diff --git a/.editorconfig b/.editorconfig index 26e3a39cfb..60827f04ba 100644 --- a/.editorconfig +++ b/.editorconfig @@ -16,6 +16,10 @@ insert_final_newline = true 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 diff --git a/.github/ISSUE_TEMPLATE/blank.md b/.github/ISSUE_TEMPLATE/blank.md index 50a32034d6..5644802ef5 100644 --- a/.github/ISSUE_TEMPLATE/blank.md +++ b/.github/ISSUE_TEMPLATE/blank.md @@ -1,5 +1,11 @@ --- name: Blank issue -about: If you're 100% sure that you don't need one of the other issue templates, use this one instead. +about: If you're 100% sure that you don't need one of the other issue templates, use + this one instead. +title: '' +labels: help wanted, question +assignees: '' --- + + diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 3c35416e04..2e64ef16dd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,12 @@ --- name: Bug report -about: Create a report to help us improve the QMK Firmware +about: Create a report to help us improve QMK Firmware. +title: "[Bug] " +labels: bug, help wanted, discussion +assignees: '' + --- + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..0d4ca035c8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: QMK Discord + url: https://discord.gg/Uq7gcHh + about: Ask questions, discuss issues and features. Chill. + - name: OLKB Subreddit + url: https://www.reddit.com/r/olkb + about: All things OLKB and QMK. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 01aeb26cec..f7eaa825b8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,12 @@ --- name: Feature request -about: Suggest a new feature or changes to existing features +about: Suggest a new feature or changes to existing features. +title: "[Feature Request] " +labels: enhancement, help wanted, discussion +assignees: '' + --- + diff --git a/.github/ISSUE_TEMPLATE/other_issues.md b/.github/ISSUE_TEMPLATE/other_issues.md index 7c4891ac31..a0060a8ca6 100644 --- a/.github/ISSUE_TEMPLATE/other_issues.md +++ b/.github/ISSUE_TEMPLATE/other_issues.md @@ -1,7 +1,12 @@ --- name: Other issues -about: Anything else that doesn't fall into the above categories. +about: Anything else that doesn't fall into the above categories. +title: '' +labels: help wanted, question, discussion +assignees: '' + --- + diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000000..b2c40591b7 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,52 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# General configuration + +# Pull request specific configuration +pulls: + staleLabel: awaiting changes + # Number of days of inactivity before an Issue or Pull Request becomes stale + daysUntilStale: 45 + # Number of days of inactivity before a stale Issue or Pull Request is closed. + # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. + daysUntilClose: 30 + # Comment to post when marking as stale. Set to `false` to disable + markComment: > + Thank you for your contribution! + + This pull request has been automatically marked as stale because it has not had + activity in the last 45 days. It will be closed in 30 days if no further activity occurs. + Please feel free to give a status update now, or re-open when it's ready. + # Comment to post when closing a stale Issue or Pull Request. + closeComment: > + Thank you for your contribution! + + This pull request has been automatically closed because it has not had activity in the last 30 days. + Please feel free to give a status update now, ping for review, or re-open when it's ready. + # Limit the number of actions per hour, from 1-30. Default is 30 + limitPerRun: 30 + exemptLabels: + - awaiting review + - breaking_change + - in progress + - on hold + +# Issue specific configuration +issues: + staleLabel: solved + limitPerRun: 10 + daysUntilStale: 90 + daysUntilClose: 30 + markComment: > + This issue has been automatically marked as resolved because it has not had activity in the + last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity + occurs. + closeComment: > + This issue has been automatically closed because it has not had activity in the last 30 days. + If this issue is still valid, re-open the issue and let us know. + exemptLabels: + - bug + - in progress + - on hold + - discussion + - to do diff --git a/.gitignore b/.gitignore index 7cd7fa8015..7b15615625 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ quantum/version.h CMakeLists.txt cmake-build-debug doxygen/ -.DS_STORE +.DS_Store /util/wsl_downloaded /util/win_downloaded /keyboards/*/Makefile @@ -60,8 +60,8 @@ util/Win_Check_Output.txt # ignore image files *.png -*.jpg *.gif +*.jpg # Do not ignore MiniDox left/right hand eeprom files !keyboards/minidox/*.eep @@ -70,3 +70,6 @@ util/Win_Check_Output.txt secrets.tar id_rsa_* /.vs + +# python things +__pycache__ diff --git a/.gitmodules b/.gitmodules index 0e870021f0..f2e96bedc8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -11,3 +11,6 @@ [submodule "lib/googletest"] path = lib/googletest url = https://github.com/google/googletest +[submodule "lib/lufa"] + path = lib/lufa + url = https://github.com/qmk/lufa diff --git a/.travis.yml b/.travis.yml index b4a76765cc..bfac998c11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ os: linux dist: trusty -sudo: required group: edge language: c branches: @@ -13,12 +12,11 @@ env: - MAKEFLAGS="-j3 --output-sync" services: - docker -before_install: - - docker build -t qmkfm/qmk_firmware . install: - npm install -g moxygen script: - git rev-parse --short HEAD + - git diff --name-only HEAD $TRAVIS_BRANCH - bash util/travis_test.sh - bash util/travis_build.sh - bash util/travis_docs.sh @@ -29,7 +27,7 @@ addons: - diffutils - dos2unix - doxygen -after_success: +after_script: bash util/travis_compiled_push.sh notifications: webhooks: diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0543f3de1e..697686cd59 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,11 @@ // Suggested extensions { "recommendations": [ - "EditorConfig.EditorConfig" + "EditorConfig.EditorConfig", + "xaver.clang-format", + "ms-vscode.cpptools", + "bierner.github-markdown-preview", + "donjayamanne.git-extension-pack", + "CoenraadS.bracket-pair-colorizer-2" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index ba5b56aa40..e5089a55ba 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,10 +8,12 @@ "**/*.hex": true }, "files.associations": { - "*.h": "c", - "*.c": "c", - "*.cpp": "cpp", - "*.hpp": "cpp", - "xstddef": "c" + "*.h": "c", + "*.c": "c", + "*.cpp": "cpp", + "*.hpp": "cpp", + "xstddef": "c", + "type_traits": "c", + "utility": "c" } } diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d5d8b01de5..c9e3e0586a 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -8,8 +8,17 @@ Our users, contributors, and collaborators are expected to treat each other with * The use of sexualized language or imagery * Unwelcome advances, sexual or otherwise +* Deliberate intimidation, stalking, or following * Insults or derogatory comments, or personal or political attacks * Publishing others’ private information without explicit permission +* Sustained disruption of talks or other events * Other conduct which could reasonably be considered inappropriate in a professional setting +* Advocating for, or encouraging, any of the above behaviour -If someone is violating this Code of Conduct you may email hello@qmk.fm to bring your concern to the Members. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. +# Reporting + +If someone is violating this Code of Conduct, please email hello@qmk.fm or reach out to one of the Collaborators to bring it to our attention. All complaints will be reviewed and investigated. + +QMK will seek to use the least punitive means available to resolve an issue. If the circumstances require asking an offender to leave, we will do that. + +Reports will be taken and kept in strict confidence. You will not be required to confront an offender directly. diff --git a/Dockerfile b/Dockerfile index f15eb2ee36..17831c4ec3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,4 @@ -FROM debian:9 - -RUN apt-get update && apt-get install --no-install-recommends -y \ - avr-libc \ - avrdude \ - binutils-arm-none-eabi \ - binutils-avr \ - build-essential \ - dfu-programmer \ - dfu-util \ - gcc \ - gcc-avr \ - git \ - libnewlib-arm-none-eabi \ - software-properties-common \ - unzip \ - wget \ - zip \ - && rm -rf /var/lib/apt/lists/* - -# upgrade gcc-arm-none-eabi from the default 5.4.1 to 6.3.1 due to ARM runtime issues -RUN wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -O - | \ - tar xj --strip-components=1 -C / +FROM qmkfm/base_container VOLUME /qmk_firmware WORKDIR /qmk_firmware diff --git a/Makefile b/Makefile index a6c3ee35b7..8f02eea049 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,10 @@ endif override SILENT := false ifndef SUB_IS_SILENT -QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null) +ifndef SKIP_GIT + QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null) +endif + ifneq ($(QMK_VERSION),) $(info QMK Firmware $(QMK_VERSION)) endif @@ -94,6 +97,7 @@ $(eval $(call NEXT_PATH_ELEMENT)) # endif define GET_KEYBOARDS +ifndef ALT_GET_KEYBOARDS All_RULES_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk)) All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk)) All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/rules.mk)) @@ -105,6 +109,9 @@ define GET_KEYBOARDS KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/keymaps/*/rules.mk)) KEYBOARDS := $$(sort $$(filter-out $$(KEYMAPS_MK), $$(All_RULES_MK))) +else + KEYBOARDS := $(shell find keyboards/ -type f -iname "rules.mk" | grep -v keymaps | sed 's!keyboards/\(.*\)/rules.mk!\1!' | sort | uniq) +endif endef $(eval $(call GET_KEYBOARDS)) @@ -265,12 +272,14 @@ define PARSE_RULE # If the rule starts with all, then continue the parsing from # PARSE_ALL_KEYBOARDS ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true) + KEYBOARD_RULE=all $$(eval $$(call PARSE_ALL_KEYBOARDS)) else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true) $$(eval $$(call PARSE_TEST)) # If the rule starts with the name of a known keyboard, then continue # the parsing from PARSE_KEYBOARD else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true) + KEYBOARD_RULE=$$(MATCHED_ITEM) $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM))) # Otherwise use the KEYBOARD variable, which is determined either by # the current directory you run make from, or passed in as an argument @@ -364,12 +373,18 @@ define PARSE_KEYBOARD # The same if all was specified else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true) $$(eval $$(call PARSE_ALL_KEYMAPS)) + # List all keymaps for the given keyboard + else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,list-keymaps),true) + $$(eval $$(call LIST_ALL_KEYMAPS)) # Try to match the specified keyamp with the list of known keymaps else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true) $$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM))) # Otherwise try to match the keymap from the current folder, or arguments to the make command else ifneq ($$(KEYMAP),) $$(eval $$(call PARSE_KEYMAP,$$(KEYMAP))) + # Otherwise if we are running make all: just skip + else ifeq ($$(KEYBOARD_RULE),all) + # $$(info Skipping: No user keymap for $$(CURRENT_KB)) # Otherwise, make all keymaps, again this is consistent with how it works without # any arguments else @@ -400,6 +415,16 @@ endef # endif # endef +# Prints a list of all known keymaps for the given keyboard +define LIST_ALL_KEYMAPS + COMMAND_true_LIST_KEYMAPS := \ + printf "$$(KEYMAPS)\n"; + COMMAND_false_LIST_KEYMAPS := \ + printf "$$(MSG_AVAILABLE_KEYMAPS)\n"; \ + printf "$$(KEYMAPS)\n"; + COMMANDS += LIST_KEYMAPS +endef + # $1 Keymap # This is the meat of compiling a keyboard, when entering this, everything is known # keyboard, subproject, and keymap @@ -538,9 +563,10 @@ endef if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi # Check if the submodules are dirty, and display a warning if they are ifndef SKIP_GIT - if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi - if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi - if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi + if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi + if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi + if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi + if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi git submodule status --recursive 2>/dev/null | \ while IFS= read -r x; do \ case "$$x" in \ diff --git a/Vagrantfile b/Vagrantfile index 552711d632..dae4e0d53d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -52,26 +52,37 @@ Vagrant.configure(2) do |config| end # Docker provider pulls from hub.docker.com respecting docker.image if - # config.vm.box is nil. Note that this bind-mounts from the current dir to + # config.vm.box is nil. In this case, we adhoc build util/vagrant/Dockerfile. + # Note that this bind-mounts from the current dir to # /vagrant in the guest, so unless your UID is 1000 to match vagrant in the # image, you'll need to: chmod -R a+rw . config.vm.provider "docker" do |docker, override| override.vm.box = nil - docker.image = "jesselang/debian-vagrant:stretch" + docker.build_dir = "util/vagrant" docker.has_ssh = true end - # This script ensures the required packages for AVR programming are installed - # It also ensures the system always gets the latest updates when powered on - # If this causes issues you can run a 'vagrant destroy' and then - # add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working - # non-updated box and then attempt to troubleshoot or open a Github issue - config.vm.provision "shell", inline: "/vagrant/util/qmk_install.sh", run: "always" + # Unless we are running the docker container directly + # 1. run container detached on vm + # 2. attach on 'vagrant ssh' + ["virtualbox", "vmware_workstation", "vmware_fusion"].each do |type| + config.vm.provider type do |virt, override| + override.vm.provision "docker" do |d| + d.run "qmkfm/base_container", + cmd: "tail -f /dev/null", + args: "--privileged -v /dev:/dev -v '/vagrant:/vagrant'" + end + + override.vm.provision "shell", inline: <<-SHELL + echo 'docker restart qmkfm-base_container && exec docker exec -it qmkfm-base_container /bin/bash -l' >> ~vagrant/.bashrc + SHELL + end + end config.vm.post_up_message = <<-EOT - Log into the VM using 'vagrant ssh'. QMK directory synchronized with host is - located at /vagrant + Log into the environment using 'vagrant ssh'. QMK directory synchronized with + host is located at /vagrant To compile the .hex files use make command inside this directory, e.g. cd /vagrant make :default diff --git a/bin/qmk b/bin/qmk new file mode 100755 index 0000000000..4d5b3d884f --- /dev/null +++ b/bin/qmk @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +"""CLI wrapper for running QMK commands. +""" +import os +import subprocess +import sys +from importlib.util import find_spec +from time import strftime + +# Add the QMK python libs to our path +script_dir = os.path.dirname(os.path.realpath(__file__)) +qmk_dir = os.path.abspath(os.path.join(script_dir, '..')) +python_lib_dir = os.path.abspath(os.path.join(qmk_dir, 'lib', 'python')) +sys.path.append(python_lib_dir) + +# Make sure our modules have been setup +with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd: + for line in fd.readlines(): + line = line.strip().replace('<', '=').replace('>', '=') + + if line[0] == '#': + continue + + if '#' in line: + line = line.split('#')[0] + + module = line.split('=')[0] if '=' in line else line + if not find_spec(module): + print('Could not find module %s!' % module) + print('Please run `pip3 install -r requirements.txt` to install the python dependencies.') + exit(255) + +# Figure out our version +# TODO(skullydazed/anyone): Find a method that doesn't involve git. This is slow in docker and on windows. +command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags'] +result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + +if result.returncode == 0: + os.environ['QMK_VERSION'] = result.stdout.strip() +else: + os.environ['QMK_VERSION'] = 'nogit-' + strftime('%Y-%m-%d-%H:%M:%S') + '-dirty' + +# Setup the CLI +import milc # noqa + +milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}' + + +@milc.cli.entrypoint('QMK Helper Script') +def qmk_main(cli): + """The function that gets run when no subcommand is provided. + """ + cli.print_help() + + +def main(): + """Setup our environment and then call the CLI entrypoint. + """ + # Change to the root of our checkout + os.environ['ORIG_CWD'] = os.getcwd() + os.chdir(qmk_dir) + + # Import the subcommands + import qmk.cli # noqa + + # Execute + return_code = milc.cli() + + if return_code is False: + exit(1) + + elif return_code is not True and isinstance(return_code, int): + if return_code < 0 or return_code > 255: + milc.cli.log.error('Invalid return_code: %d', return_code) + exit(255) + + exit(return_code) + + exit(0) + + +if __name__ == '__main__': + main() diff --git a/bootloader.mk b/bootloader.mk index 4bcf183fb7..d615533947 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -19,12 +19,14 @@ # # Sets the bootloader defined in the keyboard's/keymap's rules.mk # Current options: -# atmel-dfu -# lufa-dfu -# qmk-dfu -# halfkay -# caterina -# bootloadHID +# +# halfkay PJRC Teensy +# caterina Pro Micro (Sparkfun/generic) +# atmel-dfu Atmel factory DFU +# lufa-dfu LUFA DFU +# qmk-dfu QMK DFU (LUFA + blinkenlight) +# bootloadHID HIDBootFlash compatible (ATmega32A) +# USBasp USBaspLoader (ATmega328P) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -32,40 +34,40 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 4096 + ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + BOOTLOADER_SIZE = 4096 endif ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 8192 + BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 4096 + ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + BOOTLOADER_SIZE = 4096 endif ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 8192 + BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 4096 + ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + BOOTLOADER_SIZE = 4096 endif ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 8192 + BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), halfkay) OPT_DEFS += -DBOOTLOADER_HALFKAY ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 512 + BOOTLOADER_SIZE = 512 endif ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 1024 + BOOTLOADER_SIZE = 1024 endif endif ifeq ($(strip $(BOOTLOADER)), caterina) @@ -76,6 +78,10 @@ ifeq ($(strip $(BOOTLOADER)), bootloadHID) OPT_DEFS += -DBOOTLOADER_BOOTLOADHID BOOTLOADER_SIZE = 4096 endif +ifeq ($(strip $(BOOTLOADER)), USBasp) + OPT_DEFS += -DBOOTLOADER_USBASP + BOOTLOADER_SIZE = 4096 +endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) diff --git a/build_json.mk b/build_json.mk new file mode 100644 index 0000000000..3e7dc95c0c --- /dev/null +++ b/build_json.mk @@ -0,0 +1,26 @@ +# Look for a json keymap file +ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","") + KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c + KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) +else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","") + KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c + KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) +else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","") + KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c + KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) +else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","") + KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c + KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) +else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","") + KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c + KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) +endif + +# Generate the keymap.c +$(KEYBOARD_OUTPUT)/src/keymap.c: + bin/qmk json-keymap --quiet --output $(KEYMAP_C) $(KEYMAP_JSON) diff --git a/build_keyboard.mk b/build_keyboard.mk index 213cb44456..b086420653 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -98,31 +98,38 @@ MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP) MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP) MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP) -ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_5)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) -else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_4)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) -else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_3)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) -else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_2)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) -else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_1)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) -else ifneq ($(LAYOUTS),) - include build_layout.mk -else - $(error Could not find keymap) - # this state should never be reached +# Check for keymap.json first, so we can regenerate keymap.c +include build_json.mk + +ifeq ("$(wildcard $(KEYMAP_PATH))", "") + # Look through the possible keymap folders until we find a matching keymap.c + ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_5)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) + else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_4)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) + else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_3)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) + else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_2)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) + else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_1)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) + else ifneq ($(LAYOUTS),) + # If we haven't found a keymap yet fall back to community layouts + include build_layout.mk + else + $(error Could not find keymap) + # this state should never be reached + endif endif ifeq ($(strip $(CTPC)), yes) @@ -313,7 +320,6 @@ ifneq ("$(wildcard $(USER_PATH)/config.h)","") CONFIG_H += $(USER_PATH)/config.h endif - # Object files directory # To put object files in current directory, use a dot (.), do NOT make # this an empty or blank macro! @@ -323,7 +329,7 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","") CONFIG_H += $(KEYMAP_PATH)/config.h endif -# # project specific files +# project specific files SRC += $(KEYBOARD_SRC) \ $(KEYMAP_C) \ $(QUANTUM_SRC) @@ -392,6 +398,7 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) all: build check-size build: elf cpfirmware check-size: build +objs-size: build include show_options.mk include $(TMK_PATH)/rules.mk diff --git a/common_features.mk b/common_features.mk index 3296424a11..e50207b0b4 100644 --- a/common_features.mk +++ b/common_features.mk @@ -112,7 +112,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER else - SRC += ws2812.c + WS2812_DRIVER_REQUIRED = yes endif endif @@ -176,7 +176,7 @@ endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) OPT_DEFS += -DWS2812 - SRC += ws2812.c + WS2812_DRIVER_REQUIRED = yes endif ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) @@ -229,12 +229,59 @@ ifeq ($(strip $(LCD_ENABLE)), yes) CIE1931_CURVE = yes endif -ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) +# backward compat +ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) + BACKLIGHT_ENABLE = custom +endif + +VALID_BACKLIGHT_TYPES := yes software custom + +BACKLIGHT_ENABLE ?= no +ifneq ($(strip $(BACKLIGHT_ENABLE)), no) + ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),) + $(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type) + endif + ifeq ($(strip $(VISUALIZER_ENABLE)), yes) CIE1931_CURVE = yes endif - ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) - OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER + + COMMON_VPATH += $(QUANTUM_DIR)/backlight + SRC += $(QUANTUM_DIR)/backlight/backlight.c + OPT_DEFS += -DBACKLIGHT_ENABLE + + ifeq ($(strip $(BACKLIGHT_ENABLE)), software) + SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c + else + ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) + OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER + endif + + ifeq ($(PLATFORM),AVR) + SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c + else + SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c + endif + endif +endif + +VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c + +WS2812_DRIVER ?= bitbang +ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) + ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),) + $(error WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver) + endif + + ifeq ($(strip $(WS2812_DRIVER)), bitbang) + SRC += ws2812.c + else + SRC += ws2812_$(strip $(WS2812_DRIVER)).c + endif + + # add extra deps + ifeq ($(strip $(WS2812_DRIVER)), i2c) + QUANTUM_LIB_SRC += i2c_master.c endif endif @@ -267,20 +314,21 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes) OPT_DEFS += -DENCODER_ENABLE endif -ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L) - COMMON_VPATH += $(DRIVER_PATH)/haptic - SRC += haptic.c +HAPTIC_ENABLE ?= no +ifneq ($(strip $(HAPTIC_ENABLE)),no) + COMMON_VPATH += $(DRIVER_PATH)/haptic + SRC += haptic.c + OPT_DEFS += -DHAPTIC_ENABLE +endif + +ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), ) SRC += DRV2605L.c QUANTUM_LIB_SRC += i2c_master.c - OPT_DEFS += -DHAPTIC_ENABLE OPT_DEFS += -DDRV2605L endif -ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID) - COMMON_VPATH += $(DRIVER_PATH)/haptic - SRC += haptic.c +ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), ) SRC += solenoid.c - OPT_DEFS += -DHAPTIC_ENABLE OPT_DEFS += -DSOLENOID_ENABLE endif @@ -358,3 +406,13 @@ ifeq ($(strip $(SPACE_CADET_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c OPT_DEFS += -DSPACE_CADET_ENABLE endif + +ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/dip_switch.c + OPT_DEFS += -DDIP_SWITCH_ENABLE +endif + +ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c + OPT_DEFS += -DDYNAMIC_MACRO_ENABLE +endif diff --git a/docs/ChangeLog/20190830.md b/docs/ChangeLog/20190830.md new file mode 100644 index 0000000000..bd2d5e19c3 --- /dev/null +++ b/docs/ChangeLog/20190830.md @@ -0,0 +1,53 @@ +# QMK Breaking Change - 2019 Aug 30 + +Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps. + +This document marks the inaugural Breaking Change merge. A list of changes follows. + +## Core code formatting with clang-format + +* All core files (`drivers/`, `quantum/`, `tests/`, and `tmk_core/`) have been formatted with clang-format +* A travis process to reformat PR's on merge has been instituted +* You can use the new CLI command `qmk cformat` to format before submitting your PR if you wish. + +## LUFA USB descriptor cleanup + +* Some code cleanups related to the USB HID descriptors on AVR keyboards, to make them easier to read and understand +* More information: see https://github.com/qmk/qmk_firmware/pull/4871 +* No behaviour changes anticipated and no keymaps modified + +## Migrating `ACTION_LAYER_MOMENTARY()` entries in `fn_actions` to `MO()` keycodes + +* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()` +* The end result of removing this obsolete feature should result in a decent reduction in firmware size and code complexity +* All keymaps affected are recommended to switch away from `fn_actions` in favour of the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features + +## Update Atreus to current code conventions + +* Duplicate include guards have bypassed the expected header processing behavior +* All keymaps affected are recommended to remove duplication of `/config.h` to `/keymaps//config.h` and only provide overrides at the keymap level + +## Backport changes to keymap language files from ZSA fork + +* Fixes an issue in the `keymap_br_abnt2.h` file that includes the wrong source (`keymap_common.h` instead of `keymap.h`) +* Updates the `keymap_swedish.h` file to be specific to swedish, and not just "nordic" in general. +* Any keymaps using this will need to remove `NO_*` and replace it with `SE_*`. + +## Update repo to use LUFA as a git submodule + +* `/lib/LUFA` removed from the repo +* LUFA set as a submodule, pointing to qmk/lufa +* This should allow more flexibility with LUFA, and allow us to keep the sub-module up to date, a lot more easily. It was ~2 years out of date with no easy path to fix that. This prevents that from being an issue in the future + +## Migrating `ACTION_BACKLIGHT_*()` entries in `fn_actions` to `BL_` keycodes + +* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()` +* All keymaps using these actions have had the relevant `KC_FN*` keys replaced with the equivalent `BL_*` keys +* If you currently use `KC_FN*` you will need to replace `fn_actions` with the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features + +## Remove `KC_DELT` alias in favor of `KC_DEL` + +* `KC_DELT` was a redundant, undocumented alias for `KC_DELETE` +* It has been removed and all its uses replaced with the more common `KC_DEL` alias +* Around 90 keymaps (mostly for ErgoDox boards) have been modified as a result + diff --git a/docs/LANGS.md b/docs/LANGS.md deleted file mode 100644 index 4b48f2d3d8..0000000000 --- a/docs/LANGS.md +++ /dev/null @@ -1,4 +0,0 @@ -# Languages - -* [English](/) -* [Chinese](zh/) diff --git a/docs/README.md b/docs/README.md index 22ab243cd2..9f9ca166bd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,7 +15,7 @@ QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains Q If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork. -Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`git@github.com:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`). +Otherwise, you can clone it directly with `git clone https://github.com/qmk/qmk_firmware`. Do not download the zip or tar files; a git repository is required to download the submodules in order to compile. ## How to Compile diff --git a/docs/_langs.md b/docs/_langs.md new file mode 100644 index 0000000000..7fb4a29d33 --- /dev/null +++ b/docs/_langs.md @@ -0,0 +1,8 @@ +- Translations + - [:uk: English](/) + - [:cn: 中文](/zh-cn/) + - [:es: Español](/es/) + - [:fr: Français](/fr-fr/) + - [:he: עברית](/he-il/) + - [:ru: Русский](/ru-ru/) + - [:jp: 日本語](/ja/) diff --git a/docs/_summary.md b/docs/_summary.md index 8a40ccd7f2..808a8de4a0 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -8,15 +8,21 @@ * [QMK Basics](README.md) * [QMK Introduction](getting_started_introduction.md) + * [QMK CLI](cli.md) + * [QMK CLI Config](cli_configuration.md) * [Contributing to QMK](contributing.md) * [How to Use Github](getting_started_github.md) * [Getting Help](getting_started_getting_help.md) +* [Breaking Changes](breaking_changes.md) + * [2019 Aug 30](ChangeLog/20190830.md) + * [FAQ](faq.md) * [General FAQ](faq_general.md) * [Build/Compile QMK](faq_build.md) * [Debugging/Troubleshooting QMK](faq_debug.md) * [Keymap](faq_keymap.md) + * [Driver Installation with Zadig](driver_installation_zadig.md) * Detailed Guides * [Install Build Tools](getting_started_build_tools.md) @@ -27,6 +33,7 @@ * [Keymap Overview](keymap.md) * [Hardware](hardware.md) + * [Compatible Microcontrollers](compatible_microcontrollers.md) * [AVR Processors](hardware_avr.md) * [Drivers](hardware_drivers.md) @@ -34,6 +41,8 @@ * [Keyboard Guidelines](hardware_keyboard_guidelines.md) * [Config Options](config_options.md) * [Keycodes](keycodes.md) + * [Coding Conventions - C](coding_conventions_c.md) + * [Coding Conventions - Python](coding_conventions_python.md) * [Documentation Best Practices](documentation_best_practices.md) * [Documentation Templates](documentation_templates.md) * [Glossary](reference_glossary.md) @@ -41,6 +50,7 @@ * [Useful Functions](ref_functions.md) * [Configurator Support](reference_configurator_support.md) * [info.json Format](reference_info_json.md) + * [Python CLI Development](cli_development.md) * [Features](features.md) * [Basic Keycodes](keycodes_basic.md) @@ -55,6 +65,7 @@ * [Combos](feature_combo.md) * [Command](feature_command.md) * [Debounce API](feature_debounce_type.md) + * [DIP Switch](feature_dip_switch.md) * [Dynamic Macros](feature_dynamic_macros.md) * [Encoders](feature_encoders.md) * [Grave Escape](feature_grave_esc.md) @@ -73,6 +84,7 @@ * [RGB Lighting](feature_rgblight.md) * [RGB Matrix](feature_rgb_matrix.md) * [Space Cadet](feature_space_cadet.md) + * [Split Keyboard](feature_split_keyboard.md) * [Stenography](feature_stenography.md) * [Swap Hands](feature_swap_hands.md) * [Tap Dance](feature_tap_dance.md) @@ -87,6 +99,7 @@ * [ISP Flashing Guide](isp_flashing_guide.md) * [ARM Debugging Guide](arm_debugging.md) * [I2C Driver](i2c_driver.md) + * [WS2812 Driver](ws2812_driver.md) * [GPIO Controls](internals_gpio_control.md) * [Proton C Conversion](proton_c_conversion.md) @@ -98,6 +111,7 @@ * [Using Eclipse with QMK](other_eclipse.md) * [Using VSCode with QMK](other_vscode.md) * [Support](support.md) + * [How to add translations](translating.md) * QMK Internals (In Progress) * [Defines](internals_defines.md) diff --git a/docs/arm_debugging.md b/docs/arm_debugging.md index 491dfe8ad7..448b7a8fcc 100644 --- a/docs/arm_debugging.md +++ b/docs/arm_debugging.md @@ -6,15 +6,15 @@ This guide is catered towards advance users and assumes you can compile an ARM c ## Installing the software -The main objective here is to get the MCU Eclipse IDE correcly installed on our machine. The necesarry instructions are derived from [this](https://gnu-mcu-eclipse.github.io/install/) install guide. +The main objective here is to get the MCU Eclipse IDE correctly installed on our machine. The necessary instructions are derived from [this](https://gnu-mcu-eclipse.github.io/install/) install guide. ### The xPack Manager -This tool is a software package manager and it is used to help us get the necesarry depencencies. +This tool is a software package manager and it is used to help us get the necessary dependencies. -XPM runs using Node.js so grab that form [here](https://nodejs.org/en/). After installation, open a terminal and type `npm -v`. A reply with the version number means that the instalation was successful. +XPM runs using Node.js so grab that from [here](https://nodejs.org/en/). After installation, open a terminal and type `npm -v`. A reply with the version number means that the installation was successful. -XPM instalation instructions can be found [here](https://www.npmjs.com/package/xpm) and are OS specific. Entering `xpm --version` to your terminal should return the software version. +XPM installation instructions can be found [here](https://www.npmjs.com/package/xpm) and are OS specific. Entering `xpm --version` to your terminal should return the software version. ### The ARM Toolchain @@ -26,10 +26,10 @@ If you are using windows you need to install this! `xpm install --global @gnu-mcu-eclipse/windows-build-tools` -### Programer/Debugger Drivers +### Programmer/Debugger Drivers -Now its the time to install your programer's drivers. This tutorial was made using an ST-Link v2 which you can get from almost anywhere. -If you have an ST-Link the drivers can be found [here](https://www.st.com/en/development-tools/stsw-link009.html) otherwise consult the manufuturer of your tool. +Now it's time to install your programmer's drivers. This tutorial was made using an ST-Link v2 which you can get from almost anywhere. +If you have an ST-Link the drivers can be found [here](https://www.st.com/en/development-tools/stsw-link009.html) otherwise consult the manufacturer of your tool. ### OpenOCD @@ -84,4 +84,4 @@ Reset your keyboard. Press the bug icon and if all goes well you should soon find yourself in the debug perspective. Here the program counter will pause at the beginning of the main function and way for you to press Play. Most of the features of all debuggers work on ARM MCUs but for exact details google is your friend! -Happy debugging! \ No newline at end of file +Happy debugging! diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md new file mode 100644 index 0000000000..b5bcb7a1c7 --- /dev/null +++ b/docs/breaking_changes.md @@ -0,0 +1,107 @@ +# Breaking Changes + +This document describes QMK's Breaking Change process. A Breaking Change is any change which modifies how QMK behaves in a way that in incompatible or potentially dangerous. We limit these changes so that users can have confidence that updating their QMK tree will not break their keymaps. + +The breaking change period is when we will merge PR's that change QMK in dangerous or unexpected ways. There is a built-in period of testing so we are confident that any problems caused are rare or unable to be predicted. + +## What has been included in past Breaking Changes? + +* [2019 Aug 30](ChangeLog/20190830.md) + +## When is the next Breaking Change? + +The next Breaking Change is scheduled for Nov 29. + +### Important Dates + +* [x] 2019 Sep 21 - `future` is created. It will be rebased weekly. +* [ ] 2019 Nov 01 - `future` closed to new PR's. +* [ ] 2019 Nov 01 - Call for testers. +* [ ] 2019 Nov 27 - `master` is locked, no PR's merged. +* [ ] 2019 Nov 29 - Merge `future` to `master`. +* [ ] 2019 Nov 30 - `master` is unlocked. PR's can be merged again. + +## What changes will be included? + +To see a list of breaking change candidates you can look at the [`breaking_change` label](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). New changes might be added between now and when `future` is closed, and a PR with that label applied is not guaranteed to be merged. + +If you want your breaking change to be included in this round you need to create a PR with the `breaking_change` label and have it accepted before `future` closes. After `future` closes no new breaking changes will be accepted. + +Criteria for acceptance: + +* PR is complete and ready to merge +* PR has a ChangeLog + +# Checklists + +This section documents various processes we use when running the Breaking Changes process. + +## Rebase `future` from `master` + +This is run every Friday while `future` is open. + +Process: + +``` +cd qmk_firmware +git checkout master +git pull --ff-only +git checkout future +git rebase master +git push --force +``` + +## Creating the `future` branch + +This happens immediately after the previous `future` branch is merged. + +* `qmk_firmware` git commands + * [ ] `git checkout master` + * [ ] `git pull --ff-only` + * [ ] `git checkout -b future` + * [ ] Edit `readme.md` + * [ ] Add a big notice at the top that this is a testing branch. + * [ ] Include a link to this document + * [ ] `git commit -m 'Branch point for Breaking Change'` + * [ ] `git tag breakpoint___
` + * [ ] `git tag ` # Prevent the breakpoint tag from confusing version incrementing + * [ ] `git push origin future` + * [ ] `git push --tags` + +## 4 Weeks Before Merge + +* `future` is now closed to new PR's, only fixes for current PR's may be merged +* Post call for testers + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## 1 Week Before Merge + +* Announce that master will be closed from <2 Days Before> to + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## 2 Days Before Merge + +* Announce that master is closed for 2 days + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## Day Of Merge + +* `qmk_firmware` git commands + * [ ] `git checkout future` + * [ ] `git pull --ff-only` + * [ ] `git rebase origin/master` + * [ ] Edit `readme.md` + * [ ] Remove the notes about `future` + * [ ] Roll up the ChangeLog into one file. + * [ ] `git commit -m 'Merge point for Breaking Change'` + * [ ] `git push origin future` +* Github Actions + * [ ] Create a PR for `future` + * [ ] Make sure travis comes back clean + * [ ] Merge `future` PR diff --git a/docs/cli.md b/docs/cli.md new file mode 100644 index 0000000000..1c09527221 --- /dev/null +++ b/docs/cli.md @@ -0,0 +1,222 @@ +# QMK CLI + +This page describes how to setup and use the QMK CLI. + +# Overview + +The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more. + +* [Global CLI](#global-cli) +* [Local CLI](#local-cli) +* [CLI Commands](#cli-commands) + +# Requirements + +The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). + +# Global CLI + +QMK provides an installable CLI that can be used to setup your QMK build environment, work with QMK, and which makes working with multiple copies of `qmk_firmware` easier. We recommend installing and updating this periodically. + +## Install Using Homebrew (macOS, some Linux) + +If you have installed [Homebrew](https://brew.sh) you can tap and install QMK: + +``` +brew tap qmk/qmk +brew install qmk +export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware` +qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment +``` + +## Install Using easy_install or pip + +If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command: + +``` +pip3 install qmk +export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware` +qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment +``` + +## Packaging For Other Operating Systems + +We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines: + +* Follow best practices for your OS when they conflict with these guidelines + * Document why in a comment when you do deviate +* Install using a virtualenv +* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`. + +# Local CLI + +If you do not want to use the global CLI there is a local CLI bundled with `qmk_firmware`. You can find it in `qmk_firmware/bin/qmk`. You can run the `qmk` command from any directory and it will always operate on that copy of `qmk_firmware`. + +**Example**: + +``` +$ ~/qmk_firmware/bin/qmk hello +Ψ Hello, World! +``` + +## Local CLI Limitations + +There are some limitations to the local CLI compared to the global CLI: + +* The local CLI does not support `qmk setup` or `qmk clone` +* The local CLI always operates on the same `qmk_firmware` tree, even if you have multiple repositories cloned. +* The local CLI does not run in a virtualenv, so it's possible that dependencies will conflict + +# CLI Commands + +## `qmk cformat` + +This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files. + +**Usage**: + +``` +qmk cformat [file1] [file2] [...] [fileN] +``` + +## `qmk compile` + +This command allows you to compile firmware from any directory. You can compile JSON exports from or compile keymaps in the repo. + +**Usage for Configurator Exports**: + +``` +qmk compile +``` + +**Usage for Keymaps**: + +``` +qmk compile -kb -km +``` + +## `qmk flash` + +This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. +To specify a different bootloader, use `-bl `. Visit +for more details of the available bootloaders. + +**Usage for Configurator Exports**: + +``` +qmk flash -bl +``` + +**Usage for Keymaps**: + +``` +qmk flash -kb -km -bl +``` + +**Listing the Bootloaders** + +``` +qmk flash -b +``` + +## `qmk config` + +This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md). + +**Usage**: + +``` +qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] +``` + +## `qmk docs` + +This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. + +**Usage**: + +``` +qmk docs [-p PORT] +``` + +## `qmk doctor` + +This command examines your environment and alerts you to potential build or flash problems. + +**Usage**: + +``` +qmk doctor +``` + +## `qmk json-keymap` + +Creates a keymap.c from a QMK Configurator export. + +**Usage**: + +``` +qmk json-keymap [-o OUTPUT] filename +``` + +## `qmk kle2json` + +This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite. + +**Usage**: + +``` +qmk kle2json [-f] +``` + +**Examples**: + +``` +$ qmk kle2json kle.txt +☒ File info.json already exists, use -f or --force to overwrite. +``` + +``` +$ qmk kle2json -f kle.txt -f +Ψ Wrote out to info.json +``` + +## `qmk list-keyboards` + +This command lists all the keyboards currently defined in `qmk_firmware` + +**Usage**: + +``` +qmk list-keyboards +``` + +## `qmk new-keymap` + +This command creates a new keymap based on a keyboard's existing default keymap. + +**Usage**: + +``` +qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] +``` + +## `qmk pyformat` + +This command formats python code in `qmk_firmware`. + +**Usage**: + +``` +qmk pyformat +``` + +## `qmk pytest` + +This command runs the python test suite. If you make changes to python code you should ensure this runs successfully. + +**Usage**: + +``` +qmk pytest +``` diff --git a/docs/cli_configuration.md b/docs/cli_configuration.md new file mode 100644 index 0000000000..ad9ff291c8 --- /dev/null +++ b/docs/cli_configuration.md @@ -0,0 +1,121 @@ +# QMK CLI Configuration + +This document explains how `qmk config` works. + +# Introduction + +Configuration for QMK CLI is a key/value system. Each key consists of a subcommand and an argument name separated by a period. This allows for a straightforward and direct translation between config keys and the arguments they set. + +## Simple Example + +As an example let's look at the command `qmk compile --keyboard clueboard/66/rev4 --keymap default`. + +There are two command line arguments that could be read from configuration instead: + +* `compile.keyboard` +* `compile.keymap` + +Let's set these now: + +``` +$ qmk config compile.keyboard=clueboard/66/rev4 compile.keymap=default +compile.keyboard: None -> clueboard/66/rev4 +compile.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +Now I can run `qmk compile` without specifying my keyboard and keymap each time. + +## Setting User Defaults + +Sometimes you want to share a setting between multiple commands. For example, multiple commands take the argument `--keyboard`. Rather than setting this value for every command you can set a user value which will be used by any command that takes that argument. + +Example: + +``` +$ qmk config user.keyboard=clueboard/66/rev4 user.keymap=default +user.keyboard: None -> clueboard/66/rev4 +user.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +# CLI Documentation (`qmk config`) + +The `qmk config` command is used to interact with the underlying configuration. When run with no argument it shows the current configuration. When arguments are supplied they are assumed to be configuration tokens, which are strings containing no spaces with the following form: + + [.][=] + +## Setting Configuration Values + +You can set configuration values by putting an equal sign (=) into your config key. The key must always be the full `
.` form. + +Example: + +``` +$ qmk config default.keymap=default +default.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +## Reading Configuration Values + +You can read configuration values for the entire configuration, a single key, or for an entire section. You can also specify multiple keys to display more than one value. + +### Entire Configuration Example + + qmk config + +### Whole Section Example + + qmk config compile + +### Single Key Example + + qmk config compile.keyboard + +### Multiple Keys Example + + qmk config user compile.keyboard compile.keymap + +## Deleting Configuration Values + +You can delete a configuration value by setting it to the special string `None`. + +Example: + +``` +$ qmk config default.keymap=None +default.keymap: default -> None +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +## Multiple Operations + +You can combine multiple read and write operations into a single command. They will be executed and displayed in order: + +``` +$ qmk config compile default.keymap=default compile.keymap=None +compile.keymap=skully +compile.keyboard=clueboard/66_hotswap/gen1 +default.keymap: None -> default +compile.keymap: skully -> None +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +# User Configuration Options + +| Key | Default Value | Description | +|-----|---------------|-------------| +| user.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) | +| user.keymap | None | The keymap name (Example: `default`) | +| user.name | None | The user's github username. | + +# All Configuration Options + +| Key | Default Value | Description | +|-----|---------------|-------------| +| compile.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) | +| compile.keymap | None | The keymap name (Example: `default`) | +| hello.name | None | The name to greet when run. | +| new_keyboard.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) | +| new_keyboard.keymap | None | The keymap name (Example: `default`) | diff --git a/docs/cli_development.md b/docs/cli_development.md new file mode 100644 index 0000000000..cc8c59d067 --- /dev/null +++ b/docs/cli_development.md @@ -0,0 +1,207 @@ +# QMK CLI Development + +This document has useful information for developers wishing to write new `qmk` subcommands. + +# Overview + +The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None. + +# Subcommands + +[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code. + +Subcommands in the local CLI are always found in `qmk_firmware/lib/python/qmk/cli`. + +Let's start by looking at an example subcommand. This is `lib/python/qmk/cli/hello.py`: + +```python +"""QMK Python Hello World + +This is an example QMK CLI script. +""" +from milc import cli + + +@cli.argument('-n', '--name', default='World', help='Name to greet.') +@cli.subcommand('QMK Hello World.') +def hello(cli): + """Log a friendly greeting. + """ + cli.log.info('Hello, %s!', cli.config.hello.name) +``` + +First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function. + +Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator. + +# User Interaction + +MILC and the QMK CLI have several nice tools for interacting with the user. Using these standard tools will allow you to colorize your text for easier interactions, and allow the user to control when and how that information is displayed and stored. + +## Printing Text + +There are two main methods for outputting text in a subcommand- `cli.log` and `cli.echo()`. They operate in similar ways but you should prefer to use `cli.log.info()` for most general purpose printing. + +You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below. + +Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.5/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example. + +You should never use the format operator (`%`) directly, always pass values as arguments. + +### Logging (`cli.log`) + +The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong. + +The default log level is `INFO`. If the user runs `qmk -v ` the default log level will be set to `DEBUG`. + +| Function | Emoji | +|----------|-------| +| cli.log.critical | `{bg_red}{fg_white}¬_¬{style_reset_all}` | +| cli.log.error | `{fg_red}☒{style_reset_all}` | +| cli.log.warning | `{fg_yellow}⚠{style_reset_all}` | +| cli.log.info | `{fg_blue}Ψ{style_reset_all}` | +| cli.log.debug | `{fg_cyan}☐{style_reset_all}` | +| cli.log.notset | `{style_reset_all}¯\\_(o_o)_/¯` | + +### Printing (`cli.echo`) + +Sometimes you simply need to print text outside of the log system. This is appropriate if you are outputting fixed data or writing out something that should never be logged. Most of the time you should prefer `cli.log.info()` over `cli.echo`. + +### Colorizing Text + +You can colorize the output of your text by including color tokens within text. Use color to highlight, not to convey information. Remember that the user can disable color, and your subcommand should still be usable if they do. + +You should generally avoid setting the background color, unless it's integral to what you are doing. Remember that users have a lot of preferences when it comes to their terminal color, so you should pick colors that work well against both black and white backgrounds. + +Colors prefixed with 'fg' will affect the foreground (text) color. Colors prefixed with 'bg' will affect the background color. + +| Color | Background | Extended Background | Foreground | Extended Foreground| +|-------|------------|---------------------|------------|--------------------| +| Black | {bg_black} | {bg_lightblack_ex} | {fg_black} | {fg_lightblack_ex} | +| Blue | {bg_blue} | {bg_lightblue_ex} | {fg_blue} | {fg_lightblue_ex} | +| Cyan | {bg_cyan} | {bg_lightcyan_ex} | {fg_cyan} | {fg_lightcyan_ex} | +| Green | {bg_green} | {bg_lightgreen_ex} | {fg_green} | {fg_lightgreen_ex} | +| Magenta | {bg_magenta} | {bg_lightmagenta_ex} | {fg_magenta} | {fg_lightmagenta_ex} | +| Red | {bg_red} | {bg_lightred_ex} | {fg_red} | {fg_lightred_ex} | +| White | {bg_white} | {bg_lightwhite_ex} | {fg_white} | {fg_lightwhite_ex} | +| Yellow | {bg_yellow} | {bg_lightyellow_ex} | {fg_yellow} | {fg_lightyellow_ex} | + +There are also control sequences that can be used to change the behavior of +ANSI output: + +| Control Sequences | Description | +|-------------------|-------------| +| {style_bright} | Make the text brighter | +| {style_dim} | Make the text dimmer | +| {style_normal} | Make the text normal (neither `{style_bright}` nor `{style_dim}`) | +| {style_reset_all} | Reset all text attributes to default. (This is automatically added to the end of every string.) | +| {bg_reset} | Reset the background color to the user's default | +| {fg_reset} | Reset the foreground color to the user's default | + +# Arguments and Configuration + +QMK handles the details of argument parsing and configuration for you. When you add a new argument it is automatically incorporated into the config tree based on your subcommand's name and the long name of the argument. You can access this configuration in `cli.config`, using either attribute-style access (`cli.config..`) or dictionary-style access (`cli.config['']['']`). + +Under the hood QMK uses [ConfigParser](https://docs.python.org/3/library/configparser.html) to store configurations. This gives us an easy and straightforward way to represent the configuration in a human-editable way. We have wrapped access to this configuration to provide some nicities that ConfigParser does not normally have. + +## Reading Configuration Values + +You can interact with `cli.config` in all the ways you'd normally expect. For example the `qmk compile` command gets the keyboard name from `cli.config.compile.keyboard`. It does not need to know whether that value came from the command line, an environment variable, or the configuration file. + +Iteration is also supported: + +``` +for section in cli.config: + for key in cli.config[section]: + cli.log.info('%s.%s: %s', section, key, cli.config[section][key]) +``` + +## Setting Configuration Values + +You can set configuration values in the usual ways. + +Dictionary style: + +``` +cli.config['
'][''] = +``` + +Attribute style: + +``` +cli.config.
. = +``` + +## Deleting Configuration Values + +You can delete configuration values in the usual ways. + +Dictionary style: + +``` +del(cli.config['
']['']) +``` + +Attribute style: + +``` +del(cli.config.
.) +``` + +## Writing The Configuration File + +The configuration is not written out when it is changed. Most commands do not need to do this. We prefer to have the user change their configuration deliberitely using `qmk config`. + +You can use `cli.save_config()` to write out the configuration. + +## Excluding Arguments From Configuration + +Some arguments should not be propagated to the configuration file. These can be excluded by adding `arg_only=True` when creating the argument. + +Example: + +``` +@cli.argument('-o', '--output', arg_only=True, help='File to write to') +@cli.argument('filename', arg_only=True, help='Configurator JSON file') +@cli.subcommand('Create a keymap.c from a QMK Configurator export.') +def json_keymap(cli): + pass +``` + +You will only be able to access these arguments using `cli.args`. For example: + +``` +cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.output) +``` + +# Testing, and Linting, and Formatting (oh my!) + +We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `pyformat` subcommands to run these tests: + +### Testing and Linting + + qmk pytest + +### Formatting + + qmk pyformat + +## Formatting Details + +We use [yapf](https://github.com/google/yapf) to automatically format code. Our configuration is in the `[yapf]` section of `setup.cfg`. + +?> Tip- Many editors can use yapf as a plugin to automatically format code as you type. + +## Testing Details + +Our tests can be found in `lib/python/qmk/tests/`. You will find both unit and integration tests in this directory. We hope you will write both unit and integration tests for your code, but if you do not please favor integration tests. + +If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help: + + # TODO(unassigned/): Write tests + +We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions. + +## Linting Details + +We use flake8 to lint our code. Your code should pass flake8 before you open a PR. This will be checked when you run `qmk pytest` and by CI when you submit a PR. diff --git a/docs/coding_conventions_c.md b/docs/coding_conventions_c.md new file mode 100644 index 0000000000..08994bfbb7 --- /dev/null +++ b/docs/coding_conventions_c.md @@ -0,0 +1,58 @@ +# Coding Conventions (C) + +Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines: + +* We indent using four (4) spaces (soft tabs) +* We use a modified One True Brace Style + * Opening Brace: At the end of the same line as the statement that opens the block + * Closing Brace: Lined up with the first character of the statement that opens the block + * Else If: Place the closing brace at the beginning of the line and the next opening brace at the end of the same line. + * Optional Braces: Always include optional braces. + * Good: if (condition) { return false; } + * Bad: if (condition) return false; +* We encourage use of C style comments: `/* */` + * Think of them as a story describing the feature + * Use them liberally to explain why particular decisions were made. + * Do not write obvious comments + * If you not sure if a comment is obvious, go ahead and include it. +* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns. +* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`) +* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)` + * If you are not sure which to prefer use the `#if defined(DEFINED)` form. + * Do not change existing code from one style to the other, except when moving to a multiple condition `#if`. + * Do not put whitespace between `#` and `if`. + * When deciding how (or if) to indent directives keep these points in mind: + * Readability is more important than consistency. + * Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying. + * When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code. + +Here is an example for easy reference: + +```c +/* Enums for foo */ +enum foo_state { + FOO_BAR, + FOO_BAZ, +}; + +/* Returns a value */ +int foo(void) { + if (some_condition) { + return FOO_BAR; + } else { + return -1; + } +} +``` + +# Auto-formatting with clang-format + +[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) is part of LLVM and can automatically format your code for you, because ain't nobody got time to do it manually. We supply a configuration file for it that applies most of the coding conventions listed above. It will only change whitespace and newlines, so you will still have to remember to include optional braces yourself. + +Use the [full LLVM installer](http://llvm.org/builds/) to get clang-format on Windows, or use `sudo apt install clang-format` on Ubuntu. + +If you run it from the command-line, pass `-style=file` as an option and it will automatically find the .clang-format configuration file in the QMK root directory. + +If you use VSCode, the standard C/C++ plugin supports clang-format, alternatively there is a [separate extension](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat) for it. + +Some things (like LAYOUT macros) are destroyed by clang-format, so either don't run it on those files, or wrap the sensitive code in `// clang-format off` and `// clang-format on`. diff --git a/docs/coding_conventions_python.md b/docs/coding_conventions_python.md new file mode 100644 index 0000000000..694aa38cfc --- /dev/null +++ b/docs/coding_conventions_python.md @@ -0,0 +1,314 @@ +# Coding Conventions (Python) + +Most of our style follows PEP8 with some local modifications to make things less nit-picky. + +* We target Python 3.5 for compatability with all supported platforms. +* We indent using four (4) spaces (soft tabs) +* We encourage liberal use of comments + * Think of them as a story describing the feature + * Use them liberally to explain why particular decisions were made. + * Do not write obvious comments + * If you not sure if a comment is obvious, go ahead and include it. +* We require useful docstrings for all functions. +* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns. +* Some of our practices conflict with the wider python community to make our codebase more approachable to non-pythonistas. + +# YAPF + +You can use [yapf](https://github.com/google/yapf) to style your code. We provide a config in [setup.cfg](setup.cfg). + +# Imports + +We don't have a hard and fast rule for when to use `import ...` vs `from ... import ...`. Understandability and maintainability is our ultimate goal. + +Generally we prefer to import specific function and class names from a module to keep code shorter and easier to understand. Sometimes this results in a name that is ambiguous, and in such cases we prefer to import the module instead. You should avoid using the "as" keyword when importing, unless you are importing a compatability module. + +Imports should be one line per module. We group import statements together using the standard python rules- system, 3rd party, local. + +Do not use `from foo import *`. Supply a list of objects you want to import instead, or import the whole module. + +## Import Examples + +Good: + +``` +from qmk import effects + +effects.echo() +``` + +Bad: + +``` +from qmk.effects import echo + +echo() # It's unclear where echo comes from +``` + +Good: + +``` +from qmk.keymap import compile_firmware + +compile_firmware() +``` + +OK, but the above is better: + +``` +import qmk.keymap + +qmk.keymap.compile_firmware() +``` + +# Statements + +One statement per line. + +Even when allowed (EG `if foo: bar`) we do not combine 2 statements onto a single line. + +# Naming + +`module_name`, `package_name`, `ClassName`, `method_name`, `ExceptionName`, `function_name`, `GLOBAL_CONSTANT_NAME`, `global_var_name`, `instance_var_name`, `function_parameter_name`, `local_var_name`. + +Function names, variable names, and filenames should be descriptive; eschew abbreviation. In particular, do not use abbreviations that are ambiguous or unfamiliar to readers outside your project, and do not abbreviate by deleting letters within a word. + +Always use a .py filename extension. Never use dashes. + +## Names to Avoid + +* single character names except for counters or iterators. You may use `e` as an exception identifier in try/except statements. +* dashes (`-`) in any package/module name +* `__double_leading_and_trailing_underscore__` names (reserved by Python) + +# Docstrings + +To maintain consistency with our docstrings we've set out the following guidelines. + +* Use markdown formatting +* Always use triple-dquote docstrings with at least one linebreak: `"""\n"""` +* First line is a short (< 70 char) description of what the function does +* If you need more in your docstring leave a blank line between the description and the rest. +* Start indented lines at the same indent level as the opening triple-dquote +* Document all function arguments using the format described below +* If present, Args:, Returns:, and Raises: should be the last three things in the docstring, separated by a blank line each. + +## Simple docstring example + +``` +def my_awesome_function(): + """Return the number of seconds since 1970 Jan 1 00:00 UTC. + """ + return int(time.time()) +``` + +## Complex docstring example + +``` +def my_awesome_function(): + """Return the number of seconds since 1970 Jan 1 00:00 UTC. + + This function always returns an integer number of seconds. + """ + return int(time.time()) +``` + +## Function arguments docstring example + +``` +def my_awesome_function(start=None, offset=0): + """Return the number of seconds since 1970 Jan 1 00:00 UTC. + + This function always returns an integer number of seconds. + + + Args: + start + The time to start at instead of 1970 Jan 1 00:00 UTC + + offset + Return an answer that has this number of seconds subtracted first + + Returns: + An integer describing a number of seconds. + + Raises: + ValueError + When `start` or `offset` are not positive numbers + """ + if start < 0 or offset < 0: + raise ValueError('start and offset must be positive numbers.') + + if not start: + start = time.time() + + return int(start - offset) +``` + +# Exceptions + +Exceptions are used to handle exceptional situations. They should not be used for flow control. This is a break from the python norm of "ask for forgiveness." If you are catching an exception it should be to handle a situation that is unusual. + +If you use a catch-all exception for any reason you must log the exception and stacktrace using cli.log. + +Make your try/except blocks as short as possible. If you need a lot of try statements you may need to restructure your code. + +# Tuples + +When defining one-item tuples always include a trailing comma so that it is obvious you are using a tuple. Do not rely on implicit one-item tuple unpacking. Better still use a list which is unambiguous. + +This is particularly important when using the printf-style format strings that are commonly used. + +# Lists and Dictionaries + +We have configured YAPF to differentiate between sequence styles with a trailing comma. When a trailing comma is omitted YAPF will format the sequence as a single line. When a trailing comma is included YAPF will format the sequence with one item per line. + +You should generally prefer to keep short definition on a single line. Break out to multiple lines sooner rather than later to aid readability and maintainability. + +# Parentheses + +Avoid excessive parentheses, but do use parentheses to make code easier to understand. Do not use them in return statements unless you are explicitly returning a tuple, or it is part of a math expression. + +# Format Strings + +We generally prefer printf-style format strings. Example: + +``` +name = 'World' +print('Hello, %s!' % (name,)) +``` + +This style is used by the logging module, which we make use of extensively, and we have adopted it in other places for consistency. It is also more familiar to C programmers, who are a big part of our casual audience. + +Our included CLI module has support for using these without using the percent (%) operator. Look at `cli.echo()` and the various `cli.log` functions (EG, `cli.log.info()`) for more details. + +# Comprehensions & Generator Expressions + +We encourage the liberal use of comprehensions and generators, but do not let them get too complex. If you need complexity fall back to a for loop that is easier to understand. + +# Lambdas + +OK to use but probably should be avoided. With comprehensions and generators the need for lambdas is not as strong as it once was. + +# Conditional Expressions + +OK in variable assignment, but otherwise should be avoided. + +Conditional expressions are if statements that are in line with code. For example: + +``` +x = 1 if cond else 2 +``` + +It's generally not a good idea to use these as function arguments, sequence items, etc. It's too easy to overlook. + +# Default Argument Values + +Encouraged, but values must be immutable objects. + +When specifying default values in argument lists always be careful to specify objects that can't be modified in place. If you use a mutable object the changes you make will persist between calls, which is usually not what you want. Even if that is what you intend to do it is confusing for others and will hinder understanding. + +Bad: + +``` +def my_func(foo={}): + pass +``` + +Good: + +``` +def my_func(foo=None): + if not foo: + foo = {} +``` + +# Properties + +Always use properties instead of getter and setter functions. + +``` +class Foo(object): + def __init__(self): + self._bar = None + + @property + def bar(self): + return self._bar + + @bar.setter + def bar(self, bar): + self._bar = bar +``` + +# True/False Evaluations + +You should generally prefer the implicit True/False evaluation in if statements, rather than checking equivalency. + +Bad: + +``` +if foo == True: + pass + +if bar == False: + pass +``` + +Good: + +``` +if foo: + pass + +if not bar: + pass +``` + +# Decorators + +Use when appropriate. Try to avoid too much magic unless it helps with understanding. + +# Threading and Multiprocessing + +Should be avoided. If you need this you will have to make a strong case before we merge your code. + +# Power Features + +Python is an extremely flexible language and gives you many fancy features such as custom metaclasses, access to bytecode, on-the-fly compilation, dynamic inheritance, object reparenting, import hacks, reflection, modification of system internals, etc. + +Don't use these. + +Performance is not a critical concern for us, and code understandability is. We want our codebase to be approachable by someone who only has a day or two to play with it. These features generally come with a cost to easy understanding, and we would prefer to have code that can be readily understood over faster or more compact code. + +Note that some standard library modules use these techniques and it is ok to make use of those modules. But please keep readability and understandability in mind when using them. + +# Type Annotated Code + +For now we are not using any type annotation system, and would prefer that code remain unannotated. We may revisit this in the future. + +# Function length + +Prefer small and focused functions. + +We recognize that long functions are sometimes appropriate, so no hard limit is placed on function length. If a function exceeds about 40 lines, think about whether it can be broken up without harming the structure of the program. + +Even if your long function works perfectly now, someone modifying it in a few months may add new behavior. This could result in bugs that are hard to find. Keeping your functions short and simple makes it easier for other people to read and modify your code. + +You could find long and complicated functions when working with some code. Do not be intimidated by modifying existing code: if working with such a function proves to be difficult, you find that errors are hard to debug, or you want to use a piece of it in several different contexts, consider breaking up the function into smaller and more manageable pieces. + +# FIXMEs + +It is OK to leave FIXMEs in code. Why? Encouraging people to at least document parts of code that need to be thought out more (or that are confusing) is better than leaving this code undocumented. + +All FIXMEs should be formatted like: + +``` +FIXME(username): Revisit this code when the frob feature is done. +``` + +...where username is your GitHub username. + +# Unit Tests + +These are good. We should have some one day. diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md index 6e3f8372c9..85dd440d37 100644 --- a/docs/compatible_microcontrollers.md +++ b/docs/compatible_microcontrollers.md @@ -1,25 +1,36 @@ -# Atmel AVR +# Compatible Microcontrollers -QMK should run on any Atmel AVR processor with enough Flash. It has been tested on the following: +QMK runs on any USB-capable AVR or ARM microcontroller with enough flash space - generally 32kB or more, though it will *just* squeeze into 16kB with most features disabled. -* ATmega32U4 ([PJRC Teensy 2.0](http://www.pjrc.com/teensy/)) -* AT90USB1286 ([PJRC Teensy++ 2.0](http://www.pjrc.com/teensy/)) -* AT90USB1287 ([Atmel USBKEY](http://www.atmel.com/tools/AT90USBKEY.aspx)) -* ATmega168P with using [V-USB](http://www.obdev.at/products/vusb/index.html) -* ATmega328P with using [V-USB](http://www.obdev.at/products/vusb/index.html) -* ATmega32U2 -* AT90USB1286, 646, 647 should work -* AT90USB162 testing... +## Atmel AVR -NOTE: To enable full features of firmware you'll need 32KB flash size. +The following use [LUFA](https://www.fourwalledcubicle.com/LUFA.php) as the USB stack: -Please add any tested microcontrollers to this list. +* [ATmega16U2](https://www.microchip.com/wwwproducts/en/ATmega16U2) / [ATmega32U2](https://www.microchip.com/wwwproducts/en/ATmega32U2) +* [ATmega16U4](https://www.microchip.com/wwwproducts/en/ATmega16U4) / [ATmega32U4](https://www.microchip.com/wwwproducts/en/ATmega32U4) +* [AT90USB64](https://www.microchip.com/wwwproducts/en/AT90USB646) / [AT90USB128](https://www.microchip.com/wwwproducts/en/AT90USB1286) -# ARM +Certain MCUs which do not have native USB will use [V-USB](https://www.obdev.at/products/vusb/index.html) instead: -You can also use any ARM processor that [ChibiOS](http://www.chibios.org) supports. The following processors have been tested: +* [ATmega32A](https://www.microchip.com/wwwproducts/en/ATmega32A) +* [ATmega328P](https://www.microchip.com/wwwproducts/en/ATmega328P) -* [Kinetis MKL26Z64](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/l-series-ultra-low-power-m0-plus/kinetis-kl2x-48-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) -* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf) -* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf) -* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) +## ARM + +You can also use any ARM chip with USB that [ChibiOS](http://www.chibios.org) supports. Most have plenty of flash. Known to work are: + +### STMicroelectronics (STM32) + + * [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html) + * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) + * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) + +### NXP (Kinetis) + + * [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) + * [MK20DX128](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-50-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-based-on-arm-cortex-m4-core:K20_50) + * [MK20DX256](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) + +## Atmel ATSAM + +There is limited support for one of Atmel's ATSAM microcontrollers, that being the [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) used by the [Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop). diff --git a/docs/config_options.md b/docs/config_options.md index eb0a441ccc..0cf3fb78a6 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -76,7 +76,7 @@ This is a C header file that is one of the first things included, and will persi * `#define B7_AUDIO` * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define BACKLIGHT_PIN B7` - * pin of the backlight - `B5`, `B6`, `B7` and `C6` (and `D4` on ATmega32A) use hardware PWM, others use software implementation + * pin of the backlight * `#define BACKLIGHT_LEVELS 3` * number of levels your backlight will have (maximum 15 excluding off) * `#define BACKLIGHT_BREATHING` @@ -89,10 +89,12 @@ This is a C header file that is one of the first things included, and will persi * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap * `#define LOCKING_RESYNC_ENABLE` * tries to keep switch state consistent with keyboard LED state -* `#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))` +* `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)` * key combination that allows the use of magic commands (useful for debugging) -* `#define USB_MAX_POWER_CONSUMPTION` +* `#define USB_MAX_POWER_CONSUMPTION 500` * sets the maximum power (in mA) over USB for the device (default: 500) +* `#define USB_POLLING_INTERVAL_MS 10` + * sets the USB polling rate in milliseconds for the keyboard, mouse, and shared (NKRO/media keys) interfaces * `#define F_SCL 100000L` * sets the I2C clock rate speed for keyboards using I2C. The default is `400000L`, except for keyboards using `split_common`, where the default is `100000L`. @@ -171,8 +173,8 @@ If you define these options you will enable the associated feature, which may in * how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined. * `#define TAP_CODE_DELAY 100` * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. -* `#define TAP_HOLD_CAPS_DELAY 200` - * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 200ms if not defined. +* `#define TAP_HOLD_CAPS_DELAY 80` + * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. ## RGB Light Configuration @@ -194,8 +196,8 @@ If you define these options you will enable the associated feature, which may in * units to step when in/decreasing saturation * `#define RGBLIGHT_VAL_STEP 12` * units to step when in/decreasing value (brightness) -* `#define RGBW_BB_TWI` - * bit-bangs TWI to EZ RGBW LEDs (only required for Ergodox EZ) +* `#define RGBW` + * Enables RGBW LED support ## Mouse Key Options @@ -222,6 +224,7 @@ There are a few different ways to set handedness for split keyboards (listed in 2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half * For boards with DFU bootloader you can use `:dfu-split-left`/`:dfu-split-right` to flash these EEPROM files * For boards with Caterina bootloader (like stock Pro Micros), use `:avrdude-split-left`/`:avrdude-split-right` + * For boards with ARM DFU bootloader (like Proton C), use `:dfu-util-split-left`/`:dfu-util-split-right` 3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) 4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half @@ -248,6 +251,9 @@ There are a few different ways to set handedness for split keyboards (listed in * `#define MATRIX_COL_PINS_RIGHT { }` * If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns. +* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }` + * If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`. + * `#define RGBLED_SPLIT { 6, 6 }` * See [RGB Light Configuration](#rgb-light-configuration) @@ -261,6 +267,14 @@ There are a few different ways to set handedness for split keyboards (listed in * 4: about 26kbps * 5: about 20kbps +* `#define SPLIT_USB_DETECT` + * Detect (with timeout) USB connection when delegating master/slave + * Default behavior for ARM + * Required for AVR Teensy + +* `#define SPLIT_USB_TIMEOUT 2500` + * Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT` + # The `rules.mk` File This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. @@ -289,19 +303,20 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i * `halfkay` * `caterina` * `bootloadHID` + * `USBasp` ## Feature Options Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU. * `BOOTMAGIC_ENABLE` - * Virtual DIP switch configuration(+1000) + * Virtual DIP switch configuration * `MOUSEKEY_ENABLE` - * Mouse keys(+4700) + * Mouse keys * `EXTRAKEY_ENABLE` - * Audio control and System control(+450) + * Audio control and System control * `CONSOLE_ENABLE` - * Console for debug(+400) + * Console for debug * `COMMAND_ENABLE` * Commands for debug and configuration * `COMBO_ENABLE` @@ -333,7 +348,8 @@ Use these to enable or disable building certain features. The more you have enab * `NO_USB_STARTUP_CHECK` * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master. * `LINK_TIME_OPTIMIZATION_ENABLE` - = Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` + * Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` + * Alternatively, you can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`. ## USB Endpoint Limitations diff --git a/docs/contributing.md b/docs/contributing.md index 7d1a9691cf..04dc0da20f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -54,72 +54,20 @@ Never made an open source contribution before? Wondering how contributions work # Coding Conventions -Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines: +Most of our style is pretty easy to pick up on. If you are familiar with either C or Python you should not have too much trouble with our local styles. -* We indent using four (4) spaces (soft tabs) -* We use a modified One True Brace Style - * Opening Brace: At the end of the same line as the statement that opens the block - * Closing Brace: Lined up with the first character of the statement that opens the block - * Else If: Place the closing brace at the beginning of the line and the next opening brace at the end of the same line. - * Optional Braces: Always include optional braces. - * Good: if (condition) { return false; } - * Bad: if (condition) return false; -* We encourage use of C style comments: `/* */` - * Think of them as a story describing the feature - * Use them liberally to explain why particular decisions were made. - * Do not write obvious comments - * If you not sure if a comment is obvious, go ahead and include it. -* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns. -* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`) -* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)` - * If you are not sure which to prefer use the `#if defined(DEFINED)` form. - * Do not change existing code from one style to the other, except when moving to a multiple condition `#if`. - * Do not put whitespace between `#` and `if`. - * When deciding how (or if) to indent directives keep these points in mind: - * Readability is more important than consistency. - * Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying. - * When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code. - -Here is an example for easy reference: - -```c -/* Enums for foo */ -enum foo_state { - FOO_BAR, - FOO_BAZ, -}; - -/* Returns a value */ -int foo(void) { - if (some_condition) { - return FOO_BAR; - } else { - return -1; - } -} -``` - -# Auto-formatting with clang-format - -[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) is part of LLVM and can automatically format your code for you, because ain't nobody got time to do it manually. We supply a configuration file for it that applies most of the coding conventions listed above. It will only change whitespace and newlines, so you will still have to remember to include optional braces yourself. - -Use the [full LLVM installer](http://llvm.org/builds/) to get clang-format on Windows, or use `sudo apt install clang-format` on Ubuntu. - -If you run it from the command-line, pass `-style=file` as an option and it will automatically find the .clang-format configuration file in the QMK root directory. - -If you use VSCode, the standard C/C++ plugin supports clang-format, alternatively there is a [separate extension](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat) for it. - -Some things (like LAYOUT macros) are destroyed by clang-format, so either don't run it on those files, or wrap the sensitive code in `// clang-format off` and `// clang-format on`. +* [Coding Conventions - C](coding_conventions_c.md) +* [Coding Conventions - Python](coding_conventions_python.md) # General Guidelines We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making. -* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature. +* Separate PRs into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature. * Check for unnecessary whitespace with `git diff --check` before committing. * Make sure your code change actually compiles. - * Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error - * Keyboards: Make sure that `make keyboard:all` does not return any errors + * Keymaps: Make sure that `make keyboard:your_new_keymap` does not return any errors. + * Keyboards: Make sure that `make keyboard:all` does not return any errors. * Core: Make sure that `make all` does not return any errors. * Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. Example: @@ -131,6 +79,8 @@ The kerpleplork was intermittently failing with error code 23. The root cause wa Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure. ``` +!> **IMPORTANT:** If you would like to contribute a bugfix or improvement to user code, such as non-default keymaps, userspace and layouts, be sure to tag the original submitter of the code in your PR. Many users, regardless of skill level with Git and GitHub, may be confused or frustrated at their code being modified without their knowledge. + ## Documentation Documentation is one of the easiest ways to get started contributing to QMK. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren't sure where or how to jump in please [reach out for help](#where-can-i-go-for-help)! diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 7be82c650f..2d505b0751 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -90,68 +90,110 @@ keyrecord_t record { # LED Control -QMK provides methods to read the 5 LEDs defined as part of the HID spec: +QMK provides methods to read 5 of the LEDs defined in the HID spec: -* `USB_LED_NUM_LOCK` -* `USB_LED_CAPS_LOCK` -* `USB_LED_SCROLL_LOCK` -* `USB_LED_COMPOSE` -* `USB_LED_KANA` +* Num Lock +* Caps Lock +* Scroll Lock +* Compose +* Kana -These five constants correspond to the positional bits of the host LED state. -There are two ways to get the host LED state: +There are two ways to get the lock LED state: -* by implementing `led_set_user()` -* by calling `host_keyboard_leds()` +* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or +* by calling `led_t host_keyboard_led_state()` -## `led_set_user()` +!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called. -This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a parameter. -Use the `IS_LED_ON(usb_led, led_name)` and `IS_LED_OFF(usb_led, led_name)` macros to check the LED status. +Two more deprecated functions exist that provide the LED state as a `uint8_t`: -!> `host_keyboard_leds()` may already reflect a new value before `led_set_user()` is called. +* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)` +* `uint8_t host_keyboard_leds()` -### Example `led_set_user()` Implementation +## `led_update_user()` + +This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter. + +You must return either `true` or `false` from this function, depending on whether you want to override the keyboard-level implementation. + +?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead. + +### Example `led_update_kb()` Implementation ```c -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(B0); - } else { - writePinHigh(B0); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B1); - } else { - writePinHigh(B1); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); - } - if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) { - writePinLow(B3); - } else { - writePinHigh(B3); - } - if (IS_LED_ON(usb_led, USB_LED_KANA)) { - writePinLow(B4); - } else { - writePinHigh(B4); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + if (led_state.num_lock) { + writePinLow(B0); + } else { + writePinHigh(B0); + } + if (led_state.caps_lock) { + writePinLow(B1); + } else { + writePinHigh(B1); + } + if (led_state.scroll_lock) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + if (led_state.compose) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + if (led_state.kana) { + writePinLow(B4); + } else { + writePinHigh(B4); + } + return true; } } ``` -### `led_set_*` Function Documentation +### Example `led_update_user()` Implementation -* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)` -* Keymap: `void led_set_user(uint8_t usb_led)` +```c +bool led_update_user(led_t led_state) { + if (led_state.num_lock) { + writePinLow(B0); + } else { + writePinHigh(B0); + } + if (led_state.caps_lock) { + writePinLow(B1); + } else { + writePinHigh(B1); + } + if (led_state.scroll_lock) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + if (led_state.compose) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + if (led_state.kana) { + writePinLow(B4); + } else { + writePinHigh(B4); + } + return true; +} +``` -## `host_keyboard_leds()` +### `led_update_*` Function Documentation -Call this function to get the last received LED state. This is useful for reading the LED state outside `led_set_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). -For convenience, you can use the `IS_HOST_LED_ON(led_name)` and `IS_HOST_LED_OFF(led_name)` macros instead of calling and checking `host_keyboard_leds()` directly. +* Keyboard/Revision: `bool led_update_kb(led_t led_state)` +* Keymap: `bool led_update_user(led_t led_state)` + +## `host_keyboard_led_state()` + +Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). ## Setting Physical LED State @@ -297,8 +339,8 @@ This runs code every time that the layers get changed. This can be useful for l This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example ```c -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { case _RAISE: rgblight_setrgb (0x00, 0x00, 0xFF); break; @@ -320,8 +362,8 @@ uint32_t layer_state_set_user(uint32_t state) { ``` ### `layer_state_set_*` Function Documentation -* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)` -* Keymap: `uint32_t layer_state_set_user(uint32_t state)` +* Keyboard/Revision: `layer_state_t layer_state_set_kb(layer_state_t state)` +* Keymap: `layer_state_t layer_state_set_user(layer_state_t state)` The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status) @@ -377,8 +419,8 @@ void keyboard_post_init_user(void) { The above function will use the EEPROM config immediately after reading it, to set the default layer's RGB color. The "raw" value of it is converted in a usable structure based on the "union" that you created above. ```c -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { case _RAISE: if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); } break; diff --git a/docs/de/README.md b/docs/de/README.md new file mode 100644 index 0000000000..88239d45d4 --- /dev/null +++ b/docs/de/README.md @@ -0,0 +1,33 @@ +# Quantum Mechanical Keyboard Firmware + +[![Aktuelle Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## Was ist QMK Firmware? + +QMK (*Quantum Mechanical Keyboard*) ist eine Open-Source-Community, welche die QMK-Firmware, die QMK-Toolbox, [qmk.fm](https://qmk.fm) und diese Dokumententation betreut. QMK-Firmware ist eine Weiterentwicklung der [tmk\_keyboard](http://github.com/tmk/tmk_keyboard)-Tastatur-Firmware mit vielen nützlichen Zusatzfunktionen für Atmel AVR-Prozessoren. Ursprünglich wurde sie für Produkte von [OLKB](http://olkb.com), das [ErgoDox EZ](http://www.ergodox-ez.com) und das [Clueboard](http://clueboard.co/) entwickelt. Im Laufe der Zeit wurde sie mit Hilfe von [ChibiOS](http://chibios.org) auch für die ARM-Architektur angepasst. Außerdem ist es inzwischen möglich, auch handverdrahtete Tastaturen und selbst geätzte PCBs mit QMK zu verwenden. + +## Bezugsquelle für QMK + +Wenn Du vorhast, deine Tastatur, Tastaturbelegung oder Features zu QMK beizusteuern, geht das am einfachsten, indem Du das [Repository auf Github](https://github.com/qmk/qmk_firmware#fork-destination-box) forkst, die Änderungen in deinem lokalen Repo vornimmst und anschließend einen [Pull Request](https://github.com/qmk/qmk_firmware/pulls) einreichst. + +Ansonsten kannst Du es als [zip](https://github.com/qmk/qmk_firmware/zipball/master) oder [tar](https://github.com/qmk/qmk_firmware/tarball/master) herunterladen, oder es direkt via git klonen (`git clone git@github.com:qmk/qmk_firmware.git` bzw. `git clone https://github.com/qmk/qmk_firmware.git`). + + +## Anleitung fürs Kompilieren + +Bevor Du in der Lage bist, die Firmware zu kompilieren, musst Du eine [Entwicklungsumgebung](de/getting_started_build_tools.md) für AVR und/oder ARM aufsetzen. Danach kannst Du mit dem `make` Befehl eine Keymap für deine Tastatur erzeugen. Die Notation dafür ist: + + make planck/rev4:default + +Dies generiert die Revision `rev4` für eine Tastatur vom Type `planck` mit der `default` Tastaturbelegung. Nicht alle Tastaturen haben Revisionen (auch bekannt als Subprojekt oder Unterordner) weswegen dies auch ausgelassen werden kann: + + make preonic:default + +## Möglichkeiten der Anpassung + +QMK hat viele [Features](de/features.md), die es zu entdecken gibt. In der [Dokumentation](https://docs.qmk.fmk) kannst Du Dir einen Überblick verschaffen. Die meisten Features basieren darauf, die [Tastaturbelegung](de/keymap.md) anzupassen und das Verhalten der [Keycodes](de/keycodes.md) zu verändern. diff --git a/docs/de/_summary.md b/docs/de/_summary.md new file mode 100644 index 0000000000..37768355f2 --- /dev/null +++ b/docs/de/_summary.md @@ -0,0 +1,121 @@ +* [Anleitung für Anfänger](de/newbs.md) + * [Erste Schritte](de/newbs_getting_started.md) + * [Die erste Firmware](de/newbs_building_firmware.md) + * [Firmware flashen](de/newbs_flashing.md) + * [Testen und Debuggen](de/newbs_testing_debugging.md) + * [Git Tips und Tricks](de/newbs_best_practices.md) + * [Hilfreiche Ressourcen](de/newbs_learn_more_resources.md) + +* [QMK Basics](de/README.md) + * [QMK Einführung](de/getting_started_introduction.md) + * [QMK CLI](de/cli.md) + * [QMK CLI Konfiguration](de/cli_configuration.md) + * [Zu QMK beitragen](de/contributing.md) + * [Anleitung für Github](de/getting_started_github.md) + * [Nach Hilfe fragen](de/getting_started_getting_help.md) + +* [Breaking Changes](de/breaking_changes.md) + * [2019 Aug 30](de/ChangeLog/20190830.md) + +* [FAQ](de/faq.md) + * [Häufige Fragen](de/faq_general.md) + * [Build/Kompilieren](de/faq_build.md) + * [Debugging/Troubleshooting](de/faq_debug.md) + * [Keymap](de/faq_keymap.md) + * [Treiber Installation mit Zadig](de/driver_installation_zadig.md) + +* Detailierte Guides + * [Build Tools installieren](de/getting_started_build_tools.md) + * [Vagrant Guide](de/getting_started_vagrant.md) + * [Build/Compile Anleitung](de/getting_started_make_guide.md) + * [Firmware flashen](de/flashing.md) + * [Funktionalität anpassen](de/custom_quantum_functions.md) + * [Keymap Überblick](de/keymap.md) + +* [Hardware](de/hardware.md) + * [AVR Prozessoren](de/hardware_avr.md) + * [Treiber](de/hardware_drivers.md) + +* Referenz + * [Tastatur Richtlinien](de/hardware_keyboard_guidelines.md) + * [Konfigurations Optionen](de/config_options.md) + * [Keycodes](de/keycodes.md) + * [Coding Konventionen - C](de/coding_conventions_c.md) + * [Coding Konventionen - Python](de/coding_conventions_python.md) + * [Dokumentations Best Practices](de/documentation_best_practices.md) + * [Dokumentations Templates](de/documentation_templates.md) + * [Glossar](de/reference_glossary.md) + * [Unit Testing](de/unit_testing.md) + * [Nützliche Funktionen](de/ref_functions.md) + * [Configurator Support](de/reference_configurator_support.md) + * [info.json Format](de/reference_info_json.md) + * [Python CLI Development](de/cli_development.md) + +* [Features](de/features.md) + * [Basic Keycodes](de/keycodes_basic.md) + * [US ANSI Shifted Keys](de/keycodes_us_ansi_shifted.md) + * [Quantum Keycodes](de/quantum_keycodes.md) + * [Advanced Keycodes](de/feature_advanced_keycodes.md) + * [Audio](de/feature_audio.md) + * [Auto Shift](de/feature_auto_shift.md) + * [Backlight](de/feature_backlight.md) + * [Bluetooth](de/feature_bluetooth.md) + * [Bootmagic](de/feature_bootmagic.md) + * [Combos](de/feature_combo.md) + * [Command](de/feature_command.md) + * [Debounce API](de/feature_debounce_type.md) + * [DIP Switch](de/feature_dip_switch.md) + * [Dynamic Macros](de/feature_dynamic_macros.md) + * [Encoders](de/feature_encoders.md) + * [Grave Escape](de/feature_grave_esc.md) + * [Haptic Feedback](de/feature_haptic_feedback.md) + * [HD44780 LCD Controller](de/feature_hd44780.md) + * [Key Lock](de/feature_key_lock.md) + * [Layouts](de/feature_layouts.md) + * [Leader Key](de/feature_leader_key.md) + * [LED Matrix](de/feature_led_matrix.md) + * [Macros](de/feature_macros.md) + * [Mouse Keys](de/feature_mouse_keys.md) + * [OLED Driver](de/feature_oled_driver.md) + * [One Shot Keys](de/feature_advanced_keycodes.md#one-shot-keys) + * [Pointing Device](de/feature_pointing_device.md) + * [PS/2 Mouse](de/feature_ps2_mouse.md) + * [RGB Lighting](de/feature_rgblight.md) + * [RGB Matrix](de/feature_rgb_matrix.md) + * [Space Cadet](de/feature_space_cadet.md) + * [Split Keyboard](de/feature_split_keyboard.md) + * [Stenography](de/feature_stenography.md) + * [Swap Hands](de/feature_swap_hands.md) + * [Tap Dance](de/feature_tap_dance.md) + * [Terminal](de/feature_terminal.md) + * [Thermal Printer](de/feature_thermal_printer.md) + * [Unicode](de/feature_unicode.md) + * [Userspace](de/feature_userspace.md) + * [Velocikey](de/feature_velocikey.md) + +* Für Maker und Modder + * [Hand Wiring Guide](de/hand_wire.md) + * [ISP Flashing Guide](de/isp_flashing_guide.md) + * [ARM Debugging Guide](de/arm_debugging.md) + * [I2C Driver](de/i2c_driver.md) + * [GPIO Controls](de/internals_gpio_control.md) + * [Proton C Conversion](de/proton_c_conversion.md) + +* Für ein tieferes Verständnis + * [Wie Tastaturen funktionieren](de/how_keyboards_work.md) + * [QMK verstehen](de/understanding_qmk.md) + +* Andere Themen + * [Eclipse mit QMK](de/other_eclipse.md) + * [VSCode mit QMK](de/other_vscode.md) + * [Support](de/support.md) + * [Übersetzungen](de/translating.md) + +* QMK Internals (de/In Progress) + * [Defines](de/internals_defines.md) + * [Input Callback Reg](de/internals_input_callback_reg.md) + * [Midi Device](de/internals_midi_device.md) + * [Midi Device Setup Process](de/internals_midi_device_setup_process.md) + * [Midi Util](de/internals_midi_util.md) + * [Send Functions](de/internals_send_functions.md) + * [Sysex Tools](de/internals_sysex_tools.md) diff --git a/docs/de/cli.md b/docs/de/cli.md new file mode 100644 index 0000000000..437062ad66 --- /dev/null +++ b/docs/de/cli.md @@ -0,0 +1,169 @@ +# QMK CLI (Kommandozeile) + +Diese Seite beschreibt die Einrichtung und den Umgang mit dem QMK CLI (Kommandozeile). + +# Übersicht + +Die QMK CLI vereinfacht das Zusammenbauen und Arbeiten mit QMK Tastaturen. Hier findest Du wichtige Befehle, um beispielsweise das Herunterladen und Kompilieren der QMK Firmware oder das Erstellen von Tastaturbelegungen (und vieles mehr) zu erleichtern. + +* [Globale CLI](#globale-cli) +* [Lokale CLI](#lokale-cli) +* [CLI-Befehle](#cli-befehle) + +# System-Anforderungen + +Die CLI benötigt Python 3.5 oder höher. Außerdem ist es nötig, die Packages laut [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) zu installieren. + +# Globale CLI + +QMK bietet ein installierbares CLI, das Du zum Einrichten Deiner QMK Build-Umgebung verwenden kannst. Dieses ermöglicht Dir das Arbeiten mit QMK, und erleichtert das Arbeiten mit mehreren Kopien der `qmk_firmware`. Wir empfehlen, dieses CLI zu installieren und regelmäßig upzudaten. + +## Installation mit Homebrew (macOS, manche Linux) + +Solltest Du [Homebrew](https://brew.sh) installiert haben, kannst Du QMK per tap installieren: + +``` +brew tap qmk/qmk +brew install qmk +export QMK_HOME='~/qmk_firmware' # Optional: setzt den Installationsort für `qmk_firmware` +qmk setup # Dies klont `qmk/qmk_firmware` und richtet optional auch Deine Build-Umgebung ein +``` + +## Installation mit easy_install oder pip + +Falls Du kein Homebrew hast, kannst Du QMK auch manuell installieren. Zuerst musst Du sicherstellen, dass Python 3.5 (oder höher) und pip installiert ist. Dann installiere QMK mit diesem Befehl: + +``` +pip3 install qmk +export QMK_HOME='~/qmk_firmware' # Optional: setzt den Installationsort für `qmk_firmware` +qmk setup # Dies klont `qmk/qmk_firmware` und richtet optional auch Deine Build-Umgebung ein +``` +## Installation mit git Repo + +`git clone https://github.com/qmk/qmk_cli.git && cd qmk_cli && python3 setup.py install` + +## Packaging für andere Betriebssysteme + +Wir suchen nach Freiwilligen, die ein `qmk`-Package für weitere Betriebssysteme erstellen und pflegen. Falls Du ein Package für Dein OS erstellen möchtest, bitte befolge diese Richtlinien: + +* Verwende "Best Practices" für Dein OS, sollten sie mit diesen Richtlinien in Konflikt stehen. + * Dokumentiere den Grund in einem Kommentar, wenn Du abweichen musstest. +* Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/). +* Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`. + +# Lokale CLI + +Wenn Du die globale CLI nicht verwenden möchtest, beinhaltet `qmk_firmware` auch eine lokale CLI. Du kannst sie hier finden: `qmk_firmware/bin/qmk`. Du kannst den `qmk`-Befehl aus irgendeinem Datei-Verzeichnis ausführen und es wird immer auf dieser Kopie von `qmk_firmware` arbeiten. + +**Beispiel**: + +``` +$ ~/qmk_firmware/bin/qmk hello +Ψ Hello, World! +``` + +## Einschränkungen der lokalen CLI + +Hier ein Vergleich mit der globalen CLI: + +* Die lokale CLI unterstützt kein `qmk setup` oder `qmk clone`. +* Die lokale CLI arbeitet immer innerhalb der selben `qmk_firmware`-Verzeichnisstruktur, auch wenn Du mehrere Repositories geklont hast. +* Die lokale CLI läuft nicht in einer virtualenv. Daher ist es möglich, dass Abhängigkeiten (dependencies) miteinander in Konflikt kommen/stehen. + +# CLI-Befehle + +## `qmk compile` + +Dieser Befehl erlaubt es dir, die Firmware - aus egal welchem Datei-Verzeichnis - zu compilen. Du kannst JSON-Exporte von oder Keymaps in der Repo kompilen. + +**Anwendung für Konfigurations-Exports**: + +``` +qmk compile +``` + +**Anwendung für Keymaps**: + +``` +qmk compile -kb -km +``` + +## `qmk cformat` + +Dieser Befehl formatiert C-Code im clang-Format. Benutze ihn ohne Argumente, um den core-Code zu formatieren, oder benutze Namen von Dateien in der CLI, um den Befehl auf bestimmte Dateien anzuwenden. + +**Anwendung**: + +``` +qmk cformat [file1] [file2] [...] [fileN] +``` + +## `qmk config` + +Dieser Befehl konfiguriert das Verhalten von QMK. Für die volle `qmk config`-Dokumentation gehe zu [CLI-Konfiguration](cli_configuration.md). + +**Anwendung**: + +``` +qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] +``` + +## `qmk docs` + +Dieser Befehl startet einen lokalen HTTP-Server, den Du zum Browsen oder Verbessern der Dokumentation verwenden kannst. Der Default-Port ist 8936. + +**Anwendung**: + +``` +qmk docs [-p PORT] +``` + +## `qmk doctor` + +Dieser Befehl untersucht Deine Umgebung und warnt Dich vor potentiellen Build- oder Flash-Problemen. + +**Anwendung**: + +``` +qmk doctor +``` + +## `qmk list-keyboards` + +Dieser Befehl listet alle zurzeit in `qmk_firmware` definierten Tastaturen/Keyboards auf. + +**Anwendung**: + +``` +qmk list-keyboards +``` + +## `qmk new-keymap` + +Dieser Befehl erstellt eine neue Keymap basierend auf einer existierenden Standard-Keymap eines bestimmten Keyboards. + +**Anwendung**: + +``` +qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] +``` + +## `qmk pyformat` + +Dieser Befehl formatiert Python-Code in `qmk_firmware`. + +**Anwendung**: + +``` +qmk pyformat +``` + +## `qmk pytest` + +Dieser Befehl führt die Python Test Suite aus. Wenn Du Python-Code veränderst, solltest Du sicherstellen, dass der Test erfolgreich ausgeführt wurde. + +**Anwendung**: + +``` +qmk pytest +``` diff --git a/docs/de/driver_installation_zadig.md b/docs/de/driver_installation_zadig.md new file mode 100644 index 0000000000..bd04e05430 --- /dev/null +++ b/docs/de/driver_installation_zadig.md @@ -0,0 +1,47 @@ +# Bootloader Treiber Installation mit Zadig + +QMK erscheint für den Host als normales HID Eingabegerät und benötigt deshalb keine zusätzlichen Treiber. Der Bootloader, den Du für das Flashen der Firmware benötigst, jedoch meistens schon. + +Hierzu gibt es zwei Ausnahmen: den Caterina Bootloader, meistens auf Pro Micros, sowie den HalfKay Bootloader auf PJRC Teensys. Diese erscheinen als serieller Port und als generisches HID Gerät und benötigen keine Treiber. + +Wir empfehlen deshalb [Zadig](https://zadig.akeo.ie/). Wenn Du die Entwicklungsumgebung mit MSYS2 oder WSL installiert hast, wird dich dass `qmk_install.sh` Skript gefragt haben, ob es die Treiber für dich installieren sollte. + +## Installation + +Versetze deine Tastatur in den Bootloader-Modus, entweder durch Betätigung des physischen `RESET` Schalters - meist auf der Unterseite der Platine - oder durch das Auslösen des Key-Codes `RESET` bzw. `KC_RESET` (sollte in der zur Tastatur gehörigen `keycode.c` zu entnehmen sein). Sollte deine Tastatur weder noch besitzen, versuche es damit die `Escape`-Taste oder `Leertaste + B` zu halten während Du die Tastatur mit dem PC verbindest (Siehe auch [Bootmagic](de/feature_bootmagic.md) für weitere Details). Ein paar Tastaturen benutzen das [Command](de/feature_command.md)-Feature an Stelle von Bootmagic; in diesem Fall kannst du mit den Tastenkombinationen `linkes Shift + rechtes Shift + B` oder `linkes Shift + rechtes Shift + Escape` zu jeder Zeit in den Bootloader wechseln solange die Tastatur verbunden ist. + +Eingie Tastaturen haben u.U. spezielle Anweisungen um in den Bootloader-Modus zu gelangen. Zum Beispiel kann die [Bootmagic-Lite](de/feature_bootmagic.md#bootmagic-lite)-Taste (default: Escape) auf eine andere Taste gemappt sein; oder die magische Kombination (default: linkes Shift+rechtes Shift) verwendet anstatt Shift die STRG-Tasten. Die zur Tastatur gehörige README sollte dir Aufschluss darüber geben wie der Bootloader-Modus ausgelöst werden kann wenn Du unsicher bist. + +Um ein Gerät mit USBaspLoader in den Bootloader-Modus zu versetzen, halte `BOOT` gedrückt während Du den `RESET`-Knopf drückst. +Alternativ, halte `BOOT` gedrückt während Du das USB-Kabel einsteckst. + +Zadig sollte das Bootloader-Gerät automatisch erkennen. Manchmal musst Du zusätzlich noch **Options → List All Devices** auswählen. + + - Tastaturen mit Atmel AVR MCUs sollten als `ATm32U4DFU` (oder ähnlich) angezeigt werden, mit der Vendor ID `03EB`. + - USBasp werden als `USBasp` angezeigt, mit VID/PID `16C0:05DC`. + - Tastaturen AVR controller und dem QMK-DFU Bootloader haben den namen ` Bootloader` und die VID `03EB`. + - Die meisten ARM Tastaturen werden als `STM32 BOOTLOADER` angezeigt, mit VID/PID `0483:DF11`. + +!> Sollte Zadig ein oder mehrere Geräte mit `HidUsb`-Treiber anzeigen, dann ist deine Tastatur wahrscheinlich nicht im Bootloader-Modus. Der Pfeil wird orange eingefärbt sein und Du wirst nach einer Bestätigung gefragt um Veränderungen am System vorzunehmen. In diesem Fall **fahre nicht fort**! + +Wenn der Pfeil grün angezeigt wird, wähle den Treiber aus und klicke auf **Treiber installieren**. Der `libusb-win32`-Treiber sollte gewöhnlich für AVR verwendet werden und `WinUSB` für ARM. Sollte es danach noch nicht möglich sein die Tastatur zu flashen, versuche es mit einem anderen Treiber. Für USBaspLoader Geräte, die über die Befehlszeile mit MSYS2 geflasht werden, wird der `libusbk`-Treiber empfohlen. Ansonsten sollte `libusb-win32` funktionieren wenn die QMK Toolbox verwendet wird. + +![Zadig mit Bootloader-Treiber korrekt installiert](https://i.imgur.com/b8VgXzx.png) + +Entferne nun deine Tastatur und verbinde sie erneut um sicherzugehen dass der neue Treiber erfolgreich installiert wurde. Wenn Du QMK Toolbox benutzt, starte die Anwendung zur Sicherheit einmal neu, da Veränderungen am Treiber manchmal nicht richtig erkannt werden. Wenn dies immer noch nicht erfolgreich war hilft es an dieser Stelle manchmal ein Neustart des Computers. + +## Wiederherstellung einer Installation für ein falsches Gerät + +Wenn Du feststellst dass Du anschließend auf deiner Tastatur nicht mehr tippen kannst, ist etwas bei der Installation schief gelaufen. Ein häufiger Fehler ist es dass die Tastatur nicht im Bootloader-Modus war und stattdessen der Treiber für das HID-Gerät ersetzt wurde. Dies kannst Du einfach mit Zadig überprüfen, eine funktionierende Tastatur verwendet als Treiber `HidUsb` auf allen Interfaces . + +![Eine funktionierende Tastatur aus Zadigs Sicht](https://i.imgur.com/Hx0E5kC.png) + +Öffne den Geräte-Manager und suche nach einem Gerät das wie deine Tastatur aussieht. + +![Die Tastatur mit dem falschen Treiber installiert, im Geräte-Manager](https://i.imgur.com/L3wvX8f.png) + +Rechtsklick und **Gerät deinstallieren** anklicken. Bitte gehe sicher dass in diesem Schritt auch **Treibersoftware für dieses Gerät löschen** markiert ist. + +![Der "Gerät deinstallieren"-Dialog, mit "Treibersoftware für dieses Gerät entfernen" markiert](https://i.imgur.com/aEs2RuA.png) + +Klick **Aktion → Suche nach veränderter Hardware**. Nun solltest Du wieder in der Lage sein normal zu tippen. Vergewissere dich mit Hilfe von Zadig dass die Tastatur nun `HidUsb` als Treiber verwendet. Wenn dies der Fall ist sollte wieder alles funktionieren. diff --git a/docs/de/newbs.md b/docs/de/newbs.md new file mode 100644 index 0000000000..61139a99e1 --- /dev/null +++ b/docs/de/newbs.md @@ -0,0 +1,22 @@ +# Anleitung für absolute Beginner +QMK ist eine mächtige Open Source Firmware für mechanische Tastaturen. Mit QMK kannst Du deine Tastatur sowohl sehr einfach als auch sehr umfangreich anpassen. Menschen unterschiedlichen Wissensstandes - vom kompletten Anfänger bis zum erfahrenen Programmierer - haben ihre Tastaturen mit QMK erfolgreich auf ihre persönlichen Bedürfnisse angepasst. Diese Anleitung soll Dir unabhängig von deinen Vorkenntnissen dabei helfen dies ebenfalls zu bewältigen. + +Bist Du unsicher ob deine Tastatur QMK unterstützt? Wenn es eine mechanische Tastatur ist, die Du selbst gebaut hast, stehen deine Chancen gut. Wir unterstützen eine [Vielzahl](https://qmk.fm/keyboards/) selbst gebauter Tastaturen, sodass selbst wenn deine jetzige Tastatur nicht unterstützt wird Du keine Probleme haben solltest eine für deine Anforderungen zu finden. + +## Übersicht + +Diese Anleitung ist in 7 Abschnitte unterteilt: + +* [Die ersten Schritte](newbs_getting_started.md) +* [Die erste Firmware auf der Kommandozeile erzeugen](newbs_building_firmware.md) +* [Die erste Firmware mit der Online GUI erzeugen](newbs_building_firmware_configurator.md) +* [Firmware flashen](newbs_flashing.md) +* [Testen und Debuggen](newbs_testing_debugging.md) +* [Git Leitfaden](newbs_best_practices.md) +* [Weitere hilfreiche Ressourcen für Anfänger](newbs_learn_more_resources.md) + +Diese Anleitung richtet sich an Personen, die vorher noch nie Software kompiliert haben. Die Entscheidungen und Empfehlungen basieren auf dieser Grundannahme. Es gibt unterschiedliche Herangehensweisen für viele der Prozeduren und wir unterstützen die meisten Alternativen. Wenn Du mal nicht weiter weißt oder Dir nicht sicher bist, wie Du an ein Problem herangehen sollst, kannst Du uns gerne [um Hilfe bitten](getting_started_getting_help.md). + +## Weitere Ressourcen + +* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Ein äußerst hilfreicher Blog eines Community-Mitglieds, der einige Grundlagen der QMK-Firmware aus der Sicht des Benutzers erklärt (auf Englisch). diff --git a/docs/de/newbs_building_firmware.md b/docs/de/newbs_building_firmware.md new file mode 100644 index 0000000000..b6d4840249 --- /dev/null +++ b/docs/de/newbs_building_firmware.md @@ -0,0 +1,78 @@ +# Eine eigene Firmware erstellen + +Nachdem Du nun eine funktionierende Entwicklungsumgebung aufgesetzt hast, bist Du nun bereit, deine eigene Firmware zu erstellen. Dieses Sektion des Guides wird zwischen drei Programmen hin- und herwechseln: deinem Dateimanager, deinem Texteditor und der Befehlszeile. Lasse diese drei Fenster geöffnet, bis Du fertig und zufrieden mit deiner Tastatur-Firmware bist. + +Solltest Du die Befehlszeile zwischenzeitlich geschlossen haben, vergiss nicht wieder in das richtige Verzeichnis zu navigieren, benutze dazu den Befehl `cd qmk_firmware`. + +## Navigiere in deinen Keymap Ordner + +Beginne damit, in das `keymaps` Verzeichnis für deine Tastatur zu navigieren. + +Wenn Du macOS oder Windows benutzt, kannst Du einfach in das keymaps Verzeichnis wechseln. + +?> macOS:
+ open keyboards//keymaps + +?> Windows:
+ start .\\keyboards\\\\keymaps + +## Eine Kopie der `default` Tastaturbelegung erstellen + +Wenn Du den `keymaps` Ordner geöffnet hast, solltest Du zuerst eine Kopie des `default` Verzeichnisses erstellen. Wir empfehlen dafür deinen GitHub Benutzernamen zu verweden, aber Du kannst auch jeden anderen Namen verwenden solange er nur aus Kleinbuchstaben, Zahlen und Unterstrichen besteht. + +Um den Prozess zu automatisieren kannst Du dazu auch das Skript `new_keymap.sh` verwenden. + +Navigiere dazu in das `qmk_firmware/util` Verzeichnis und gib folgenden Befehl ein: + +``` +./new_keymap.sh +``` + +Um zum Beispiel den Benutzernamen John für die Tastaturbelegung eines 1up60hse zu verwenden, würdest Du Folgendes eingeben: + +``` +./new_keymap.sh 1upkeyboards/1up60hse john +``` + +## Öffne `keymap.c` in deinem bevorzugtem Text Editor + +Öffne deine `keymap.c`. In dieser Datei findest Du die Strukturen, die das Verhalten deiner Tastatur bestimmen. Oben in der `keymap.c` befinden sich Definitionen (defines) und Aufzählungen (enums), die die Tastaturbelegung leserlicher machen sollen. Weiter unten wirst Du eine Zeile finden, die wie folgt aussieht: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +Diese Zeile markiert den Anfang der Liste der Ebenen (Layers). Darunter befinden sich Zeilen die entweder `LAYOUT` oder `KEYMAP` enthalten, das deutet auf den Start einer Ebene hin. Danach folgt eine Liste von Tasten, die dieser Ebene zugewiesen sind. + +!> Beim Bearbeiten einer Tastaturbelegung solltest Du darauf achten, keine Kommata hinzuzufügen oder zu entfernen. Ansonsten kann dies dazu führen, dass deine Firmware nicht mehr kompiliert und es ist nicht immer einfach festzustellen, wo genau ein Komma zuviel oder zu wenig ist. Die letzte Zeile hat am Ende kein Komma, die Zeilen davor jedoch schon. + +## Personalisiere die Tastaturbelegung nach deinen Wünschen + +Wie Du diesen Schritt abschließt ist vollkommen Dir überlassen. Ändere die eine Sache die Dich stört oder verändere alles von Grund auf. Du kannst Ebenen entfernen die Du nicht brauchst oder Neue hinzufügen, bis zu 32 Stück. Die folgende Dokumentation verrät Dir was Du hier alles definieren kannst: + +* [Keycodes](de/keycodes.md) +* [Features](de/features.md) +* [FAQ](de/faq.md) + +?> Während Du langsam ein Gefühl dafür kriegst wie Keymaps funktionieren, solltest Du darauf achten nicht zuviel auf einmal zu verändern. Größere Änderungen machen es schwieriger, Probleme zu debuggen. + +## Deine Firmware erzeugen + +Wenn Du damit fertig bist, deine Tastaturbelegung anzupassen, musst Du noch die Firmware erzeugen. Öffne dazu wieder die Befehlszeile und führe folgenden Befehl aus: + + make : + +Wenn deine Tastaturbelegung z.B. "xyverz" heißt und Du die Belegung für ein rev5 planck erzeugen möchtest, lautet der Befehl: + + make planck/rev5:xyverz + +Während des Kompiliervorgangs wird viel Text auf dem Bildschirm ausgegeben. Es sollte am Ende mit etwas enden das ungefähr so aussieht: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## Deine Firmware flashen +Bitte fahre mit [Firmware flashen](de/newbs_flashing.md) fort, um zu erfahren, wie Du deine neue Firmware auf deine Tastatur flashen kannst. diff --git a/docs/de/newbs_flashing.md b/docs/de/newbs_flashing.md new file mode 100644 index 0000000000..940438669e --- /dev/null +++ b/docs/de/newbs_flashing.md @@ -0,0 +1,369 @@ +# Deine Tastatur flashen + +Nachdem deine Firmware nun fertig ist musst Du Sie noch auf deine Tastatur flashen. + +## Flash-Vorgang mit QMK Toolbox + +Der einfachste Weg deine Tastatur zu flashen ist mit Hilfe der [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) + +Leider ist die QMK Toolbox derzeit nur für Windows und macOS verfügbar. Wenn Du Linux benutzt (oder es vorziehst die Firmware mit der Kommandozeile zu flashen) solltest Du die Methode benutzen die [hier](de/newbs_flashing.md#tastatur-mit-der-befehlszeile-flashen) beschrieben wird. + +### Lade die Datei in QMK Toolbox + +Beginne damit die Datei in der QMK Toolbox Anwendung zu laden. Versichere dich dass Du die Firmware-Datei im Finder oder Explorer findest. Deine Tastatur-Firmware sollte entweder vom Typ `.hex` oder `.bin` sein sein. QMK sollte die für deine Tastatur entsprechende Datei automatisch in das Root-Verzeichnis (normalerweise `qmk_firmware`) kopieren. + +?> Wenn Du Windows oder macOS benutzt kannst Du mit folgenden Befehlen ganz einfach das aktuelle Firmware-Verzeichnis im Explorer oder Finder öffnen. + +#### Windows: + +``` start . ``` + +#### macOS: + +``` open . ``` + +Die Firmware-Dateien folgen dabei immer folgendem Schema: + + _.{bin,hex} + +Zum Beispiel würde ein `planck/rev5` mit der `default` Tastaturbelegung folgenden Dateinamen haben: + + planck_rev5_default.hex + +Wenn Du die Firmware-Datei gefunden hast kannst Du sie in das "Local file" ("Lokale Datei") Feld in der QMK Toolbox ziehen, alternativ kannst Du auf "Öffnen" klicken und in das Verzeichnis navigieren indem sich die Firmware-Datei befindet. + +### Die Tastatur in den DFU (Bootloader) Modus versetzen + +Um deine angepasste Firmware auf deine Tastatur zu flashen musst Du diese erst in einen speziellen "flashing"-Modus versetzen. Während die Tastatur in diesem Modus ist kannst Du nicht auf ihr tippen oder sie wie gewohnt als Tastatur benutzen. Es ist wichtig dass der flashing-Prozesses nicht unterbrochen oder die Tastatur ausstöpselst wird, da der Vorgang ansonst wiederholt werden muss. + +Verschiedene Tastaturen verwenden unterschiedliche Methoden um in den Bootloader-Modus zu gelangen. Wenn dein PCB im Moment QMK oder TMK verwendet und Du keine spezifischen Anweisungen erhalten hast probiere die folgenden Methoden in dieser Reihenfolge: + +* Halte beide Shift-Tasten und drücke `Pause` +* Halte beide Shift-Tasten und drücke `B` +* Entferne deine Tastatur vom Computer, drücke gleichzeitig `Leertaste` und `B`, verbinde die Tastatur wieder mit dem Computer und warte eine Sekunde bevor Du die Tasten wieder loslässt. +* Drücke den physischen `RESET`-Knopf auf der Unterseite des PCBs +* Suche auf dem PCB den Pin mit dem Label `RESET`, verbinde diesen mit deinem GND-Pin +* Suche auf dem PCB den Pin mit dem Label `BOOT0`, verbinde diesen mit GND und schließe die Tastatur wieder an den PC an TODO: DIS IS DANGEROUS!! + +Wenn Du damit erfolgreich warst solltest Du in der QMK Toolbox eine Nachricht sehen die ungefähr so aussieht: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### Tastatur flashen + +Klicke auf den `Flash`-Knopf in der QMK Toolbox. Die Ausgabe wird ungefähr so aussehen: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash qmk_firmware/clueboard_66_hotswap_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## Tastatur mit der Befehlszeile flashen + +Zunächst solltest Du versuchen herauszufinden welchen Bootlader deine Tastatur benutzt. Diese vier Bootloader sind am Weitesten verbreitet: + +| MCU | Bootloader | +| --- | --- | +| Pro-Micro und Klone | CATERINA | +| Teensy | Halfkay | +| OLKB Boards | QMK-DFU | +| sonstige atmega32u4 | DFU | + +Auf der Seite [Flash Anleitung und Bootloader Informationen](de/flashing.md) kannst Du mehr über das Thema erfahren. + +Wenn Du weißt welchen Bootloader deine Tastaur verwendet, kannst Du diese Information bei der Kompilation hinzufügen um den Flash-Vorgang mit dem `make`-Befehl zu automatisieren. +```rules.mk +... +BOOTLOADER = caterina +... +``` + +### DFU + +Wenn Du den DFU-Bootloader verwendest und Du bereit bist deine Firmware zu kompilieren und zu flashen, öffne ein Befehlszeile und führe folgenden Befehl aus: + + make ::dfu + +Wenn deine Tastaturbelegung z.B den Namen "xzverz" trägt und Du ein rev5 planck flashen möchtest sähe der Befehl wie folgt aus: + + make planck/rev5:xyverz:dfu + + +Nachdem der Vorgang abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +Wenn dieser Punkt erreicht ist wird das Build-Skript alle 5 Sekunden nach einem DFU Bootloader suchen. Dieser Vorgang wird wiederholt bis er erfolgreich ist oder abgebrochen wird. + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +Wenn diese Nachricht erscheint konnte das Build-Skript den Controller nicht eigenständig in den DFU Modus versetzen (z.B. weil der Modus in rules.mk falsch gesetzt wurde oder ein Problem mit der Hardware besteht), wenn dies eintritt musst Du die oben beschrieben Schritte benutzen um den Controller in den DFU Modus zu versetzen. Danach sollte die Ausgabe ungefähr so aussehen: + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash qmk_firmware/clueboard_66_hotswap_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +?> Wenn Du mit diesem Schritt Probleme hast (z.B. `dfu-programmer: no device present`) hilft dir hoffentlich der Abschnitt [Häufig gestellte Fragen (Build/Kompilieren)](de/faq_build.md). + +#### DFU Befehle + +Es gibt verschiedene DFU Befehle um die Firmware auf ein DFU Gerät zu flashen: + +* `:dfu` - Dies ist die default Option. Es wird gecheckt ob ein DFU Gerät verfügbar ist, ist dies der Fall wird die Firmware geflasht. Dieser Check wird alle 5 Sekunden ausgeführt bis ein DFU Gerät erkannt wird. +* `:dfu-ee` - Der Flash-Vorgang benutzt eine `.eep` Datei anstatt einer `.hex` Datei. Dies ist eher unüblich. +* `:dfu-split-left` - Dies flasht die Firmware wie gewohnt (`:dfu`). Allerdings nur die "linke Seite" der EEPROM für geteilte Tastaturen. _Dies ist ideal für auf Elite C basierenden geteilten Tastaturen._ +* `:dfu-split-right` - Dies flasht die Firmware wie gewohnt (`:dfu`). Allerdings nur die "rechte Seite" der EEPROM für geteilte Tastaturen. _Dies ist ideal für auf Elite C basierenden geteilten Tastaturen._ + + +### Caterina +Für Arduinos und andere ProMicro Klone (z.B. SparkFun ProMicro), wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::avrdude + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein "rev2 Lets Split" erzeugen möchtest, lautet der Befehl dafür: + + make lets_split/rev2:xyverz:avrdude + +Nachdem die Kompilation abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +Nun wird die Tastatur automatisch zurückgesetzt und das Skript wird die Firmware flashen sobald es den Bootloader erkennt. Die Ausgabe sollte ungefähr so aussehen: + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` +Sollten dabei Probleme auftreten (z.B. "Zugriff verweigert" / "Permission denied") muss der Make-Befehl mit privilegierten Berechtigungen ausgeführt werden: + + sudo make ::avrdude + +Zusätzlich ist es möglich mehrere Tastaturen in einem Vorgang zu flashen: + + make ::avrdude-loop + +Du kannst den Loop mit STRG + C unterbrechen sobald der Vorgang abgeschlossen ist. Die korrekte Tastenkombination kann abweichen und hängt vom Betriebssystem ab. + + +### HalfKay + +Für Tastaturen mit PJRC Controllern (Teensy's), wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::teensy + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein Ergodox oder Ergodox EZ erzeugen möchtest, lautet der Befehl dafür: + + make ergodox_ez:xyverz:teensy + +Nachdem die Kompilation abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +An diesem Punkt solltest Du die Tastatur zurücksetzen um den Flash-Vorgang auszulösen. Wenn dies abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + + ``` +Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................. +................................................... +Booting +``` + +### BootloadHID + +Für auf Bootmapper Client(BMC)/bootloaderHID/ATmega32A basierende Tastaturen, wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::bootloaderHID + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein jj40 erzeugen möchtest, lautet der Befehl dafür: + + make jj40:xyverz:bootloaderHID + +Nachdem die Kompilation abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +Wenn dieser Punkt erreicht ist wird das Build-Skript alle 5 Sekunden nach einem DFU Bootloader suchen. Dieser Vorgang wird wiederholt bis er erfolgreich ist oder abgebrochen wird. + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +An diesem Punkt solltest Du die Tastatur zurücksetzen um den Flash-Vorgang auszulösen. Wenn dies abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + +### STM32 (ARM) + +Für die meisten ARM Tastaturen (inkl. Proton C, Planck Rev 6 und Preonic Rev 3), wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::dfu-util + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein Planck Revision 6 erzeugen möchtest, benutze dafür den folgenden Befehl und reboote die Tastatur in den Bootloader (kurz bevor der Kompiliervorgang abgeschlossen ist): + + make planck/rev6:xyverz:dfu-util + +Nachdem der Kompiliervorgang abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +Für auf Bootmapper Client(BMC)/bootloaderHID/ATmega32A basierende Tastaturen, wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::bootloaderHID + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein jj40 erzeugen möchtest, lautet der Befehl dafür: +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +#### STM32 Befehle + +Für Tastaturen mit STM32 Controller sind die DFU Befehle wie folgt: + +* `:dfu-util` - The default command for flashing to STM32 devices. +* `:dfu-util` - Der Standard-Befehl für STM32 Geräte. +* `:dfu-util-wait` - Funktioniert wie der Standard-Befehl, aber mit einem 10 Sekunden Timeout bevor erneut versucht wird die Firmware zu flashen. Mit dem Parameter `TIME_DELAY=20` auf der Befehlszeile kann der Timeout beeinflusst werden. + * z.B.: `make ::dfu-util TIME_DELAY=5` +* `:dfu-util-split-left` - Gleiche Funktionsweise wie `dfu-util`, jedoch wird zusätzlich das EEPROM Setting "linke Seite" für geteilte Tastaturen gesetzt. +* `:dfu-util-split-right` - Gleiche Funktionsweise wie `dfu-util`, jedoch wird zusätzlich das EEPROM Setting "rechte Seite" für geteilte Tastaturen gesetzt. + +## Probier's aus! + +Herzlichen Glückwunsch! Deine individuell angepasst Firmware wurde auf deine Tastatur übertragen! + + Probiere deine neue Tastatur aus und gehe sicher dass alles wie gewünscht funktioniert. Wir haben einen weiteren Artikel zum Thema [Testen und Debuggen](de/newbs_testing_debugging.md) verfasst der sich mit Problembeseitigung beschäftigt um den Beginnger-Guide abzuschließen. diff --git a/docs/de/newbs_getting_started.md b/docs/de/newbs_getting_started.md new file mode 100644 index 0000000000..8240f2bafa --- /dev/null +++ b/docs/de/newbs_getting_started.md @@ -0,0 +1,101 @@ +# Einleitung +Genau wie in einem Computer befindet sich auch in einer Tastatur ein Prozessor. + +Dieser Prozessor führt Software aus, die registriert wenn Tasten gedrückt bzw. wieder losgelassen werden und leitet die entsprechenden Signale an den Computer weiter. + +QMK übernimmt die Rolle dieser Software und teilt dem Host-Computer den aktuellen Zustand der Tastatur mit. Wenn Du eine Tastaturbelegung definierst, ist dies äquivalent zu einem ausführbarem Programm, das auf deiner Tastatur läuft. + +QMK möchte seine BenutzerInnen in die Lage versetzen, simple Aufgaben möglichst einfach zu gestalten und gleichzeitig komplexe Dinge zu ermöglichen, die mit normalen Tastaturen ohne zusätzliche Software undenkbar wären. Du musst nicht programmieren können, um abgefahrene Tastaturbelegungen zu gestalten - es reicht wenn Du eine Idee hast und ein paar einfache syntaktische Regeln verstehen kannst. + +# Los geht's! +Bevor Du damit loslegen kannst, deine Tastaturbelegung zu erstellen, musst Du ein wenig Software installieren und Dir eine Entwicklungsumgebung aufsetzen. Die gute Nachricht ist, dass das nur einmal erledigt werden muss, egal für wie viele verschiedene Tastaturen Du hinterher Firmware entwickeln willst. + +Wenn Du es vorziehst mit einer grafischen Oberfläche zu entwickeln kannst Du auch dazu gerne direkt mit dem online [QMK Konfigurator](https://config.qmk.fm) loslegen. Siehe auch: [Firmware mit der Online GUI erzeugen](de/newbs_building_firmware_configurator.md) + +## Software herunterladen + +### Text Editor + +Du wirst ein Programm benötigen, mit dem Du **plain text** (= reiner Text) Dateien bearbeiten und speichern kannst. Wenn Du Windows benutzt, reicht dafür schon das normale `Notepad` und für Linux z.B. `gedit` oder `leafpad`. Beide sind sehr rudimentäre Editoren deren Funktionsumfang aber vollkommen ausreicht. Für macOS' standard `TextEdit` muss man ein bisschen vorsichtig sein und darauf achten, beim Speichern explizit unter _Format_ die Option _Reiner Text_ auszuwählen. + +Ansonsten ist es empfehlenswert, einen Editor herunterzuladen der für die Programmierung und das Bearbeiten von Code ausgelegt ist wie z.b [Notepad++](http://notepad-plus-plus.org/), [Sublime Text](https://www.sublimetext.com/) oder [VS Code](https://code.visualstudio.com/). + +?> Immer noch unsicher, welcher Text Editor der Richtige für Dich ist? Laurence Bradford hat eine hervorragende [Einleitung](https://learntocodewith.me/programming/basics/text-editors/) zu dem Thema geschrieben (auf Englisch). + +### QMK Toolbox + +QMK Toolbox ist ein optionales grafisches Programm für Windows und macOS, das es erleichtern soll, deine Tastatur zu programmieren und zu debuggen. Du wirst es höchstwahrscheinlich früher oder später als unverzichtbar ansehen, wenn es darum geht eine Tastatur einfach zu flashen oder zu debuggen, da es ermöglicht, sich debug-Nachrichten direkt anzeigen zu lassen. + +[Hier kannst Du die aktuelle Version herunterladen.](https://github.com/qmk/qmk_toolbox/releases/latest) + +* Für Windows: `qmk_toolbox.exe` (portable) oder `qmk_toolbox_install.exe` (installer) +* Für macOS: `QMK.Toolbox.app.zip` (portable) oder `QMK.Toolbox.pkg` (installer) + +## Die Entwicklungsumgebung aufsetzen + + +Wir haben versucht, die Installation der Entwicklungsumgebung für QMK so einfach wie möglich zu gestalten. Alles, was Du tun musst, ist eine Linux oder Unix Umgebung aufzusetzen, danach macht QMK den Rest. + +?> Wenn Du das erste Mal mit der Linux/Unix Befehlszeile arbeitest, schadet es nicht, sich mit ein paar Grundlagen und Befehlen vertraut zu machen. Diese Ressourcen sollten ausreichen, um sich das Nötigste anzueignen um mit QMK arbeiten zu können:
+[Erforderliche Linux Grundlagen](https://www.guru99.com/must-know-linux-commands.html)
+[Noch ein paar Linux Befehle](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +Du wirst MSYS2 (o.Ä.) und Git benötigen. + +* Befolge die Installationsanleitung auf der [MSYS2 Homepage](http://www.msys2.org) +* Schließe alle offenen MSYS2 Fenster und öffne ein neues MSYS2 MinGW 64-bit Terminal +* Installiere Git mit dem Kommando: `pacman -S git` + +### macOS + +Du wirst Homebrew benötigen. Folge dafür den Anweisungen auf der [Homebrew homepage](https://brew.sh). + +Nachdem Homebrew erfolgreich installiert ist, kannst Du mit _QMK aufsetzen_ fortfahren. + +### Linux + +Du benötigst Git, aber es ist ziemlich wahrscheinlich, dass es bereits installiert ist. Sollte dies nicht der Fall sein, kannst Du es mit dem folgenden Aufruf installieren: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch Linux: `pacman -S git` + +?> Docker ist ebenfalls eine Option für alle Plattformen. [Hier](de/getting_started_build_tools.md#docker) kannst Du dazu weitere Informationen finden. + +## QMK aufsetzen +Wenn Du damit fertig bist, deine Linux/Unix Umgebung zu installieren, kannst Du damit fortfahren QMK herunterzuladen. Dafür werden wir mit Git das QMK Repository "klonen". Öffne ein Terminal oder ein MSYS2 MinGW Fenster, dies wirst Du für den Rest der Anleitung benötigen. In diesem Fenster rufst Du nun die beiden folgenden Kommandos auf: + +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` +?> Wenn Du bereits weißt, [wie man GitHub benutzt](de/getting_started_github.md), empfehlen wir, dass Du Dir ein eigenen Fork erstellst. Wenn Du nicht weißt, was das bedeuten soll, kannst Du diesen Ratschlag getrost ignorieren. + +QMK liefert ein Script mit, das helfen soll, Dir alles Weitere abzunehmen. Du kannst es mit dem folgenden Befehl aufrufen: + + util/qmk_install.sh + +## Die Build-Umgebung testen + +Nun sollte hoffentlich alles Nötige für eine funktionierende QMK Build-Umgebung installiert sein und Du solltest in der Lage sein, die QMK-Firmware zu kompilieren. Um dies mit einer `default` Tastaturbelegung zu testen, kannst Du den folgenden Befehl ausprobieren: + + make :default + +Der Befehl um z.B. die Firmware für ein _Clueboard 66%_ zu erzeugen lautet: + + make clueboard/66/rev3:default + +Wenn es fertig ist, sollte der Output ungefähr so ähnlich wie das Folgende aussehen: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# Eine eigene Tastaturbelegung erstellen +Du bist nun fertig mit dem Setup der Entwicklungsumgebung und solltest somit in der Lage sein, deine eigenen Tastaturbelegungen zu erstellen. Um fortzufahren, folge bitte der nächsten Anleitung unter [Die erste Firmware](de/newbs_building_firmware.md). diff --git a/docs/de/newbs_learn_more_resources.md b/docs/de/newbs_learn_more_resources.md new file mode 100644 index 0000000000..59b72152dd --- /dev/null +++ b/docs/de/newbs_learn_more_resources.md @@ -0,0 +1,14 @@ +# Lernmaterial + +Diese weiterführenden Ressourcen sind darauf ausgerichtet, Neulingen der QMK Commmunity mehr Informationen und ein besseres Verständnis zu einzelnen Themen zu bieten. + +Git Ressourcen: + +* [Gutes allgemeines Tutorial](https://www.codecademy.com/learn/learn-git) (auf Englisch) +* [Git spielerisch anhand von Beispielen lernen](https://learngitbranching.js.org/) (auf Englisch) +* [Mehr über den allgemeinen Umgang mit Github](getting_started_github.md) +* [Mehr über Git im Bezug zu QMK](contributing.md) + +Mehr über die Arbeit mit der Befehlszeile: + +* [Gutes allgemeines Tutorial über die Arbeit mit der Befehlszeile](https://www.codecademy.com/learn/learn-the-command-line) (auf Englisch) diff --git a/docs/de/newbs_testing_debugging.md b/docs/de/newbs_testing_debugging.md new file mode 100644 index 0000000000..acc067e10f --- /dev/null +++ b/docs/de/newbs_testing_debugging.md @@ -0,0 +1,100 @@ +# Testen und Debuggen + +Nachdem Du deine Tastatur mit deiner angepassten Firmware geflasht hast, ist es nun an der Zeit sie auszuprobieren. Mit ein bisschen Glück sollte alles ohne Probleme funktionieren, wenn dies nicht der Fall ist, soll dieses Dokument dir dabei helfen, herauszufinden wo das Problem liegt. + +## Testen + +Die Tastatur zu testen ist relativ selbsterklärend. Drücke jede der Tasten um dich zu versichern, dass der gesendete Keyode der ist, den du erwarten würdest. Dafür gibt es sogar ein paar Programme die helfen sollen, dass keine Taste ausgelassen wurde. + +Anmerkung: Diese Programme werden weder von QMK bereitgestellt oder gutgeheißen. + +* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Nur für Windows) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Nur für Mac) +* [Keyboard Tester](http://www.keyboardtester.com) (Web basiert) +* [Keyboard Checker](http://keyboardchecker.com) (Web basiert) + +## Debuggen + +Deine Tastatur wird Debug Informationen liefern wenn Du `CONSOLE_ENABLE = yes` in deiner `rules.mk` gesetzt hast. Die default-Ausgabe ist sehr beschränkt und kann wenn nötig durch die Aktivierung des Debug-Modes erhöht werden. Benutze dafür entweder den `DEBUG` Keycode in deiner Tastaturbelegung, das [Command](de/feature_command.md)-Feature oder füge den folgenden Code zu deiner Tastaturbelegung hinzu. + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### Debuggen mit der QMK Toolbox + +Für kompatible Plattformen kann die [QMK Toolbox](https://github.com/qmk/qmk_toolbox) benutzt werden um Debug-Nachrichten deiner Tastatur anzuzeigen. + +### Debuggen mit hid_listen + +Bevorzugst Du es lieber auf der Befehlszeile zu debuggen? Dafür eignet sich das Programm [hid_listen](https://www.pjrc.com/teensy/hid_listen.html) von PJRC. Binaries sind für Windows, Linux und MacOS verfügbar. + + + +## Eigene Debug-Nachrichten senden + +Manchmal ist es hilfreich Debug-Nachrichten innerhalb deines eigenen [Custom Codes](de/custom_quantum_functions.md) zu drucken. Das ist ziemlich einfach. Beginne damit `print.h` am Anfang deiner Datei zu inkludieren: + + #include + +Danach stehen dir verschiedene Druck-Funktionen zur Verfügung: + +* `print("string")`: Druckt einen simplen String +* `uprintf("%s string", var)`: Druckt einen formatierten String +* `dprint("string")` Druckt einen simplen String, aber nur wenn der Debug-Mode aktiviert ist +* `dprintf("%s string", var)`: Druckt einen formatierten String, aber nur wenn der Debug-Mode aktiviert ist + +## Debug Beispiele + +Anbei findest Du eine Sammlung von hilfreichen Beispielen. Für weitere Informationen Informationen sei an dieser Stelle auf [Debugging/Troubleshooting QMK](de/faq_debug.md) verwiesen. + +### Which matrix position is this keypress? +### Welche Matrix Position hat dieser Tastenanschlag + +Beim Portieren, oder bei der Fehlerdiagnose von PCB Problemen, ist es nützlich sich anzeigen zu lassen ob ein Tastenanschlag richtig erkannt wurde. Um die Protokollierung für diesen Fall zu aktivieren, füge bitte folgenden Code zu deiner Tastaturbelegung `keymap.c` hinzu. + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Wenn 'console' aktiviert ist wird die Matrix-Position und der Status jedes Tastenanschlags ausgegeben +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +Beispiel Ausgabe: +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### Wieviel Zeit wurde benötigt um einen Tastenanschlag zu detektieren? + +Wenn Performance-Probleme auftreten ist es hilfreich die Frequenz, mit der die Matrix gescannt wird, zu wissen. Um dies in diesem Fall zu aktiveren füge, den folgenden Code zu deiner Tastaturbelegung in `config.h` hinzu. + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +Beispiel Ausgabe +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` diff --git a/docs/documentation_templates.md b/docs/documentation_templates.md index ba3830b64c..85d3893b71 100644 --- a/docs/documentation_templates.md +++ b/docs/documentation_templates.md @@ -28,9 +28,9 @@ the Ctrl, Alt, or GUI modifiers are held down. A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) -Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) -Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0 -Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) +* Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +* Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0 +* Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) Make example for this keyboard (after setting up your build environment): @@ -38,5 +38,3 @@ Make example for this keyboard (after setting up your build environment): 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). ``` - -There needs to be two spaces at the end of the `Keyboard Maintainer` and `Hardware Supported` lines for it to render correctly with Markdown. diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md new file mode 100644 index 0000000000..b04a6fbef1 --- /dev/null +++ b/docs/driver_installation_zadig.md @@ -0,0 +1,48 @@ +# Bootloader Driver Installation with Zadig + +QMK presents itself to the host as a regular HID keyboard device, and as such requires no special drivers. However, in order to flash your keyboard on Windows, the bootloader device that appears when you reset the board often *does*. + +There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the HalfKay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver. + +We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you. + +## Installation + +Put your keyboard into bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic](feature_bootmagic.md) docs for more details). Some boards use [Command](feature_command.md) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in. +Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure. + +To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button. +Alternatively, hold `BOOT` while inserting the USB cable. + +Zadig will automatically detect the bootloader device. You may sometimes need to check **Options → List All Devices**. + + - For keyboards with Atmel AVR MCUs, the bootloader will be named something similar to `ATm32U4DFU`, and have a Vendor ID of `03EB`. + - USBasp bootloaders will appear as `USBasp`, with a VID/PID of `16C0:05DC`. + - AVR keyboards flashed with the QMK-DFU bootloader will be named ` Bootloader` and will also have the VID `03EB`. + - For most ARM keyboards, it will be called `STM32 BOOTLOADER`, and have a VID/PID of `0483:DF11`. + +!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case! + +If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. For flashing a USBaspLoader device via command line with msys2, the `libusbk` driver is recommended, otherwise `libusb-win32` will work fine if you are using QMK Toolbox for flashing. + +![Zadig with a bootloader driver correctly installed](https://i.imgur.com/b8VgXzx.png) + +Finally, unplug and replug the keyboard to make sure the new driver has been loaded. If you are using the QMK Toolbox to flash, exit and restart it too, as it can sometimes fail to recognize the driver change. + +## Recovering from Installation to Wrong Device + +If you find that you can no longer type with the keyboard, you may have accidentally replaced the driver for the keyboard itself instead of for the bootloader. This can happen when the keyboard is not in the bootloader mode. You can easily confirm this in Zadig - a healthy keyboard has the `HidUsb` driver installed on all of its interfaces: + +![A healthy keyboard as seen by Zadig](https://i.imgur.com/Hx0E5kC.png) + +Open the Device Manager and look for a device that looks like your keyboard. + +![The board with the wrong driver installed, in Device Manager](https://i.imgur.com/L3wvX8f.png) + +Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first. + +![The Device Uninstall dialog, with the "delete driver" checkbox ticked](https://i.imgur.com/aEs2RuA.png) + +Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again! + +?> A full reboot of your computer may sometimes be necessary at this point, to get Windows to pick up the new driver. diff --git a/docs/es/README.md b/docs/es/README.md new file mode 100644 index 0000000000..73e7a7097d --- /dev/null +++ b/docs/es/README.md @@ -0,0 +1,32 @@ +# Firmware Quantum Mechanical Keyboard + +[![Versión actual](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Estado de Build](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Estado de la documentación](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![Contribuyentes en GitHub](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![Forks en GitHub](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## ¿Qué es el firmware QMK? + +QMK (*Quantum Mechanical Keyboard*) es una comunidad open source que mantiene el firmware QMK, QMK Toolbox, qmk.fm, y estos documentos. El firmware QMK es un firmware para teclados basado en [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) con algunas características útiles para controladores Atmel AVR, y más específicamente, la [línea de productos OLKB](http://olkb.com), el teclado [ErgoDox EZ](http://www.ergodox-ez.com), y la [línea de productos Clueboard](http://clueboard.co/). También ha sido portado a chips ARM chips usando ChibiOS. Lo puedes utilizar para manejar tu propio teclado ya sea cableado a mano o basado en una PCB personalizada. + +## Cómo conseguirlo + +Si estás pensando en contribuir con un keymap, teclado, or característica a QMK, la manera más sencilla es hacer un [fork del repositorio en Github](https://github.com/qmk/qmk_firmware#fork-destination-box), y clonar tu repositorio localmente para hacer los cambios, subirlos, y abir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) desde tu fork. + +De cualquier manera, también puedes descargarlo directamente en formatos ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), o clonarlo via git (`git@github.com:qmk/qmk_firmware.git`), o https (`https://github.com/qmk/qmk_firmware.git`). + +## Cómo compilar + +Antes de poder compilar, necesitarás [instalar un entorno](getting_started_build_tools.md) para el desarrollo de AVR y/o ARM. Una vez hayas completado este paso, usarás el comando `make` para compilar un teclado y keymap con la siguiente notación: + + make planck/rev4:default + +Este ejemplo compilaría la revisión `rev4` del teclado `planck` con el keymap `default`. No todos los teclados tienen revisiones (también llamados subproyectos o carpetas), en ese caso, se puede omitir: + + make preonic:default + +## Cómo personalizar + +QMK tiene montones de [características](features.md) para explorar, y una buena cantidad de [documentación de referencia](http://docs.qmk.fm) en la que sumergirse. Se pueden sacar provecho de la mayoría de las características modificando tu [keymap](keymap.md), y cambiando los [keycodes](keycodes.md). diff --git a/docs/es/_summary.md b/docs/es/_summary.md new file mode 100644 index 0000000000..684d7ab6cd --- /dev/null +++ b/docs/es/_summary.md @@ -0,0 +1,121 @@ +* [Guía completa para novatos](newbs.md) + * [Empezando](newbs_getting_started.md) + * [Construyendo tu primer firmare](newbs_building_firmware.md) + * [Flasheando el firmware](newbs_flashing.md) + * [Testeando y depurando ](newbs_testing_debugging.md) + * [Mejores práticas](newbs_best_practices.md) + * [Recursos de aprendizaje](newbs_learn_more_resources.md) + +* [QMK Basics](README.md) + * [Introducción a QMK](getting_started_introduction.md) + * [QMK CLI](cli.md) + * [Configuración de QMK CLI](cli_configuration.md) + * [Contribuyendo a QMK](contributing.md) + * [Cómo usar Github](getting_started_github.md) + * [Obtener ayuda](getting_started_getting_help.md) + +* [Cambios incompatibles](breaking_changes.md) + * [30 Ago 2019](ChangeLog/20190830.md) + +* [Preguntas frecuentes](faq.md) + * [General](faq_general.md) + * [Construir/Compilar QMK](faq_build.md) + * [Depurando/Encontrando problemas en QMK](faq_debug.md) + * [Keymap](faq_keymap.md) + * [Instalación de drivers con Zadig](driver_installation_zadig.md) + +* Guías detalladas + * [Instalar herramientas construcción](getting_started_build_tools.md) + * [Guía Vagrant](getting_started_vagrant.md) + * [Instrucciones de Construcción/Compilado](getting_started_make_guide.md) + * [Flasheando Firmware](flashing.md) + * [Personalizando funcionalidad](custom_quantum_functions.md) + * [Visión general del Keymap](keymap.md) + +* [Hardware](hardware.md) + * [Procesadores AVR](hardware_avr.md) + * [Drivers](hardware_drivers.md) + +* Referencia + * [Pautas de teclados](hardware_keyboard_guidelines.md) + * [Opciones de configuración](config_options.md) + * [Keycodes](keycodes.md) + * [Convenciones de código - C](coding_conventions_c.md) + * [Convenciones de código - Python](coding_conventions_python.md) + * [Mejores prácticas de documentación](documentation_best_practices.md) + * [Plantillas de documentación](documentation_templates.md) + * [Glosario](reference_glossary.md) + * [Tests unitarios](unit_testing.md) + * [Funciones útiles](ref_functions.md) + * [Sporte configurador](reference_configurator_support.md) + * [Formato info.json](reference_info_json.md) + * [Desarrollo Python CLI](cli_development.md) + +* [Características](features.md) + * [Keycodes Básicos](keycodes_basic.md) + * [Teclas US ANSI Shifted](keycodes_us_ansi_shifted.md) + * [Keycodes Quantum](quantum_keycodes.md) + * [Keycodes Avanzados](feature_advanced_keycodes.md) + * [Audio](feature_audio.md) + * [Auto Shift](feature_auto_shift.md) + * [Retroiluminación](feature_backlight.md) + * [Bluetooth](feature_bluetooth.md) + * [Bootmagic](feature_bootmagic.md) + * [Combos](feature_combo.md) + * [Comando](feature_command.md) + * [API Debounce](feature_debounce_type.md) + * [Switch DIP](feature_dip_switch.md) + * [Macros Dinámicas](feature_dynamic_macros.md) + * [Encoders](feature_encoders.md) + * [Grave Escape](feature_grave_esc.md) + * [Feedback Háptico](feature_haptic_feedback.md) + * [Controlador LCD HD44780](feature_hd44780.md) + * [Key Lock](feature_key_lock.md) + * [Layouts](feature_layouts.md) + * [Tecla Leader](feature_leader_key.md) + * [Matriz LED](feature_led_matrix.md) + * [Macros](feature_macros.md) + * [Teclas del ratón](feature_mouse_keys.md) + * [Driver OLED](feature_oled_driver.md) + * [Teclas One Shot](feature_advanced_keycodes.md#one-shot-keys) + * [Dispositivo de apuntado](feature_pointing_device.md) + * [Ratón PS/2](feature_ps2_mouse.md) + * [Iluminación RGB](feature_rgblight.md) + * [Matriz RGB](feature_rgb_matrix.md) + * [Cadete espacial](feature_space_cadet.md) + * [Teclado dividido](feature_split_keyboard.md) + * [Stenografía](feature_stenography.md) + * [Swap Hands](feature_swap_hands.md) + * [Tap Dance](feature_tap_dance.md) + * [Terminal](feature_terminal.md) + * [Impresora Térmica](feature_thermal_printer.md) + * [Unicode](feature_unicode.md) + * [Userspace](feature_userspace.md) + * [Velocikey](feature_velocikey.md) + +* Para Makers y Modders + * [Guía de cableado a mano](hand_wire.md) + * [Guía de flasheado de ISP](isp_flashing_guide.md) + * [Guía de depuración de ARM](arm_debugging.md) + * [Driver I2C](i2c_driver.md) + * [Controles GPIO](internals_gpio_control.md) + * [Conversión Proton C](proton_c_conversion.md) + +* Para entender en profundidad + * [Cómo funcionan los teclados](how_keyboards_work.md) + * [Entendiendo QMK](understanding_qmk.md) + +* Otros temas + * [Usando Eclipse con QMK](other_eclipse.md) + * [Usando VSCode con QMK](other_vscode.md) + * [Soporte](support.md) + * [Cómo añadir traducciones](translating.md) + +* QMK Internals (En progreso) + * [Defines](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Dispositivo Midi](internals_midi_device.md) + * [Proceso de configuración de un dispositivo Midi](internals_midi_device_setup_process.md) + * [Utilidad Midi](internals_midi_util.md) + * [Funciones Send](internals_send_functions.md) + * [Herramientas Sysex](internals_sysex_tools.md) diff --git a/docs/es/becoming_a_qmk_collaborator.md b/docs/es/becoming_a_qmk_collaborator.md new file mode 100644 index 0000000000..f88846df24 --- /dev/null +++ b/docs/es/becoming_a_qmk_collaborator.md @@ -0,0 +1,9 @@ +# Llegar a ser un colaborador QMK + +Un colaborador QMK es un maker o diseñador de teclados que tiene interés en ayudar a QMK a crecer y mantener sus teclado(s), y alentar a los usuarios y clientes a presentar herramientas, ideas, y keymaps. Siempre procuramos agregar más teclados y colaboradores, pero pedimos que cumplan los siguientes requisitos: + +* **Tener un PCB disponible a la venta.** Desafortunadamente, hay demasiada variación y complicaciones con teclados cableados a mano. +* **Realizar el mantenimiento de tu teclado en QMK.** Este podría requirir un setup inicial para hacer que tu teclado funcione, pero también podría incluir adaptarse a cambios hecho al base de QMK que podrían descomponer o rendir código superfluo. +* **Aprobar e incorporar pull requests de keymaps para tu teclado.** Nos gusta alentar a los usuarios a contribuir sus keymaps para que otros los vean y los puedan usar para crear sus propios. + +Si sientes que cumples los requisitos, ¡mándanos un email a hello@qmk.fm con una introducción y algunos enlaces para tu teclado! diff --git a/docs/es/hardware.md b/docs/es/hardware.md new file mode 100644 index 0000000000..8d7579c9ef --- /dev/null +++ b/docs/es/hardware.md @@ -0,0 +1,8 @@ +# Hardware + +QMK es compatible con una variedad de hardware. Si tu procesador puede ser dirigido por [LUFA](http://www.fourwalledcubicle.com/LUFA.php) o [ChibiOS](http://www.chibios.com), probablemente puedes hacer que QMK se ejecute en él. Esta sección explora cómo hacer que QMK se ejecute y se comunique con hardware de todo tipo. + +* [Pautas de teclados](hardware_keyboard_guidelines.md) +* [Procesadores AVR](hardware_avr.md) +* Procesadores ARM (TBD) +* [Drivers](hardware_drivers.md) diff --git a/docs/es/hardware_avr.md b/docs/es/hardware_avr.md new file mode 100644 index 0000000000..4236292a12 --- /dev/null +++ b/docs/es/hardware_avr.md @@ -0,0 +1,181 @@ +# Teclados con Procesadores AVR + +Esta página describe el soporte para procesadores AVR en QMK. Los procesadores AVR incluyen el atmega32u4, atmega32u2, at90usb1286, y otros procesadores de la Corporación Atmel. Los procesadores AVR son MCUs de 8-bit que son diseñados para ser fáciles de trabajar. Los procesadores AVR más comunes en los teclados tienen USB y un montón de GPIO para permitir grandes matrices de teclado. Son los MCUs más populares para el uso en los teclados hoy en día. + +Si aún no lo has hecho, debes leer las [Pautas de teclados](hardware_keyboard_guidelines.md) para tener una idea de cómo los teclados encajan en QMK. + +## Añadir tu Teclado AVR a QMK + +QMK tiene varias características para simplificar el trabajo con teclados AVR. Para la mayoría de los teclados no tienes que escribir ni una sola línea de código. Para empezar, ejecuta el archivo `util/new_keyboard.sh`: + +``` +$ ./util/new_keyboard.sh +Generating a new QMK keyboard directory + +Keyboard Name: mycoolkb +Keyboard Type [avr]: +Your Name [John Smith]: + +Copying base template files... done +Copying avr template files... done +Renaming keyboard files... done +Replacing %KEYBOARD% with mycoolkb... done +Replacing %YOUR_NAME% with John Smith... done + +Created a new keyboard called mycoolkb. + +To start working on things, cd into keyboards/mycoolkb, +or open the directory in your favourite text editor. +``` + +Esto creará todos los archivos necesarios para tu nuevo teclado, y rellenará la configuración con valores predeterminados. Ahora sólo tienes que personalizarlo para tu teclado. + +## `readme.md` + +Aquí es donde describirás tu teclado. Por favor sigue la [Plantilla del readme de teclados](documentation_templates.md#keyboard-readmemd-template) al escribir tu `readme.md`. Te animamos a colocar una imagen en la parte superior de tu `readme.md`. Por favor, utiliza un servicio externo como [Imgur](http://imgur.com) para alojar las imágenes. + +## `.c` + +Aquí es donde pondrás toda la lógica personalizada para tu teclado. Muchos teclados no necesitan nada aquí. Puedes aprender más sobre cómo escribir lógica personalizada en [Funciones Quantum Personalizadas](custom_quantum_functions.md). + +## `.h` + +Este es el archivo en el que defines tu(s) [Macro(s) de Layout](feature_layouts.md). Por lo menos deberías tener un `#define LAYOUT` para tu teclado que se ve algo así: + +```c +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11 \ +) { \ + { k00, k01, k02 }, \ + { k10, KC_NO, k11 }, \ +} +``` + +La primera mitad de la macro pre-procesador `LAYOUT` define la disposición física de las llaves. La segunda mitad de la macro define la matriz a la que están conectados los interruptores. Esto te permite tener una disposición física de las llaves que difiere de la matriz de cableado. + +Cada una de las variables `k__` tiene que ser única, y normalmente sigue el formato `k`. + +La matriz física (la segunda mitad) debe tener un número de filas igualando `MATRIX_ROWS`, y cada fila debe tener exactamente `MATRIX_COLS` elementos. Si no tienes tantas teclas físicas puedes usar `KC_NO` para rellenar los espacios en blanco. + +## `config.h` + +El archivo `config.h` es donde configuras el hardware y el conjunto de características para tu teclado. Hay un montón de opciones que se pueden colocar en ese archivo, demasiadas para listar allí. Para obtener una visión de conjunto completa de las opciones disponibles consulta la página de [Opciones de Configuración](config_options.md). + +### Configuración de hardware + + +En la parte superior de `config.h` encontrarás ajustes relacionados con USB. Estos controlan la apariencia de tu teclado en el Sistema Operativo. Si no tienes una buena razón para cambiar debes dejar el `VENDOR_ID` como `0xFEED`. Para el `PRODUCT_ID` debes seleccionar un número que todavía no esté en uso. + +Cambia las líneas de `MANUFACTURER`, `PRODUCT`, y `DESCRIPTION` para reflejar con precisión tu teclado. + +```c +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Tú +#define PRODUCT mi_teclado_fantastico +#define DESCRIPTION Un teclado personalizado +``` + +?> Windows y macOS mostrarán el `MANUFACTURER` y `PRODUCT` en la lista de dispositivos USB. `lsusb` en Linux toma estos de la lista mantenida por el [Repositorio de ID USB](http://www.linux-usb.org/usb-ids.html) por defecto. `lsusb -v` mostrará los valores reportados por el dispositivo, y también están presentes en los registros del núcleo después de conectarlo. + +### Configuración de la matriz del teclado + +La siguiente sección del archivo `config.h` trata de la matriz de tu teclado. Lo primero que debes establecer es el tamaño de la matriz. Esto es generalmente, pero no siempre, el mismo número de filas y columnas como la disposición física de las teclas. + +```c +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 +``` + +Una vez que hayas definido el tamaño de tu matriz, necesitas definir qué pines en tu MCU están conectados a filas y columnas. Para hacerlo simplemente especifica los nombres de esos pines: + +```c +#define MATRIX_ROW_PINS { D0, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } +#define UNUSED_PINS +``` + +El número de entradas debe ser el mismo que el número que asignaste a `MATRIX_ROWS`, y del mismo modo para `MATRIX_COL_PINS` y `MATRIX_COLS`. No tienes que especificar `UNUSED_PINS`, pero puedes si deseas documentar qué pines están abiertos. + +Finalmente, puedes especificar la dirección en la que apuntan tus diodos. Esto puede ser `COL2ROW` o `ROW2COL`. + +```c +#define DIODE_DIRECTION COL2ROW +``` + +#### Matriz de patas directas +Para configurar un teclado en el que cada interruptor está conectado a un pin y tierra separados en lugar de compartir los pines de fila y columna, usa `DIRECT_PINS`. La asignación define los pines de cada interruptor en filas y columnas, de izquierda a derecha. Debe ajustarse a los tamaños dentro de `MATRIX_ROWS` y `MATRIX_COLS`. Usa `NO_PIN` para rellenar espacios en blanco. Sobreescribe el comportamiento de `DIODE_DIRECTION`, `MATRIX_ROW_PINS` y `MATRIX_COL_PINS`. + +```c +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F1, E6, B0, B2, B3 }, \ + { F5, F0, B1, B7, D2 }, \ + { F6, F7, C7, D5, D3 }, \ + { B5, C6, B6, NO_PIN, NO_PIN } \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION +``` + +### Configuración de retroiluminación + +QMK soporta retroiluminación en la mayoría de los pines GPIO. Algunos de ellos pueden ser manejados por el MCU en hardware. Para más detalles, consulta la [Documentación de Retroiluminación](feature_backlight.md). + +```c +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 +``` + +### Otras opciones de configuración + +Hay un montón de características que se pueden configurar o ajustar en `config.h`. Debes consultar la página de [Opciones de Configuración](config_options.md) para más detalles. + +## `rules.mk` + +Usa el archivo `rules.mk` para decirle a QMK qué archivos construir y qué características habilitar. Si estás construyendo sobre un atmega32u4 deberías poder dejar mayormente los valores predeterminados. Si estás usando otro MCU es posible que tengas que ajustar algunos parámetros. + +### Opciones MCU + +Estas opciones le indican al sistema de compilación para qué CPU construir. Ten mucho cuidado si cambias cualquiera de estos ajustes. Puedes inutilizar tu teclado. + +```make +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +``` + +### Gestores de arranque + +El gestor de arranque es una sección especial de tu MCU que te permite actualizar el código almacenado en el MCU. Piensa en ello como una partición de rescate para tu teclado. + +#### Ejemplo de gestor de arranque + +```make +BOOTLOADER = halfkay +``` + +#### Ejemplo de cargador DFU Atmel + +```make +BOOTLOADER = atmel-dfu +``` + +#### Ejemplo de gestor de arranque Pro Micro + +```make +BOOTLOADER = caterina +``` + +### Opciones de construcción + +Hay un serie de características que se pueden activar o desactivar en `rules.mk`. Consulta la página de [Opciones de Configuración](config_options.md#feature-options) para obtener una lista detallada y una descripción. diff --git a/docs/es/hardware_drivers.md b/docs/es/hardware_drivers.md new file mode 100644 index 0000000000..7b74b34b45 --- /dev/null +++ b/docs/es/hardware_drivers.md @@ -0,0 +1,36 @@ +# Controladores de hardware QMK + +QMK se utiliza en un montón de hardware diferente. Mientras que el soporte para los MCUs y las configuraciones de matriz más comunes está integrado, hay una serie de controladores que se pueden añadir para soportar hardware adicional al teclado. Los ejemplos incluyen ratones y otros dispositivos de apuntamiento, extensores de i/o para teclados divididos, modúlos Bluetooth, y pantallas LCD, OLED y TFT. + + + +# Controladores disponibles + +## ProMicro (Solo AVR) + +Soporte para direccionar pines en el ProMicro por su nombre Arduino en lugar de su nombre AVR. Esto necesita ser mejor documentado. Si estás tratando de hacer esto y leer el código no ayuda por favor [abre una issue](https://github.com/qmk/qmk_firmware/issues/new) y podemos ayudarte por el proceso. + +## Controlador OLED SSD1306 + +Soporte para pantallas OLED basadas en SSD1306. Para obtener más información consulta la página de [Característica de Controlador OLED](feature_oled_driver.md). + +## uGFX + +Puedes hacer uso de uGFX dentro de QMK para manejar LCDs de caracteres y gráficos, matrices de LED, OLED, TFT, y otras tecnologías de visualización. Esto necesita ser mejor documentado. Si estás tratando de hacer esto y leer el código no ayuda por favor [abre una issue](https://github.com/qmk/qmk_firmware/issues/new) y podemos ayudarte por el proceso. + +## WS2812 (Solo AVR) + +Soporte para LEDs WS2811/WS2812{a,b,c}. Para obtener más información consulta la página de [Luz RGB](feature_rgblight.md). + +## IS31FL3731 + +Soporte para hasta 2 controladores. Cada controlador implementa 2 matrices charlieplex para direccionar LEDs individualmente usando I2C. Esto permite hasta 144 LEDs del mismo color o 32 LEDs RGB. Para obtener más información sobre cómo configurar el controlador, consulta la página de [Matriz RGB](feature_rgb_matrix.md). + +## IS31FL3733 + +Soporte para hasta un solo controlador con espacio para expansión. Cada controlador puede controlar 192 LEDs individuales o 64 LEDs RGB. Para obtener más información sobre cómo configurar el controlador, consulta la página de [Matriz RGB](feature_rgb_matrix.md). + diff --git a/docs/es/hardware_keyboard_guidelines.md b/docs/es/hardware_keyboard_guidelines.md new file mode 100644 index 0000000000..2cde2b39fb --- /dev/null +++ b/docs/es/hardware_keyboard_guidelines.md @@ -0,0 +1,149 @@ +# Pautas del teclado QMK + +Desde sus inicios, QMK ha crecido a pasos agigantados gracias a personas como tú que contribuyes a la creación y mantenimiento de nuestros teclados comunitarios. A medida que hemos crecido hemos descubierto algunos patrones que funcionan bien, y pedimos que te ajustes a ellos para que sea más fácil para que otras personas se beneficien de tu duro trabajo. + + +## Nombrar tu Teclado/Proyecto + +Todos los nombres de teclado están en minúsculas, consistiendo sólo de letras, números y guiones bajos (`_`). Los nombres no pueden comenzar con un guión bajo. La barra de desplazamiento (`/`) se utiliza como un carácter de separación de subcarpetas. + +Los nombres `test`, `keyboard`, y `all` están reservados para las órdenes de make y no pueden ser usados como un nombre de teclado o subcarpeta. + +Ejemplos Válidos: + +* `412_64` +* `chimera_ortho` +* `clueboard/66/rev3` +* `planck` +* `v60_type_r` + +## Subcarpetas + +QMK utiliza subcarpetas tanto para organización como para compartir código entre las revisiones del mismo teclado. Puedes anidar carpetas hasta 4 niveles de profundidad: + + qmk_firmware/keyboards/top_folder/sub_1/sub_2/sub_3/sub_4 + +Si una subcarpeta tiene un archivo `rules.mk` será considerado un teclado compilable. Estará disponible en el configurador de QMK y se probará con `make all`. Si estás utilizando una carpeta para organizar varios teclados del mismo fabricante no debes tener un archivo `rules.mk`. + +Ejemplo: + +Clueboard utiliza subcarpetas para ambos propósitos: organización y revisiones de teclado. + +* [`qmk_firmware`](https://github.com/qmk/qmk_firmware/tree/master) + * [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards) + * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization folder, there's no `rules.mk` file + * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file + * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision + * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← compilable: `make clueboard/66/rev1` + * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) ← compilable: `make clueboard/66/rev2` + * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) ← compilable: `make clueboard/66/rev3` or `make clueboard/66` + +## Estructura de carpetas de teclado + +Su teclado debe estar ubicado en `qmk_firm cuidada/keyboards/` y el nombre de la carpeta debe ser el nombre de su teclado como se describe en la sección anterior. Dentro de esta carpeta debe haber varios archivos: + +* `readme.md` +* `info.json` +* `config.h` +* `rules.mk` +* `.c` +* `.h` + +### `readme.md` + +Todos los proyectos necesitan tener un archivo `readme.md` que explica lo que es el teclado, quién lo hizo y dónde está disponible. Si es aplicable, también debe contener enlaces a más información, como el sitio web del fabricante. Por favor, sigue la [plantilla publicada](documentation_templates.md#keyboard-readmemd-template). + +### `info.json` + +Este archivo es utilizado por la [API de QMK](https://github.com/qmk/qmk_api). Contiene la información que [configurador de QMK](https://config.qmk.fm/) necesita mostrar en una representación de su teclado. También puede establecer metadatos aquí. Para más información, consulta la [página de referencia](reference_info_json.md). + +### `config.h` + +Todos los proyectos necesitan tener un archivo `config.h` que establece cosas como el tamaño de la matriz, nombre del producto, USB VID/PID, descripción y otros ajustes. En general, usa este archivo para establecer la información esencial y los valores predeterminados para tu teclado que siempre funcionarán. + +### `rules.mk` + +La presencia de este archivo indica que la carpeta es un destino de teclado y se puede utilizar en las órdenes `make`. Aquí es donde estableces el entorno de compilación para tu teclado y configuras el conjunto predeterminado de características. + +### `` + +Aquí es donde escribirás código personalizado para tu teclado. Típicamente escribirás código para inicializar e interactuar con el hardware de tu teclado. Si tu teclado se compone de sólo una matriz de teclas sin LEDs, altavoces u otro hardware auxiliar este archivo puede estar en blanco. + +Las funciones siguientes se definen típicamente en este archivo: + +* `void matrix_init_kb(void)` +* `void matrix_scan_kb(void)` +* `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` +* `void led_set_kb(uint8_t usb_led)` + +### `` + +Este archivo se utiliza para definir la matriz para tu teclado. Debes definir al menos un macro de C que traduce una serie en una matriz que representa la matriz de interruptor físico para tu teclado. Si es posible construir tu teclado con múltiples diseños debes definir macros adicionales. + +Si solo tienes un diseño debes llamar a esta macro `LAYOUT`. + +Al definir diseños múltiples debes tener un diseño base, llamado `LAYOUT_all`, que soporte todas las posibles posiciones de switch en tu matriz, incluso si ese diseño es imposible de construir físicamente. Esta es la macro que deberías usar en tu keymap `predeterminado`. Debes tener keymaps adicionales llamados `default_ término layout>` que usen tus otras macros de diseño. Esto hará que sea más fácil para las personas utilizar los diseños que defines. + +Los nombres de las macros de diseño son completamente minúsculas, excepto por la palabra `LAYOUT` en el frente. + +Por ejemplo, si tienes un PCB de 60% que soporta ANSI e ISO podría definir los siguientes diseños y keymaps: + +| Nombre de diseño | Nombre de keymap | Descripción | +|-------------|-------------|-------------| +| LAYOUT_all | default | Un diseño que soporta tanto ISO como ANSI | +| LAYOUT_ansi | default_ansi | Un diseño ANSI | +| LAYOUT_iso | default_iso | Un diseño ISO | + +## Archivos de Imagen/Hardware + +En un esfuerzo por mantener el tamaño de repo abajo ya no estamos aceptando archivos binarios de cualquier formato, con pocas excepciones. Alojarlos en otro lugar (por ejemplo ) y enlazarlos en el `readme.md` es preferible. + +Para archivos de hardware (tales como placas, casos, pcb) puedes contribuir a [qmk.fm repo](https://github.com/qmk/qmk.fm) y estarán disponibles en [qmk.fm](http://qmk.fm). Archivos descargables se almacenan en `//` (nombre sigue el mismo formato que el anterior), se sirven en `http://qmk.fm//`, y se generan páginas de `/_pages//` que se sirven en la misma ubicación (Los archivos .md se generan en archivos .html mediante Jekyll). Echa un vistazo a la carpeta `lets_split` para ver un ejemplo. + +## Predeterminados de teclado + +Dada la cantidad de funcionalidad que expone QMK, es muy fácil confundir a los nuevos usuarios. Al armar el firmware predeterminado para tu teclado, te recomendamos limitar tus funciones y opciones habilitadas al conjunto mínimo necesario para soportar tu hardware. A continuación se formulan recomendaciones sobre características específicas. + +### Bootmagic y Command + +[Bootmagic](feature_bootmagic.md) and [Command](feature_command.md) son dos características relacionadas que permiten a un usuario controlar su teclado de manera no obvia. Te recomendamos que piense largo y tendido acerca de si vas a habilitar cualquiera de las características, y cómo vas a exponer esta funcionalidad. Tengas en cuenta que los usuarios que quieren esta funcionalidad puede habilitarla en sus keymaps personales sin afectar a todos los usuarios novatos que pueden estar usando tu teclado como su primera tarjeta programable. + +De lejos el problema más común con el que se encuentran los nuevos usuarios es la activación accidental de Bootmagic mientras están conectando su teclado. Están sosteniendo el teclado por la parte inferior, presionando sin saberlo en alt y barra espaciadora, y luego se dan cuenta de que estas teclas han sido intercambiadas en ellos. Recomendamos dejar esta característica deshabilitada de forma predeterminada, pero si la activas consideres establecer la opción `BOOTMAGIC_KEY_SALT` a una tecla que es difícil de presionar al conectar el teclado. + +Si tu teclado no tiene 2 teclas de cambio debes proporcionar un predeterminado de trabajo para `IS_COMMAND`, incluso cuando haya definido `COMMAND_ENABLE = no`. Esto dará a sus usuarios un valor predeterminado para ajustarse a si lo hacen enable Command. + +## Programación de teclado personalizado + +Como se documenta en [Funcionalidad de Adaptación](custom_quantum_functions.md) puedes definir funciones personalizadas para tu teclado. Por favor, tengas en cuenta que sus usuarios pueden querer personalizar ese comportamiento así, y hacer que sea posible para que puedan hacer eso. Si está proporcionando una función personalizada, por ejemplo `process_record_kb()`, asegúrese de que su función también llame a la versión` `_user()` de la llamada. También debes tener en cuenta el valor de retorno de la versión `_user()`, y ejecutar sólo tu código personalizado si el usuario devuelve `true`. + +## Proyectos Sin Producción/Conectados A Mano + +Estamos encantados de aceptar cualquier proyecto que utilice QMK, incluidos los prototipos y los cableados de mano, pero tenemos una carpeta `/keyboards/handwired/` separada para ellos, por lo que la carpeta `/keyboards/` principal no se llena. Si un proyecto prototipo se convierte en un proyecto de producción en algún momento en el futuro, ¡estaremos encantados de moverlo a la carpeta `/keyboards/` principal! + +## Advertencias como errores + +Al desarrollar su teclado, tengas en cuenta que todas las advertencias serán tratadas como errores - estas pequeñas advertencias pueden acumularse y causar errores más grandes en el camino (y pierdan es generalmente una mala práctica). + +## Derechos de autor + +Si estás adaptando la configuración de tu teclado de otro proyecto, pero no utilizando el mismo código, asegúrese de actualizar la cabecera de derechos de autor en la parte superior de los archivos para mostrar tu nombre, en este formato: + + Copyright 2017 Tu nombre + +Si estás modificando el código de otra persona y sólo ha hecho cambios triviales debes dejar su nombre en la declaración de derechos de autor. Si has hecho un trabajo significativo en el archivo debe agregar tu nombre a la de ellos, así: + + Copyright 2017 Su nombre Tu nombre + +El año debe ser el primer año en que se crea el archivo. Si el trabajo se hizo a ese archivo en años posteriores puedes reflejar que mediante la adición del segundo año a la primera, como así: + + Copyright 2015-2017 Tu nombre + +## Licencia + +El núcleo de QMC está licenciado bajo la [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). Si estás enviando binarios para los procesadores AVR puedes elegir cualquiera [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) o [GPLv3](https://www.gnu.org/licenses/gpl.html). Si estás enviando binarios para ARM procesadores debes elegir [GPL Versión 3](https://www.gnu.org/licenses/gpl.html) para cumplir con los [ChibiOS](http://www.chibios.org) licencia GPLv3. + +Si tu teclado hace uso de la [uGFX](https://gfx.io) características dentro de QMK debes cumplir con la [Licencia de uGFX](https://ugfx.io/license.html), que requiere una licencia comercial separada antes de vender un dispositivo que contiene uGFX. + +## Detalles técnicos + +Si estás buscando más información sobre cómo hacer que su teclado funcione con QMK, [echa un vistazo a la sección hardware](hardware.md)! diff --git a/docs/es/newbs.md b/docs/es/newbs.md new file mode 100644 index 0000000000..ebb4b6ac2d --- /dev/null +++ b/docs/es/newbs.md @@ -0,0 +1,23 @@ +# La guía completa de QMK para novatos + +QMK es un poderoso firmware Open Source para tu teclado mecánico. Puedes utilizar QMK para personalizar tu teclado en maneras a la vez simples y potentes. Gente de todos los niveles de habilidad, desde completos novatos hasta expertos programadores, han utilizado con éxito QMK para personalizar sus teclados. Esta guía te ayudará a hacer lo mismo, sin importar tu nivel de habilidad. + +¿No estás seguro de si tu teclado puede ejecutar QMK? Si es un teclado mecánico construido por ti mismo probablemente puedas. Damos soporte a [gran número de placas de hobbistas](http://qmk.fm/keyboards/), e incluso si tu teclado actual no pudiera ejecutar QMK no deberías tener problemas encontrando uno que cumpliera tus necesidades. + +## Visión general + +Hay 7 secciones principales en esta guía: + +* [Empezando](newbs_getting_started.md) +* [Construyendo tu primer firmware](newbs_building_firmware.md) +* [Construyendo tu primer firmware usando la GUI](newbs_building_firmware_configurator.md) +* [Flasheando el firmware](newbs_flashing.md) +* [Testeando y depurando](newbs_testing_debugging.md) +* [Mejores práticas](newbs_best_practices.md) +* [Recursos de aprendizaje](newbs_learn_more_resources.md) + +Esta guía está enfocada en ayudar a alguien que nunca ha compilado software con anterioridad. Toma decisiones y hace recomendaciones teniendo en cuenta este punto de vista. Hay métodos alternativos para muchos de estos procedimientos, y soportamos la mayoría de esas alternativas. Si tienes alguna duda sobre cómo llevar a cabo una tarea nos puedes [preguntar para que te guiemos](getting_started_getting_help.md). + +## Recursos adicionales + +* [Blog de Básicos de Thomas Baart's QMK](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Un blog creado por un usuario que cubre lo básico sobre cómo usar el firmware QMK Firmware, visto desde la perspectiva de un usuario nuevo. diff --git a/docs/es/newbs_best_practices.md b/docs/es/newbs_best_practices.md new file mode 100644 index 0000000000..fc2afb9ed2 --- /dev/null +++ b/docs/es/newbs_best_practices.md @@ -0,0 +1,159 @@ +# Mejores prácticas + +## O, "Cómo aprendí a dejar de preocuparme y amarle a Git." + +Este documento procura instruir a los novatos en las mejores prácticas para tener una experiencia más fácil en contribuir a QMK. Te guiaremos por el proceso de contribuir a QMK, explicando algunas maneras de hacerlo más fácilmente, y luego romperemos algunas cosas para enseñarte cómo arreglarlas. + +En este documento suponemos un par de cosas: + +1. Tienes una cuenta de Github, y has hecho un [fork del repo qmk_firmware](getting_started_github.md) en tu cuenta. +2. Has [configurado tu entorno de desarrollo](newbs_getting_started.md?id=environment-setup). + + +## La rama master de tu fork: Actualizar a menudo, nunca commit + +Se recomienda que para desarrollo con QMK, lo que sea que estés haciendo, mantener tu rama `master` actualizada, pero **nunca** commit en ella. Mejor, haz todos tus cambios en una rama de desarrollo y manda pull requests de tus ramas mientras programas. + +Para evitar los conflictos de merge — cuando dos o más usuarios han editado la misma parte de un archivo al mismo tiempo — mantén tu rama `master` actualizada, y empieza desarrollo nuevo creando una nueva rama. + +### Actualizando tu rama master + +Para mantener tu rama `master` actualizada, se recomienda agregar el repository ("repo") de Firmware QMK como un repo remoto en git. Para hacer esto, abre tu interfaz de línea de mandatos y ingresa: +``` +git remote add upstream https://github.com/qmk/qmk_firmware.git +``` + +Para verificar que el repo ha sido agregado, ejecuta `git remote -v`, y lo siguiente debe aparecer: + +``` +$ git remote -v +origin https://github.com//qmk_firmware.git (fetch) +origin https://github.com//qmk_firmware.git (push) +upstream https://github.com/qmk/qmk_firmware.git (fetch) +upstream https://github.com/qmk/qmk_firmware.git (push) +``` + +Ya que has hecho esto, puedes buscar actualizaciones del repo ejecutando `git fetch upstream`. Esto busca las ramas y etiquetas — juntos conocidos como "refs" — del repo QMK, que ahora tiene el apodo `upstream`. Ahora podemos comparar los archivos en nuestro fork `origin` con los de QMK. + +Para actualizar la rama master de tu fork, ejecuta lo siguiente, pulsando Intro después de cada línea: + +``` +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` + +Esto te coloca en tu rama master, busca los refs del repo de QMK, descarga la rama `master` actual a tu computadora, y después lo sube a tu fork. + +### Hacer cambios + +Para hacer cambios, crea una nueva rama ejecutando: + +``` +git checkout -b dev_branch +git push --set-upstream origin dev_branch +``` + +Esto crea una nueva rama llamada `dev_branch`, te coloca en ella, y después guarda la nueva rama a tu fork. El parámetro `--set-upstream` le dice a git que use tu fork y la rama `dev_branch` cada vez que uses `git push` o `git pull` en esta rama. Solo necesitas usarlo la primera que que subes cambios; ya después, puedes usar `git push` o `git pull`, sin usar los demás parámetros. + +!> Con `git push`, puedes usar `-u` en vez de `--set-upstream` — `-u` es un alias de `--set-upstream`. + +Puedes nombrar tu rama casi cualquier cosa, pero se recomienda ponerle algo con relación a los cambios que vas a hacer. + +Por defecto `git checkout -b` se basará tu nueva rama en la rama en la cual estás actualmente. Puedes basar tu rama en otra rama existente agregando el nombre de la rama al comando: + +``` +git checkout -b dev_branch master +``` + +Ahora que tienes una rama development, abre tu editor de texto y haz los cambios que quieres. Se recomienda hacer varios commits pequeños a tu rama; de este modo cualquier cambio que causa problemas puede ser rastreado y deshecho si fuera necesario. Para hacer tus cambios, edita y guarda los archivos que necesitas actualizar, agrégalos al *staging area* de Git, y luego haz un commit a tu rama: + +``` +git add path/to/updated_file +git commit -m "My commit message." +``` +`git add` agrega los archivos que han sido cambiados al *staging area* de Git, lo cual es la "zona de preparación"de Git. Este contiene los cambios que vas a *commit* usando `git commit`, que guarda los cambios en el repo. Usa un mensaje de commit descriptivo para que puedas saber que ha cambiado fácilmente. + +!> Si has cambiado muchos archivos, pero todos los archivos son parte del mismo cambio, puedes usar `git add .` para agregar todos los archivos cambiados que están en tu directiro actual, en vez de agregar cada archivo manualmente. + +### Publicar tus cambios + +El útimo paso es subir tus cambios a tu fork. Para hacerlo, ejecuta `git push`. Ahora Git publicará el estado actual de `dev_branch` a tu fork. + + +## Resolver los conflictos del merge + +A veces cuando el trabajo en una rama tarda mucho tiempo en completarse, los cambios que han sido hechos por otros chocan con los cambios que has hecho en tu rama cuando abres un pull request. Esto se llama un *merge conflict*, y es algo que ocurre cuando varias personas editan las mismas partes de los mismos archivos. + +### Rebase tus cambios + +Un *rebase* es la manera de Git de tomar los cambios que se aplicaron en un punto, deshacerlos, y aplicar estos mismos cambios en otro punto. En el caso de un conflicto de merge, puedes hacer un rebase de tu rama para recoger los cambios que has hecho. + +Para empezar, ejecuta lo siguiente: + +``` +git fetch upstream +git rev-list --left-right --count HEAD...upstream/master +``` + +El comando `git rev-list` ejecutado aquí muestra el número de commits que difieren entre la rama actual y la rama master de QMK. Ejecutamos `git fetch` primero para asegurarnos de que tenemos los refs que representan es estado actual del repo upstream. El output del comando `git rev-list` muestra dos números: + +``` +$ git rev-list --left-right --count HEAD...upstream/master +7 35 +``` + +El primer número representa el número de commits en la rama actual desde que fue creada, y el segundo número es el número de commits hecho a `upstream/master` desde que la rama actual fue creada, o sea los cambios que no están registrados en la rama actual. + +Ahora que sabemos el estado actual de la rama actual y el del repo upstream, podemos empezar una operación rebase: + +``` +git rebase upstream/master +``` +Esto le dice a Git que deshaga los commits en la rama actual, y después los re-aplica en la rama master de QMK. + +``` +$ git rebase upstream/master +First, rewinding head to replay your work on top of it... +Applying: Commit #1 +Using index info to reconstruct a base tree... +M conflicting_file_1.txt +Falling back to patching base and 3-way merge... +Auto-merging conflicting_file_1.txt +CONFLICT (content): Merge conflict in conflicting_file_1.txt +error: Failed to merge in the changes. +hint: Use 'git am --show-current-patch' to see the failed patch +Patch failed at 0001 Commit #1 + +Resolve all conflicts manually, mark them as resolved with +"git add/rm ", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort". +``` + +Esto nos dice que tenemos un conflicto de merge, y nos dice el nombre del archivo con el conflict. Abre el archivo en tu editor de texto, y en alguna parte del archivo verás algo así: + +``` +<<<<<<< HEAD +

For help with any issues, email us at support@webhost.us.

+======= +

Need help? Email support@webhost.us.

+>>>>>>> Commit #1 +``` +La línea `<<<<<<< HEAD` marca el principio de un conflicto de merge, y la línea `>>>>>>> Commit #1` marca el final, con las secciones de conflicto separadas por `=======`. La parte del lado `HEAD` is de la versión de QMK master del archivo, y la parte marcada con el mensaje de commit es de la rama actual. + +Ya que Git rastrea *cambios de archivos* en vez del contenido de los archivos directamente, si Git no puede encontrar el texto que estaba en el archivo antes del último commit, no sabrá cómo editar el archivo. El editar el archivo de nuevo resolverá este conflicto. Haz tus cambios, y guarda el archivo. + +``` +

Need help? Email support@webhost.us.

+``` + +Ahora ejecuta: + +``` +git add conflicting_file_1.txt +git rebase --continue +``` + +Git registra los cambios al archivo con conflictos, y sigue aplicando los commits de nuestra rama hasta llegar al final. diff --git a/docs/es/newbs_building_firmware.md b/docs/es/newbs_building_firmware.md new file mode 100644 index 0000000000..ff9873c785 --- /dev/null +++ b/docs/es/newbs_building_firmware.md @@ -0,0 +1,81 @@ +# Construyendo tu primer firmware + +Ahora que has configurado tu entorno de construcción estas listo para empezar a construir firmwares personalizados. Para esta sección de la guía alternaremos entre 3 programas - tu gestor de ficheros, tu editor de texto , y tu ventana de terminal. Manten los 3 abiertos hasta que hayas acabado y estés contento con el firmware de tu teclado. + +Si has cerrado y reabierto la ventana de tu terminal después de seguir el primero paso de esta guía, no olvides hacer `cd qmk_firmware` para que tu terminal esté en el directorio correcto. + +## Navega a tu carpeta de keymaps + +Comienza navegando a la carpeta `keymaps` correspondiente a tu teclado. + +?> Si estás en macOS o Windows hay comandos que puedes utilizar fácilmente para abrir la carpeta keymaps. + +?> macOS: + + abre keyboards//keymaps + +?> Windows: + + inicia .\\keyboards\\\\keymaps + +## Crea una copia del keymap `default` + +Una vez que tengas la carpeta `keymaps` abierta querrás crear una copia de la carpeta `default`. Recomendamos encarecidamente que nombres la carpeta igual que tu nombre de usuario de GitHub, pero puedes utilizar el nombre que quieras siempre que contenga sólo letras en minúscula, números y el caracter de guión bajo. + +Para automatizar el proceso, también tienes la opción de ejecutar el script `new_keymap.sh`. + +Navega a la carpeta `qmk_firmware/util` e introduce lo siguiente: + +``` +./new_keymap.sh +``` + +Por ejemplo, para un usuario llamado John, intentando hacer un keymap nuevo para el 1up60hse, tendría que teclear + +``` +./new_keymap.sh 1upkeyboards/1up60hse john +``` + +## Abre `keymap.c` con tu editor de texto favorito + +Abre tu `keymap.c`. Dentro de este fichero encontrarás la estructura que controla cómo se comporta tu teclado. En lo alto de `keymap.c` puede haber distintos defines y enums que hacen el keymap más fácil de leer. Continuando por abajo encontrarás una línea con este aspecto: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +Esta línea indica el comienzo del listado de Capas. Debajo encontrarás líneas que contienen o bien `LAYOUT` o `KEYMAP`, y estas líneas indican el comienzo de una capa. Debajo de esa línea está la lista de teclas que pertenecen a esa capa concreta. + +!> Cuando estés editando tu fichero de keymap ten cuidado con no añadir ni eliminar ninguna coma. Si lo haces el firmware dejará de compilar y puede no ser fácil averiguar dónde está la coma faltante o sobrante. + +## Personaliza el Layout a tu gusto + +Cómo completar esta paso depende enteramente de ti. Haz ese pequeño cambio que querías o rehaz completamente todo. Puedes eliminar capas si no las necesitas todas, o añadir nuevas hasta un total de 32. Comprueba la siguiente documentación para descubrir qué es lo que puedes definir aquí: + +* [Keycodes](keycodes.md) +* [Características](features.md) +* [Preguntas frecuentes](faq.md) + +?> Mientras estás descubriendo cómo funcionan los keymaps, haz pequeños cambios. Cambios mayores pueden hacer difícil la depuración de problemas que puedan aparecer. + +## Construye tu firmware + +Cuando los cambios a tu keymap están completos necesitarás construir el firmware. Para hacerlo vuelve a la ventana de tu terminal y ejecuta el siguiente comando: + + make : + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un planck rev5, utilizarás el siguiente comando: + + make planck/rev5:xyverz + +Mientras compila, recibirás un montón de información de salida en la pantalla informándote de qué ficheros están siendo compilados. Debería acabar con una información similar a esta: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## Flashea tu firmware + +Continua con [Flasheando el firmware](newbs_flashing.md) para aprender cómo escribir tu firmware nuevo en tu teclado. diff --git a/docs/es/newbs_building_firmware_configurator.md b/docs/es/newbs_building_firmware_configurator.md new file mode 100644 index 0000000000..a257343240 --- /dev/null +++ b/docs/es/newbs_building_firmware_configurator.md @@ -0,0 +1,105 @@ +# Configurador QMK + +El [Configurador QMK](https://config.qmk.fm) es un entorno gráfico online que genera ficheros hexadecimales de Firmware QMK. + +?> **Por favor sigue estos pasos en orden.** + +Ve el [Video tutorial](https://youtu.be/tx54jkRC9ZY) + +El Configurador QMK functiona mejor con Chrome/Firefox. + + +!> **Ficheros de otras herramientas como KLE, o kbfirmware no serán compatibles con el Configurador QMK. No las cargues, no las importes. El configurador Configurador QMK es una herramienta DIFERENTE. ** + +## Seleccionando tu teclado + +Haz click en el desplegable y selecciona el teclado para el que quieres crear el keymap. + +?> Si tu teclado tiene varias versiones, asegúrate de que seleccionas la correcta.** + +Lo diré otra vez porque es importante + +!> **ASEGÚRATE DE QUE SELECCIONAS LA VERSIÓN CORRECTA!** + +Si se ha anunciado que tu teclado funciona con QMK pero no está en la lista, es probable que un desarrollador no se haya encargado de él aún o que todavía no hemos tenido la oportunidad de incluirlo. Abre un issue en [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) solicitando soportar ese teclado un particular, si no hay un [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) activo para ello. Hay también teclados que funcionan con QMK que están en las cuentas de github de sus manufacturantes. Acuérdate de comprobar esto también. + +## Eligiendo el layout de tu teclado + +Elige el layout que mejor represente el keymap que quieres crear. Algunos teclados no tienen suficientes layouts o layouts correctos definidos aún. Serán soportados en el futuro. + +## Nombre del keymap + +Llama a este keymap como quieras. + +?> Si estás teniendo problemas para compilar, puede merecer la pena probar un cambio de nombre, ya que puede que ya exista en el repositorio de QMK Firmware. + +## Creando Tu keymap + +La adición de keycodes se puede hacer de 3 maneras. +1. Arrastrando y soltando +2. Clickando en un hueco vacío en el layout y haciendo click en el keycode que deseas +3. Clickando en un hueco vacío en el layout, presionando la tecla física en tu teclado. + +Mueve el puntero de tu ratón sobre una tecla y un pequeño extracto te dirá que es lo que hace la tecla. Para una descripción más detallada por favor, mira + +[Referencia básica de keycodes](https://docs.qmk.fm/#/keycodes_basic) +[Referencia avanzada de keycodes](https://docs.qmk.fm/#/feature_advanced_keycodes) + +En el caso de que no puedas encontrar un layout que suporte tu keymap, por ejemplo, tres huecos para la barra espaciadora, dos huecos para el retroceso o dos huecos para shift etc etc, rellènalos TODOS. + +### Ejemplo: + +3 huecos para barra espaciadora: Rellena TODOS con barra espaciadora + +2 huecos para retroceso: Rellena AMBOS con retroceso + +2 huecos para el shift derecho: Rellena AMBOS con shift derecho + +1 hueco para el shift izquierdo y 1 hueco para soporte iso: Rellena ambos con el shift izquierdo + +5 huecos , pero sólo 4 teclas: Intuye y comprueba o pregunta a alguien que lo haya hecho anteriormente. + +## Guardando tu keymap para ediciones futuras + +Cuando estés satisfecho con un teclado o quieres trabajar en el después, pulsa el botón `Exportar Keymap`. Guardára tu keymap con el nombre que elijas seguido de .json. + +Entonces podrás cargar este fichero .json en el futuro pulsando el botón `Importar Keymap`. + +!> **PRECAUCIÓN:** No es el mismo tipo de fichero .json usado en kbfirmware.com ni ninguna otra herramienta. Si intentas utilizar un fichero .json de alguna de estas herramientas con el Configurador QMK, existe la posibilidad de que tu teclado **explote**. + +## Generando tu fichero de firmware + +Pulsa el botón verde `Compilar`. + +Cuando la compilación haya acabado, podrás presionar el botón verde `Descargar Firmware`. + +## Flasheando tu teclado + +Por favor, dirígete a la sección de [Flashear firmware](newbs_flashing.md) + +## Problemas comunes + +#### Mi fichero .json no funciona + +Si el fichero .json fue generado con el Configurador QMK, enhorabuena, has dado con un bug. Abre una issue en [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) + +Si no....cómo no viste el mensaje en negrita que puse arriba diciendo que no hay que utilizar otros ficheros .json? + +#### Hay espacios extra en mi layout ¿Qué hago? + +Si te refieres a tener tres espacios para la barra espaciadora, la mejor decisión es rellenar los tres con la barra espaciadora. También se puede hacer lo mismo con las teclas retroceso y las de shift + +#### Para qué sirve el keycode....... + +Por favor, mira + +[Referencia básica de keycodes](https://docs.qmk.fm/#/keycodes_basic) +[Referencia avanzada de keycodes](https://docs.qmk.fm/#/feature_advanced_keycodes) + +#### No compila + +Por favor, revisa las otras capas de tu keymap para asegurarte de que no hay teclas aleatorias presentes. + +## Problemas y bugs + +Siempre aceptamos peticiones de clientes y reportes de bug. Por favor, indícalos en [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) diff --git a/docs/es/newbs_flashing.md b/docs/es/newbs_flashing.md new file mode 100644 index 0000000000..066715c483 --- /dev/null +++ b/docs/es/newbs_flashing.md @@ -0,0 +1,351 @@ +# Flasheando tu teclado + +Ahora que has construido tu fichero de firmware personalizado querrás flashear tu teclado. + +## Flasheando tu teclado con QMK Toolbox + +La manera más simple de flashear tu teclado sería con [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases). + +De todos modos, QMK Toolbox actualmente sólo está disponible para Windows y macOS. Si estás usando Linux (o sólo quisieras flashear el firmware desde la línea de comandos), tendrás que utilizar el [método indicado abajo](newbs_flashing.md#flash-your-keyboard-from-the-command-line). + +### Cargar el fichero en QMK Toolbox + +Empieza abriendo la aplicación QMK Toolbox. Tendrás que buscar el fichero de firmware usando Finder o Explorer. El firmware de teclado puede estar en uno de estos dos formatos- `.hex` o `.bin`. QMK intenta copiar el apropiado para tu teclado en el fichero raíz `qmk_firmware`. + +?> Si tu estás on Windows o macOS hay comandos que puedes usar para abrir fácilmente la carpeta del firmware actual en Explorer o Finder. + +?> Windows: + + start . + +?> macOS: + + open . + +El fichero de firmware sempre sigue el siguiente formato de nombre: + + _.{bin,hex} + +Por ejemplo, un `plank/rev5` con un keymap `default` tendrá este nombre de fichero: + + planck_rev5_default.hex + +Una vez que hayas localizado el fichero de tu firmware arrástralo a la caja "Fichero local" en QMK Toolbox, o haz click en "Abrir" y navega allí donde tengas almacenado tu fichero de firmware. + +### Pon tu teclado en modo DFU (Bootloader) + +Para poder flashear tu firmware personalizado tienes que poner tu teclado en un modo especial que permite flasheado. Cuando está en este modo no podrás teclear o utilizarlo para ninguna otra cosa. Es muy importante que no desconectes tu teclado, de lo contrario interrumpirás el proceso de flasheo mientras el firmware se está escribiendo. + +Diferentes teclados tienen diferentes maneras de entrar en este modo especial. Si tu PCB actualmente ejecuta QMK o TMK y no has recibido instrucciones específicas, intenta los siguientes pasos en orden: + +* Manten pulsadas ambas teclas shift y pulsa `Pause` +* Manten pulsadas ambas teclas shift y pulsa `B` +* Desconecta tu teclado, mantén pulsada la barra espaciadora y `B` al mismo tiempo, conecta tu teclado y espera un segundo antes de dejar de pulsar las teclas +* Pulsa el botón físico `RESET` situado en el fondo de la PCB +* Localiza los pines en la PCB etiquetados on `BOOT0` o `RESET`, puentea estos dos juntos cuando enchufes la PCB + +Si has tenido éxito verás un mensaje similar a este en QMK Toolbox: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### Flashea tu teclado + +Haz click en el botón `Flash` de QMK Toolbox. Verás una información de salida similar a esta: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## Flashea tu teclado desde la línea de comandos + +Lo primero que tienes que saber es qué bootloader utiliza tu teclado. Hay cuatro bootloaders pincipales que se usan habitualmente . Pro-Micro y sus clones usan CATERINA, Teensy's usa Halfkay, las placas OLKB usan QMK-DFU, y otros chips atmega32u4 usan DFU. + +Puedes encontrar más información sobre bootloaders en la página [Instrucciones de flasheado e información de Bootloader](flashing.md). + +Si sabes qué bootloader estás usando, en el momento de compilar el firmware, podrás añadir algún texto extra al comando `make` para automatizar el proceso de flasheado. + +### DFU + +Para eo bootloader DFU, cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el siguiente comando de construcción: + + make ::dfu + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un planck rev5, utilizarás este comando: + + make planck/rev5:xyverz:dfu + +Una vez que finalice de compilar, deberá aparecer lo siguiente: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +Después de llegar a este punto, el script de construcción buscará el bootloader DFU cada 5 segundos. Repetirá lo siguiente hasta que se encuentre el dispositivo o lo canceles: + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +Una vez haya hecho esto, tendrás que reiniciar el controlador. Debería mostrar una información de salida similar a esta: + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +?> Si tienes problemas con esto- del estilo de `dfu-programmer: no device present` - por favor consulta las [Preguntas frecuentes de construcción](faq_build.md). + +#### Comandos DFU + +Hay un número de comandos DFU que puedes usar para flashear firmware a un dispositivo DFU: + +* `:dfu` - Esta es la opción normal y espera hasta que un dispositivo DFU esté disponible, entonces flashea el firmware. Esperará reintentando cada 5 segundos, para ver si un dispositivo DFU ha aparecido. +* `:dfu-ee` - Esta flashea un fichero `eep` en vez del hex normal. Esto no es lo común. +* `:dfu-split-left` - Esta flashea el firmware normal, igual que la opción por defecto (`:dfu`). Sin embargo, también flashea el fichero EEPROM "Lado Izquierdo" para teclados divididos. _Esto es ideal para los ficheros divididos basados en Elite C._ +* `:dfu-split-right` - Esto flashea el firmware normal, igual que la opción por defecto (`:dfu`). Sin embargo, también flashea el fichero EEPROM "Lado Derecho" para teclados divididos. _Esto es ideal para los ficheros divididos basados en Elite C._ + + +### Caterina + +Para placas Arduino y sus clones (como la SparkFun ProMicro), cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el siguiente comando de construcción: + + make ::avrdude + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un Lets Split rev2, usarás este comando: + + make lets_split/rev2:xyverz:avrdude + +Una vez que finalice de compilar, deberá aparecer lo siguiente: + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +En este punto, reinicia la placa y entonces el script detectará el bootloader y procederá a flashear la placa. La información de salida deber ser algo similar a esto: + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` +Si tienes problemas con esto, puede ser necesario que hagas esto: + + sudo make ::avrdude + + +Adicionalmente, si quisieras flashear múltiples placas, usa el siguiente comando: + + make ::avrdude-loop + +Cuando hayas acabado de flashear placas, necesitarás pulsar Ctrl + C o cualquier combinación que esté definida en tu sistema operativo para finalizar el bucle. + + +### HalfKay + +Para dispositivos PJRC (Teensy's), cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el siguiente comando de construcción: + + make ::teensy + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un Ergodox o un Ergodox EZ, usarás este comando: + + make ergodox_ez:xyverz:teensy + +Una vez que el firmware acabe de compilar, deberá mostrar una información de salida como esta: + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +En este punto, reinicia tu placa. Una vez que lo hayas hecho, deberás ver una información de salida como esta: + + ``` + Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................................................................................................................................ +................................................... +Booting +``` + +### BootloadHID + +Para placas basadas en Bootmapper Client(BMC)/bootloadHID/ATmega32A, cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el comando de construcción: + + make ::bootloaderHID + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un jj40, usarás esté comando: + + make jj40:xyverz:bootloaderHID + +Una vez que el firmware acaba de compilar, mostrará una información de salida como esta: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +Después de llegar a este punto, el script de construcción buscará el bootloader DFU cada 5 segundos. Repetirá lo siguiente hasta que se encuentre el dispositivo o hasta que lo canceles. + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +Una vez que lo haga, querrás reinicar el controlador. Debería entonces mostrar una información de salida similar a esta: + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + +### STM32 (ARM) + +Para la mayoría de placas ARM (incluyendo la Proton C, Planck Rev 6, y Preonic Rev 3), cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el siguiente comando de construcción: + + make ::dfu-util + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un teclado Planck Revision 6, utilizarás este comando y a continuación reiniciarás el teclado con el bootloader (antes de que acabe de compilar): + + make planck/rev6:xyverz:dfu-util + +Una vez que el firmware acaba de compilar, mostrará una información de salida similar a esta: + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +#### STM32 Commands + +Hay un número de comandos DFU que puedes usar para flashear firmware a un dispositivo DFU: + +* `:dfu-util` - El comando por defecto para flashing en dispositivos STM32. +* `:dfu-util-wait` - Esto funciona como el comando por defecto, pero te da (configurable) 10 segundos de tiempo antes de que intente flashear el firmware. Puedes usar `TIME_DELAY=20` desde la líena de comandos para cambiar este tiempo de retardo. + * Eg: `make ::dfu-util TIME_DELAY=5` +* `:dfu-util-split-left` - Flashea el firmware normal, igual que la opción por defecto (`:dfu-util`). Sin embargo, también flashea el fichero EEPROM "Lado Izquierdo" para teclados divididos. +* `:dfu-util-split-right` - Flashea el firmware normal, igual que la opción por defecto (`:dfu-util`). Sin embargo, también flashea el fichero EEPROM "Lado Derecho" para teclados divididos. + +## ¡Pruébalo! + +¡Felicidades! ¡Tu firmware personalizado ha sido programado en tu teclado! + +Pruébalo y asegúrate de que todo funciona de la manera que tu quieres. Hemos escrito [Testeando y depurando](newbs_testing_debugging.md) para redondear esta guía de novatos, así que pásate por allí para aprender cómo resolver problemas con tu funcionalidad personalizada. diff --git a/docs/es/newbs_getting_started.md b/docs/es/newbs_getting_started.md new file mode 100644 index 0000000000..eb0d6d36fb --- /dev/null +++ b/docs/es/newbs_getting_started.md @@ -0,0 +1,103 @@ +# Introducción + +El teclado de tu computador tiene un procesador dentro de él, no muy distinto del que está dentro de tu ordenador. Este procesador ejecuta software que es responsable de detectar la pulsación de las teclas y enviar informes sobre el estado del teclado cuando las teclas son pulsadas y liberadas. QMK ocupa el rol de ese software. Cuando construyes un keymap personalizado , estas creando el equivalente de un programa ejecutable en tu teclado. + +QMK intenta poner un montón de poder en tus manos haciendo que las cosas fáciles sean fáciles, y las cosas difíciles posibles. No tienes que saber cómo programar para crear keymaps potentes — sólo tienes que seguir un conjunto simple de reglas sintácticas. + +# Comenzando + +Antes de que puedas construir keymaps, necesitarás instalar algun software y configurar tu entorno de construcción. Esto sólo hay que hacerlo una vez sin importar en cuántos teclados planeas configurar el software. + +Si prefieres hacerlo mediante un interfaz gráfico , por favor, considera utilizar el [Configurador QMK](https://config.qmk.fm). En ese caso dirígete a [Construyendo tu primer firmware usando la GUI](newbs_building_firmware_configurator.md). + + +## Descarga el software + +### Editor de texto + +Necesitarás un programa con el que puedas editar y guardar archivos de **texto plano**, en windows puedes utilizar Notepad y en tu Linux puedes utilizar gedit. Estos dos programas son editores simples y funcionales. En macOS ten cuidado con la aplicación de edición de texto por defecto TextEdit: no guardará texto plano a menos de que se le seleccione explícitamente _Make Plain Text_ desde el menú _Format_. + +También puedes descargar e instalar un editor de texto dedicado como [Sublime Text](https://www.sublimetext.com/) o [VS Code](https://code.visualstudio.com/). Esta es probablemente la mejor manera independientemente de la plataforma, ya que estos programas fueron creados específicamente para editar código. + +?> ¿No estás seguro de qué editor de texto utilizar? Laurence Bradford escribió una [estupenda introducción](https://learntocodewith.me/programming/basics/text-editors/) al tema. + +### QMK Toolbox + +QMK Toolbox is an optional graphical program for Windows and macOS that allows you to both program and debug your custom keyboard. You will likely find it invaluable for easily flashing your keyboard and viewing debug messages that it prints. + +[Download the latest release here.](https://github.com/qmk/qmk_toolbox/releases/latest) + +* For Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installer) +* For macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installer) + +## Configura tu entorno + +Hemos intentado hacer QMK lo más fácil de configurar posible. Sólo tienes que preparar tu entorno Linux o Unix, y luego dejar que QMK +instale el resto. + +?> Si no has trabajado con la línea de comandos de Linux/Unix con anterioridad, hay algunos conceptos y comandos básicos que deberías aprender. Estos recursos te enseñarán lo suficiente para poder trabajar con QMK:
+[Comandos de Linux que debería saber](https://www.guru99.com/must-know-linux-commands.html)
+[Algunos comandos básicos de Unix](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +Necesitarás instalar MSYS2 y Git. + +* Sigue las instrucciones de instalación en la [página de MSYS2](http://www.msys2.org). +* Cierra las terminales abiertas de MSYS2 y abre una nueva termial de MSYS2 MinGW 64-bit. +* Instala Git ejecutando este comando: `pacman -S git`. + +### macOS + +Necesitarás instalar Homebrew. Sigue las instrucciones que encontrarás en la [página de Homebrew](https://brew.sh). + +Despueś de que se haya inastalado Homebrew, continúa con _Set Up QMK_. En ese paso ejecutará un script que instalará el resto de paquetes. + +### Linux + +Necesitarás instalar Git. Es bastante probable que ya lo tengas, pero si no, uno de los siguientes comandos debería instalarlo: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> Docker es también una opción en todas las plataformas. [Haz click aquí si quieres detalles.](getting_started_build_tools.md#docker) + +## Configura QMK + +Una vez que hayas configurado tu entorno Linux/Unix, estarás listo para descargar QMK. Haremos esto utilizando Git para "clonar" el respositorio de QMK. Abre una ventana de Terminal o MSYS2 MinGW y mantenla abierta mientras sigues esta guía. Dentro de esa ventana ejecuta estos dos comandos: + +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> Si ya sabes [cómo usar GitHub](getting_started_github.md), te recomendamos en vez de eso, crees y clones tu propio fork. Si no sabes lo que significa, puedes ignorar este mensaje sin problemas. + +QMK viene con un script para ayudarte a configurar el resto de cosas que necesitarás. Deberías ejecutarlo introduciendo este comando: + + util/qmk_install.sh + +## Prueba tu entorno de construcción + +Ahora que tu entorno de construcción de QMK está configurado, puedes construcir un firmware para tu teclado. Comienza intentado construir el keymap por defecto del teclado. Deberías ser capaz de hacerlo con un comando con este formato: + + make :default + +Por ejemplo, para construir el firmware para un Clueboard 66% deberías usar: + + make clueboard/66/rev3:default + +Cuando esté hecho, deberías tener un montón de información de salida similar a esta: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# Creando tu keymap + +Ya estás listo para crear tu propio keymap personal! Para hacerlo continua con [Construyendo tu primer firmware](newbs_building_firmware.md). diff --git a/docs/es/newbs_learn_more_resources.md b/docs/es/newbs_learn_more_resources.md new file mode 100644 index 0000000000..413b9ffa5e --- /dev/null +++ b/docs/es/newbs_learn_more_resources.md @@ -0,0 +1,15 @@ +# Recursos de aprendizaje + +Estos recursos procuran dar miembros nuevos en la communidad QMK un mayor entendimiento de la información proporcionada en la documentación para novatos. + +Recursos de Git: + +* [Excelente tutorial general](https://www.codecademy.com/learn/learn-git) +* [Juego de Git para aprender usando ejemplos](https://learngitbranching.js.org/) +* [Recursos de Git para aprender más sobre Github](getting_started_github.md) +* [Recursos de Git dirigidos específicamente a QMK](contributing.md) + + +Recursos para línea de mandatos: + +* [Excelente tutorial general sobre la línea de mandatos](https://www.codecademy.com/learn/learn-the-command-line) diff --git a/docs/es/newbs_testing_debugging.md b/docs/es/newbs_testing_debugging.md new file mode 100644 index 0000000000..ef7412f15c --- /dev/null +++ b/docs/es/newbs_testing_debugging.md @@ -0,0 +1,99 @@ +# Testeando y depurando + +Una vez que hayas flasheado tu teclado con un firmware personalizado estarás listo para probarlo. Con un poco de suerte todo funcionará a la primera, pero si no es así, este documento te ayudará a averiguar qué está mal. + +## Probando + +Probar tu teclado es generalmente bastante sencillo. Persiona cada una de las teclas y asegúrate de que envía la tecla correcta. Existen incluso programas que te ayudarán a asegurarte de que no te dejas ninguna tecla sin comprobar. + +Nota: Estos programas no los provée ni están relacionados con QMK. + +* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Sólo Windows) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Sólo Mac) +* [Keyboard Tester](http://www.keyboardtester.com) (Aplicación web) +* [Keyboard Checker](http://keyboardchecker.com) (Aplicación web) + +## Depurando + +Tu teclado mostrará información de depuración si tienes `CONSOLE_ENABLE = yes` en tu `rules.mk`. Por defecto la información de salida es muy limitada, pero puedes encender el modo de depuración para incrementar la información de salida. Utiliza el keycode `DEBUG` de tu keymap, usa la característica [Comando](feature_command.md) para activar el modo depuración, o añade el siguiente código a tu keymap. + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### Depurando con QMK Toolbox + +Para plataformas compatibles, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) se puede usar para mostrar mensajes de depuración de tu teclado. + +### Depurando con hid_listen + +¿Prefieres una solución basada en una terminal? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provista por PJRC, se puede usar también para mostrar mensajes de depuración. Hay binarios preconstruídos para Windows,Linux,y MacOS. + + + +## Enviando tus propios mensajes de depuración + +A veces, es útil imprimir mensajes de depuración desde tu [código personalizado](custom_quantum_functions.md). Hacerlo es bastante simple. Comienza incluyendo `print.h` al principio de tu fichero: + + #include + +Después de eso puedes utilzar algunas funciones print diferentes: + +* `print("string")`: Imprime un string simple +* `uprintf("%s string", var)`: Imprime un string formateado +* `dprint("string")` Imprime un string simple, pero sólo cuando el modo de depuración está activo +* `dprintf("%s string", var)`: Imprime un string formateado, pero sólo cuando el modo de depuración está activo + +## Ejemplos de depuración + +Debajo hay una colección de ejemplos de depuración del mundo real. Para información adicional, Dirígete a [Depurando/Encontrando problemas en QMK](faq_debug.md). + +### ¿Que posición en la matriz tiene esta pulsación de tecla? + +Cuando estés portando, o intentando diagnosticar problemas en la pcb, puede ser útil saber si la pulsación de una tecla es escaneada correctamente. Para hablitar la información de registro en este escenario, añade el siguiente código al `keymap.c` de tus keymaps + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +Ejemplo de salida +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### ¿Cuanto tiempo tardó en escanear la pulsación de una tecla? + +Cuando estés probando problemas en el rendimiento, puede ser útil saber la frecuenta a la cual la matríz de pulsadores se está escaneando. Para hablitar la información de registro en este escenario, añade el siguiente código al `config.h` de tus keymaps + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +Ejemplo de salida +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` diff --git a/docs/faq_build.md b/docs/faq_build.md index 23d6a67021..f11cb76aa2 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -19,7 +19,11 @@ Note that running `make` with `sudo` is generally ***not*** a good idea, and you ### Linux `udev` Rules On Linux, you'll need proper privileges to access the MCU. You can either use -`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. +`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following: +```console +sudo udevadm control --reload-rules +sudo udevadm trigger +``` **/etc/udev/rules.d/50-atmel-dfu.rules:** ``` @@ -43,22 +47,39 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" ``` +**/etc/udev/rules.d/55-catalina.rules:** +``` +# ModemManager should ignore the following devices +ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1" +``` + +**Note:** ModemManager filtering only works when not in strict mode, the following commands can update that settings: +```console +sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service +sudo systemctl daemon-reload +sudo systemctl restart ModemManager +``` + +**/etc/udev/rules.d/56-dfu-util.rules:** +``` +# stm32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666" +# Generic stm32 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666" +``` + ### Serial device is not detected in bootloader mode on Linux Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options. ## Unknown Device for DFU Bootloader -If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue. +Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader, or none at all. -Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. - -If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUSB` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. If that doesn't work, try all of the options, until one works. - -?> There isn't a best option for which driver should be used here. Some options work better on some systems than others. libUSB and WinUSB seem to be the best options here. - -If the bootloader doesn't show up in the list for devices, you may need to enable the "List all devices" option in the `Options` menu, and then find the bootloader in question. +Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_firmware` directory in MSYS2 or WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually. +If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig.md) for more detailed information. ## WINAVR is Obsolete It is no longer recommended and may cause some problem. diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 7c1690d13f..1e0cdc82bf 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -27,7 +27,7 @@ You may need privilege to access the device on OS like Linux. Check: - *hid_listen* finds your device. See above. - Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). -- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**. +- set `debug_enable=true`. See [Testing and Debugging](newbs_testing_debugging.md#debugging) - try using 'print' function instead of debug print. See **common/print.h**. - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). @@ -87,6 +87,7 @@ Size after: - EEPROM has around a 100000 write cycle. You shouldn't rewrite the firmware repeatedly and continually; that'll burn the EEPROM eventually. + ## NKRO Doesn't work First you have to compile firmware with this build option `NKRO_ENABLE` in **Makefile**. @@ -183,22 +184,15 @@ Pressing any key during sleep should wake host. Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem. +## Enabling JTAG -## Using PF4-7 Pins of USB AVR? -You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affected with this. +By default, the JTAG debugging interface is disabled as soon as the keyboard starts up. JTAG-capable MCUs come from the factory with the `JTAGEN` fuse set, and it takes over certain pins of the MCU that the board may be using for the switch matrix, LEDs, etc. -If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. +If you would like to keep JTAG enabled, just add the following to your `config.h`: -See this code. +```c +#define NO_JTAG_DISABLE ``` - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1< - ## What Differences Are There Between QMK and TMK? TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert](https://github.com/jackhumbert)'s fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK. diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index 0a627469e7..84d8548d46 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -95,13 +95,6 @@ Even worse, it is not recognized unless the keyboard's VID and PID match that of See [this issue](https://github.com/qmk/qmk_firmware/issues/2179) for detailed information. - -## Media Control Keys in Mac OSX -#### KC_MNXT and KC_MPRV Does Not Work on Mac -Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`. -See https://github.com/tmk/tmk_keyboard/issues/195 - - ## Keys Supported in Mac OSX? You can know which keycodes are supported in OSX from this source code. diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index f748ccd70c..e73258d511 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -15,7 +15,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your keymap, keeping it mo ## Caveats -Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. +Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two. diff --git a/docs/feature_audio.md b/docs/feature_audio.md index 7511598bcf..5132dfe971 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -21,6 +21,8 @@ STARTUP_SONG // plays when the keyboard starts up (audio.c) GOODBYE_SONG // plays when you press the RESET key (quantum.c) AG_NORM_SONG // plays when you press AG_NORM (quantum.c) AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c) +CG_NORM_SONG // plays when you press CG_NORM (quantum.c) +CG_SWAP_SONG // plays when you press CG_SWAP (quantum.c) MUSIC_ON_SONG // plays when music mode is activated (process_music.c) MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c) CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c) diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index 9b4b296249..f0b507bc61 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -51,12 +51,15 @@ By default, Auto Shift is disabled for any key press that is accompanied by one modifiers. Thus, Ctrl+A that you hold for a really long time is not the same as Ctrl+Shift+A. -You can re-enable Auto Shift for modifiers by adding another rule to your `rules.mk` +You can re-enable Auto Shift for modifiers by adding a define to your `config.h` - AUTO_SHIFT_MODIFIERS = yes +```c +#define AUTO_SHIFT_MODIFIERS +``` In which case, Ctrl+A held past the `AUTO_SHIFT_TIMEOUT` will be sent as Ctrl+Shift+A + ## Configuring Auto Shift If desired, there is some configuration that can be done to change the @@ -65,15 +68,12 @@ behavior of Auto Shift. This is done by setting various variables the A sample is - #ifndef CONFIG_USER_H - #define CONFIG_USER_H +```c +#pragma once - #include "../../config.h" - - #define AUTO_SHIFT_TIMEOUT 150 - #define NO_AUTO_SHIFT_SPECIAL - - #endif +#define AUTO_SHIFT_TIMEOUT 150 +#define NO_AUTO_SHIFT_SPECIAL +``` ### AUTO_SHIFT_TIMEOUT (Value in ms) diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index b06db89e4d..71f375594c 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -1,20 +1,23 @@ # Backlighting -Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming. +Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard. + +QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming. The MCU can only supply so much current to its GPIO pins. Instead of powering the backlight directly from the MCU, the backlight pin is connected to a transistor or MOSFET that switches the power to the LEDs. -## Usage +## Driver configuration Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following: -```make -BACKLIGHT_ENABLE = yes +```makefile +BACKLIGHT_ENABLE = software # Valid driver values are 'yes,software,no' ``` -You should then be able to use the keycodes below to change the backlight level. +See below for help on individual drivers. ## Keycodes +Once enabled the following keycodes below can be used to change the backlight level. |Key |Description | |---------|------------------------------------------| @@ -26,88 +29,6 @@ You should then be able to use the keycodes below to change the backlight level. |`BL_DEC` |Decrease the backlight level | |`BL_BRTG`|Toggle backlight breathing | -## Caveats - -This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard. - -Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software PWM implementation triggered by hardware timer interrupts will be used. - -Hardware PWM is supported according to the following table: - -| Backlight Pin | Hardware timer | -|---------------|-------------------------| -|`B5` | Timer 1 | -|`B6` | Timer 1 | -|`B7` | Timer 1 | -|`C6` | Timer 3 | -|`D4` | Timer 1 (ATmega32A only)| -| other | Software PWM | - -The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration: - -| Audio Pin(s) | Audio Timer | Software PWM Timer | -|--------------|-------------|--------------------| -| `C4` | Timer 3 | Timer 1 | -| `C5` | Timer 3 | Timer 1 | -| `C6` | Timer 3 | Timer 1 | -| `B5` | Timer 1 | Timer 3 | -| `B6` | Timer 1 | Timer 3 | -| `B7` | Timer 1 | Timer 3 | -| `Bx` & `Cx` | Timer 1 & 3 | None | - -When all timers are in use for [audio](feature_audio.md), the backlight software PWM will not use a hardware timer, but instead will be triggered during the matrix scan. In this case the backlight doesn't support breathing and might show lighting artifacts (for instance flickering), because the PWM computation might not be called with enough timing precision. - -## Configuration - -To change the behaviour of the backlighting, `#define` these in your `config.h`: - -|Define |Default |Description | -|---------------------|-------------|-------------------------------------------------------------------------------------------------------------| -|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| -|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | -|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) | -|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | -|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | -|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | -|`BACKLIGHT_ON_STATE` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | - -## Backlight On State - -Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *low*. -Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case you must `#define BACKLIGHT_ON_STATE 1`, so that when the transistor is on, the pin is driven *high* instead. - -## Multiple backlight pins - -Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin). -In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle. -This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on. - -To activate multiple backlight pins, you need to add something like this to your user `config.h`: - -~~~c -#define BACKLIGHT_LED_COUNT 2 -#undef BACKLIGHT_PIN -#define BACKLIGHT_PINS { F5, B2 } -~~~ - -## Hardware PWM Implementation - -When using the supported pins for backlighting, QMK will use a hardware timer configured to output a PWM signal. This timer will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. -The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the backlight pin will go low, and is pulled high again when the counter resets. -In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus the brightness, where `0x0000` is completely off and `0xFFFF` is completely on. - -The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second. -In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM. - -## Software PWM Implementation - -When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. -When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle. -The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the CPU will fire a Compare Output match interrupt, which will turn the LEDs off. -In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus the brightness, where `0x0000` is completely off and `0xFFFF` is completely on. - -The breathing effect is the same as in the hardware PWM implementation. - ## Backlight Functions |Function |Description | @@ -124,8 +45,158 @@ The breathing effect is the same as in the hardware PWM implementation. ### Backlight Breathing Functions -|Function |Description | -|----------|----------------------------------------------------------| -|`breathing_toggle()` |Turn the backlight breathing on or off | -|`breathing_enable()` |Turns on backlight breathing | -|`breathing_disable()` |Turns off backlight breathing | +|Function |Description | +|----------|---------------------------------------------------| +|`breathing_toggle()` |Turn the backlight breathing on or off | +|`breathing_enable()` |Turns on backlight breathing | +|`breathing_disable()` |Turns off backlight breathing | + +## Common Driver Configuration + +To change the behavior of the backlighting, `#define` these in your `config.h`: + +|Define |Default |Description | +|---------------------|-------------|--------------------------------------------------------------------------------------| +|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) | +|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | +|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | +|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | +|`BACKLIGHT_ON_STATE` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | + +### Backlight On State + +Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*. +Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead. + +This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define. + +## AVR driver + +On AVR boards, the default driver currently sniffs the configuration to pick the best scenario. To enable it, add this to your rules.mk: +```makefile +BACKLIGHT_ENABLE = yes +``` + +### Caveats + +Hardware PWM is supported according to the following table: + +|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|ATmega328P| +|-------------|-------------|-------------|-------------|---------|----------| +|`B1` | | | | |Timer 1 | +|`B2` | | | | |Timer 1 | +|`B5` |Timer 1 |Timer 1 | | | | +|`B6` |Timer 1 |Timer 1 | | | | +|`B7` |Timer 1 |Timer 1 |Timer 1 | | | +|`C4` |Timer 3 | | | | | +|`C5` |Timer 3 | |Timer 1 | | | +|`C6` |Timer 3 |Timer 3 |Timer 1 | | | +|`D4` | | | |Timer 1 | | +|`D5` | | | |Timer 1 | | + +All other pins will use software PWM. If the [Audio](feature_audio.md) feature is disabled or only using one timer, the backlight PWM can be triggered by a hardware timer: + +|Audio Pin|Audio Timer|Software PWM Timer| +|---------|-----------|------------------| +|`C4` |Timer 3 |Timer 1 | +|`C5` |Timer 3 |Timer 1 | +|`C6` |Timer 3 |Timer 1 | +|`B5` |Timer 1 |Timer 3 | +|`B6` |Timer 1 |Timer 3 | +|`B7` |Timer 1 |Timer 3 | + +When both timers are in use for Audio, the backlight PWM will not use a hardware timer, but will instead be triggered during the matrix scan. In this case, breathing is not supported, and the backlight might flicker, because the PWM computation may not be called with enough timing precision. + +### AVR Configuration + +To change the behavior of the backlighting, `#define` these in your `config.h`: + +|Define |Default |Description | +|---------------------|-------------|--------------------------------------------------------------------------------------------------------------| +|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this | +|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | + +### Multiple backlight pins + +Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin). +In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle. +This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on. + +To activate multiple backlight pins, you need to add something like this to your user `config.h`: + +```c +#define BACKLIGHT_LED_COUNT 2 +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { F5, B2 } +``` + +### Hardware PWM Implementation + +When using the supported pins for backlighting, QMK will use a hardware timer configured to output a PWM signal. This timer will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. +The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the backlight pin will go low, and is pulled high again when the counter resets. +In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus the brightness, where `0x0000` is completely off and `0xFFFF` is completely on. + +The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second. +In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM. + +### Timer Assisted PWM Implementation + +When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. +When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle. +The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the CPU will fire a Compare Output match interrupt, which will turn the LEDs off. +In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus the brightness, where `0x0000` is completely off and `0xFFFF` is completely on. + +The breathing effect is the same as in the hardware PWM implementation. + +## ARM Driver + +While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. To enable it, add this to your rules.mk: +```makefile +BACKLIGHT_ENABLE = yes +``` + +### Caveats + +Currently only hardware PWM is supported, not timer assisted, and does not provide automatic configuration. + +?> STMF072 support is being investigated. + +### ARM Configuration + +To change the behavior of the backlighting, `#define` these in your `config.h`: + +|Define |Default |Description | +|------------------------|-------------|-------------------------------------------------------------------------------------------------------------| +|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PWM_DRIVER` |`PWMD4` |The PWM driver to use, see ST datasheets for pin to PWM timer mapping. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PWM_CHANNEL` |`3` |The PWM channel to use, see ST datasheets for pin to PWM channel mapping. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PAL_MODE` |`2` |The pin alternative function to use, see ST datasheets for pin AF mapping. Unless you are designing your own keyboard, you shouldn't need to change this| + +## Software PWM Driver + +Emulation of PWM while running other keyboard tasks, it offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your rules.mk: +```makefile +BACKLIGHT_ENABLE = software +``` + +### Software PWM Configuration + +To change the behavior of the backlighting, `#define` these in your `config.h`: + +|Define |Default |Description | +|-----------------|-------------|-------------------------------------------------------------------------------------------------------------| +|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | + +### Multiple backlight pins + +Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin). +In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle. +This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on. + +To activate multiple backlight pins, you need to add something like this to your user `config.h`: + +```c +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { F5, B2 } +``` diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 3ffbfa0680..6cd5c3c6cf 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -2,18 +2,18 @@ ## Bluetooth Known Supported Hardware -Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1 Qmk has support for RN-42 HID Firmware and Bluefruit EZ Key the later of which is not produced anymore. For more recent BLE protocols currently only the Adafruit Bluefruit SPI friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support Mouse Input. +Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules and the Bluefruit EZ-Key, the latter of which is not produced anymore. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. -|Board |Bluetooth Protocol |Connection Type |Rules.mk |Bluetooth Chip| +|Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip| |----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -|[Adafruit EzKey HID]("https://www.adafruit.com/product/1535") |Bluetooth Classic | UART | BLUETOOTH = AdafruitEZKey | | -|Rover Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART | BLUETOOTH = RN42 | RN-42 | -|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI | BLUETOOTH = AdafruitBLE | nRF5182 | +|[Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) |Bluetooth Classic | UART |`BLUETOOTH = AdafruitEZKey` | | +|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 | +|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 | Not Supported Yet but possible: * [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479). [Possible tmk implementation found in](https://github.com/tmk/tmk_keyboard/issues/514) * HC-05 boards flashed with RN-42 firmware. They apparently both use the CSR BC417 Chip. Flashing it with RN-42 firmware gives it HID capability. -* [Sparkfun Bluetooth mate](https://www.sparkfun.com/products/14839) +* Sparkfun Bluetooth Mate * HM-13 based boards ### Adafruit BLE SPI Friend diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md index 225189ccb7..ed00d51295 100644 --- a/docs/feature_bootmagic.md +++ b/docs/feature_bootmagic.md @@ -34,6 +34,8 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug |`X` |Toggle key matrix debugging | |`K` |Toggle keyboard debugging | |`M` |Toggle mouse debugging | +|`L` |Set "Left Hand" for EE_HANDS handedness | +|`R` |Set "Right Hand" for EE_HANDS handedness | |Backspace |Clear the EEPROM | |Caps Lock |Toggle treating Caps Lock as Left Control | |Left Control |Toggle swapping Caps Lock and Left Control | @@ -64,8 +66,11 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug |`MAGIC_NO_GUI` | |Disable the GUI keys (useful when gaming) | |`MAGIC_UNNO_GUI` | |Enable the GUI keys | |`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides (for macOS)| -|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and Left GUI | -|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Left Alt and GUI swap | +|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI | +|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap | +|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)| +|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI | +|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap | |`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace | |`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace | |`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock | @@ -76,6 +81,12 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug |`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and Left GUI | |`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and Right GUI | |`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and Right GUI | +|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and Left GUI | +|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and Left GUI | +|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and Right GUI | +|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and Right GUI | +|`MAGIC_EE_HANDS_LEFT` | |Set "Left Hand" for EE_HANDS handedness | +|`MAGIC_EE_HANDS_RIGHT` | |Set "Right Hand" for EE_HANDS handedness | ## Configuration @@ -91,6 +102,8 @@ If you would like to change the hotkey assignments for Bootmagic, `#define` thes |`BOOTMAGIC_KEY_DEBUG_MATRIX` |`KC_X` |Toggle matrix debugging | |`BOOTMAGIC_KEY_DEBUG_KEYBOARD` |`KC_K` |Toggle keyboard debugging | |`BOOTMAGIC_KEY_DEBUG_MOUSE` |`KC_M` |Toggle mouse debugging | +|`BOOTMAGIC_KEY_EE_HANDS_LEFT` |`KC_L` |Set "Left Hand" for EE_HANDS handedness | +|`BOOTMAGIC_KEY_EE_HANDS_RIGHT` |`KC_R` |Set "Right Hand" for EE_HANDS handedness | |`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK` |`KC_LCTRL` |Swap Left Control and Caps Lock | |`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL` |`KC_CAPSLOCK`|Toggle treating Caps Lock as Left Control | |`BOOTMAGIC_KEY_SWAP_LALT_LGUI` |`KC_LALT` |Toggle swapping Left Alt and Left GUI (for macOS) | diff --git a/docs/feature_combo.md b/docs/feature_combo.md index 4cb1bcda08..d3eb896b28 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -2,7 +2,7 @@ The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the tapping term would hit `ESC` instead, or have it perform even more complex tasks. -To enable this feature, yu need to add `COMBO_ENABLE = yes` to your `rules.mk`. +To enable this feature, you need to add `COMBO_ENABLE = yes` to your `rules.mk`. Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using). @@ -59,19 +59,12 @@ void process_combo_event(uint8_t combo_index, bool pressed) { switch(combo_index) { case ZC_COPY: if (pressed) { - register_code(KC_LCTL); - register_code(KC_C); - unregister_code(KC_C); - unregister_code(KC_LCTL); + tap_code16(LCTL(KC_C)); } break; - case XV_PASTE: if (pressed) { - register_code(KC_LCTL); - register_code(KC_V); - unregister_code(KC_V); - unregister_code(KC_LCTL); + tap_code16(LCTL(KC_V)); } break; } @@ -87,3 +80,24 @@ If you're using long combos, or even longer combos, you may run into issues with In this case, you can add either `#define EXTRA_LONG_COMBOS` or `#define EXTRA_EXTRA_LONG_COMBOS` in your `config.h` file. You may also be able to enable action keys by defining `COMBO_ALLOW_ACTION_KEYS`. + +## Keycodes + +You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game. + +|Keycode |Description | +|----------|---------------------------------| +|`CMB_ON` |Turns on Combo feature | +|`CMB_OFF` |Turns off Combo feature | +|`CMB_TOG` |Toggles Combo feature on and off | + +## User callbacks + +In addition to the keycodes, there are a few functions that you can use to set the status, or check it: + +|Function |Description | +|-----------|--------------------------------------------------------------------| +| `combo_enable()` | Enables the combo feature | +| `combo_disable()` | Disables the combo feature, and clears the combo buffer | +| `combo_toggle()` | Toggles the state of the combo feature | +| `is_combo_enabled()` | Returns the status of the combo feature state (true or false) | diff --git a/docs/feature_command.md b/docs/feature_command.md index deabedc1c3..a4ce3f5aea 100644 --- a/docs/feature_command.md +++ b/docs/feature_command.md @@ -16,36 +16,36 @@ To use Command, hold down the key combination defined by the `IS_COMMAND()` macr If you would like to change the key assignments for Command, `#define` these in your `config.h` at either the keyboard or keymap level. All keycode assignments here must omit the `KC_` prefix. -|Define |Default |Description | -|------------------------------------|---------------------------------------------------------------------------|------------------------------------------------| -|`IS_COMMAND()` |(get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))|The key combination to activate Command | -|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row | -|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys | -|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` | -|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial | -|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging | -|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging | -|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging | -|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console | -|`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console | -|`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console| -|`MAGIC_KEY_HELP` |`H` |Print Command help to the console | -|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) | -|`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer | -|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) | -|`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer | -|`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer | -|`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer | -|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer | -|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer | -|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer | -|`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer | -|`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer | -|`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer | -|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader | -|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) | -|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed | -|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console | -|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM | -|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) | -|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping | +|Define |Default |Description | +|------------------------------------|--------------------------------|------------------------------------------------| +|`IS_COMMAND()` |`(get_mods() == MOD_MASK_SHIFT)`|The key combination to activate Command | +|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row | +|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys | +|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` | +|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial | +|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging | +|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging | +|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging | +|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console | +|`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console | +|`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console| +|`MAGIC_KEY_HELP` |`H` |Print Command help to the console | +|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) | +|`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer | +|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) | +|`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer | +|`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer | +|`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer | +|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer | +|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer | +|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer | +|`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer | +|`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer | +|`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer | +|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader | +|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) | +|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed | +|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console | +|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM | +|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) | +|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping | diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md index 38eca3f37c..b5e5b61bb3 100644 --- a/docs/feature_debounce_type.md +++ b/docs/feature_debounce_type.md @@ -17,14 +17,14 @@ endif | DEBOUNCE_TYPE | Description | What else is needed | | ------------- | --------------------------------------------------- | ----------------------------- | | Not defined | Use the default algorithm, currently sym_g | Nothing | -| custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | +| 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 | **Regarding split keyboards**: The debounce code is compatible with split keyboards. # Use your own debouncing code -* Set ```DEBOUNCE_TYPE = custom ```. +* Set ```DEBOUNCE_TYPE = custom```. * Add ```SRC += debounce.c``` * Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples. * Debouncing occurs after every raw matrix scan. @@ -33,10 +33,10 @@ The debounce code is compatible with split keyboards. # Changing between included debouncing methods You can either use your own code, by including your own debounce.c, or switch to another included one. Included debounce methods are: -* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE_DELAY``` milliseconds of no further input for that row. +* 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. -* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` milliseconds of no further input for that key -* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed. +* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key +* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occured, all input changes are pushed. diff --git a/docs/feature_dip_switch.md b/docs/feature_dip_switch.md new file mode 100644 index 0000000000..bce47fed88 --- /dev/null +++ b/docs/feature_dip_switch.md @@ -0,0 +1,90 @@ +# DIP Switches + +DIP switches are supported by adding this to your `rules.mk`: + + DIP_SWITCH_ENABLE = yes + +and this to your `config.h`: + +```c +#define DIP_SWITCH_PINS { B14, A15, A10, B9 } +``` + +## Callbacks + +The callback functions can be inserted into your `.c`: + +```c +void dip_switch_update_kb(uint8_t index, bool active) { + dip_switch_update_user(index, active); +} +``` + + +or `keymap.c`: + +```c +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { audio_on(); } else { audio_off(); } + break; + case 1: + if(active) { clicky_on(); } else { clicky_off(); } + break; + case 2: + if(active) { music_on(); } else { music_off(); } + break; + case 3: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_PLOVER); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + break; + } +} +``` + +Additionally, we support bit mask functions which allow for more complex handling. + + +```c +void dip_switch_update_mask_kb(uint32_t state) { + dip_switch_update_mask_user(state); +} +``` + + +or `keymap.c`: + +```c +void dip_switch_update_mask_user(uint32_t state) { + if (state & (1UL<<0) && state & (1UL<<1)) { + layer_on(_ADJUST); // C on esc + } else { + layer_off(_ADJUST); + } + if (state & (1UL<<0)) { + layer_on(_TEST_A); // A on ESC + } else { + layer_off(_TEST_A); + } + if (state & (1UL<<1)) { + layer_on(_TEST_B); // B on esc + } else { + layer_off(_TEST_B); + } +} +``` + + +## Hardware + +One side of the DIP switch should be wired directly to the pin on the MCU, and the other side to ground. It should not matter which side is connected to which, as it should be functionally the same. diff --git a/docs/feature_dynamic_macros.md b/docs/feature_dynamic_macros.md index 0d11a28641..b86df6c60f 100644 --- a/docs/feature_dynamic_macros.md +++ b/docs/feature_dynamic_macros.md @@ -4,51 +4,45 @@ QMK supports temporary macros created on the fly. We call these Dynamic Macros. You can store one or two macros and they may have a combined total of 128 keypresses. You can increase this size at the cost of RAM. -To enable them, first add a new element to the end of your `keycodes` enum — `DYNAMIC_MACRO_RANGE`: +To enable them, first include `DYNAMIC_MACRO_ENABLE = yes` in your `rules.mk`. Then, add the following keys to your keymap: -```c -enum keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - LOWER, - RAISE, - BACKLIT, - EXT_PLV, - DYNAMIC_MACRO_RANGE, -}; -``` +|Key |Alias |Description | +|------------------|----------|---------------------------------------------------| +|`DYN_REC_START1` |`DM_REC1` |Start recording Macro 1 | +|`DYN_REC_START2` |`DM_REC2` |Start recording Macro 2 | +|`DYN_MACRO_PLAY1` |`DM_PLY1` |Replay Macro 1 | +|`DYN_MACRO_PLAY2` |`DM_PLY2` |Replay Macro 2 | +|`DYN_REC_STOP` |`DM_RSTP` |Finish the macro that is currently being recorded. | -Your `keycodes` enum may have a slightly different name. You must add `DYNAMIC_MACRO_RANGE` as the last element because `dynamic_macros.h` will add some more keycodes after it. +That should be everything necessary. -Below it, include the `dynamic_macro.h` header: +To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. -```c - #include "dynamic_macro.h"` -``` +To finish the recording, press the `DYN_REC_STOP` layer button. -Add the following keys to your keymap: +To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. -* `DYN_REC_START1` — start recording the macro 1, -* `DYN_REC_START2` — start recording the macro 2, -* `DYN_MACRO_PLAY1` — replay the macro 1, -* `DYN_MACRO_PLAY2` — replay the macro 2, -* `DYN_REC_STOP` — finish the macro that is currently being recorded. +It is possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. You can disable this completly by defining `DYNAMIC_MACRO_NO_NESTING` in your `config.h` file. -Add the following code to the very beginning of your `process_record_user()` function: +?> For the details about the internals of the dynamic macros, please read the comments in the `process_dynamic_macro.h` and `process_dynamic_macro.c` files. -```c - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } -``` +## Customization -That should be everything necessary. To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To finish the recording, press the `DYN_REC_STOP` layer button. To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. +There are a number of options added that should allow some additional degree of customization -Note that it's possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. +|Define |Default |Description | +|----------------------------|----------------|-----------------------------------------------------------------------------------------------------------------| +|`DYNAMIC_MACRO_SIZE` |128 |Sets the amount of memory that Dynamic Macros can use. This is a limited resource, dependent on the controller. | +|`DYNAMIC_MACRO_USER_CALL` |*Not defined* |Defining this falls back to using the user `keymap.c` file to trigger the macro behavior. | +|`DYNAMIC_MACRO_NO_NESTING` |*Not Defined* |Defining this disables the ability to call a macro from another macro (nested macros). | -For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, use the following snippet instead of the one above: + +If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by adding the `DYNAMIC_MACRO_SIZE` define in your `config.h` (default value: 128; please read the comments for it in the header). + + +### DYNAMIC_MACRO_USER_CALL + +For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, add `#define DYNAMIC_MACRO_USER_CALL` to your `config.h` and insert the following snippet at the beginning of your `process_record_user()` function: ```c uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode); @@ -58,6 +52,15 @@ For users of the earlier versions of dynamic macros: It is still possible to fin } ``` -If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header). +### User Hooks -For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header. +There are a number of hooks that you can use to add custom functionality and feedback options to Dynamic Macro feature. This allows for some additional degree of customization. + +Note, that direction indicates which macro it is, with `1` being Macro 1, `-1` being Macro 2, and 0 being no macro. + +* `dynamic_macro_record_start_user(void)` - Triggered when you start recording a macro. +* `dynamic_macro_play_user(int8_t direction)` - Triggered when you play back a macro. +* `dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record)` - Triggered on each keypress while recording a macro. +* `dynamic_macro_record_end_user(int8_t direction)` - Triggered when the macro recording is stopped. + +Additionally, you can call `dynamic_macro_led_blink()` to flash the backlights if that feature is enabled. diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 9ac97a9a16..cbf72914e9 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -6,7 +6,6 @@ Basic encoders are supported by adding this to your `rules.mk`: and this to your `config.h`: - #define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } @@ -21,6 +20,15 @@ Additionally, the resolution can be specified in the same file (the default & su #define ENCODER_RESOLUTION 4 +## Split Keyboards + +If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout for the right half like this: + +```c +#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } +#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +``` + ## Callbacks The callback functions can be inserted into your `.c`: diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md index 85fd439640..2273633227 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/feature_haptic_feedback.md @@ -22,13 +22,16 @@ Not all keycodes below will work depending on which haptic mechanism you have ch | Name | Description | |-----------|-------------------------------------------------------| |`HPT_ON` | Turn haptic feedback on | -|`HPT_OFF` | Turn haptic feedback on | +|`HPT_OFF` | Turn haptic feedback off | |`HPT_TOG` | Toggle haptic feedback on/off | |`HPT_RST` | Reset haptic feedback config to default | |`HPT_FBK` | Toggle feedback to occur on keypress, release or both | |`HPT_BUZ` | Toggle solenoid buzz on/off | |`HPT_MODI` | Go to next DRV2605L waveform | |`HPT_MODD` | Go to previous DRV2605L waveform | +|`HPT_CONT` | Toggle continuous haptic mode on/off | +|`HPT_CONI` | Increase DRV2605L continous haptic strength | +|`HPT_COND` | Decrease DRV2605L continous haptic strength | |`HPT_DWLI` | Increase Solenoid dwell time | |`HPT_DWLD` | Decrease Solenoid dwell time | @@ -38,11 +41,15 @@ First you will need a build a circuit to drive the solenoid through a mosfet as [Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf) -Select a pin that has PWM for the signal pin -``` -#define SOLENOID_PIN *pin* -``` +| Settings | Default | Description | +|--------------------------|---------------|-------------------------------------------------------| +|`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. | +|`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. | +|`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. | +|`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. | + +?> Dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds. Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin. @@ -145,3 +152,7 @@ If haptic feedback is enabled, the keyboard will vibrate to a specific sqeuence #define DRV_MODE_DEFAULT *sequence name or number* ``` This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed. + +### DRV2605L Continuous Haptic Mode + +This mode sets continuous haptic feedback with the option to increase or decrease strength. diff --git a/docs/feature_hd44780.md b/docs/feature_hd44780.md index e9d9e8b7b8..0a174035be 100644 --- a/docs/feature_hd44780.md +++ b/docs/feature_hd44780.md @@ -2,11 +2,12 @@ This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) -You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes. This will use about 400 KB of extra space. +You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes. ## Configuration -You will need to configure the pins used by your display and its number of lines and collumn in your keyboards `config.h`. +You will need to configure the pins used by your display, and its number of lines and columns in your keyboard's `config.h`. + Uncomment the section labled HD44780 and change the parameters as needed. ```` @@ -25,7 +26,7 @@ Uncomment the section labled HD44780 and change the parameters as needed. #define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 #define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 #define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 #define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 #define LCD_RS_PORT LCD_PORT //< port for RS line #define LCD_RS_PIN 3 //< pin for RS line @@ -38,14 +39,14 @@ Uncomment the section labled HD44780 and change the parameters as needed. Should you need to configure other properties you can copy them from `quantum/hd44780.h` and set them in your `config.h` -## Usage +## Usage -To initialize your display call lcd_init() with one of these parameters: +To initialize your display, call `lcd_init()` with one of these parameters: ```` LCD_DISP_OFF : display off LCD_DISP_ON : display on, cursor off LCD_DISP_ON_CURSOR : display on, cursor on -LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing +LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing ```` This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`. It is advised to clear the display before use. @@ -53,4 +54,4 @@ To do so call `lcd_clrsrc()`. To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`. -There are more posible methods to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) +There are more methods available to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) diff --git a/docs/feature_key_lock.md b/docs/feature_key_lock.md index 718d9c5bd1..46935adda0 100644 --- a/docs/feature_key_lock.md +++ b/docs/feature_key_lock.md @@ -16,7 +16,7 @@ First, enable Key Lock by setting `KEY_LOCK_ENABLE = yes` in your `rules.mk`. Th ## Caveats -Key Lock is only able to hold standard action keys and [One Shot modifier](quantum_keycodes.md#one-shot-keys) keys (for example, if you have your Shift defined as `OSM(KC_LSFT)`). +Key Lock is only able to hold standard action keys and [One Shot modifier](feature_advanced_keycodes.md#one-shot-keys) keys (for example, if you have your Shift defined as `OSM(KC_LSFT)`). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as `KC_LPRN`. If it's in the [Basic Keycodes](keycodes_basic.md) list, it can be held. Switching layers will not cancel the Key Lock. diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 503e438288..b124ba5a8f 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -31,7 +31,7 @@ This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keym void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _QWERTY: oled_write_P(PSTR("Default\n"), false); break; @@ -96,17 +96,19 @@ void oled_task_user(void) { ## Basic Configuration -| Define | Default | Description | -|------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------| -| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display | -| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts | -| `OLED_FONT_START` | `0` | The starting characer index for custom fonts | -| `OLED_FONT_END` | `224` | The ending characer index for custom fonts | -| `OLED_FONT_WIDTH` | `6` | The font width | -| `OLED_FONT_HEIGHT` | `8` | The font height (untested) | -| `OLED_DISABLE_TIMEOUT` | *Not defined* | Disables the built in OLED timeout feature. Useful when implementing custom timeout rules. | -| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. | -| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.
Useful for 128x64 displays centered on a 132x64 SH1106 IC. | +| Define | Default | Description | +|----------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------| +| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display | +| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts | +| `OLED_FONT_START` | `0` | The starting characer index for custom fonts | +| `OLED_FONT_END` | `224` | The ending characer index for custom fonts | +| `OLED_FONT_WIDTH` | `6` | The font width | +| `OLED_FONT_HEIGHT` | `8` | The font height (untested) | +| `OLED_TIMEOUT` | `60000` | Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | +| `OLED_SCROLL_TIMEOUT` | `0` | Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | +| `OLED_SCROLL_TIMEOUT_RIGHT`| *Not defined* | Scroll timeout direction is right when defined, left when undefined. | +| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. | +| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.
Useful for 128x64 displays centered on a 132x64 SH1106 IC. | ## 128x64 & Custom sized OLED Displays @@ -227,6 +229,12 @@ void oled_write_P(const char *data, bool invert); // Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM void oled_write_ln_P(const char *data, bool invert); +// Writes a string to the buffer at current cursor position +void oled_write_raw(const char *data, uint16_t size); + +// Writes a PROGMEM string to the buffer at current cursor position +void oled_write_raw_P(const char *data, uint16_t size); + // Can be used to manually turn on the screen if it is off // Returns true if the screen was on or turns on bool oled_on(void); diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 01e2cc63db..d138967991 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md @@ -149,7 +149,7 @@ In your keyboard config.h: #### PS/2 Mouse Features -These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/ +These enable settings supported by the PS/2 mouse protocol. ``` /* Use remote mode instead of the default stream mode (see link) */ @@ -202,7 +202,7 @@ Note: you can also use `ps2_mouse_set_resolution` for the same effect (not suppo #### Scroll Button If you're using a trackpoint, you will likely want to be able to use it for scrolling. -Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving. +It's possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving. To enable the feature, you must set a scroll button mask as follows: ``` diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 916fcdce03..3e69361fbd 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -107,7 +107,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( --- -### WS2812 (AVR only) +### WS2812 There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`: @@ -374,6 +374,7 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set ``` ## EEPROM storage diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index be4ddfa729..2e9610163b 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -6,7 +6,7 @@ QMK has the ability to control RGB LEDs attached to your keyboard. This is commo Some keyboards come with RGB LEDs preinstalled. Others must have them installed after the fact. See the [Hardware Modification](#hardware-modification) section for information on adding RGB lighting to your keyboard. -Currently QMK supports the following addressable LEDs on AVR microcontrollers (however, the white LED in RGBW variants is not supported): +Currently QMK supports the following addressable LEDs (however, the white LED in RGBW variants is not supported): * WS2811, WS2812, WS2812B, WS2812C, etc. * SK6812, SK6812MINI, SK6805 @@ -363,8 +363,8 @@ Using the `rgblight_set_clipping_range()` function, you can prepare more buffers You can set the Clipping Range by executing the following code. ```c -// some soruce - rgblight_set_clipping_range(3, 4); +// some source +rgblight_set_clipping_range(3, 4); ``` clip direct diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md new file mode 100644 index 0000000000..affce34293 --- /dev/null +++ b/docs/feature_split_keyboard.md @@ -0,0 +1,211 @@ +# Split Keyboard + +Many keyboards in the QMK Firmware repo are "split" keyboards. They use two controllers—one plugging into USB, and the second connected by a serial or an I2C connection over a TRRS or similar cable. + +Split keyboards can have a lot of benefits, but there is some additional work needed to get them enabled. + +QMK Firmware has a generic implementation that is usable by any board, as well as numerous board specific implementations. + +For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards. + +!> ARM is not yet supported for Split Keyboards. Progress is being made, but we are not quite there, yet. + + +## Hardware Configuration + +This assumes that you're using two Pro Micro-compatible controllers, and are using TRRS jacks to connect to two halves. + +### Required Hardware + +Apart from diodes and key switches for the keyboard matrix in each half, you will need 2x TRRS sockets and 1x TRRS cable. + +Alternatively, you can use any sort of cable and socket that has at least 3 wires. + +If you want to use I2C to communicate between halves, you will need a cable with at least 4 wires and 2x 4.7kΩ pull-up resistors. + +#### Considerations + +The most commonly used connection is a TRRS cable and jacks. These provide 4 wires, making them very useful for split keyboards, and are easy to find. + +However, since one of the wires carries VCC, this means that the boards are not hot pluggable. You should always disconnect the board from USB before unplugging and plugging in TRRS cables, or you can short the controller, or worse. + +Another option is to use phone cables (as in, old school RJ-11/RJ-14 cables). Make sure that you use one that actually supports 4 wires/lanes. + +However, USB cables, SATA cables, and even just 4 wires have been known to be used for communication between the controllers. + +!> Using USB cables for communication between the controllers works just fine, but the connector could be mistaken for a normal USB connection and potentially short out the keyboard, depending on how it's wired. For this reason, they are not recommended for connecting split keyboards. + +### Serial Wiring + +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0 (aka PDO or pin 3) between the two Pro Micros. + +?> Note that the pin used here is actually set by `SOFT_SERIAL_PIN` below. + +![serial wiring](https://i.imgur.com/C3D1GAQ.png) + +### I2C Wiring + +The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros. + +The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves. + +![I2C wiring](https://i.imgur.com/Hbzhc6E.png) + +## Firmware Configuration + +To enable the split keyboard feature, add the following to your `rules.mk`: + +```make +SPLIT_KEYBOARD = yes +``` + +If you're using a custom transport (communication method), then you will also need to add: + +```make +SPLIT_TRANSPORT = custom +``` + +### Setting Handedness + +By default, the firmware does not know which side is which; it needs some help to determine that. There are several ways to do this, listed in order of precedence. + +#### Handedness by Pin + +You can configure the firmware to read a pin on the controller to determine handedness. To do this, add the following to your `config.h` file: + +```c +#define SPLIT_HAND_PIN B7 +``` + +This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side. + +#### Handedness by EEPROM + +This method sets the keyboard's handedness by setting a flag in the persistent storage (`EEPROM`). This is checked when the controller first starts up, and determines what half the keyboard is, and how to orient the keyboard layout. + + +To enable this method, add the following to your `config.h` file: + +```c +#define EE_HANDS +``` + +However, you'll have to flash the EEPROM files for the correct hand to each controller. You can do this manually, or there are targets for avrdude and dfu to do this, while flashing the firmware: + +* `:avrdude-split-left` +* `:avrdude-split-right` +* `:dfu-split-left` +* `:dfu-split-right` +* `:dfu-util-split-left` +* `:dfu-util-split-right` + +This setting is not changed when re-initializing the EEPROM using the `EEP_RST` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox]()'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files. + +You can find the `EEPROM` files in the QMK firmware repo, [here](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common). + +#### Handedness by `#define` + +You can set the handedness at compile time. This is done by adding the following to your `config.h` file: + +```c +#define MASTER_RIGHT +``` + +or + +```c +#define MASTER_LEFT +``` + +If neither are defined, the handedness defaults to `MASTER_LEFT`. + + +### Communication Options + +Because not every split keyboard is identical, there are a number of additional options that can be configured in your `config.h` file. + +```c +#define USE_I2C +``` + +This enables I2C support for split keyboards. This isn't strictly for communication, but can be used for OLED or other I2C-based devices. + +```c +#define SOFT_SERIAL_PIN D0 +``` + +This sets the pin to be used for serial communication. If you're not using serial, you shouldn't need to define this. + +However, if you are using serial and I2C on the board, you will need to set this, and to something other than D0 and D1 (as these are used for I2C communication). + +```c +#define SELECT_SOFT_SERIAL_SPEED {#}` +``` + +If you're having issues with serial communication, you can change this value, as it controls the communication speed for serial. The default is 1, and the possible values are: + +* **`0`**: about 189kbps (Experimental only) +* **`1`**: about 137kbps (default) +* **`2`**: about 75kbps +* **`3`**: about 39kbps +* **`4`**: about 26kbps +* **`5`**: about 20kbps + +### Hardware Configuration Options + +There are some settings that you may need to configure, based on how the hardware is set up. + +```c +#define MATRIX_ROW_PINS_RIGHT { } +#define MATRIX_COL_PINS_RIGHT { } +``` + +This allows you to specify a different set of pins for the matrix on the right side. This is useful if you have a board with differently-shaped halves that requires a different configuration (such as Keebio's Quefrency). + +```c +#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } } +``` + +This allows you to specify a different set of direct pins for the right side. + +```c +#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } +#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +``` + +This allows you to specify a different set of encoder pins for the right side. + +```c +#define RGBLIGHT_SPLIT +``` + +This option enables synchronization of the RGB Light modes between the controllers of the split keyboard. This is for keyboards that have RGB LEDs that are directly wired to the controller (that is, they are not using the "extra data" option on the TRRS cable). + +```c +#define RGBLED_SPLIT { 6, 6 } +``` + +This sets how many LEDs are directly connected to each controller. The first number is the left side, and the second number is the right side. + +?> This setting implies that `RGBLIGHT_SPLIT` is enabled, and will forcibly enable it, if it's not. + + +```c +#define SPLIT_USB_DETECT +``` +This option changes the startup behavior to detect an active USB connection when delegating master/slave. If this operation times out, then the half is assume to be a slave. This is the default behavior for ARM, and required for AVR Teensy boards (due to hardware limitations). + +?> This setting will stop the ability to demo using battery packs. + +```c +#define SPLIT_USB_TIMEOUT 2500 +``` +This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`. + +## Additional Resources + +Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information. + +However, the RGB Light section is out of date, as it was written long before the RGB Split code was added to QMK Firmware. Instead, wire each strip up directly to the controller. + + diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index b5e5218b09..f48f11b1cb 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -1,40 +1,58 @@ # Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things - - +## Introduction Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature: With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. -To make it clear how this is different from `ACTION_FUNCTION_TAP`, let's explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap. +## Explanatory Comparison with `ACTION_FUNCTION_TAP` +`ACTION_FUNCTION_TAP` can offer similar functionality to Tap Dance, but it's worth noting some important differences. To do this, let's explore a certain setup! We want one key to send `Space` on single-tap, but `Enter` on double-tap. -With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly. +With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if `SPC` and `a` are both typed within `TAPPING_TERM`. With the Tap Dance feature, that'll come out correctly as `SPC a` (even if both `SPC` and `a` are typed within the `TAPPING_TERM`. -The implementation hooks into two parts of the system, to achieve this: into `process_record_quantum()`, and the matrix scan. We need the latter to be able to time out a tap sequence even when a key is not being pressed, so `SPC` alone will time out and register after `TAPPING_TERM` time. +To achieve this correct handling of interrupts, the implementation of Tap Dance hooks into two parts of the system: `process_record_quantum()`, and the matrix scan. These two parts are explained below, but for now the point to note is that we need the latter to be able to time out a tap sequence even when a key is not being pressed. That way, `SPC` alone will time out and register after `TAPPING_TERM` time. -But lets start with how to use it, first! +## How to Use Tap Dance +But enough of the generalities; lets look at how to actually use Tap Dance! -First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array. +First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. -This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options: +Optionally, you might want to set a custom `TAPPING_TERM` time by adding something like this in you `config.h`: + +``` +#define TAPPING_TERM 175 +``` + +The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead. + +Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()` - takes a number, which will later be used as an index into the `tap_dance_actions` array. + +After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options: * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. -* `ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode). +* `ACTION_TAP_DANCE_LAYER_MOVE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode). + * This is the same as `ACTION_TAP_DANCE_DUAL_ROLE`, but renamed to something that is clearer about its functionality. Both names will work. +* `ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer)`: Sends the `kc` keycode when tapped once, or toggles the state of `layer`. (this functions like the `TG` layer keycode). * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. * `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function when the dance action finishes (like the previous option), and the last function when the tap dance action resets. * `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`. -The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. +The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. !> Keep in mind that only [basic keycodes](keycodes_basic.md) are supported here. Custom keycodes are not supported. -And that's the bulk of it! +Similar to the first option, the second option is good for simple layer-switching cases. -And now, on to the explanation of how it works! +For more complicated cases, use the third or fourth options (examples of each are listed below). -The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and the timer. +Finally, the fifth option is particularly useful if your non-Tap-Dance keys start behaving weirdly after adding the code for your Tap Dance keys. The likely problem is that you changed the `TAPPING_TERM` time to make your Tap Dance keys easier for you to use, and that this has changed the way your other keys handle interrupts. -This means that you have `TAPPING_TERM` time to tap the key again, you do not have to input all the taps within that timeframe. This allows for longer tap counts, with minimal impact on responsiveness. +## Implementation Details +Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works! + +The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and reset the timer. + +This means that you have `TAPPING_TERM` time to tap the key again; you do not have to input all the taps within a single `TAPPING_TERM` timeframe. This allows for longer tap counts, with minimal impact on responsiveness. Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys. @@ -315,6 +333,8 @@ And then simply use `TD(X_CTL)` anywhere in your keymap. If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace. +> In this configuration "hold" takes place **after** tap dance timeout (see `ACTION_TAP_DANCE_FN_ADVANCED_TIME`). To achieve instant hold, remove `state->interrupted` checks in conditions. As a result you may use comfortable longer tapping periods to have more time for taps and not to wait too long for holds (try starting with doubled `TAPPING_TERM`). + ### Example 5: Using tap dance for advanced mod-tap and layer-tap keys Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`. @@ -397,3 +417,106 @@ qk_tap_dance_action_t tap_dance_actions[] = { ``` Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`. + +### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys + +Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this example, we will set up a key to function as `KC_QUOT` on single-tap, as `MO(_MY_LAYER)` on single-hold, and `TG(_MY_LAYER)` on double-tap. + +The first step is to include the following code towards the beginning of your `keymap.c`: + +```c +typedef struct { + bool is_press_action; + int state; +} tap; + +//Define a type for as many tap dance states as you need +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3 +}; + +enum { + QUOT_LAYR = 0 //Our custom tap dance key; add any other tap dance keys to this enum +}; + +//Declare the functions to be used with your tap dance key(s) + +//Function associated with all tap dances +int cur_dance (qk_tap_dance_state_t *state); + +//Functions associated with individual tap dances +void ql_finished (qk_tap_dance_state_t *state, void *user_data); +void ql_reset (qk_tap_dance_state_t *state, void *user_data); +``` + +Towards the bottom of your `keymap.c`, include the following code: + +```c +//Determine the current tap dance state +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (!state->pressed) { + return SINGLE_TAP; + } else { + return SINGLE_HOLD; + } + } else if (state->count == 2) { + return DOUBLE_TAP; + } + else return 8; +} + +//Initialize tap structure associated with example tap dance key +static tap ql_tap_state = { + .is_press_action = true, + .state = 0 +}; + +//Functions that control what our tap dance key does +void ql_finished (qk_tap_dance_state_t *state, void *user_data) { + ql_tap_state.state = cur_dance(state); + switch (ql_tap_state.state) { + case SINGLE_TAP: + tap_code(KC_QUOT); + break; + case SINGLE_HOLD: + layer_on(_MY_LAYER); + break; + case DOUBLE_TAP: + //check to see if the layer is already set + if (layer_state_is(_MY_LAYER)) { + //if already set, then switch it off + layer_off(_MY_LAYER); + } else { + //if not already set, then switch the layer on + layer_on(_MY_LAYER); + } + break; + } +} + +void ql_reset (qk_tap_dance_state_t *state, void *user_data) { + //if the key was held down and now is released then switch off the layer + if (ql_tap_state.state==SINGLE_HOLD) { + layer_off(_MY_LAYER); + } + ql_tap_state.state = 0; +} + +//Associate our tap dance key with its functionality +qk_tap_dance_action_t tap_dance_actions[] = { + [QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275) +}; +``` + +The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is( layer )` function which returns `true` if the given `layer` is active. + +The use of `cur_dance()` and `ql_tap_state` mirrors the above examples. + +The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `case:SINGLE_HOLD` works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `case:DOUBLE_TAP` works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`. + +`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here. + +Finally, to get this tap dance key working, be sure to include `TD(QUOT_LAYR)` in your `keymaps[]`. diff --git a/docs/feature_terminal.md b/docs/feature_terminal.md index 1863599f84..f850622165 100644 --- a/docs/feature_terminal.md +++ b/docs/feature_terminal.md @@ -1,6 +1,6 @@ # Terminal -> This feature is currently *huge* at 4400 bytes, and should probably only be put on boards with a lot of memory, or for fun. +> This feature is currently *huge*, and should probably only be put on boards with a lot of memory, or for fun. The terminal feature is a command-line-like interface designed to communicate through a text editor with keystrokes. It's beneficial to turn off auto-indent features in your editor. @@ -56,7 +56,7 @@ Outputs the last 5 commands entered 1. help 2. about 3. keymap 0 -4. help +4. help 5. flush-buffer ``` diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 2f119c8bde..e162d423ce 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -115,11 +115,11 @@ For instance, let's look at the `layer_state_set_user()` function. You can enab In your `` file, you'd want to add this: ```c __attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { +layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } -uint32_t layer_state_set_user (uint32_t state) { +layer_state_t layer_state_set_user (layer_state_t state) { state = update_tri_layer_state(state, 2, 3, 5); return layer_state_set_keymap (state); } @@ -211,15 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT ) #endif { // - #if defined(__arm__) // only run for ARM boards - SEND_STRING(":dfu-util"); - #elif defined(BOOTLOADER_DFU) // only run for DFU boards - SEND_STRING(":dfu"); - #elif defined(BOOTLOADER_HALFKAY) // only run for teensy boards - SEND_STRING(":teensy"); - #elif defined(BOOTLOADER_CATERINA) // only run for Pro Micros - SEND_STRING(":avrdude"); - #endif // bootloader options + SEND_STRING(":flash"); } if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) { SEND_STRING(" -j8 --output-sync"); @@ -244,7 +236,7 @@ endif This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make :`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time. -Also, holding `shift` will add the appropriate flashing command (`:dfu`, `:teensy`, `:avrdude`, `:dfu-util`) for a majority of keyboards. Holding `control` will add some commands that will speed up compiling time by processing multiple files at once. +Also, holding Shift will add the flash target (`:flash`) to the command. Holding Control will add some commands that will speed up compiling time by processing multiple files at once. And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap. diff --git a/docs/features.md b/docs/features.md index f9ef51eae2..44299bf10d 100644 --- a/docs/features.md +++ b/docs/features.md @@ -12,6 +12,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [Combos](feature_combo.md) - Custom actions for multiple key holds. * [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic"). * [Debounce API](feature_debounce_type.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing. +* [DIP Switch](feature_dip_switch.md) - Toggle switches for customizing board function. * [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself. * [Encoders](feature_encoders.md) - Rotary encoders! * [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave. @@ -30,6 +31,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard. * [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting. * [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets. +* [Split Keyboard](feature_split_keyboard.md) * [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use. * [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage. * [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want. diff --git a/docs/flashing.md b/docs/flashing.md index 3b4582f005..98841c1aac 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -10,11 +10,17 @@ Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by To ensure compatibility with the DFU bootloader, make sure this block is present your `rules.mk` (optionally with `lufa-dfu` or `qmk-dfu` instead): - # Bootloader - # This definition is optional, and if your keyboard supports multiple bootloaders of - # different sizes, comment this out, and the correct address will be loaded - # automatically (+60). See bootloader.mk for all options. - BOOTLOADER = atmel-dfu +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu +``` Compatible flashers: @@ -64,11 +70,17 @@ Arduino boards and their clones use the [Caterina bootloader](https://github.com To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`: - # Bootloader - # This definition is optional, and if your keyboard supports multiple bootloaders of - # different sizes, comment this out, and the correct address will be loaded - # automatically (+60). See bootloader.mk for all options. - BOOTLOADER = caterina +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina +``` Compatible flashers: @@ -87,11 +99,16 @@ or make ::avrdude -or if you want to flash multiple boards, use the following command - make ::avrdude-loop +#### Caterina commands + +There are a number of DFU commands that you can use to flash firmware to a DFU device: + +* `:avrdude` - This is the normal option which waits until a Caterina device is available (by detecting a new COM port), and then flashes the firmware. +* `:avrdude-loop` - This runs the same command as `:avrdude`, but after each device is flashed, it will attempt to flash again. This is useful for bulk flashing. _This requires you to manually escape the loop by hitting Ctrl+C._ +* `:avrdude-split-left` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._ +* `:avrdude-split-right` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._ -When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop. ## Halfkay @@ -100,11 +117,17 @@ Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on al To ensure compatibility with the Halfkay bootloader, make sure this block is present your `rules.mk`: - # Bootloader - # This definition is optional, and if your keyboard supports multiple bootloaders of - # different sizes, comment this out, and the correct address will be loaded - # automatically (+60). See bootloader.mk for all options. - BOOTLOADER = halfkay +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay +``` Compatible flashers: @@ -119,6 +142,73 @@ Flashing sequence: 3. Flash a .hex file 4. Reset the device into application mode (may be done automatically) +## USBasploader + +USBasploader is a bootloader developed by matrixstorm. It is used in some non-USB AVR chips such as the ATmega328P, which run V-USB. + +To ensure compatibility with the USBasploader bootloader, make sure this block is present in your `rules.mk`: + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp +``` + +Compatible flashers: + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI) +* [avrdude](http://www.nongnu.org/avrdude/) with the `usbasp` programmer +* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS) + +Flashing sequence: + +1. Press the `RESET` keycode, or keep the boot pin shorted to GND while quickly shorting RST to GND +2. Wait for the OS to detect the device +3. Flash a .hex file +4. Reset the device into application mode (may be done automatically) + +## BootloadHID + +BootloadHID is a USB bootloader for AVR microcontrollers. The uploader tool requires no kernel level driver on Windows and can therefore be run without installing any DLLs. + +To ensure compatibility with the bootloadHID bootloader, make sure this block is present your `rules.mk`: + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID +``` + +Compatible flashers: + +* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (recommended Windows GUI) +* [bootloadhid Command Line](https://www.obdev.at/products/vusb/bootloadhid.html) / `:BootloadHID` in QMK (recommended command line) + +Flashing sequence: + +1. Enter the bootloader using any of the following methods: + * Tap the `RESET` keycode (may not work on all devices) + * Hold the salt key while plugging the keyboard in (usually documented within keyboard readme) +2. Wait for the OS to detect the device +3. Flash a .hex file +4. Reset the device into application mode (may be done automatically) + +or: + + make ::bootloadHID + ## STM32 All STM32 chips come preloaded with a factory bootloader that cannot be modified nor deleted. Some STM32 chips have bootloaders that do not come with USB programming (e.g. STM32F103) but the process is still the same. @@ -146,7 +236,7 @@ Flashing sequence: There are a number of DFU commands that you can use to flash firmware to a STM32 device: -* `:dfu-util` - The default command for flashing to STM32 devices. -* `:dfu-util-wait` - This works like the default command, but it gives you a (configurable) 10 second timeout before it attempts to flash the firmware. You can use `TIME_DELAY=20` from the command line to change the timeout. - * Eg: `make ::dfu-util TIME_DELAY=5` +* `:dfu-util` - The default command for flashing to STM32 devices, and will wait until an STM32 bootloader device is present. +* `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards. +* `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards. * `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. diff --git a/docs/flashing_bootloadhid.md b/docs/flashing_bootloadhid.md new file mode 100644 index 0000000000..c51d8ce4b8 --- /dev/null +++ b/docs/flashing_bootloadhid.md @@ -0,0 +1,70 @@ +# BootloadHID Flashing Instructions and Bootloader Information + +ps2avr(GB) boards use an ATmega32A microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +General flashing sequence: + +1. Enter the bootloader using any of the following methods: + * Tap the `RESET` keycode (may not work on all devices) + * Hold the salt key while plugging the keyboard in (usually documented within keyboard readme) +2. Wait for the OS to detect the device +3. Flash a .hex file +4. Reset the device into application mode (may be done automatically) + +## bootloadHID Flashing Target + +Using the QMK installation script, detailed [here](newbs_getting_started.md), the required bootloadHID tools should be automatically installed. + +To flash via the command line, use the target `:bootloadHID` by executing the following command: + + make ::bootloadHID + +## GUI Flashing + +### Windows +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Ensure the configured VendorID is `16c0` and ProductID is `05df` +4. Press the `Find Device` button and ensure that your keyboard is found. +5. Press the `Open .hex File` button and locate the `.hex` file you created. +6. Press the `Flash Device` button and wait for the process to complete. + +## Command Line Flashing + +1. Place your keyboard into reset. +2. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +### Windows Manual Installation +For MSYS2: +1. Download the BootloadHID firmware package from https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz. +2. Extract contents using a compatible tool, for example 7-Zip. +3. Add to the MSYS path by copying `commandline/bootloadHID.exe` from the extracted archive to your MSYS2 installation, typically `C:\msys64\usr\bin`. + +For native Windows flashing, the `bootloadHID.exe` can be used outside of the MSYS2 environment. + +### Linux Manual Installation +1. Install libusb development dependency: + ```bash + # This depends on OS - for Debian the following works + sudo apt-get install libusb-dev + ``` +2. Download the BootloadHID firmware package: + ``` + wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp + ``` +3. Build the bootloadHID executable: + ``` + cd /tmp/bootloadHID.2012-12-08/commandline/ + make + sudo cp bootloadHID /usr/local/bin + ``` + +### MacOS Manual Installation +1. Install Homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install the following packages: + ``` + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` diff --git a/docs/fr-fr/ChangeLog/20190830.md b/docs/fr-fr/ChangeLog/20190830.md new file mode 100644 index 0000000000..cb223be31a --- /dev/null +++ b/docs/fr-fr/ChangeLog/20190830.md @@ -0,0 +1,52 @@ +# QMK Breaking Change - 30 août 2019 + +Quatre fois par an, QMK lance un processus pour fusionner les Breaking Changes. Un Breaking Change est un changement qui modifie la manière dont QMK fonctionne introduisant des incompatibilités ou des comportements dangereux. Nous n'effectuons ces changements que 4 fois par an afin que les utilisateurs n'aient pas peur de casser leurs keymaps en mettant à jour leur version de QMK. + +Ce document présente les fusions de Breaking Change. Voici la liste des changements. + +## Formattage de code Core avec clang-format + +* Tous les fichiers core (`drivers/`, `quantum/`, `tests/`, et `tmk_core/`) seront formatés avec clang-format +* Un processus travis pour reformatter les PRs lors de la fusion a été mis en place +* Vous pouvez utiliser la nouvelle commande CLI `qmk cformat` afin de formater avant de soumettre votre PR si vous le souhaitez. + +## Nettoyage des descripteurs LUFA USB + +* Nettoyage du code lié aux descripteurs USB HID sur les claviers AVR, afin de les rendre plus simple à lire et compréhensibles +* Plus d'information: https://github.com/qmk/qmk_firmware/pull/4871 +* Normalement pas de changement de fonctionnement et aucune keymap modifiée. + +## Migration des entrées de `ACTION_LAYER_MOMENTARY()` dans `fn_actions` vers des keycodes `MO()` + +* `fn_actions` est déprécié, et ses fonctionnalités ont été remplacées par des keycodes directs et `process_record_user()` +* Supprimer cette fonctionnalité obsolète devrait aboutir à une réduction importante de la taille du firmware et de la complexité du code +* Il est recommandé que toutes les keymaps affectées remplacent `fn_actions` vers les fonctionnalités de [keycode custom](https://docs.qmk.fm/#/custom_quantum_functions) et [macro](https://docs.qmk.fm/#/feature_macros) + +## Mise à jour Atreus vers les conventions de codage courantes + +* Les doublons include guards ont contourné le comportement de traitement des headers attendu +* Il est recommandé pour toutes les keymaps affectées de supprimer le doublon de `/config.h` et `/keymaps//config.h` et de ne garder que des surcharges au niveau keymap + +## Récupération des changements de fichier keymap langage de la fork ZSA + +* Corrige une issue dans le fichier `keymap_br_abnt2.h` qui inclut la mauvaise souce (`keymap_common.h` au lieu de `keymap.h`) +* Met à jour le fichier `keymap_swedish.h` afin d'être spécifique au suédois et plus "nordique" en général. +* Toutes les keymaps qui utilisent ceci devront supprimer `NO_*` et le remplacer par `SE_*`. + +## Mise à jour du repo afin d'utiliser LUFA comme un sous-module git + +* `/lib/LUFA` supprimé du dépôt +* LUFA, définis comme un sous-module, pointe vers qmk/lufa +* Ceci devrait ajouter plus de flexibilité vers LUFA, et nous permet de garder le sous-module à jour bien plus facilement. Il avait environ 2 ans de retard, sans manière simple de corriger. Ce changement devrait simplifier la mise à jour dans le futur. + +## Migration des entrées `ACTION_BACKLIGHT_*()` dans `fn_actions` vers des keycodes `BL_` + +* `fn_actions` est déprécié, et ses fonctionnalités ont été remplacées par des keycodes directs et `process_record_user()` +* Toutes les keymaps utilisant ces actions doivent avoir les clés `KC_FN*` remplacées par les clés `BL_*` équivalentes +* Si vous utilisez actuellement `KC_FN*` vous devrez remplacer `fn_actions` avec les fonctionnalités de [keycode custom](https://docs.qmk.fm/#/custom_quantum_functions) et [macro](https://docs.qmk.fm/#/feature_macros) + +## Remplacer l'alias `KC_DELT` par `KC_DEL` + +* `KC_DELT` était un alias redondant et non documenté pour `KC_DELETE` +* Il a été supprimé et toutes ses utilisations ont été remplacées par l'alias plus courant `KC_DEL` +* Environ 90 keymaps (surtout des boards ErgoDox) ont été modifiées à cette fin diff --git a/docs/fr-fr/README.md b/docs/fr-fr/README.md new file mode 100644 index 0000000000..d3591554b0 --- /dev/null +++ b/docs/fr-fr/README.md @@ -0,0 +1,32 @@ +# Quantum Mechanical Keyboard Firmware + +[![Version courante](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Statut du build](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Statut de la doc](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![Contributeurs Github](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![Forks Github](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## Qu'est-ce que QMK Firmware ? + +QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintient le firmware QMK, la QMK Toolbox (*Boite à outil*), qmk.fm et leurs documentations. QMK Firmware est un firmware dédié aux claviers qui est basé sur [tmk\_keyboard](http://github.com/tmk/tmk_keyboard). Il offre des fonctionnalités très utiles pour les contrôleurs Atmel AVR, et, plus spécifiquement pour [les produits d'OLKB](http://olkb.com), le clavier [ErgoDox EZ](http://www.ergodox-ez.com), et pour les [produits Clueboard](http://clueboard.co/). Il prend désormais aussi en charge les processeurs ARM qui utilisent ChibiOS. Vous pouvez l'utiliser pour contrôler un clavier personnalisé soudé à la main ou alors sur un clavier avec un PCB personnalisé. + +## Comment l'obtenir + +Si vous souhaitez contribuer à une disposition de clavier (keymap), ou à des fonctionnalités de QMK alors le plus simple est de [forker le dépôt avec Github](https://github.com/qmk/qmk_firmware#fork-destination-box) puis cloner le dépôt localement pour y faire des changements. Vous pourrez pousser vos changements sur github puis ouvrir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) depuis votre fork Github. + +Sinon, vous pouvez aussi le télécharger directement en ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), ou le cloner avec git en ssh (`git@github.com:qmk/qmk_firmware.git`), ou https (`https://github.com/qmk/qmk_firmware.git`). + +## Comment le compiler + +Avant d'être prêt à compiler vous allez devoir [installer un environnement](getting_started_build_tools.md) pour les développements AVR et/ou ARM. Une fois ceci fait, vous pourrez utiliser la commande `make` pour compiler le clavier et la disposition avec une commande de ce type : + + make planck/rev4:default + +Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en anglais « subprojects » ou « folder »). Cette option peut donc être omise : + + make preonic:default + +## Comment le personnaliser + +QMK a beaucoup de [fonctionnalités](features.md) à explorer, et [une documentation](http://docs.qmk.fm) très abondante que vous pourrez parcourir. La plupart des fonctionnalités vous permettrons de modifier vos [dispositions](keymap.md) (keymaps) et de changer [les codes de caractères](keycodes.md) (keycodes). diff --git a/docs/fr-fr/_summary.md b/docs/fr-fr/_summary.md new file mode 100644 index 0000000000..eef4861763 --- /dev/null +++ b/docs/fr-fr/_summary.md @@ -0,0 +1,125 @@ +**En Français** + +* [Guide pour débutant complet](fr-fr/newbs.md) + * [Pour débuter](fr-fr/newbs_getting_started.md) + * [Compiler son premier firmware](fr-fr/newbs_building_firmware.md) + * [Flasher le Firmware](fr-fr/newbs_flashing.md) + * [Test et Débuggage](fr-fr/newbs_testing_debugging.md) + * [Bonnes pratiques Git](fr-fr/newbs_best_practices.md) + * [Ressources d'apprentissage](fr-fr/newbs_learn_more_resources.md) + +* [Les bases de QMK](fr-fr/README.md) + * [Indroduction à QMK](fr-fr/getting_started_introduction.md) + * [QMK CLI](fr-fr/cli.md) + * [Configuration de la CLI QMK](fr-fr/cli_configuration.md) + * [Contribuer à QMK](fr-fr/contributing.md) + * [Comment utiliser GitHub](fr-fr/getting_started_github.md) + * [Trouver de l'aide](fr-fr/getting_started_getting_help.md) + +* [Breaking changes](fr-fr/breaking_changes.md) + * [30 août 2019](fr-fr/ChangeLog/20190830.md) + +* [FAQ](fr-fr/faq.md) + * [FAQ Générale](fr-fr/faq_general.md) + * [Compiler QMK](fr-fr/faq_build.md) + * [Débugguer / Dépanner QMK](fr-fr/faq_debug.md) + * [Keymap / Disposition](fr-fr/faq_keymap.md) + * [Installer les drivers avec Zadig](fr-fr/driver_installation_zadig.md) + +**En Anglais** + +* Guides détaillés + * [Installation des outils de compilation](getting_started_build_tools.md) + * [Guide Vagrant](getting_started_vagrant.md) + * [Commandes de compilations](getting_started_make_guide.md) + * [Flasher les firmwares](fr-fr/flashing.md) + * [Personnaliser les fonctionnalités](custom_quantum_functions.md) + * [Aperçu des fonctionnalités des dispositions](keymap.md) + +* [Hardware](hardware.md) + * [Processeurs AVR](hardware_avr.md) + * [Pilotes / Drivers](hardware_drivers.md) + +* Réferences + * [Lignes de conduite des claviers](hardware_keyboard_guidelines.md) + * [Options de configurations](config_options.md) + * [Keycodes / Codes des caractères](keycodes.md) + * [Conventions de codage - C](coding_conventions_c.md) + * [Conventions de codage - Python](coding_conventions_python.md) + * [Meilleurs pratiques sur la documentation](documentation_best_practices.md) + * [Modèles de documentation](documentation_templates.md) + * [Glossaire](reference_glossary.md) + * [Tests unitaires](unit_testing.md) + * [Fonctions utiles](ref_functions.md) + * [Support de configuration](reference_configurator_support.md) + * [Format du fichier info.json](reference_info_json.md) + * [Développer la CLI en Python](cli_development.md) + +* [Fonctionnalités](features.md) + * [Keycodes basiques](keycodes_basic.md) + * [Touches utilisées avec Shift (US ANSI)](keycodes_us_ansi_shifted.md) + * [Keycodes quantiques](quantum_keycodes.md) + * [Keycodes avancés](feature_advanced_keycodes.md) + * [Fonctionnalités audio](feature_audio.md) + * [Majuscule automatique](feature_auto_shift.md) + * [Rétroéclairage](feature_backlight.md) + * [Bluetooth](feature_bluetooth.md) + * [Bootmagic](feature_bootmagic.md) + * [Combos](feature_combo.md) + * [Commande](feature_command.md) + * [API anti-rebond](feature_debounce_type.md) + * [DIP Switch](feature_dip_switch.md) + * [Macros dynamiques](feature_dynamic_macros.md) + * [Interrupteurs rotatifs](feature_encoders.md) + * [Grave Escape](feature_grave_esc.md) + * [Retour haptique](feature_haptic_feedback.md) + * [Contrôleur LCD HD44780](feature_hd44780.md) + * [Touche à verrou / Lock-key](feature_key_lock.md) + * [Dispositions / layouts](feature_layouts.md) + * [Touche leader](feature_leader_key.md) + * [Matrice LED](feature_led_matrix.md) + * [Macros](feature_macros.md) + * [Boutons de souris](feature_mouse_keys.md) + * [Pilotes / Drivers OLED](feature_oled_driver.md) + * [Touche one-shot](feature_advanced_keycodes.md#one-shot-keys) + * [Périphériques de pointage](feature_pointing_device.md) + * [Souris PS/2](feature_ps2_mouse.md) + * [Éclairage RGB](feature_rgblight.md) + * [Matrice RGB](feature_rgb_matrix.md) + * [Space Cadet](feature_space_cadet.md) + * [Claviers scindés / splittés](feature_split_keyboard.md) + * [Stenographie](feature_stenography.md) + * [Inversion des mains](feature_swap_hands.md) + * [Tap Dance](feature_tap_dance.md) + * [Terminale](feature_terminal.md) + * [Imprimante thermique](feature_thermal_printer.md) + * [Caractères unicodes](feature_unicode.md) + * [Dossier utilisateur](feature_userspace.md) + * [Velocikey](feature_velocikey.md) + +* Pour les makers et les bricoleurs + * [Guide des claviers soudés à la main](hand_wire.md) + * [Guide de flash de l’ISP](isp_flashing_guide.md) + * [Guide du débogage ARM](arm_debugging.md) + * [Drivers i2c](i2c_driver.md) + * [Contrôles des GPIO](internals_gpio_control.md) + * [Conversion en Proton C](proton_c_conversion.md) + +* Pour aller plus loin + * [Comment fonctionnent les claviers](how_keyboards_work.md) + * [Comprendre QMK](understanding_qmk.md) + +* Autres sujets + * [Utiliser Eclipse avec QMK](other_eclipse.md) + * [Utiliser VSCode avec QMK](other_vscode.md) + * [Support](support.md) + * [Comment ajouter des traductions](translating.md) + +* À l’intérieur de QMK (En cours de documentation) + * [Définitions](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Appareils Midi](internals_midi_device.md) + * [Installation d’un appareil Midi](internals_midi_device_setup_process.md) + * [Utilitaires Midi](internals_midi_util.md) + * [Fonctions Midi](internals_send_functions.md) + * [Outils Sysex](internals_sysex_tools.md) diff --git a/docs/fr-fr/breaking_changes.md b/docs/fr-fr/breaking_changes.md new file mode 100644 index 0000000000..53bbb2212a --- /dev/null +++ b/docs/fr-fr/breaking_changes.md @@ -0,0 +1,107 @@ +# Breaking changes + +Ce document décrit le processus de QMK pour la gestion des breaking changes. Un breaking change est un changement qui modifie la manière dont QMK fonctionne introduisant des incompatibilités ou des comportements dangereux. Nous limitons ces changements afin que les utilisateurs n'aient pas peur de casser leurs keymaps en mettant à jour leur version de QMK. + +La période de breaking change est quand nous allons fusionner un PR qui change QMK d'une manière dangereuse ou inattendue. Il y a une période interne de test afin de nous assurer que les problèmes résiduels sont rares ou impossible à prévoir. + +## Qu'est-ce qui a été inclus dans des Breaking Changes précédents? + +* [30 août 2019](ChangeLog/20190830.md) + +## Quand va être le prochain Breaking Change? + +Le prochain Breaking Change est planifié pour le 29 novembre. + +### Dates importantes + +* [x] 21 septembre 2019 - `future` est créé. Il va être rebasé de manière hebdomadaire. +* [ ] 01 novembre 2019 - `future` fermé aux nouveaux PRs. +* [ ] 01 novembre 2019 - Appel aux testeurs. +* [ ] 27 novembre 2019 - `master` est bloqué, pas de PRs fusionnés. +* [ ] 29 novembre 2019 - `future` est fusionné dans `master`. +* [ ] 30 novembre 2019 - `master` est débloqué. Les PRs peuvent à nouveau être fusionnés. + +## Quels changements seront inclus? + +Pour voir une liste de candidats de breaking changes, vous pouvez regarder la liste des [labels `breaking_change`](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). De nouveaux changements peuvent être ajoutés entre maintenant et lorsque `future` est fermée, et un PR avec ce label n'est pas garanti d'être fusionné. + +Si vous souhaitez que votre breaking change soit inclus dans ce tour, vous devez créer un PR avec le label `breaking_change` et faire en sorte qu'il soit accepté avant que `future` ne soit fermé. Une fois `future` fermé, aucun nouveau breaking change sera accepté. + +Critère d'acceptation: + +* Le PR est complété et prêt à fusionner +* Le PR a un ChangeLog + +# Checklists + +Cette section documente plusieurs processus que nous utilisons en lançant le processus de Breaking Change. + +## Rebase `future` de `master` + +Ceci est lancé chaque vendredi tant que `future` est ouvert. + +Processus: + +``` +cd qmk_firmware +git checkout master +git pull --ff-only +git checkout future +git rebase master +git push --force +``` + +## Créer la branche `future` + +Ceci est fait immédiatement après la fusion de la branche `future` précédente. + +* `qmk_firmware` git commands + * [ ] `git checkout master` + * [ ] `git pull --ff-only` + * [ ] `git checkout -b future` + * [ ] Modifie `readme.md` + * [ ] Ajoute un message en haut qui indique que c'est une branche de test. + * [ ] Ajoute un lien vers ce document + * [ ] `git commit -m 'Branch point for Breaking Change'` + * [ ] `git tag breakpoint___
` + * [ ] `git tag ` # Evite que le label point d'arrêt soit confondu par un incrément de version + * [ ] `git push origin future` + * [ ] `git push --tags` + +## 4 Semaines Avant la Fusion + +* `future` est maintenant fermé aux nouveaux PRs, seul des correctifs pour les PRs courants peuvent être mergés +* Envoi de l'appel aux testeurs + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## 1 Semaine Avant la Fusion + +* Annonce que master sera fermée entre <2 jours avant> à + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## 2 Jours Avant la Fusion + +* Annonce que master est fermé pour 2 jours + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## Jour de la fusion + +* `qmk_firmware` git commands + * [ ] `git checkout future` + * [ ] `git pull --ff-only` + * [ ] `git rebase origin/master` + * [ ] Modifie `readme.md` + * [ ] Supprimer les notes à propos de `future` + * [ ] Regroupe ChangeLog dans un fichier. + * [ ] `git commit -m 'Merge point for Breaking Change'` + * [ ] `git push origin future` +* Actions sur Github + * [ ] Crée un PR pour `future` + * [ ] S'assurer que Travis ne relève aucun problème + * [ ] Fusion le PR `future` diff --git a/docs/fr-fr/cli.md b/docs/fr-fr/cli.md new file mode 100644 index 0000000000..4281536458 --- /dev/null +++ b/docs/fr-fr/cli.md @@ -0,0 +1,146 @@ +# La CLI de QMK + +Cette page décrit comment configurer et utiliser la CLI QMK. + +# Vue d'ensemble + +La CLI de QMK permet de simplifier la compilation et l'interaction avec les claviers QMK. Nous avons défini plusieurs commandes pour simplifier et rationaliser les tâches telles qu'obtenir et compiler le firmware QMK, créer de nouvelles keymaps, et plus. + +* [CLI globale](#global-cli) +* [CLI locale](#local-cli) +* [Les commandes CLI](#cli-commands) + +# Pré-requis + +La CLI nécessite Python 3.5 ou plus récent. Nous essayons de limiter le nombre de pré-requis, mais vous allez aussi devoir installer les paquets listés dans le fichier [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). + +# CLI globale + +QMK met à disposition une CLI installable qui peut être utilisée pour configurer votre environnement de compilation QMK, fonctionne avec QMK, et qui rend l'utilisation de plusieurs copies de `qmk_firmware` plus simple. Nous recommandons d'installer et de mettre à jour ceci régulièrement. + +## Installer en utilisant Homebrew (macOS, quelques Linux) + +Si vous avez installé [Homebrew](https://brew.sh) vous pouvez entrer ce qui suit et installer QMK: + +``` +brew tap qmk/qmk +brew install qmk +export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware` +qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment +``` + +## Installer en utilisant easy_install ou pip + +Si votre système n'est pas listé ci-dessus, vous pouvez installer QMK manuellement. Premièrement, vérifiez que vous avez bien installé Python 3.5 (ou plus récent) et pip. Ensuite, installez QMK avec cette commande: + +``` +pip3 install qmk +export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware` +qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment +``` + +## Paquets pour d'autres systèmes d'exploitation + +Nous recherchons des gens pour créer et maintenir un paquet `qmk` pour plus de systèmes d'exploitation. Si vous voulez créer un paquet pour votre système d'exploitation, suivez ces directives: + +* Suivez les bonnes pratiques pour votre système d'exploitation lorsqu'elles entrent en conflit avec ces directives + * Documentez pourquoi dans un commentaire lorsque vous ne les suivez pas +* Installez en utilisant un virtualenv +* Expliquez à l'utilisateur de définir la variable d'environnement `QMK_Home` pour "check out" les sources du firmware à un autre endroit que `~/qmk_firmware`. + +# CLI locale + +Si vous ne voulez pas utiliser la CLI globale, il y a une CLI locale empaquetée avec `qmk_firmware`. Vous pouvez le trouver dans `qmk_firmware/bin/qmk`. Vous pouvez lancer la commande `qmk` depuis n'importe quel répertoire et elle fonctionnera toujours sur cette copie de `qmk_firmware`. + +**Exemple**: + +``` +$ ~/qmk_firmware/bin/qmk hello +Ψ Hello, World! +``` + +## Limitations de la CLI locale + +Il y a quelques limitations à la CLI locale comparé à la globale: + +* La CLI locale ne supporte pas `qmk setup` ou `qmk clone` +* La CLI locale n'opère pas sur le même arbre `qmk_firmware`, même si vous avez plusieurs dépôts clonés. +* La CLI locale ne s'exécute pas dans un virtualenv, donc il y a des risques que des dépendances seront en conflit + +# Les commandes CLI + +## `qmk compile` + +Cette commande permet de compiler le firmware de n'importe quel répertoire. Vous pouvez compiler des exports JSON de ou compiler des keymaps du dépôt. + +**Utilisation pour les exports de configuration**: + +``` +qmk compile +``` + +**Utilisation pour les Keymaps**: + +``` +qmk compile -kb -km +``` + +## `qmk cformat` + +Cette commande formatte le code C en utilisant clang-format. Lancez-la sans arguments pour formatter tout le code core, ou passez les noms de fichiers à la ligne de commande pour la lancer sur des fichiers spécifiques. + +**Utilisation**: + +``` +qmk cformat [file1] [file2] [...] [fileN] +``` + +## `qmk config` + +Cette commande vous permet de configurer le comportement de QMK. Pour la documentation complète de `qmk config`, regardez [Configuration de CLI](cli_configuration.md). + +**Utilisation**: + +``` +qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] +``` + +## `qmk doctor` + +Cette commande examine votre environnement et vous alertes des potentiels problèmes de compilation ou de flash. + +**Utilisation**: + +``` +qmk doctor +``` + +## `qmk new-keymap` + +Cette commande crée une nouvelle keymap basée sur une keymap par défaut d'un clavier existant. + +**Utilisation**: + +``` +qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] +``` + +## `qmk pyformat` + +Cette commande formate le code python dans `qmk_firmware`. + +**Utilisation**: + +``` +qmk pyformat +``` + +## `qmk pytest` + +Cette commande démarre la suite de test python. Si vous faites des changements dans le code Python, assurez-vous que les tests se lancent avec succès. + +**Utilisation**: + +``` +qmk pytest +``` diff --git a/docs/fr-fr/cli_configuration.md b/docs/fr-fr/cli_configuration.md new file mode 100644 index 0000000000..3eed1e0e95 --- /dev/null +++ b/docs/fr-fr/cli_configuration.md @@ -0,0 +1,121 @@ +# Configuration de QMK CLI + +Ce document explique comment fonctionne la commande `qmk config`. + +# Introduction + +La configuration pour QMK CLI est un système clé/valeur. Chaque clé est composée d'une sous-commande et d'un argument séparé par une virgule. Cela permet une traduction simple et directe entre les clés de configuration et l'argument qu'elle définit. + +## Exemple simple + +Comme exemple, regardons la commande `qmk compile --keyboard clueboard/66/rev4 --keymap default`. + +Il y a deux arguments de ligne de commande qui peuvent être lu de la configuration: + +* `compile.keyboard` +* `compile.keymap` + +Essayons de les définir: + +```shell +$ qmk config compile.keyboard=clueboard/66/rev4 compile.keymap=default +compile.keyboard: None -> clueboard/66/rev4 +compile.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +Maintenant, je peux lancer la commande `qmk compile` sans avoir à spécifier mon clavier et keymap à chaque fois. + +## Définir les options par défaut + +Parfois, il est utile de partager une configuration entre plusieurs commandes. Par exemple, plusieurs commandes prennent un argument `--keyboard`. Plutôt que de devoir définir cette valeur pour chaque commande, vous pouvez définir une valeur d'utilisateur qui sera utilisée par toutes les commandes qui prennent cet argument. + +Exemple: + +``` +$ qmk config user.keyboard=clueboard/66/rev4 user.keymap=default +user.keyboard: None -> clueboard/66/rev4 +user.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +# CLI Documentation (`qmk config`) + +La commande `qmk config` est utilisée pour interagir avec la configuration sous-jacente. Lancée sans argument, elle affiche la configuration courante. Lorsque des arguments sont définis, ils sont considérés comme étant des jetons de configuration, qui sont des chaînes de caractère ne contenant aucun espace avec le format suivant: + + [.][=] + +## Définir des valeurs de configuration + +Vous pouvez définir des valeurs de configuration en mettant le caractère égal (=) dans votre clé de configuration. La clé doit toujours être dans le format complet `
.`. + +Exemple: + +``` +$ qmk config default.keymap=default +default.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +## Lire des valeurs de configuration + +Vous pouvez lire les valeurs de configuration pour la totalité de la configuration, une seule clé, ou une section entière. Vous pouvez aussi spécifier plusieurs clés pour afficher plus d'une valeur. + +### Exemple avec la totalité de la configuration + + qmk config + +### Exemple avec une section entière + + qmk config compile + +### Exemple avec une clé unique + + qmk config compile.keyboard + +### Exemple avec plusieurs clés + + qmk config user compile.keyboard compile.keymap + +## Supprimer des valeurs de configuration + +Vous pouvez supprimer une valeur de configuration en la définissant avec la chaîne spéciale `None`. + +Exemple: + +``` +$ qmk config default.keymap=None +default.keymap: default -> None +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +## Plusieurs opérations + +Vous pouvez combiner plusieurs opérations d'écriture et de lecture en une seule commande. Elles seront exécutées et affichées dans l'ordre: + +``` +$ qmk config compile default.keymap=default compile.keymap=None +compile.keymap=skully +compile.keyboard=clueboard/66_hotswap/gen1 +default.keymap: None -> default +compile.keymap: skully -> None +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +# Options de configuration utilisateur + +| Clé | Valeur par défaut | Description | +|-----|---------------|-------------| +| user.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) | +| user.keymap | None | Le nom de la keymap (Exemple: `default`) | +| user.name | None | Le nom d'utilisateur GitHub de l'utilisateur. | + +# Toutes les options de configuration + +| Clé | Valeur par défaut | Description | +|-----|---------------|-------------| +| compile.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) | +| compile.keymap | None | Le nom de la keymap (Exemple: `default`) | +| hello.name | None | Le nom à saluer lorsque démarré. | +| new_keyboard.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) | +| new_keyboard.keymap | None | Le nom de la keymap (Example: `default`) | diff --git a/docs/fr-fr/contributing.md b/docs/fr-fr/contributing.md new file mode 100644 index 0000000000..0092d664ef --- /dev/null +++ b/docs/fr-fr/contributing.md @@ -0,0 +1,154 @@ +# Comment contribuer + +👍🎉 Premièrement, merci de prendre le temps de lire ceci et de contribuer! 🎉👍 + +Les contributions de tiers nous aide à améliorer et faire grandir QMK. Nous voulons rendre les pull requests et le processus de contribution utile et simple à la fois pour les contributeurs et les mainteneurs. C'est pourquoi nous avons mis en places des directives pour les contributeurs afin que votre pull request puisse être accepté sans changement majeur. + +* [Aperçu du projet](#project-overview) +* [Conventions de codage](#coding-conventions) +* [Directives générales](#general-guidelines) +* [Que veut dire le code de conduite pour moi?](#what-does-the-code-of-conduct-mean-for-me) + +## Je ne veux pas lire tout ce pavé! J'ai juste une question! + +Si vous voulez poser une question sur QMK, vous pouvez le faire sur le [sous-reddit OLKB](https://reddit.com/r/olkb) ou sur [Discord](https://discord.gg/Uq7gcHh). + +Merci de garder ceci en tête: + +* Cela peut prendre plusieurs heures pour que quelqu'un réponde à votre question. Merci d'être patient! +* Tous ceux impliqués avec QMK fait don de son temps et de son énergie. Nous ne sommes pas payés pour travailler sur ou répondre aux questions concernant QMK. +* Essayez de poser vos questions de manière à ce qu'elles soient le plus simple à répondre possible. Si vous n'êtes pas sûrs de savoir comment faire, voici quelques bon guides (en anglais): + * https://opensource.com/life/16/10/how-ask-technical-questions + * http://www.catb.org/esr/faqs/smart-questions.html + +# Aperçu du projet + +QMK est majoritairement écrit en C, avec quelques fonctions et parties spécifiques écrites en C++. Il est destiné aux processeurs intégrés que l'on trouve dans des clavier, particulièrement AVR ([LUFA](http://www.fourwalledcubicle.com/LUFA.php)) et ARM ([ChibiOS](http://www.chibios.com)). Si vous maîtrisez déjà la programmation sur Arduino, vous trouverez beaucoup de concepts et de limitations familiers. Une expérience préalable avec les Arduino n'est pas nécessaire à contribuer avec succès à QMK. + + + +# Où trouver de l'aide? + +Si vous avez besoin d'aide, vous pouvez [ouvrir une issue](https://github.com/qmk/qmk_firmware/issues) ou [un chat sur Discord](https://discord.gg/Uq7gcHh). + +# Comment contribuer? + +Vous n'avez encore jamais contribué à un projet open source? Vous vous demandez comment les contributions dans QMK fonctionnent? Voici un aperçu rapide! + +0. Enregistrez-vous sur [GitHub](https://github.com). +1. Définissez une keymap à contribuer, [trouvez une issue](https://github.com/qmk/qmk_firmware/issues) que vous souhaitez corriger, ou [une fonction](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature) que vous voulez ajouter. +2. Créez un fork sur le dépôt associé avec une issue sur votre compte GitHub. Cela veut dire que vous allez avoir une copie du dépôt sous `votre-login-GitHub/qmk_firmware`. +3. Clonez le dépôt sur votre machine locale en utilisant `git clone https://github.com/login-github/repository-name.git`. +4. Si vous travaillez sur une nouvelle fonctionnalité, pensez à ouvrir une issue pour parler avec nous du travail que vous souhaitez démarrer. +5. Créez une nouvelle branche pour votre correctif en utilisant `git checkout -b nom-de-branche`. +6. Faites les changements nécessaires pour corriger le problème ou ajouter la fonctionnalité. +7. Utilisez `git add chemin-de-fichier` pour ajouter les contenus des fichiers modifiés au "snapshot" que git utilise pour gérer l'état du projet, appelé aussi l'index. +8. Utilisez `git commit -m "Insérez une description courte des changements (en anglais)"` pour enregistrer le contenu de l'index avec un message descriptif. +9. Poussez les changements vers votre dépôt sur GitHub en utilisant `git push origin nom-de-branche`. +10. Créez un pull request sur [QMK Firmware](https://github.com/qmk/qmk_firmware/pull/new/master). +11. Donnez un titre à votre pull request en utilisant une description courte des changements que vous avez fait et ajoutez le numéro de l'issue ou du bug associé avec votre changement. Les commentaires de PR devraient se faire en anglais de préférence. Par exemple, vous pouvez utiliser un titre tel que celui-là: "Added more log outputting to resolve #4352". +12. Dans la description du pull request, expliquez les changements que vous avez fait et tous les problèmes qui existent, selon vous, sur le pull request que vous avez fait. Vous pouvez aussi utiliser la description pour poser des questions au mainteneur. Il n'est pas nécessaire que votre pull request soit parfait (aucun pull request ne l'est), le reviewer sera là pour vous aider à résoudre les problèmes et l'améliorer! +13. Attendez que le pull request soit revu par un mainteneur. +14. Faites des changements au pull request si le mainteneur le recommande. +15. Célébrez votre succès une fois votre pull request fusionné! + +# Conventions de codage + +La grande majorité de notre style est plutôt simple à comprendre. Si vous connaissez C ou Python, vous ne devriez pas avoir trop de difficulté avec notre style. + +* [Conventions de codage - C](coding_conventions_c.md) +* [Conventions de codage - Python](coding_conventions_python.md) + +# Directives générales + +Nous avons un certain nombre de type de changements dans QMK, chacun nécessitant un niveau de rigueur différent. Nous voulons que vous gardiez les directives suivantes en tête quel que soit le changement que vous êtes en train de faire. + +* Séparez les PR dans des unités logiques. Par exemple, ne soumettez pas un PR qui couvre deux fonctionnalités séparées, soumettez plutôt un PR pour chaque fonctionnalité. +* Vérifiez les espaces blancs non nécessaires avec `git diff --check` avant de commit. +* Assurez-vous que votre code compile. + * Keymaps: Assurez-vous que `make keyboard:your_new_keymap` ne renvoie pas d'erreur. + * Claviers: Assurez-vous que `make keyboard:all` ne renvoie pas d'erreur. + * Core: Assurez-vous que `make all` ne renvoie pas d'erreur. +* Assurez-vous que les messages de commit soient compréhensibles d'eux-mêmes. Vous devriez écrire une description simple (pas plus de 70 caractères) sur la première ligne, suivi d'une ligne vide, suivi d'un détail de votre commit, si nécessaire. Exemple: + +``` +Adjust the fronzlebop for the kerpleplork + +The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations. + +Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure. +``` + +## Documentation + +La documentation est l'une des manières les plus simples de démarrer la contribution sur QMK. Il est simple de trouver des endroits où la documentation est fausse ou incomplète, et il est tout aussi simple de la corriger! Nous avons aussi grandement besoin de quelqu'un pour éditer notre documentation, donc si vous avez des compétences en édition mais que vous n'êtes pas sûr de savoir où aller, n'hésitez pas [demandez de l'aide](#where-can-i-go-for-help)! + +Vous trouverez toute notre documentation dans le répertoire `qmk_firmware/docs`, ou si vous préférez utiliser des outils web, vous pouvez cliquer sur le bouton "Suggest An Edit" en haut de chaque page sur http://docs.qmk.fm/. + +Lorsque vous donnez des exemples de code dans la documentation, essayez de suivre les conventions de nommage utilisées ailleurs dans la documentation. Par exemple, standardisez les enums en utilisant `my_layers` ou `my_keycodes` afin de garder une consistance: + +```c +enum my_layers { + _FIRST_LAYER, + _SECOND_LAYER +}; + +enum my_keycodes { + FIRST_LAYER = SAFE_RANGE, + SECOND_LAYER +}; +``` + +## Keymaps + +La plupart des contributeurs débutants démarrent avec leurs keymaps personnelles. Nous essayons de garder les standards pour les keymaps pluôt simple (les keymaps reflètent, après tout, la personnalité de leurs créateurs) mais nous demandons que vous suiviez les directives suivantes afin que d'autres puissent découvrir et apprendre de votre keymap. + +* Ecrivez un fichier `readme.md` en utilisant [la template](documentation_templates.md). +* Tous les PR de keymaps doivent être "squashés", donc si la manière dont vos commits sont squashés vous est important, vous devez le faire vous-même. +* Ne regroupez pas des fonctionnalités avec votre PR de keymap. Envoyez d'abord votre fonctionnalité, puis créez un second PR pour la keymap. +* N'incluez pas de fichier `Makefile` dans votre dossier de keymap (ils ne sont plus utilisés) +* Mettez à jour les copyrights dans les en-têtes de fichiers (cherchez `%YOUR_NAME%`) + +## Claviers + +Les claviers sont la raison d'être de QMK. Certains claviers sont maintenus par la communauté, alors que d'autre sont maintenus par les gens responsables de la création du clavier. Le fichier `readme.md` devrait vous informer de qui maintient le clavier. Si vous avez des questions concernant un clavier en particulier, vous pouvez [Ouvrir une issue](https://github.com/qmk/qmk_firmware/issues) et tagger le mainteneur dans votre question. + +Nous vous demandons aussi que vous suiviez ces directives: + +* Ecrivez un fichier `readme.md` en utilisant [le template](documentation_templates.md). +* Gardez un nombre de commits raisonnable, ou nous squasherons votre PR. +* Ne regroupez pas des fonctionnalités avec le PR pour votre clavier. Envoyez d'abord votre fonctionnalité, puis créez un second PR pour le clavier. +* Appelez les fichiers `.c`/`.h` du nom du dossier parent, par exemple `/keyboards///.[ch]` +* N'incluez pas de fichier `Makefile` dans votre dossier de keymap (ils ne sont plus utilisés) +* Mettez à jour les copyrights dans les en-têtes de fichiers (cherchez `%YOUR_NAME%`) + +## Quantum/TMK Core + +Faites attention d'être sûr d'implémenter votre nouvelle fonctionnalité de la meilleure manière qu'il soit avant d'investir beaucoup de travail à son développement. Vous pouvez apprendre les bases de QMK en lisant [Comprendre QMK](understanding_qmk.md), qui vous donnera une idée du flux du programme QMK. A partir de là, parlez nous afin de définir la meilleure façon d'implémenter votre idée. Il y a deux façons principale de le faire: + +* [Chat sur Discord](https://discord.gg/Uq7gcHh) +* [Ouvrir une Issue](https://github.com/qmk/qmk_firmware/issues/new) + +Les PR de nouvelles fonctionnalités de de correction de bug affectent tous les claviers. Nous sommes aussi dans un processus de restructuration de QMK. Pour cette raison, il est absolument nécessaire que tout changement important ou significatif soit discuté avant que l'implémentation soit faite. Si vous ouvrez un PR sans nous avoir parlé, préparez-vous à faire des refontes significatives si vos changements ne sont pas compatibles avec ce que nous avons planifié. + +Voici quelques choses à garder en tête lorsque vous travaillez sur une fonctionnalité ou un bug fix. + +* **Désactivé par défaut** - la mémoire est plutôt limitée sur la plupart des puces que QMK supporte, et il est important que les keymaps courantes ne soient pas cassées. S'il vous plaît faites que vos features doivent être **activées** plutôt que désactivées. Si vous pensez qu'elle devrait être activée par défaut, ou que cela réduit la taille du code, parlez-nous-en. +* **Compilez localement avant de soumettre** - Cela devrait aller sans dire, mais votre code doit compiler! Notre système Travis devrait relever les problèmes, mais il est généralement plus rapide de compiler quelques claviers en local plutôt que d'attendre le retour des résultats +* **Faites attention aux révisions et différentes bases de puces** - beaucoup de claviers ont des révisions qui permettent des changements de configuration mineurs, voir des bases de chip différentes. Essayez de faire que votre fonctionnalité soit supportée à la fois sur ARM et AVR, ou désactivez-là automatiquement sur les plateformes non supportées. +* **Expliquez votre fonctionnalité** - Documentez-là dans `docs/`, soit dans un nouveau fichier, ou dans une partie d'un fichier existant. Si vous ne la documentez pas, personne ne pourra bénéficier de votre dur labeur. + +Nous vous demandons aussi de suivre ces directives: + +* Gardez un nombre de commits raisonnable, ou nous squasherons votre PR. +* Ne regroupez pas des claviers ou des keymaps avec des changements core. Soumettez vos changements core en premier. +* Ecrivez des [Tests Unitaires](unit_testing.md) pour votre fonctionnalité. +* Suivez le style du fichier que vous modifiez. Si le style n'est pas clair ou qu'il y a un mélange de fichiers, vous devriez vous conformer aux [conventions de codage](#coding-conventions) au dessus. + +## Refactoriser + +Afin de maintenir une vision claire sur comment les choses sont architectuées dans QMK, nous essayons de planifier des refactorisations en profondeur et qu'un collaborateur fasse le changement. Si vous avez une idée de refactorisation, ou une suggestion, [ouvrez une issue] [open an issue](https://github.com/qmk/qmk_firmware/issues), nous adorons discuter de comment améliorer QMK. + +# Que veut dire le code de conduite pour moi? + +Note [Code De Conduite](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) veut dire que vous avez la responsabilité de traiter tout le monde dans le projet avec respect et courtoisie, peu importe leur identité. Si vous êtes victime d'une attitude ou de commentaires inappropriés, tels que décrit dans notre Code de Conduite, nous sommes là pour vous et nous ferons de notre mieux pour nous assurer que le fautif soit réprimandé, tel que décrit dans notre code. diff --git a/docs/fr-fr/driver_installation_zadig.md b/docs/fr-fr/driver_installation_zadig.md new file mode 100644 index 0000000000..9e7d77b6dc --- /dev/null +++ b/docs/fr-fr/driver_installation_zadig.md @@ -0,0 +1,46 @@ +# Installation du driver du bootloader avec Zadig + +Vous n’aurez pas besoin de pilote particulier pour utiliser un clavier QMK. En effet, QMK se présente à l'ordinateur hôte comme un clavier HID standard et sera reconnu sans problème. Cependant vous aurez peut-être besoin d'un pilote pour flasher votre clavier avec Windows. En effet, quand vous redémarrerez votre clavier en mode bootloader, le périphérique que détectera Windows ne sera pas un clavier mais un périphérique bootloader. + +Il existe deux exceptions : le bootloader Caterina, qui se trouve en général sur les Pro Micros, et le bootloader Halfkay, livré avec les Teensy de PJRC. Ils apparaissent respectivement sous la forme d'un port série et d'un périphérique HID générique, ne nécessitant pas de pilote particulier. + +Nous vous recommandons d'utiliser l'utilitaire [Zadig](https://zadig.akeo.ie/). Si vous avez configuré votre environnement de développement avec Msys2 ou WSL, le script `qmk_install.sh` vous aura proposé l'installation des pilotes durant le processus. + +## Installation + +Passez votre clavier en mode bootloader, soit en appuyant sur le keycode `RESET` (qui peut se trouver dans un calque différent) ou en appuyant sur le bouton reset qui se trouve en général sous la board. Si votre clavier n'a aucune de ces options, essayez de le brancher en maintenant Escape ou Espace+`B` appuyés (voir la documentation de [Bootmagic](feature_bootmagic.md) pour plus de détails). Certaines boards utilisent [Command](feature_command.md) à la place de Bootmagic. Dans ce cas, vous pouvez entrer en mode bootloader en appuyant, à n'importe quel moment lorsque le clavier est branché, sur les combinaisons de touches Shift Gauche+Shift Droit+`B` ou Shift Gauche+Shift Droit+Escape. +Certains claviers ont des instructions spécifiques pour passer en mode bootloader. Par exemple, la touche [Bootmagic Lite]](feature_bootmagic.md#bootmagic-lite) (défaut : Échap) peut être sur une touche différente telle que Contrôle Gauche. La combinaison pour la Command (défaut : Shift Gauche+Shift Droit) peut être différente, par exemple Contrôle Gauche+Contrôle Droit. Référez-vous au fichier README de votre clavier. + +Pour mettre un clavier en mode bootloader avec USBaspLoader, appuyez sur le bouton `RESET` tout en maintenant le bouton `BOOT`. Vous pouvez aussi maintenir le bouton `BOOT` en branchant le câble USB. + +Zadig détectera automatiquement les périphériques en mode bootloader. Il se peut toutefois que vous deviez vérifier en passant par **Options → List All Devices**. + + + - Pour les claviers avec des MCUs Atmel AVR, le bootloader aura un nom similaire à `ATm32U4DFU`, et un Vendor ID `03EB`. + - Les bootloaders USBasp s'appelleront `USBasp`, avec un VID/PID `16C0:05DC`. + - Les claviers AVR flashé avec le bootloader QMK-DFU s'appelleront ` Bootloader` et auront aussi le VID `03EB`. + - Pour la plupart des claviers ARM, ils s'appelleront `STM32 BOOTLOADER`, et auront un VID/PID `0483:DF11`. + +!> Si Zadig affiche certains de vos périphériques avec le driver `HidUsb`, votre clavier n'est probablement pas en mode bootloader. La flèche aura une couleur orange et vous aurez un message de confirmation vous demandant de modifier un pilote système. **Ne continuez pas!** + +Si la flèche apparaît en vert, sélectionnez le driver et appuyez sur le bouton **Install Driver**. Le driver `libusb-win32` devrait normalement fonctionner pour AVR, et `WinUSB` pour ARM. Si vous avez des problèmes pour flasher la board, essayez d'installer un pilote différent de la liste. Pour flasher un périphérique USBaspLoader en ligne de commande avec msys2, le driver `libusbk` est recommandé, sinon `libusb-win32` devrait fonctionner correctement si vous utilisez QMK Toolbox pour flasher. + +![Zadig montrant un driver de bootloader installé correctement](https://i.imgur.com/b8VgXzx.png) + +Finalement, débranchez et rebranchez le clavier afin de vous assurer que le nouveau pilote a bien été chargé. Si vous utilisez QMK Toolbox pour flasher, redémarrez-le aussi, il arrive qu'il n'arrive pas à détecter le changement de driver. + +## Récupérer l'installation du mauvais périphérique + +Si vous n'arrivez plus à saisir de texte avec le clavier, il est possible que vous ayez installé le driver sur le clavier au lieu du bootloader. Vous pouvez facilement vérifier ceci dans Zadig. Un clavier fonctionnel a le pilote `HidUsb` installé sur toutes ses interfaces : + +![Un clavier fonctionnel vu par Zadig](https://i.imgur.com/Hx0E5kC.png) + +Ouvrez le Gestionnaire de périphériques et cherchez un périphérique qui ressemble à votre clavier. + +![La board avec le mauvais driver installé, dans le Gestionnaire de périphériques](https://i.imgur.com/L3wvX8f.png) + +Cliquez dessus avec le bouton droit et sélectionner **Désinstaller le périphérique**. Faites bien attention à sélectionner **Supprimer le pilote pour ce périphérique** avant de valider. + +![Le dialogue Suppression de périphérique, avec la boîte "suppression de pilote" cochée](https://i.imgur.com/aEs2RuA.png) + +Appuyez sur **Action → Analyser les changements de hardware**. A ce stade, vous devriez pouvoir saisir à nouveau. Vérifiez dans Zadig que les périphériques utilisent bien le pilote `HidUsb`. Si c'est le cas, vous avez corrigé le problème, votre clavier devrait fonctionner à nouveau ! diff --git a/docs/fr-fr/faq.md b/docs/fr-fr/faq.md new file mode 100644 index 0000000000..89576b3cc2 --- /dev/null +++ b/docs/fr-fr/faq.md @@ -0,0 +1,6 @@ +# Foire Aux Questions + +* [FAQ Générale](faq_general.md) +* [Construire ou Compiler QMK](faq_build.md) +* [Débuguer et Dépanner QMK](faq_debug.md) +* [Keymap (disposition)](faq_keymap.md) diff --git a/docs/fr-fr/faq_build.md b/docs/fr-fr/faq_build.md new file mode 100644 index 0000000000..774bf6880f --- /dev/null +++ b/docs/fr-fr/faq_build.md @@ -0,0 +1,182 @@ +# Foire aux questions sur la compilation + +Cette page couvre les questions concernant la compilation de QMK. Si vous ne l'avez pas encore fait, vous devriez lire les guides [Configuration de l'environnement de build](getting_started_build_tools.md) et [Instructions pour Make](getting_started_make_guide.md). + +## Je ne peux pas programmer sous Linux + +Vous aurez besoin des permissions appropriées pour utiliser un périphérique. Pour les utilisateurs de Linux, référez-vous aux instructions concernant les règles `udev` ci-dessous. Si `udev` vous pose des problèmes, une alternative est d'utiliser la commande `sudo`. Si vous ne connaissez pas cette commande, référez-vous à son manuel d'utilisation en utilisant `man sudo` ou [regardez cette page](https://linux.die.net/man/8/sudo). + +Un exemple utilisant `sudo`, lorsque votre contrôleur est un ATMega32u4 : + + $ sudo dfu-programmer atmega32u4 erase --force + $ sudo dfu-programmer atmega32u4 flash your.hex + $ sudo dfu-programmer atmega32u4 reset + +ou simplement : + + $ sudo make ::dfu + +Veuillez noter que lancer `make` avec `sudo` est généralement une **mauvaise** idée, et vous devriez préférer une des méthodes précédente, si possible. + +### Règles `udev` pour Linux + +Sous Linux, vous aurez besoin des permissions appropriées pour accéder au MCU (le micro-contrôleur). Vous avez le choix d'utiliser `sudo` en flashant le firmware, ou placer ces fichiers dans `/etc/udev/rules.d`. Une fois ajouté, lancez les commandes suivantes : + +```console +sudo udevadm control --reload-rules +sudo udevadm trigger +``` + +**/etc/udev/rules.d/50-atmel-dfu.rules:** +``` +# Atmel ATMega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666" +# Atmel USBKEY AT90USB1287 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666" +# Atmel ATMega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666" +``` + +**/etc/udev/rules.d/52-tmk-keyboard.rules:** +``` +# tmk keyboard products https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +**/etc/udev/rules.d/54-input-club-keyboard.rules:** + +``` +# Input Club keyboard bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" +``` + +**/etc/udev/rules.d/55-catalina.rules:** +``` +# ModemManager should ignore the following devices +ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1" +``` + +**Note:** Le filtrage utilisant ModemManager fonctionnera uniquement si vous n'êtes pas en mode strict. Les commandes suivantes peuvent changer cette option : + +```console +sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service +sudo systemctl daemon-reload +sudo systemctl restart ModemManager +``` + +**/etc/udev/rules.d/56-dfu-util.rules:** + +``` +# stm32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666" +# Generic stm32 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666" +``` + +### Le périphérique sériel n'est pas détecté en mode bootloader sous Linux + +Assurez-vous que votre kernel ait un support approprié pour votre périphérique. Si votre périphérique utilise USB ACM, par exemple pour les Pro Micro (AtMega32u4), assurez-vous d'inclure `CONFIG_USB_ACM=y`. D'autres périphériques peuvent avoir besoin de `USB_SERIAL` et de ses sous-options. + +## Périphérique inconnu pour le bootloader DFU + +Les problèmes rencontrés lorsque l'on flash des claviers sous Windows sont, la plupart du temps, dus à une installation du mauvais pilote, ou un pilote manquant. + +Relancer le script d'installation de QMK (`./util/qmk_install.sh` situé dans répertoire `qmk_firmware`sous MSYS2 ou WSL) ou réinstaller la QMK Toolbox peut résoudre le problème. Une alternative est de télécharger et lancer manuellement le package [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer). + +Si vous rencontrez toujours des problèmes, essayez de télécharger et lancer Zadig. Voir [Installation du driver du bootloader avec Zadig](driver_installation_zadig.md) pour plus d'informations. + +## WINAVR est obsolète + +Il n'est plus recommandé et peut causer des problèmes. Voir [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). + +## USB VID et PID + +Vous pouvez utiliser l'ID de votre choix en modifier `config.h`. Il y a peu de chance de conflit avec d'autres produits. + +La plupart des boards QMK utilisent `0xFEED` comme vendor ID. Vérifiez les autres claviers pour être sûr de choisir un Product ID unique. + +Étudiez aussi ce ticket +https://github.com/tmk/tmk_keyboard/issues/150 + +Vous pouvez acheter un VID:PID unique ici. Je ne pense pas que ce soit nécessaire pour un usage personnel. +- http://www.obdev.at/products/vusb/license.html +- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 + +## Cortex: `cstddef: No such file or directory` + +Ce problème existait avec le GCC 4.8 d'Ubuntu 14.04, la solution a nécessité de mettre à jour vers 4.9 avec ce PPA. +https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded + +https://github.com/tmk/tmk_keyboard/issues/212 +https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef +https://developer.mbed.org/forum/mbed/topic/5205/ + +## `clock_prescale_set` and `clock_div_1` Not Available + +Votre chaîne d'outils (Toolchain) est trop vieille pour supporter le MCU. Par exemple, WinAVR 20100110 ne supporte pas ATMega32u2. + +``` +Compiling C: ../../tmk_core/protocol/lufa/lufa.c +avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o +../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu': +../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set' +../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function) +../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once +../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.) +make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1 +``` + +## BOOTLOADER_SIZE pour AVR + +Notez que la taille du bootloader pour les Teensy2.0++ est de 2048bytes. Quelques Makefiles peuvent contenir une erreur et avoir le mauvais commentaire. + +``` +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 2048 +# Atmel DFU loader 4096 (TMK Alt Controller) +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 +``` + +## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` sous MacOS + +C'est un problème de mise à jour avec brew, causée par des liens symboliques (symlinks) dont dépend avr-gcc qui sont détruits. + +La solution est de supprimer et réinstaller tous les modules affectés. + +``` +brew rm avr-gcc +brew rm dfu-programmer +brew rm dfu-util +brew rm gcc-arm-none-eabi +brew rm avrdude +brew install avr-gcc +brew install dfu-programmer +brew install dfu-util +brew install gcc-arm-none-eabi +brew install avrdude +``` + +### avr-gcc 8.1 et LUFA + +Si vous avez mis à jour votre avr-gcc au-dessus de la version 7, vous risquez de voir des erreurs impliquant LUA. Par exemple : + +`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` + +Pour le moment, vous devrez revenir à la version 7 de avr-gcc dans brew. + +``` +brew uninstall --force avr-gcc +brew install avr-gcc@8 +brew link --force avr-gcc@8 +``` + +### Je viens de flasher mon clavier et il ne fait rien/l'appui des touches n'est pas enregistré - c'est aussi un ARM(rev6 plank, clueboard 60, hs60v2, etc.) (Février 2019) + +A cause de la manière dont les EEPROM fonctionnent sur les puces ARM, les options sauvegardées peuvent ne plus être valides. Ceci affecte les calques par défaut et *peut*, sous certaines conditions que nous essayons encore de déterminer, rendre le clavier inutilisable. Réinitialiser l'EEPROM corrigera le problème. + +[Réinitialiser EEPROM sur Planck rev6](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) peut être utilisé pour forcer une réinitialisation d'EEPROM. Une fois cette image flashée, flashez à nouveau votre firmware standard. Cela devrait rétablir le fonctionnement de votre clavier. +Si bootmagic est activé dans n'importe quel forme, vous devriez être capable de faire aussi ceci (regardez [Documentation Bootmagic](feature_bootmagic.md) et les informations spécifiques à votre clavier). diff --git a/docs/fr-fr/faq_debug.md b/docs/fr-fr/faq_debug.md new file mode 100644 index 0000000000..7a85fd1f24 --- /dev/null +++ b/docs/fr-fr/faq_debug.md @@ -0,0 +1,236 @@ +# FAQ Débugage + +Cette page détaille diverses questions fréquemment posées par les utilisateurs sur le dépannage de leurs claviers. + +# Console de débugage + +## `hid_listen` ne reconnaît pas de périphérique + +Lorsque la console de débugage sur votre périphérique n'est pas prêt, vous obtiendrez un message similaire : + +``` +Waiting for device:......... +``` + +Une fois le périphérique connecté, *hid_listen* le trouve et vous obtiendrez ce message : + +``` +Waiting for new device:......................... +Listening: +``` + +Si vous ne recevez pas ce message `Listening:`, essayez de compiler avec `CONSOLE_ENABLE=yes` dans le [Makefile] + +Il se peut que vous ayez besoin de certains privilèges avancés pour accéder à des périphériques sur des OS comme Linux. + +- Essayez `sudo hid_listen` + +## Ne reçoit pas de messages sur la console + +Vérifiez : + +- *hid_listen* trouve votre périphérique. Voir ci-dessus. +- Activez le débugage en appuyant sur **Magic**+d. Voir [Commandes Magic](https://github.com/tmk/tmk_keyboard#magic-commands). +- Définissez `debug_enable=true` en général dans `matrix_init()` du fichier **matrix.c**. +- Essayez d'utiliser la fonction `print` à la place du debug print. Voir **common/print.h**. +- Déconnectez tous les autres périphériques qui utilisent la fonction console. Voir [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). + +## Linux ou les systèmes UNIX nécessitent des privilèges super utilisateur + +Utilisez `sudo` pour exécuter *hid_listen* avec des privilèges étendus. + +``` +$ sudo hid_listen +``` + +Ou ajoutez une *udev rule* pour les périphériques TMK en plaçant un fichier dans le répertoire rules. Le chemin vers ce répertoire peut varier en fonction du système. + +Fichier: /etc/udev/rules.d/52-tmk-keyboard.rules(sous Ubuntu) +``` +# tmk keyboard products https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +*** + +# Divers + +## Considérations de sécurité + +Vous ne voulez probablement pas "briquer" votre clavier, rendre impossible d'écrire un firmware dessus. Il y a quelques paramètres qui montrent ce qui est (et n'est probablement pas) trop risqué. + +- Si votre map de clavier n'inclut pas de RESET, pour entrer en mode DFU, vous devrez appuyer sur le bouton reset du PCB. Cela implique que vous devrez certainement dévisser certaines pièces de votre clavier pour y accéder. +- Modifier les fichiers tmk_core / common peut rendre le clavier inutilisable +- Si un fichier .hex trop large est la cause du problème : `make dfu` supprime le bloc puis teste la taille (il ne fait pas les choses dans le bon ordre), ce qui provoque une erreur. En résultat, le flash n’aura pas été fait et le clavier restera en mode DFU. +- Pour finir, notez que la taille maximale d'un fichier .hex sur un Plank est de 7000h (28672 decimal) + +``` +Linking: .build/planck_rev4_cbbrowne.elf [OK] +Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK] + +Size after: + text data bss dec hex filename + 0 22396 0 22396 577c planck_rev4_cbbrowne.hex +``` + +- La taille du fichier ci-dessus est de 22396/577ch, ce qui est en dessous de 28672/7000h +- Tant que vous avez un fichier .hex alternatif correct, vous pouvez réessayer en le chargeant +- Certaines options que vous pouvez spécifier dans votre Makefile consomme de la mémoire supplémentaire. Faites attention aux options BOOTMAGIC_ENABLE, MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE. +- Les outils DFU **ne** vous permettent **pas** d'écrire dans le bootloader (à moins que vous n'ajoutiez des options spéciales), il n'y a donc peu de risque. +- Les EEPROM ont environ 100000 cycles d'écriture. Ne réécrivez pas le firmware de manière continue et répétée. Vous allez détruire définitivement l'EEPROM. + +## NKRO ne fonctionne pas + +Premièrement, vous devez compiler le firmware avec l'option de compilation `NKRO_ENABLE` dans le **Makefile**. + +Essayez la commande `Magic` **N** (`LShift+RShift+N` par défaut) si **NKRO** ne fonctionne toujours pas. Vous pouvez utiliser cette commande pour basculer temporairement entre le mode **NKRO** et **6KRO**. Sous certaines conditions, **NKRO** ne fonctionnera pas et vous devrez basculer en **6KRO**, en particulier lorsque vous êtes dans le BIOS. + +Si votre firmware est compilé avec `BOOTMAGIC_ENABLE` vous devrez l'activer avec la commande `BootMagic` **N** (`Espace+N` par défaut). Cette option est enregistrée dans l'EEPROM et sera gardé entre deux cycles de démarrage. + +https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch + +## Le TrackPoint a besoin Circuit de réinitialisation (Support de souris PS/2) + +Sans circuit de réinitialisation vous allez avoir des résultats inconsistants à cause de la mauvaise initialisation du matériel. Regardez le schéma du circuit du TPM754. + +- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 +- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf + +## Impossible de lire la colonne de la matrice après 16 + +Utilisez `1UL<<16` à la place de `1<<16` dans `read_cols()` du fichier [matrix.h] lorsque le nombre de vos colonnes dépassent 16. + +En C, `1` implique un type [int] qui est [16 bits] pour les AVR, ce qui implique que vous ne pouvez pas décaler à gauche de plus de 15. Si vous utilisez `1<<16`, vous aurez un résultat non attendu de zéro. Vous devez donc utiliser un type [unsigned long] en utilisant `1UL`. + +http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 + +## Bootloader Jump ne fonctionne pas + +Configurez correctement la taille du bootloader dans le **Makefile**. Une mauvaise taille de section du bootloader empêchera probablement le démarrage avec **Magic command** et **Boot Magic**. + +``` +# Size of Bootloaders in bytes: +# Atmel DFU loader(ATmega32U4) 4096 +# Atmel DFU loader(AT90USB128) 8192 +# LUFA bootloader(ATmega32U4) 4096 +# Arduino Caterina(ATmega32U4) 4096 +# USBaspLoader(ATmega***) 2048 +# Teensy halfKay(ATmega32U4) 512 +# Teensy++ halfKay(AT90USB128) 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 +``` + +La taille de la section de démarrage de AVR est définie par l'option **BOOTSZ** fuse. Vérifiez la fiche technique du MCU. Veuilez noter que les tailles et adresses sont définies en **Word** (2 octets) dans la fiche technique alors que TMK utilise des **Byte**. + +La section de boot AVR se trouve à la fin de la mémoire flash, comme suit. + +``` +byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-4KB | | 128KB-8KB +0x6000 +---------------+ 0x1E000 +---------------+ + | Bootloader | 4KB | Bootloader | 8KB +0x7FFF +---------------+ 0x1FFFF +---------------+ + + +byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-512B | | 128KB-2KB +0x7E00 +---------------+ 0x1FC00 +---------------+ + | Bootloader | 512B | Bootloader | 2KB +0x7FFF +---------------+ 0x1FFFF +---------------+ +``` + +Référez-vous à cette discussion pour plus de référence. +https://github.com/tmk/tmk_keyboard/issues/179 + +Si vous utilisez un TeensyUSB, il y a un [bug connu](https://github.com/qmk/qmk_firmware/issues/164) qui fait que le bouton reset matériel empêche la touche RESET de fonctionner. Débrancher et rebrancher le clavier devrait résoudre le problème. + +## Les touches spéciales ne fonctionnent pas (Touche Système, Touches de contrôle du son) + +Vous devez définir `EXTRAKEY_ENABLE` dans le fichier `rules.mk` pour les utiliser dans QMK. + +``` +EXTRAKEY_ENABLE = yes # Audio control and System control +``` + +## Réveiller du mode veille ne fonctionne pas + +Sous Windows, activez l'option `Permettre au périphérique de sortir l'ordinateur de veille` dans les paramètres des **Options d'alimentations** du **Gestionnaire de périphériques**. Vérifiez aussi les paramètres du BIOS. + +Appuyer sur n'importe quelle touche en mode veille devrait sortir l'ordinateur de veille. + +## Vous utilisez un Arduino ? + +**Faites attention au fait que le nommage des pin d'un Arduino diffère de la puce**. Par exemple, la pin `D0` n'est pas `PD0`. Vérifiez le circuit avec la fiche technique. + +- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf +- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf + +Les Arduino Leonardo et micro ont des **ATMega32U4** et peuvent être utilisés avec TMK, mais le bootloader Arduino peut causer des problèmes. + +## Activer JTAG + +Par défaut, le débugage des interfaces JTAG est désactivé dès que le clavier démarre. Les MCUs compatible JTAG viennent d'usine avec le fusible `JTAGEN` activé, et il prend certaines pins du MCU que la board pourrait utiliser pour la matrice, les LEDs, etc. + +Si vous voulez garder JTAG activé, ajoutez la ligne suivante à votre fichier `config.h` : + +```c +#define NO_JTAG_DISABLE +``` + +## Adding LED Indicators of Lock Keys + +Si vous souhaitez votre propre indicateur LED pour CapsLock, ScrollLock et NumLock alors lisez ce post. + +http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560 + +## Programmer Arduino Micro/Leonardo + +Appuyez sur le bouton reset puis lancez la commande suivante dans les 8 secondes. + +``` +avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0 +``` + +Le nom du périphérique peut varier en fonction de votre système. + +http://arduino.cc/en/Main/ArduinoBoardMicro +https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867 + +## Compatibilité USB 3 + +Il semble que certaines personnes ont eu des problèmes avec les ports USB 3, essayez un port USB 2. + +## Compatibilité Mac + +### OS X 10.11 et Hub + +https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 + +## Problème sur BIOS (UEFI) / Resume (Mise en veille et réveil) / Redémarrage + +Certaines personnes ont eu des problèmes de fonctionnement de leur clavier dans le BIOS et/ou après des redémarrages. + +Pour le moment, l'origine du problème n'est pas comprise, mais certaines options de compilation semble liées. Dans le Makefile, essayez de désactiver les options comme `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` et/ou d'autres. + +https://github.com/tmk/tmk_keyboard/issues/266 +https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 + +## FLIP ne marche pas + +### `AtLibUsbDfu.dll` Not Found + +Supprimez le pilote actuel et réinstallez celui donné par FLIP dans le gestionnaire de périphériques. + +http://imgur.com/a/bnwzy diff --git a/docs/fr-fr/faq_general.md b/docs/fr-fr/faq_general.md new file mode 100644 index 0000000000..b1eae6df16 --- /dev/null +++ b/docs/fr-fr/faq_general.md @@ -0,0 +1,16 @@ +# Questions fréquemment posées + +## Qu'est-ce que QMK ? + +[QMK](https://github.com/qmk), acronyme pour Quantum Mechanical Keyboard, est un groupe de personnes qui construisent des outils pour des claviers personnalisés. Nous avons commencé par le [firmware QMK](https://github.com/qmk/qmk_firmware), un fork très modifié du firmware [TMK](https://github.com/tmk/tmk_keyboard). + +## Quelles sont les différences entre QMK et TMK ? + +TMK a été conçu et développé à l'origine par [Jun Wako](https://github.com/tmk). QMK a démarré comme étant le fork de [Jack Humbert](https://github.com/jackhumbert) pour le Planck. Au bout d'un moment, le fork de Jack a divergé de manière significative de TMK et, en 2015, Jack a décidé de le renommer QMK. + +D'un point de vue technique, QMK se base sur TMK en lui ajoutant plusieurs nouvelles fonctionnalités. +QMK a notamment augmenté le nombre de keycodes disponibles et les a utilisé pour implémenter des fonctionnalités avancées telles que `S()`, `LCTL()` et `MO()`. Vous pouvez voir une liste complète de ces keycodes dans [Keycodes] (keycodes.md). + +D'un point de vue management de projet et communauté, Hasu, sur TMK maintient tous les claviers supportés officiellement par lui-même, avec un peu de support de la communauté. Il existe ou peuvent être créées d'autres communautés maintenant des fork pour d'autres claviers. Peu de keymaps sont définies par défaut, les utilisateurs ne se partagent donc pas leurs keymaps en général. QMK encourage le partage des claviers et des keymaps à l'aide d'un dépôt géré de manière centrale, acceptant les pull requests qui suivent les standards de qualité. Ceux-ci sont surtout maitenus par la communauté, mais l'équipe de QMK aide aussi lorsque c'est nécessaire. + +Les deux approches ont leurs avantages et leurs inconvénients, et le développements de fonctionnalités intéressantes sont partagées entre TMK et QMK lorsque fait sens. diff --git a/docs/fr-fr/faq_keymap.md b/docs/fr-fr/faq_keymap.md new file mode 100644 index 0000000000..8244d4225f --- /dev/null +++ b/docs/fr-fr/faq_keymap.md @@ -0,0 +1,226 @@ +# FAQ Keymap + +Cette page couvre les questions souvent posées à propos des keymaps. Si vous ne l'avez pas encore fait, vous devriez commencer par là [Aperçu des Keymap](keymap.md). + +## Quels Keycodes puis-je utiliser ? + +Regardez [Keycodes](keycodes.md) pour une liste des keycodes disponibles. Certains keycodes spécifiques ont des documentations plus complètes de disponible. + +Les keycodes sont définies dans [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). + +## Quels sont les keycodes par défaut ? + +Il existe 3 configurations de clavier standard utilisées dans le monde: ANSI, ISO et JIS. L'Amérique du Nord utilise principalement l'ANSI, l'Europe et l'Afrique l'ISO et le Japon utilise JIS. Les autres régions utilisent généralement ANSI ou ISO. Les keycodes correspondant à ces dispositions spécifiques sont affichés ici : + + +![Keyboard Layout Image](https://i.imgur.com/5wsh5wM.png) + +## Certaines de mes touches sont permutées ou ne fonctionnent pas + +QMK possède deux fonctionnalités, Bootmagic et Command, qui vous permettent de modifier le comportement de votre clavier à la volée. Cela inclut, sans toutefois s'y limiter, l'échange de Ctrl / Majuscules, la désactivation de l'interface graphique, le basculement de Alt/Gui, le basculement de barre d'espacement arrière/barre oblique inversée, la désactivation de toutes les touches et d'autres modifications comportementales. + +Pour résoudre rapidement le problème, essayez de maintenir les touches Espace + Retour arrière enfoncées pendant que vous branchez votre clavier. Cela réinitialisera les paramètres stockés sur votre clavier, ramenant ces touches à un fonctionnement normal. Si cela ne fonctionne pas, regardez ici: + +* [Bootmagic](feature_bootmagic.md) +* [Command](feature_command.md) + +## La touche de menu ne fonctionne pas + +La touche trouvée sur la plupart des claviers modernes située entre `KC_RGUI` et` KC_RCTL` est en réalité appelée `KC_APP`. En effet, lorsque cette touche a été inventée, il existait déjà une clé nommée `MENU` dans les normes correspondantes. MS a donc choisi de l'appeler la touche` APP`. + +## `KC_SYSREQ` ne fonctionne pas + +Utilisez le keycode pour Print Screen (`KC_PSCREEN` or `KC_PSCR`) à la place de `KC_SYSREQ`. La combinaison de touche 'Alt + Print Screen' est reconnue comme 'System request'. + +Voir [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) et +* http://en.wikipedia.org/wiki/Magic_SysRq_key +* http://en.wikipedia.org/wiki/System_request + +## Les touches alimentation ne fonctionnent pas + +Un peu déroutant, il y a deux codes de touche "Alimentation" dans QMK: `KC_POWER` dans la page d'utilisation du clavier / keypad, et `KC_SYSTEM_POWER` (ou `KC_PWR`) dans la page Consumer. + +Le premier n'est reconnu que sur macOS, alors que le dernier, `KC_SLEP` et `KC_WAKE` sont supportés par les trois principaux systèmes d'exploitation. Il est donc recommandé de les utiliser à la place. Sous Windows, ces touches prennent effet immédiatement, mais sur macOS, elles doivent être maintenues enfoncées jusqu'à ce qu'une boîte de dialogue apparaisse. + +## Modificateur "One Shot" + +Cette fonctionnalité permet de corriger un problème avec la touche Shift. En effet, il arrive de saisir plusieurs majuscules en ne voulant en saisir qu'une sur un mot. Ex : `CEtte` à la place de `Cette`. La fonctionnalité « One shot » shift permet de corriger ça. + +https://github.com/tmk/tmk_keyboard/issues/67 + +## Le modificateur d'un calque reste bloqué + +Les touches de modification ou les calques peuvent être bloquées si la commutation de calque n'est pas configurée correctement. +Pour les touches de modification et les actions de calque, vous devez placer `KC_TRANS` sur la même position du calque de destination afin de désenregistrer la clé de modificateur ou de revenir au calque précédent lors de la libération. + +* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching +* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 +* https://github.com/tmk/tmk_keyboard/issues/248 + +## Support de touche à verrouillage mécanique + +Cette fonctionnalité permet l'usage de *touches à verrouillage mécanique* comme [ces interrupteurs Alps](http://deskthority.net/wiki/Alps_SKCL_Lock). Vous pouvez l'activer en ajoutant ceci à votre `config.h` : + +``` +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE +``` + +Une fois la fonction activée, utilisez les keycodes `KC_LCAP`, `KC_LNUM` et `KC_LSCR` dans votre keymap. + +Des vieux claviers mécaniques ont parfois des touches à verrouillage, mais les claviers modernes n'en sont pas équipés. ***Vous n'avez pas besoin de cette fonction dans la majorité des cas et devez utiliser les keycodes `KC_CAPS`, `KC_NLCK` et `KC_SLCK`.*** + +## Ajouter des caractères spéciaux autres que ASCII comme la cédille 'Ç' + +IL N'EXISTE AUCUNE METHODE UNIVERSELLE POUR LES AJOUTER QUI FONCTIONNE SUR TOUS LES SYSTEMES. Vous devez définir une **MACRO** d'une manière spécifique à votre OS ou layout. + +Voir ce post pour un exemple de code **MACRO**. + +http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 + +Sous **Windows** vous pouvez utiliser la touche `AltGr` ou **Alt code**. +* http://en.wikipedia.org/wiki/AltGr_key +* http://en.wikipedia.org/wiki/Alt_code + +Sous **Mac OS** définissez une combinaison de touche `Option`. +* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input + +Sous **Xorg** vous pouvez utiliser une touche `compose` à la place. +* http://en.wikipedia.org/wiki/Compose_key + +Et voir ceci pour une entrée **Unicode**. +* http://en.wikipedia.org/wiki/Unicode_input + +## Touche `Fn` sur macOS + +Contrairement à la plupart des touches Fn, celle des claviers Apple a son propre code d'activation... en quelque sorte. Il remplace le sixième code d'activation dans un rapport de base 6KRO HID - de sorte qu'un clavier Apple ne contient en réalité que 5KRO. + +Il est techniquement possible de demander à QMK d’envoyer ce keycode. Cependant, cela nécessite une modification du format du rapport pour ajouter l'état de la touche Fn. +Pire encore, ce keycode n'est reconnu que si les identifiants du clavier VID et PID correspondent à ceux d'un vrai clavier Apple. Malheureusement QMK ne peut juridiquement prendre en charge cette fonctionnalité et il y a peu de chance que la situation s'améliore. + +Voir [cette issue](https://github.com/qmk/qmk_firmware/issues/2179) pour des informations détaillées. + +## Touches Media sous Mac OSX + +#### KC_MNXT et KC_MPRV ne fonctionnent pas sous Mac + +Utilisez `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) et `KC_MRWD`(`KC_MEDIA_REWIND`) à la place de `KC_MNXT` et `KC_MPRV`. +Voir https://github.com/tmk/tmk_keyboard/issues/195 + +## Touches supportées sous Mac OSX? + +Vous pouvez connaître les keycodes supportés par OSX en lisant ce code source. + +`usb_2_adb_keymap` contient les tableaux des pages Keyboard/Keypad vers les scancodes ADB (keycodes interne à OSX). + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/Cosmo_USB2ADB.c + +Et `IOHIDConsumer::dispatchConsumerEvent` s'occupe des utilisations Consumer page. + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp + +## Touches JIS dans Mac OSX + +Les touches de clavier spécifiques JIS comme `無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` ne sont pas reconnues par OSX. Vous pouvez utiliser **Seil** pour les activer, esssayez les options suivantes. + +* Activer la touche NFER sur clavier PC +* Activer la touche XFER sur clavier PC +* Activer la touche KATAKANA sur clavier PC + +https://pqrs.org/osx/karabiner/seil.html + +## RN-42 Bluetooth ne fonctionne pas avec Karabiner + +Karabiner - Outil de Keymapping sous Mac OSX - Ignore les entrées du module RN-42. Vous devez activer cette option pour rendre Karabiner compatible avec votre clavier. +https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237 + +Plus de détails sur ce problème sur les liens suivants. +https://github.com/tmk/tmk_keyboard/issues/213 +https://github.com/tekezo/Karabiner/issues/403 + +## Esc et ` sur une touche simple. + +Cette fonctionnalité permet d'utiliser une touche à la fois comme touche Échap ou une touche `§` (En Azerty) selon le cas d’utilisation. Cela est très utile sur un clavier de petite taille. + +Voir la fonctionnalité [Grave Escape](feature_grave_esc.md). + +## Avoir les touches modificatrices qui ont double usage en flèches directionnelles. + +Ceci transforme les touches "modificateur droit" en touches fléchées lorsque les touches sont seulement "tapées" tout en restant des modificateurs lorsqu'elles sont maintenues. + +Dans TMK la fonction double rôle s'appelle **TAP**. + +```C + +#include "keymap_common.h" + + +/* Arrow keys on right modifier keys with TMK dual role feature + * + * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role + * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + [0] = LAYOUT( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ + FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), + [1] = LAYOUT( \ + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \ + TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), + [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), + [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), + [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), + [4] = ACTION_LAYER_MOMENTARY(1), + [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP), + [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN), + [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME), + [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END), +}; + +``` + +Touches double rôle : https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys + +## Eject sur Mac OSX + +Le keycode`KC_EJCT` fonctionne sous OSX. https://github.com/tmk/tmk_keyboard/issues/250 + +Il semble que Windows 10 ignore le code et Linux/Xorg le reconnaît mais n'a pas de mapping par défaut. + +Nous ne sommes pas sûr quel keycode est utilisé pour la touche Eject sur les claviers Apple officiels. HHKB utilise `F20` pour la touche Eject (`Fn+f`) lorsqu'il est en mode Mac, mais ce n'est probablement pas la même chose que le keycode Eject d'Apple. + +## Qu'est-ce que `weak_mods` et `real_mods` dans `action_util.c` + +___TO BE IMPROVED___ + +real_mods est prévu pour retenir l'état des touches modificateur réelles/physiques, alors que weak_mods ne retient l'état que des modificateurs temporaires ou virtuels qui ne devraient pas affecter l'état des touches modificaterus réelles. + +Par exemple, disons que vous maintenez la touche physique "shift gauche" et tapez ACTION_MODS_KEY(LSHIFT, KC_A), + +en weak_mods, + +* (1) maintenir shift gauche : real_mods |= MOD_BIT(LSHIFT) +* (2) appuyer ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT) +* (3) lâcher ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods &= ~MOD_BIT(LSHIFT) +real_mods garde sur état modificateur. + +sans weak_mods, + +* (1) maintenir shift gauche : real_mods |= MOD_BIT(LSHIFT) +* (2) appuyer ACTION_MODS_KEY(LSHIFT, KC_A): real_mods |= MOD_BIT(LSHIFT) +* (3) lâcher ACTION_MODS_KEY(LSHIFT, KC_A): real_mods &= ~MOD_BIT(LSHIFT) +ici real_mods a perdu son état pour 'shift gauche physique'. + +weak_mods est ORed avec real_mods lorsque le rapport du clavier est envoyé. +https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57 diff --git a/docs/fr-fr/flashing.md b/docs/fr-fr/flashing.md new file mode 100644 index 0000000000..c380614a5d --- /dev/null +++ b/docs/fr-fr/flashing.md @@ -0,0 +1,239 @@ +# Instructions pour flasher et informations sur les bootloader + +Les claviers utilisent différents types de bootloaders et certains doivent être flashés différement. Heureusement, certains projets comme la [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) ont pour objectifs de permettre de flasher les différents bootloader sans trop se faire de soucis et ça peu importe les manières de les flasher. + +Si vous avez un bootloader sélectionné avec la variable `BOOTLOADER` dans votre fichier `rules.mk` alors QMK vas automatiquement calculer si votre fichier .hex n'est pas trop grand pour être flashé sur votre appareil, et il affichera la taille finale du firmware. Pour vérifier la taille manuellement, vous pouvez aussi compiler le firmware avec l'option `check-size`. Exemple : `make planck/rev4:default:check-size`. + +## DFU + +Le bootloader pour les processeurs Atmel DFU est fourni par défaut sur tous les processeurs atmega32u4. Celui-ci est utilisé par beaucoup de claviers plus vieux que les OLKB et Clueboard qui ont leur propre ICs sur leurs PCBs. D'autres claviers utilisent le bootloader DFU de LUFA (ou son fork QMK), notamment les nouveaux claviers OLKB. Ce dernier ajoute des fonctionnalités spécifiques sur le matériel. + +Pour vérifier la compatibilité avec le bootloader DFU, vérifiez que ce bloc de code est présent dans votre fichier `rules.mk`. Parfois il peut être inscrit `lufa-dfu` ou `qmk-dfu` à la place. + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu +``` + +Méthodes de flash compatibles : + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé) +* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé) +* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (non recommandé) + +Ordre des actions : + +1. Pressez le keycode `RESET`, ou appuyez sur le bouton physique RESET ou alors créez un contact entre RST et GND. +2. Attendez que l'OS detecte l'appareil. +3. Éffacez la mémoire, cela peut être fait automatiquement. +4. Flasher le fichier .hex. +5. Redémarrez l'appareil en mode « application », cela peut être fait automatiquement. + +Alternativement : + + make ::dfu + +### DFU QMK + +QMK a un fork du bootloader LUFA DFU qui vous permet de faire un simple scan de la matrice pour quitter le bootloader et retourner à l'application. En même temps que le flash se produira, il est possible de faire flasher un led ou de produire un son via un haut parleur. Pour activer ces fonctionnalités, vous pouvez utiliser ce bloc dans votre fichier `config.h` (La touche permettant de quitter le bootloader a besoin d'être reliée entre les ports définis en INPUT et OUTPUT ici): + + #define QMK_ESC_OUTPUT F1 // usually COL + #define QMK_ESC_INPUT D5 // usually ROW + #define QMK_LED E6 + #define QMK_SPEAKER C6 + +Le fabricant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère « bootloader » est ajoutée au nom du produit. + +Pour génerer le bootloader, utilisez la cible `bootloader`. Exemple : `make planck/rev4:default:bootloader`. + +Pour génerer un fichier .hex prêt pour la production qui contiendra tant l'application que le bootloader, utilisez la cible `production`. Exemple : `make planck/rev4:default:production`. + +### Commandes DFU + +Il y a plusieurs commandes DFU que vous pouvez utiliser pour flasher le firmware sur un appareil DFU. + +* `:dfu` - C'est l'option normale qui attend qu'un appareil DFU soit disponible et qui flashe le firmware dès que c'est le cas. La vérification sera faite toutes les 5 secondes. +* `:dfu-ee` - Cette option flash un fichier `.eep` à la place d'un fichier `.hex`. Ce cas est plutôt rare. +* `:dfu-split-left` - Cette option flashe le firmware normal comme avec l'option (`:dfu`). Mais cela aussi flash le coté gauche du fichier EEPROM pour les claviers scindés. _C'est l'option idéale pour un clavier scindé basé sur le Elite C_ +* `:dfu-split-right` - Cette option flashe le firmware normal comme avec l'option (`:dfu`). Mais cela aussi flash le coté droite du fichier EEPROM pour les claviers scindés. _C'est l'option idéale pour un clavier scindé basé sur le Elite C_ + +## Caterina + +Les cartes arduinos et leurs clones utilisent le [bootloader Caterina](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (tous les claviers utilisant un Pro Micro, ou un clone). Ils utilisent aussi le protocole avr109 pour communiquer en virtuellement en série (serial en anglais). Les bootloaders comme le [A-Star](https://www.pololu.com/docs/0J61/9) sont basés sur Caterina. + +Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce bloc est présent dans votre fichier `rules.mk` : + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina +``` + +Flashers compatibles : + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandée) +* [avrdude](http://www.nongnu.org/avrdude/) avec avr109 / `:avrdude` (Outil en ligne de commande recommandé) +* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS) + +Séquence de flash :  + +1. Pressez la touche avec le keycode `RESET`, ou reliez les ports GND et RST. Vous n'avez que 7 secondes pour flasher une fois que l'opération a été faite. +2. Attendez que l'OS détecte l'appareil. +3. Flasher le fichier .hex. +4. Attendez que l'appareil redémarre automatiquement. + +ou, utilisez : + + make ::avrdude + +#### Commandes Caterina + +Il existe un certain nombre de commandes DFU que vous pouvez utiliser pour mettre à jour le firmware sur un périphérique DFU: + +* `: avrdude` - Il s’agit de l’option normale. Le script va attendre qu’un appareil Caterina soit disponible. Dès que c’est le cas, il flash le firmware. Il attendra de détecter un nouveau port COM pour le flasher. +* `: avrdude-loop` - Cela fonctionne de la même manière que`: avrdude`, mais une fois que chaque périphérique est flashé, il tentera de flasher à nouveau. Cela peut être utile pour flasher plusieurs claviers à la suite. _Cela implique de sortir manuellement de la boucle en appuyant sur Ctrl + C, Cmd + C ou un raccourci équivalent selon votre OS_ +* `: avrdude-split-left` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté gauche de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro. +* `: avrdude-split-right` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté droite de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro. + +## Halfkay + +Halfkay est un protocole ultra-simple développé par PJRC qui utilise HID et qui est fourni avec tous les Teensys après le modèle 2.0. + +Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce bloc est présent dans votre fichier `rules.mk` : + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay +``` + +Flasher compatibles : + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recomandée) +* [Teensy Loader](https://www.pjrc.com/teensy/loader.html) (petit utilitaire ultra simple) + [Teensy Loader en ligne de commande](https://www.pjrc.com/teensy/loader_cli.html) (Outil en ligne de commande recommandé) + +Séquence de flash : + +1. Pressez la touche du keycode `RESET`, ou reliez les ports RST et GND rapidement. Vous avez ensuite 7 secondes pour réaliser le flash. +2. Attendez que l'OS détecte l'appareil. +3. Flasher le fichier .hex. +4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement. + +## USBasploader + +USBasploader est un bootloader développé par matrixstorm. Il est utilisé sur des processeurs AVR non-USB comme le ATmega328P, qui fonctionne grâce à V-USB. + +Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que ce bloc est présent dans votre fichier `rules.mk` : + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp +``` + +Flashers compatibles : + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandé) +* [avrdude](http://www.nongnu.org/avrdude/) avec le programmeur `usbasp`. +* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS) + +Séquence de flash : + +1. Pressez la touche du keycode `RESET`, ou reliez le port de boot pendant que RST et GND snt reliés. Cela doit être fait très rapidement. +2. Attendez que l'OS détecte l'appareil. +3. Flasher le fichier .hex. +4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement. + +## BootloadHID + +BootloadHID est un bootloader pour les microcontrôleurs AVR. L'utilitaire de téleversement ne demande pas de drivers au niveau du kernel et peut être lancé sans installer aucune DLLs. + +Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que ce bloc existe dans votre fichier `rules.mk` :  + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID +``` + +Utilitaires de flash compatibles : + +* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (Utilitaire avec interface graphique recommandé) +* [bootloadhid Command Line](https://www.obdev.at/products/vusb/bootloadhid.html) / `:BootloadHID` avec QMK (utilitaire en ligne de commande recommandé) + +Séquence de flash + +1. Entrez dans le bootloader en utilisant l'une de ces méthodes : + * Pressez la touche du keycode `RESET` (Cela ne fonctionnera pas sur certains appareils). + * Verrouillez la touche « Salt » tout en branchant le clavier (Généralement ce principe est documenté dans le fichier readme du clavier) +2. Attendez que l'OS détecte l'appareil. +3. Flasher le fichier .hex. +4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement. + +Ou alors : + + make ::bootloadHID + +## STM32 + +Tous les processeurs STM32 contiennent un bootloader installé en usine qui ne peut pas être modifié ou supprimé. Certains processeurs STM32 ont des bootloaders qui ne peuvent pas être programmés par USB (ex : STM32F103) mais le processus reste le même. + +Pour le moment, aucune variable `BOOTLOADER` n'est nécessaire dans le fichier `rules.mk`. + +Flashers compatibles : + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé) +* [dfu-util](https://github.com/Stefan-Schmidt/dfu-util) / `:dfu-util` (utilitaire en ligne de commande recommandé) + +Séquence pour flasher: + +1. Entrez dans le bootloader en utilisant l'une de ces méthodes : + * Utilisez une touche sur laquelle le keycode `RESET` (Cela peut ne pas fonctionner sur les appareils STM32F042) + * Si un circuit de réinitialisation (Reset) est présent alors utilisé le bouton qui lui est dédié. + * Autrement, vous devez réaliser une liaison entre BOOT0 et VCC (en appuyant sur le bouton ou à l'aide d'un pont) puis faire un pont entre RESET et GND et enfin relacher le pont BOOT0. +2. Attendre que l'os détecte l'appareil. +3. Flasher un fichier `.bin`.h + * Vous allez recevoir un avertissement à propos de la signature DFU. Ignorez-la. +4. Réinitialisez l'appareil en mode « application ». Cela peut être fait automatiquement. + * Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux arguments DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex : `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé. + +### Commandes STM32 + +Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32  : + +* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Le script attendra qu'un bootloader STM32 soit présent. +* `:dfu-util-split-left` - Permet de flasher un firmware normalement, tout comme l'option précédente mais permet de configurer le côté gauche des paramètres EEPROM sur un clavier scindé. +* `:dfu-util-split-right` - Permet de flasher un firmware normalement, tout comme l'option précédente mais permet de configurer le côté droit des paramètres EEPROM sur un clavier scindé. +* `:st-link-cli` - Cela permet de flasher le firmware avec l'utilitaire en ligne de commande ST-LINK's plutôt que d'utiliser dfu-util. diff --git a/docs/fr-fr/getting_started_getting_help.md b/docs/fr-fr/getting_started_getting_help.md new file mode 100644 index 0000000000..fedb18c76c --- /dev/null +++ b/docs/fr-fr/getting_started_getting_help.md @@ -0,0 +1,15 @@ +# Trouver de l'aide + +Il y a beaucoup de ressources pour trouver de l'aide avec QMK. + +## Chat temps-réel + +Vous trouverez des développeurs QMK et des utilisateurs sur notre [Serveur Discord](https://discord.gg/Uq7gcHh) principal. Il y a des canaux spécifiques dans le serveur pour discuter des firmwares, toolbox, hardware et configurateurs. + +## Sous-Reddit OLKB + +Le forum officiel de QMK est [/r/olkb](https://reddit.com/r/olkb) sur [reddit.com](https://reddit.com). + +## Tickets GitHub + +Vous pouvez ouvrir un [ticket sur GitHub](https://github.com/qmk/qmk_firmware/issues). Ceci est spécialement pratique lorsque votre problème demande une discussion sur le long terme ou un débugage. diff --git a/docs/fr-fr/getting_started_github.md b/docs/fr-fr/getting_started_github.md new file mode 100644 index 0000000000..22c6ee749b --- /dev/null +++ b/docs/fr-fr/getting_started_github.md @@ -0,0 +1,61 @@ +# Comment utiliser GitHub avec QMK + +GitHub peut être un peu compliqué pour ceux qui n'y sont pas familier. Ce guide va vous expliquer chaque étape de "fork", clone et envoi d'un pull request avec QMK. + +?> Ce guide part du principe que vous êtes suffisamment à l'aise pour envoyer commandes sur la ligne de commande et que vous avez Git installé sur votre système. + +Commencez par la [page GitHub de QMK](https://github.com/qmk/qmk_firmware), et vous verrez un bouton dans le coin en haut à droite qui indique "Fork": + +![Fork on Github](http://i.imgur.com/8Toomz4.jpg) + +Si vous faites partie d'une organisation, vous aurez besoin de savoir quel compte utiliser pour le fork. Dans la plupart des cas, vous voudrez créer le fork dans votre compte personnel. Une fois le fork complet (cela peut quelques fois prendre un peu de temps), appuyez sur le bouton "Clone or download": + +![Download from Github](http://i.imgur.com/N1NYcSz.jpg) + +Faites attention à sélectionner "HTTPS", et sélectionnez le lien et copiez-le: + +![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) + +Ensuite, entrez `git clone` dans la ligne de commande, et collez votre lien: + +``` +user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit: + +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +Vos changements existent maintenant dans votre fork sur GitHub. Si vous allez à cette adresse (`https://github.com//qmk_firmware`), vous pouvez créer un nouveau "Pull Request" en cliquant sur ce bouton: + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +Maintenant, vous pourrez voir exactement ce que vous avez commité. Si ça vous semble bien, vous pouvez le finaliser en cliquant sur "Create Pull Request": + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +Une fois transmis, nous pourrons vous parler de vos changements, vous demander de faire des changements, et éventuellement de les accepter! + +Merci de contribuer à QMK :) diff --git a/docs/fr-fr/getting_started_introduction.md b/docs/fr-fr/getting_started_introduction.md new file mode 100644 index 0000000000..a7f0ff96af --- /dev/null +++ b/docs/fr-fr/getting_started_introduction.md @@ -0,0 +1,62 @@ +# Introduction + +Le but de cette page est d'expliquer les informations de base qui vous serons nécessaire pour travailler sur le projet QMK. Il a pour pré-requis que vous soyez familier à la navigation à l'aide d'un shell Unix, mais ne s'attend pas à ce que vous soyez familier avec C ou la compilation en utilisant make. + +## Structure de base de QMK + +QMK est un fork du projet [tmk_keyboard](https://github.com/tmk/tmk_keyboard) créé par [Jun Wako](https://github.com/tmk). Le code originel de TMK, avec quelques modifications, se trouve dans le dossier `tmk`. Les additions que QMK amène au projet se trouvent dans le dossier `quantum`. Les projets de clavier se trouvent dans les dossiers `handwired` et `keyboard`. + +### Structure du Userspace + +Dans le dossier `users` se trouve un répertoire pour chaque utilisateur. C'est un endroit où les utilisateurs peuvent mettre du code qui serait partagé entre plusieurs claviers. Merci de lire la documentation [Fonctionnalité Userspace](feature_userspace.md) pour plus d'information. + +### Structure du projet clavier + +Dans le dossier `keyboards`, son sous-dossier `handwired` et ses sous-dossiers pour les revendeurs et fabriquants (par exemple `clueboard`) se trouve un répertoire pour chaque projet clavier. Par exemple `qmk_firmware/keyboards/clueboard/2x1800`. + +A l'intérieur, vous trouverez la structure suivante: + +* `keymaps/`: différentes keymaps qui peuvent être compilées +* `rules.mk`: Ce fichier définit les options "make" par défaut. Ne modifiez pas ce fichier directement, utilisez à la place un `rules.mk` spécifique à la keymap. +* `config.h`: Ce fichier définit les options de compilation par défaut. Ne modifiez pas ce fichier directement, utilisez à la place un `config.h` spécifique à la keymap. +* `info.json`: Le fichier utilisé pour définir les options de layout de QMK Configurator. Voyez [Support Configurator](reference_configurator_support.md) pour plus d'information. +* `readme.md`: une brève description du clavier. +* `.h`: Ce fichier définit le layout du fichier par rapport à la matrice de commutation. +* `.c`: Ce fichier définit du code custom pour le clavier. + +Pour plus d'information sur la structure du projet, voyez [Directives clavier QMK](hardware_keyboard_guidelines.md). + +### Structure d'une Keymap + +Dans chaque dossier keymap, vous allez trouver les fichiers suivants. Seul le fichier `keymap.c` est nécessaire, et si le reste des fichiers n'existent pas, les options par défaut seront choisies. + +* `config.h`: les options de configuration de votre keymap +* `keymap.c`: tout le code de votre keymap, requis +* `rules.mk`: les features de QMK qui sont activées +* `readme.md`: une description de votre keymap, comment d'autres l'utiliseront, et des explications des fonctionnalités. Uploadez les images vers un service comme imgur. + +# Le fichier `config.h` + +Le fichier `config.h` peut être mis à 3 endroits: + +* keyboard (`/keyboards//config.h`) +* userspace (`/users//config.h`) +* keymap (`/keyboards//keymaps//config.h`) + +Le système de compilation cherche automatiquement les fichiers de configuration dans l'ordre au-dessus. Si vous souhaitez surcharger une configuration définie par un `config.h` précédent, vous devrez d'abord ajouter le code suivant. + +``` +#pragma once +``` + +Ensuite, pour surcharger l'option du fichier `config.h` précédent, vous devez `#undef` puis `#define` l'option à nouveau. + +Voici à quoi l'ensemble du code ressemble une fois regroupé: + +``` +#pragma once + +// overrides go here! +#undef MY_SETTING +#define MY_SETTING 4 +``` diff --git a/docs/fr-fr/newbs.md b/docs/fr-fr/newbs.md new file mode 100644 index 0000000000..13b06b429e --- /dev/null +++ b/docs/fr-fr/newbs.md @@ -0,0 +1,23 @@ +# Le Guide pour débutant complet à QMK + +QMK est un firmware Open Source pour votre clavier mécanique. Vous pouvez utiliser QMK pour customiser votre clavier de manière simple et puissante. Tout le monde, du débutant complet au développeur avancé, ont utilisé avec succès QMK pour customiser leur clavier. Ce guide vous aidera à faire de même, quelles que soient vos compétences. + +Vous voulez savoir si votre clavier peut utiliser QMK? Si c'est un clavier mécanique que vous avez vous-même construit, il y a de bonnes chances que vous pouvez. Nous supportons un [grand nombre de "hobbyist boards"](http://qmk.fr/keyboards), donc même si votre clavier ne peut pas utiliser QMK, vous ne devriez pas avoir trop de problème pour en trouver un qui vous convienne. + +## Vue d'ensemble + +Il y a 7 sections principales dans ce guide: + +* [Pour débuter](fr-FR/newbs_getting_started.md) +* [Compiler votre premier firmware en utilisant la ligne de commande](fr-FR/newbs_building_firmware.md) +* [Compiler votre premier firmware en utilisant l'interface graphique en ligne](fr-FR/newbs_building_firmware_configurator.md) +* [Flasher le Firmware](fr-FR/newbs_flashing.md) +* [Test et Débuggage](fr-FR/newbs_testing_debugging.md) +* [Bonnes pratiques Git](fr-FR/newbs_best_practices.md) +* [Ressources d'apprentissage](fr-FR/newbs_learn_more_resources.md) + +Ce guide a pour but principal d'aider quelqu'un qui n'a jamais compilé de logiciel avant. Les recommandations et les choix qu'il contient vont donc dans ce sens. Il y a des méthodes alternatives pour beaucoup de ces procédures, et nous supportons la plupart de ces alternatives. Si vous avez un doute sur comment accomplir une tâche, vous pouvez [nous demander de l'aide](fr-FR/getting_started_getting_help.md). + +## Ressources additionnelles + +* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Un blog créé par un utilisateur qui couvre les bases de l'utilisation du Firmware QMK, vue d'un point de vue d'un nouvel utilisateur (anglais). diff --git a/docs/fr-fr/newbs_best_practices.md b/docs/fr-fr/newbs_best_practices.md new file mode 100644 index 0000000000..1491013147 --- /dev/null +++ b/docs/fr-fr/newbs_best_practices.md @@ -0,0 +1,161 @@ +# Bonnes Pratiques + +## Ou, "Comment j'ai appris à ne plus m'en faire et aimer Git." + +Ce document a pour but d'apprendre aux novices les meilleures solutions pour faciliter la contribution à QMK. Nous allons étudier le processus de contribution à QMK, détaillant quelques moyens de rendre cette tâche plus simple. Nous allons faire quelques erreurs afin de vous apprendre à les résoudre. + +Ce document suppose les choses suivantes: + +1. Vous avez un compte GitHub, et avez [créé un "fork" pour le dépôt qmk_firmware](fr-FR/getting_started_github.md) avec votre compte. +2. Vous avez [configuré votre environnement de compilation](fr-FR/newbs_getting_started.md?id=environment-setup). + +## La branche master de votre fork: Mettre à jour souvent, ne jamais commit + +Il est hautement recommandé pour le développement de QMK, peu importe ce qui est fait ou où, de garder votre branche `master` à jour, mais de ne ***jamais*** commit dessus. A la place, faites tous vos changements dans une branche de développement et crééz des "pull requests" de votre branche lorsque vous développez. + +Pour réduire les chances de conflits de fusion (merge) — des cas où deux ou plus d'utilisateurs ont édité la même section d'un fichier en parallèle — gardez votre branche `master` relativement à jour et démarrez chaque nouveau développement en créant une nouvelle branche. + +### Mettre à jour votre branche master + +Pour garder votre branche `master` à jour, il est recommandé d'ajouter le dépôt du firmware QMK comme un dépôt distant (remote) dans git. pour se faire, ouvrez votre interface de ligne de commande Git et entrez: + +```bash +git remote add upstream https://github.com/qmk/qmk_firmware.git +``` + +Pour vérifier que le dépôt a bien été ajouté, lancez la commande `git remote -v`, qui devrait retourner le résultat suivant: + +```bash +$ git remote -v +origin https://github.com//qmk_firmware.git (fetch) +origin https://github.com//qmk_firmware.git (push) +upstream https://github.com/qmk/qmk_firmware.git (fetch) +upstream https://github.com/qmk/qmk_firmware.git (push) +``` + +Maintenant que c'est fait, vous pouvez vérifier les mises à jour au dépôt en lançant `git fetch upstream`. Cela récupère les branches et les tags — appelé de manière générale "refs" — du dépôt QMK, qui a maintenant le surnom `upstream`. Nous pouvons maintenant comparer les données sur notre "fork" `origin` à celles contenues par QMK. + +Pour mettre à jour la branche master de votre "fork", lancez les commandes suivantes (en appuyant sur Enter après chaque ligne): + +```bash +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` + +Cela vous change la branche courante en master, synchronise les données de références du dépôt QMK vers votre ordinateur. La commande pull tire les données de références vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork github. + +### Faire des changements + +Pour faire des changements, créez une nouvelle branche en entrant: + +```bash +git checkout -b dev_branch +git push --set-upstream origin dev_branch +``` + +Ceci crée une branche nommée `dev_branch`, bascule vers cette branche, et ensuite sauvegarde cette nouvelle branche vers votre fork. L'argument `--set-upstream` demande à git d'utiliser votre fork et la branche `dev_branch` à chaque fois que vous utilisez `git push` ou `git pull` depuis cette branche. Vous ne devez l'utiliser que pour le premier "push", après cela, vous pouvez utiliser simplement `git push` ou `git pull`, sans le reste des arguments. + +!> Avec `git push`, vous pouvez utiliser `-u` à la place de `--set-upstream` — `-u` est un alias pour `--set-upstream`. + +Vous pouvez appeler votre branche à peu près comme vous voulez, toutefois il est recommandé d'utiliser un nom qui est lié aux changements que vous allez faire. + +Par défaut, `git checkout -b` va faire de la branche actuelle la branche de base de votre nouvelle branche. Vous pouvez définir la base de votre nouvelle branche comme étant n'importe quelle branche existante qui n'est pas la courante en utilisant la commande: + +```bash +git checkout -b dev_branch master +``` + +Maintenant que vous avez une branche de développement, ouvrez votre éditeur de texte et faites vos changements. Il est recommandé de faire beaucoup de petits commits dans votre branche. Ainsi, un changement qui crée un problème peut être plus facilement retracé et annulé si nécessaire. Pour faire un changement, éditez et sauvez n'importe quel fichier qui doit être mis à jour, ajoutez les à la *zone de staging* de Git, et commitez les vers votre branche: + +```bash +git add path/to/updated_file +git commit -m "My commit message." +``` + +`git add` ajoute les fichiers qui ont été changés dans la *zone de staging* de Git, qui est sa "zone de chargement". Elle contient tous les changements qui vont être *validés* (committed) par `git commit`, qui sauvegarde les changements vers le dépôt. Utilisez des messages de validation descriptifs afin que vous puissiez savoir ce qui a changé d'un coup d'oeil. + +!> Si vous changez beaucoup de fichiers, mais tous les fichiers font partie du même changement, vous pouvez utiliser `git add .` pour ajouter tous les fichiers changés dans le répertoire courant, plutôt que d'avoir à ajouter chaque fichier individuellement. + +### Publier Vos Changements + +La dernière étape est de pousser vos changements vers votre fork. Pour ce faire, entrez `git push`. Git publie maintenant l'état courant de `dev_branch` vers votre fork. + +## Résoudre Les Conflits De Merge + +Parfois, lorsque votre travail sur une branche met beaucoup de temps à se compléter, des changements réalisés par d'autres peuvent entrer en conflit avec les changements que vous avez fait sur votre branche au moment où vous avez ouvert un pull request. Ceci est appelé un *conflit de merge*, et c'est ce qui arrive lorsque plusieurs personnes modifient les mêmes parties de mêmes fichiers. + +### Rebaser Vos Changements + +Un *rebase* est la manière pour Git de prendre les changements qui ont été faits à un point, les annuler, et les réappliquer sur un autre point. Dans le cas d'un conflit de merge, vous pouvez rebaser votre branche pour récupérer les changements qui ont été faits entre le moment où vous avez créé votre branche et le présent. + +Pour démarrer, lancez les commandes suivantes: + +```bash +git fetch upstream +git rev-list --left-right --count HEAD...upstream/master +``` + +La commande `git rev-list` retourne le nombre de commits qui diffère entre la branche courante et la branche master de QMK. Nous lançons `git fetch` en premier afin d'être sûr que les refs qui représentent l'état courant du dépôt upstream soient à jour. Le résultat de la commande `git rev-list` retourne deux nombres: + +```bash +$ git rev-list --left-right --count HEAD...upstream/master +7 35 +``` + +Le premier nombre représente combien il y a eu de commits sur la branche courante depuis qu'elle a été créée, et le second nombre est combien de commits ont été faits sur la branche `upstream/master` depuis que la branche a été créée et, ainsi, les changements qui ne sont pas enregistrés sur la branche courante. + +Maintenant que l'état actuel de la branche courante et la branche upstream sont connus, nous pouvons maintenant démarrer une opération de rebase: + +```bash +git rebase upstream/master +``` + +Ceci dit à Git d'annuler les commits de la branche courante puis de les réappliquer sur la branche master de QMK. + +```bash +$ git rebase upstream/master +First, rewinding head to replay your work on top of it... +Applying: Commit #1 +Using index info to reconstruct a base tree... +M conflicting_file_1.txt +Falling back to patching base and 3-way merge... +Auto-merging conflicting_file_1.txt +CONFLICT (content): Merge conflict in conflicting_file_1.txt +error: Failed to merge in the changes. +hint: Use 'git am --show-current-patch' to see the failed patch +Patch failed at 0001 Commit #1 + +Resolve all conflicts manually, mark them as resolved with +"git add/rm ", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort". +``` + +Ceci nous dit que nous avons un conflit de merge, et nous donne le nom du fichier en conflit. Ouvrez le fichier conflictuel dans votre éditeur de texte et, quelque part dans le fichier, vous trouverez quelque chose comme ça: + +```bash +<<<<<<< HEAD +

For help with any issues, email us at support@webhost.us.

+======= +

Need help? Email support@webhost.us.

+>>>>>>> Commit #1 +``` + +La ligne `<<<<<<< HEAD` montre le début d'un conflit de merge et la ligne `>>>>>>> Commit #1` indique la fin, avec les sections conflictuelles séparées par `=======`. La partie du côté `HEAD` vient de la version du fichier provenant de la branche master de QMK, et la partie marquée avec le numéro du commit provient de la branche courrante. + +Parce que Git suis *les changements des fichiers*, plutôt que les contenus des fichiers directement, si Git ne peut pas trouver le texte qu'il y avait dans le fichier avant que le commit soit fait, il ne saura pas comment modifier le fichier. Modifier le fichier à nouveau va résoudre le conflit. Faites votre changement, et sauvez le fichier. + +```bash +

Need help? Email support@webhost.us.

+``` + +Maintenant, lancez: + +```bash +git add conflicting_file_1.txt +git rebase --continue +``` + +Git enregistre le changement dans le fichier conflictuel, et continue à appliquer les commits depuis votre branche jusqu'à ce qu'il arrive à la fin. diff --git a/docs/fr-fr/newbs_building_firmware.md b/docs/fr-fr/newbs_building_firmware.md new file mode 100644 index 0000000000..81870d31e4 --- /dev/null +++ b/docs/fr-fr/newbs_building_firmware.md @@ -0,0 +1,81 @@ +# Compiler Votre Premier Firmware + +Maintenant que vous avez configuré votre environnement de build, vous être prêts à compiler un firmware customisé. Pour cette section, nous allons utiliser trois programmes différents: votre explorateur de fichier, votre éditeur de texte et votre fenêtre de terminal. Gardez les 3 ouverts jusqu'à ce que vous ayez terminé et soyez content de votre firmware de clavier. + +Si vous avez fermé et rouvert votre fenêtre de terminal depuis le démarrage de ce guide, n'oubliez pas de `cd qmk_firmware` afin que votre terminal soit dans le bon répertoire. + +## Naviguez vers votre répertoire keymaps + +Démarrez par naviguer dans le répertoire `keymaps` de votre clavier. + +?> Si vous êtes sous macOS ou Windows, il y a des commandes que vous pouvez utiliser pour facilement ouvrir le dossier keymaps. + +?> macOS: + + open keyboards//keymaps + +?> Windows: + + start .\\keyboards\\\\keymaps + +## Créez une copie de la keymap `default` + +Une fois le dossier `keymaps` ouvert, créez une copie du répertoire `default`. Nous vous recommandons de nommer ce répertoire de la même manière que votre nom d'utilisateur GitHub. Vous pouvez aussi utiliser le nom que vous voulez, tant qu'il contient uniquement des lettres minuscules, des nombres et le caractère souligné (_). + +Afin d'automatiser ce processus, vous avez aussi l'option de lancer le script `new_keymap.sh`. + +Naviguez vers le répertoire `qmk_firmware/util` et tapez ce qui suit: + +``` +./new_keymap.sh +``` + +Par exemple, pour un utilisateur s'appeleant John, essayant de créer une nouvelle keymap pour le 1up60hse, il taperait: + +``` +./new_keymap.sh 1upkeyboards/1up60hse john +``` + +## Ouvrez `keymap.c` dans votre éditeur de texte préféré + +Ouvrez votre fichier `keymap.c`. Dans ce fichier, vous trouverez la structure qui contrôle comment votre clavier se comporte. En haut du fichier `keymap.c` il peut y avoir quelques `defines` et `enums` qui rendent la keymap plus simple à lire. Plus bas, vous trouverez une ligne telle que celle-ci: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +Cette ligne indique le début d'une liste de calques (layers). En dessous, vous trouverez des lignes contenant soit `LAYOUT`, soit `KEYMAP` et ces lignes indiquent le début d'un calque. En dessous de cette ligne se trouve la liste des touches qui comprennent ce calque particulier. + +!> Lorsque vous éditez votre fichier keymap, faites attention à ne pas ajouter ou enlever une virgule. Si vous le faites, vous aller empêcher votre firmware de compiler et il ne sera pas facile de trouver où la virgule est manquante ou en trop. + +## Customisez le layout à votre goût + +Libre à vous de choisir comment compléter cette étape. Faites le petit changement qui vous dérange ou retravaillez tout de zéro. Vous pouvez supprimer des calques si vous ne les utilisez pas tous, ou ajouter des calques jusqu'à un maximum de 32. Vérifiez la documentation suivante pour trouver ce que vous pouvez définir ici: + +* [Keycodes](keycodes.md) +* [Fonctionnalités](features.md) +* [FAQ](faq.md) + +?> Lorsque vous découvrez comment des keymaps fonctionnent, faites de petits changements. De gros changements rendent le débuggage des problèmes éventuels plus difficile. + +## Compilez votre firmware + +Lorsque les changements de votre keymap sont complets, vous allez devoir compiler le firmware. Pour ce faire, retournez à votre terminal et lancez la commande de compilation: + + make : + +Par exemple, si votre keymap s'appelle "xyverz" et vous compilez une keymap pour une plank rev5, vous allez utiliser cette commande: + + make planck/rev5:xyverz + +Durant la compilation, vous allez avoir beaucoup de messages sur l'écran vous informant de quels fichiers sont en train d'être compilés. Il devrait se terminer avec des messages qui ressemblent comme suit: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## Flasher votre firmware + +Allez sur la page [Flasher le firmware](fr-FR/newbs_flashing.md) pour apprendre comment écrire votre nouveau firmware sur votre clavier. diff --git a/docs/fr-fr/newbs_building_firmware_configurator.md b/docs/fr-fr/newbs_building_firmware_configurator.md new file mode 100644 index 0000000000..577e5c80e9 --- /dev/null +++ b/docs/fr-fr/newbs_building_firmware_configurator.md @@ -0,0 +1,105 @@ +# Configurateur de QMK + +Le [Configurateur de QMK](https://config.qmk.fm) est une interface graphique en ligne permettant de générer des fichiers "hex" du firmware de QMK. + +?> **S'il vous plaît, suivez les étapes suivantes dans l'ordre.** + +Regardez le [Tutoriel vidéo](https://youtu.be/tx54jkRC9ZY) + +Le configurateur de QMK fonctionne mieux avec Chrome et Firefox. + +!> **Les fichiers d'autres outils, tels que KLE ou kbfirmware ne seront pas compatibles avec le configurateur QMK. Ne les chargez pas, ne les importez pas. Le configurateur QMK est un outil DIFFERENT.** + +## Sélectionner votre clavier + +Cliquez la boîte déroulante et sélectionnez le clavier pour lequel vous voulez créer une keymap. + +?> Si votre clavier a plusieurs versions, faites attention à utiliser la bonne. + +Je vais le répéter, parce que c'est important + +!> **FAITES ATTENTION A UTILISER LA BONNE VERSION !** + +Si votre clavier est annoncé comme fonctionnant grâce à QMK mais n'est pas dans la liste, il y a des chances que le développeur ne l'ait pas encore fait, ou que nous n'avons pas encore eu le temps de le merger. Ajoutez un problème (issue) sur [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) demandant le support de votre clavier, s'il n'y a pas de [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) ouvert pour lui. Il y a aussi des claviers alimentés par QMK qui sont sur le compte GitHub du fabricant, il est bon de le vérifier aussi. + +## Sélectionner la disposition de votre clavier + +Choisissez la disposition (layout) qui représente le mieux la keymap que vous voulez créer. Certains claviers n'ont pas encore assez de dispositions ou des dispositions incorrectes. Ils seront supportés dans le future. + +## Nom de la Keymap + +Appelez cette keymap comme vous voulez. + +?> Si vous rencontrez des problèmes lors de la compilation, il peut être utile de changer ce nom, il peut déjà exister dans le dépôt du firmware QMK. + +## Créer votre keymap + +Entrer un keycode peut s'accomplir de 3 façons différentes. + +1. Glisser déposer +2. Cliquer sur un endroit vide sur le layout et cliquer sur le keycode souhaité +3. Cliquer sur un endroit vide sur le layout et appuyer sur une touche physique de votre clavier. + +Passez votre souris au dessus d'une touche et un affichage vous dira quel est le rôle du keycode. Pour une version plus verbeuse suivre: + +[Référence Keycode basique](https://docs.qmk.fm/#/keycodes_basic) +[Référence Keycode avancé](https://docs.qmk.fm/#/feature_advanced_keycodes) + +Dans le cas où vous ne trouvez pas une disposition qui supporte votre keymap, par exemple trois places pour une barre d'espace, ou deux places pour retour clavier, ou deux places pour shift, etc. etc. remplissez les TOUTES. + +### Exemples + +3 places pour la barre d'espace: Remplissez les TOUTES avec la barre d'espace + +2 places pour un retour clavier: Remplissez les DEUX avec un retour clavier + +2 places pour un shift droit: Remplissez les DEUX avec un shift droit + +1 place pour un shift gauche et 1 place pour le support ISO: Remplissez les deux avec un shift gauche + +5 places, mais seulement 4 touches: Deviner et vérifier, ou demander à quelqu'un qui l'a déjà fait. + +## Sauvez votre keymap pour des éditions futures + +Une fois satisfait de votre keymap, ou si vous souhaitez revenir travailler dessus plus tard, appuyez sur le bouton `Export Keymap`. Il vous permettra de sauvegarder votre keymap avec le nom choisi au dessus suivi de .json. + +Vous pouvez ensuite charger ce fichier .json à nouveau en appuxant sur le bouton `Import Keymap`. + +!> **ATTENTION** Ce n'est pas le même type de fichier .json utilisé pour kbfirmware.com ou n'importe quel autre outil. Si vous essayez d'utiliser ce fichier pour d'autres outil, ou le fichier .json d'autres outils avec le configurateur QMK, il y a des chances que votre clavier **explose**. + +## Générer votre fichier firmware + +Appuyez sur le bouton `Compile`. + +Une fois la compilation terminée, vous pourrez appuyer sur le bouton vert `Download Firmware`. + +## Ecrire votre firmware sur votre clavier + +Merci de vous référer à [Flasher le Firmware](fr-FR/newbs_flashing.md) + +## Dépannage + +#### Mon fichier json ne fonctionne pas + +Si le fichier .json a été généré par le configurateur QMK, bravo vous avez trouvé un bug. Merci d'ouvrir une issue sur [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) + +Sinon... vous avez raté mon message écris en gras qui dit de ne pas utiliser d'autres fichiers .json? + +#### Il y a des espaces en trop dans mon alyout? Qu'est-ce que je fais? + +Si vous voulez dire que vous avez trois places pour une barre d'espace, le mieux est de les remplir tous avec une barre d'espace. Vous pouvez faire de même avec les retour clavier et les shift. + +#### C'est quoi le keycode pour ....... + +Merci de regarder + +[Référence keycode basique](https://docs.qmk.fm/#/keycodes_basic) +[Référence keycode avancé](https://docs.qmk.fm/#/feature_advanced_keycodes) + +#### Ca ne compile pas? + +Merci de vérifier les autres dispositions de votre keymap afin d'être sûr qu'il n'y a pas de touches aléatoires. + +## Problèmes et Bugs + +Nous acceptons toujours les demandes des clients et les rapports de bugs. Merci de les remplirs sur [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) diff --git a/docs/fr-fr/newbs_flashing.md b/docs/fr-fr/newbs_flashing.md new file mode 100644 index 0000000000..c9849eb104 --- /dev/null +++ b/docs/fr-fr/newbs_flashing.md @@ -0,0 +1,367 @@ +# Flasher votre clavier + +Maintenant que vous avez compilé un firmware custom, vous allez vouloir le flasher dans votre clavier. + +## Flasher votre clavier avec QMK Toolbox + +La manière la plus simple de flasher votre clavier est avec [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases). + +Toutefois, la QMK Toolbox n'est actuellement disponible que pour Windows et macOS. Si vous utilisez Linux (ou préférez flasher le firmware depuis la ligne de commande), vous devrez utiliser [la métode décrite ci-dessous](newbs_flashing.md#flash-your-keyboard-from-the-command-line). + +### Charger le fichier dans QMK Toolbox + +Démarrez en ouvrant l'application QMK Toolbox. Cherchez le fichier de firmware dans Finder ou Explorer. Vore firmware de clavier peut être dans un de deux formats `.hex` ou `.bin`. QMK essaye de copier le bon format pour votre clavier du répertoire racine `qmk_firmware`. + +?> Si vous êtes sous Windows ou macOS il y a des commandes que vous pouvez utiliser pour facilement ouvrir le répertoire firmware dans Explorer ou Finder. + +?> Windows: + + start . + +?> macOS: + + open . + +Le fichier firmware suit toujours ce format de nommage: + + _.{bin,hex} + +Par exemple, le `plank/rev5` avec une keymap `default` aura ce nom de fichier: + + planck_rev5_default.hex + +Une fois que vous aurez trouvé votre fichier de firmware, glissez le dans la boîte "Local file" sur QMK Toolbox, ou cliquez sur "Open" et naviguez où votre firmware est enregistré. + +### Mettez votre clavier en mode DFU (Bootloader) + +Afin de flasher votre firmware custom, vous devez mettre votre clavier dans un mode spécial. Lorsqu'il sera dans ce mode, vous ne pourrez pas taper ou utiliser votre clavier. Il est très important que vous ne débranchiez pas votre clavier ou n'arrêtiez pas le processus d'écriture du firmware. + +Chaque clavier a une manière différente d'entrer dans ce mode spécial. Si votre clavier tourne actuellement QMK ou TMK et vous n'avez pas reçu d'instruction spécifiques, essayez, dans cet ordre: + +* Enfoncez les deux touches shift et appuyez sur `Pause` +* Enfoncez les deux touches shift et appuyez sur `B` +* Débranchez votre clavier, gardez shift la barre d'espace et `B` en même temps, branchez votre clavier et attendez une seconde avant de relâcher les touches. +* Appuyez la touche physique `RESET` en bas du PCB +* Trouvez les pins sur le PCB marquées `BOOT0` ou `RESET`, court circuitez ces pins en branchant votre PCB + +Lorsque vous aurez réussi, vous verrez le message suivant dans QMK Toolbox: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### Flasher votre clavier + +Appuyez sur le boutton `Flash` dans QMK Toolbox. Vous verrez un résultat similaire à ce qui suit: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## Flashez votre clavier à l'aide de la ligne de commande + +C'est désormais relativement simple. Lorsque vous êtes prêt à compiler et à flasher votre firmware, ouvrez la fenêtre de votre terminal et exécutez la commande de build : + + make ::flash + +Par exemple, si votre keymap s'appelle "xyverz" et que vous fabriquez une keymap pour un clavier `planck` de version `rev5` vous devrez utiliser cette commande: + + make planck/rev5:xyverz:flash + +La commande va vérifier la configuration du clavier, puis tentera de le flasher en fonction du bootloader (chargeur d’amorçage) spécifié. Cela signifie que vous n'avez pas besoin de savoir quel bootloader votre clavier utilise. Exécutez simplement la commande et laissez-le faire le gros du travail. + +Cependant, tout dépend du bootloader qui est installé sur le clavier. Si cette information n’est pas configurée ou si vous tentez de flasher un clavier qui ne permet pas d’être flashé alors vous obtiendrez cette erreur : + + WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time. + +Dans ce cas, vous devrez choisir le bootloader. + +Il y a cinq bootloaders principaux. Les Pro-Micro et les clones utilisent Caterina, les Teensy utilisent Halfkay, les claviers AVR d’OLKB utilisent QMK-DFU, certains controleurs atmega32u4 utilisent DFU et la plupart des controlleurs ARM utilisent ARM DFU. + +Vous pouvez trouver plus d'information à propos des bootloaders sur la page [Instructions de flash et information sur le Bootloader](flashing.md). + +Si vous savez quel bootloader vous utilisez, lorsque vous compilez le firmware, vous pouvez ajouter quelques options à la commande `make` pour automatiser le processus de flash. + +### DFU + +Pour le bootloader DFU, lorsque vous êtes prêts à compiler et flasher votre firmware, ouvrez votre fenêtre de terminal et lancez la commande de compilation: + + make ::dfu + +Par exemple, si vous keymap s'appelle "xyverz" et vous compilez une keymap pour une plank rev5, vous utiliserez cette commande: + + make planck/rev5:xyverz:dfu + +Une fois la compilation terminée, le résultat devrait être le suivant: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +Une fois arrivé à ce stade, le script de compilation va chercher le bootloader DFU toutes les 5 secondes. Il va répéter les messages suivants jusqu'à ce que l'appareil soit trouvé ou que vous l'annuliez. + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +Une fois terminé, vous devrez mettre à zéro le contrôleur. Vous allez voir un résultat similaire à ceci: + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +?> Si vous avez des soucis concernant ceci - par exemple `dfu-programmer: no device present` - merci de regarder [Foires Aux Questions de Compilation](faq_build.md). + +#### Commandes DFU + +Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flasher un firmware sur un device DFU: + +* `:dfu` - C'est l'option standard qui attends jusqu'à e qu'un appareil DFU soit disponible, puis flash le firmware. Il va vérifier toutes les 5 secondes, afin de voir si un appareil DFU est apparu. +* `:dfu-ee` - Ceci flash un fichier `eep` à la place du standard hex, peu commun. +* `:dfu-split-left` - Ceci flash le firmware standard, comme la commande standard (`:dfu`). Toutefois, elle flash aussi les fichiers EEPROM du "côté gauche" pour les claviers scindés. _C'est l'option idéale pour les claviers scindés basés sur Elite C._ +* `:dfu-split-right` - Ceci flash le firmware standard, comme la commande standard (`:dfu`). Toutefois, elle flash aussi les fichiers EEPROM du "côté droit" pour les claviers scindés. _C'est l'option idéale pour les claviers scindés basés sur Elite C._ + +### Caterina + +Pour les boards Arduino et leurs clones (tel que le SparkFun ProMicro), lorsque vous êtes prêt à compiler et flasher votre firmware, ouvrez votre terminal et lancer la commande de compilation: + + make ::avrdude + +Par exemple, si votre keymap se nomme "xyverz" et que vous compilez une keymap pour un Lets Split rev2, vous utiliserez la commande suivante: + + make lets_split/rev2:xyverz:avrdude + +Une fois le firmware compilé, vous aurez le résultat suivant: + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +Une fois ceci fait, réinitialisez votre board et le script va détecter et flasher le firmware. La sortie devrait ressembler à quelque chose comme ça: + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` + +Si vous avez un souci, essayez de faire ceci: + + sudo make ::avrdude + +#### Commandes Caterina + +Il existe un certain nombre de commandes DFU que vous pouvez utiliser pour mettre à jour le firmware sur un périphérique DFU: + +* `: avrdude` - Il s’agit de l’option normale. Elle attend qu’un appareil Caterina soit disponible, puis tente de flasher le firmware. Il attendra de détecter un autre port COM, puis il flashera à nouveau. +* `: avrdude-loop` - Cela fonctionne de la même manière que `: avrdude`, mais une fois que chaque périphérique est flashé, il tentera de flasher à nouveau. Cela peut être utile pour flasher plusieurs claviers à la suite. _Cela implique de sortir manuellement de la boucle en appuyant sur Ctrl + C, Cmd + C ou un raccourci équivalent selon votre OS_ +* `: avrdude-split-left` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté gauche de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro. +* `: avrdude-split-right` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté droite de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro. + +### HalfKay + +Pour les composants PJRC (les Teensy), lorsque vous êtes prêts à compiler et flasher votre firmware, ouvrez votre fenêtre de terminal et lancez la commande de compilation suivante: + + make ::teensy + +Par exemple, si vous keymap s'appelle "xyverz" et vous compilez une keymap pour un Ergodox ou un Ergodox EZ, vous utiliserez cette commande: + + make ergodox_ez:xyverz:teensy + +Une fois la compilation du firmware terminée, votre sortie devrait ressembler à ça: + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +Une fois terminé, réinitialisez votre board. Une fois fait, vous verrez une sortie comme ça: + + ``` + Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................................................................................................................................ +................................................... +Booting +``` + +### STM32 (ARM) + +Pour la majorité des boards ARM (incluant les Proton C, Planck Rev 6, et Preonic Rev 3), lorsque vous êtes prêt à compiler et flasher votre firmware, ouvrez la fenêtre de terminal et lancez la commande de compilation: + + make ::dfu-util + +Par exemple, si votre keymap s'appelle "xyverz" et vous compilez une keymap pour le clavier Plank Revision 6, vous utiliserez cette commande et redémarrerez le clavier vers le bootloader (avant que la compilation soit terminée): + + make planck/rev6:xyverz:dfu-util + +Une fois le firmware compilé, il va afficher quelque chose comme ça: + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +#### Commandes STM32 + +Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flasher un firmware sur un device STM32: + +* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Elle attendra qu'un bootloader STM32 soit présent et tentera de l’utiliser. +* `:dfu-util-left` - Ceci flasher le firmware standard, comme la commande standard (`:dfu-util`). Toutefois, elle flasher aussi les fichiers EEPROM du "côté gauche" pour les claviers scindés. +* `:dfu-util-right` - Ceci flash le firmware standard, comme la commande standard (`:dfu-util`). Toutefois, elle flash aussi les fichiers EEPROM du "côté droit" pour les claviers scindés. +* `:st-link-cli` - Cela permet de flasher le firmware avec l'utilitaire en ligne de commande ST-LINK's plutôt que d'utiliser dfu-util. + +### BootloadHID + +Pour les claviers basés sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, si vous êtes prêts à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante : + + make ::bootloaderHID + +Par exemple, si votre keymap s'appelle "xyverz" et que vous compilez une keymap pour un jj40, utilisez cette commande: + + make jj40:xyverz:bootloaderHID + +Une fois le firmware compilé, vous aurez cette sortie: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +A ce stade, le script de build va chercher le bootloader DFU toutes les 5 secondes. Il répétera l ’affichage de ce message jusqu'à ce que l’appareil soit trouvé ou que vous annuliez l'opération``` + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +Une fois ce résultat obtenu, réinitialisez le contrôleur. Le résultat suivant devrait s’afficher : + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + +## Faites l'essai! + +Bravo! Votre firmware customisé a été programmé sur votre clavier! + +Essayez-le et vérifiez qu'il fonctionne comme vous le souhaitez. Nous avons écrit [Tester et débugger](newbs_testing_debugging.md) pour compléter le guide du débutant, alors allez voir là-bas pour apprendre comment dépanner vos fonctionnalités custom. diff --git a/docs/fr-fr/newbs_getting_started.md b/docs/fr-fr/newbs_getting_started.md new file mode 100644 index 0000000000..8a8029fd14 --- /dev/null +++ b/docs/fr-fr/newbs_getting_started.md @@ -0,0 +1,101 @@ +# Introduction + +Votre clavier d'ordinateur contient un processeur, proche de celui dans votre ordinateur. Ce processeur exécute un logiciel responsable de détecter les touches appuyées et envoie des rapports à propos de l'état du clavier lorsque les touches sont appuyées et relâchées. QMK prend le rôle de ce logiciel, détectant les appuis des boutons et passant cette information à l'ordinateur hôte. Lorsque vous construisez votre keymap customisée, vous créez l'équivalent d'un programme exécutable pour votre clavier. + +QMK essaie de rendre les choses simples faciles, et les choses difficiles possibles. Vous n'avez pas à savoir programmer pour créer des keymaps puissantes - vous devez seulement suivre quelques règles de syntaxe simples. + +# Guide de démarrage + +Avant de pouvoir construire des keymaps, vous devez installer quelques logiciels et configurer votre environnement de compilation. Ceci n'a besoin d'être fait seulement une fois, peu importe le nombre de clavier pour lesquels vous compter compiler un firmware. + +Si vous préférez une approche plus proche d'une interface graphique, considérez utiliser l'outil en ligne [QMK Configurator](https://config.qmk.fm). Référez-vous à [Construire votre premier firmware en utilisant l'interface graphique en ligne](newbs_building_firmware_configurator.md). + +## Logiciels à télécharger + +### Editeur de texte + +Vous allez avoir besoin d'un programme qui peut éditer et sauvegarder des fichiers **plain text**. Si vous êtes sur Windows, vous pouvez utiliser notepad et sur Linux vous pouvez utiliser gedit. Ces deux options sont des éditeurs de texte simples mais fonctionnels. Sur macOS, faites attention avec l'application par défaut TextEdit: elle ne sauvegardera pas les fichiers en mode "plain text" sauf si vous sélectionnez explicitement _Make Plain Text_ à partir du menu _Format_. + +Vous pouvez aussi télécharger et installer un éditeur de texte dédié comme [Sublime Text](https://www.sublimetext.com/) ou [VS Code](https://code.visualstudio.com/). C'est probablement la meilleure solution peu importe la plateforme car ce sont des programmes conçus spécifiquement pour éditer du code. + +?> Pas sûr de quel éditeur de texte utiliser? Laurence Bradford a écrit une [excellente introduction](https://learntocodewith.me/programming/basics/text-editors/) au sujet. + +### QMK Toolbox + +QMK Toolbox est un programme graphique optionnel pour Windows et macOS qui permet à la fois de programmer et débugger votre clavier customisé. Il vous sera probablement très utile pour facilement flasher votre clavier et analyser ses messages de débugage. + +[Télécharger la dernière version ici.](https://github.com/qmk/qmk_toolbox/releases/latest) + +* Pour Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installeur) +* Pour macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installeur) + +## Configurez votre environnement + +Nous avons essayé de rendre QMK aussi simple que possible à configurer. Vous avez uniquement à préparer votre environnment Linux ou Unix et laisser QMK installer le reste. + +?> Si vous n'avez jamais travaillé avec la ligne de commande Linux/Unix, il y a un certain nombre de concepts basiques et de commandes que vous devriez apprendre. Ces ressources vous apprendrons suffisemment pour travailler avec QMK:
+[Commandes Linux à savoir](https://www.guru99.com/must-know-linux-commands.html)
+[Commandes Unix de base](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +Vous devez installer MSYS2 et Git. + +* Suivez les instructions d'installation sur la [page de MSYS2](http://www.msys2.org). +* Fermez tous les terminaux MSYS2 éventuellement ouverts et ouvrez un nouveau terminal MSYS2 MinGW 64-bit. +* Installez Git en lançant la commande: `pacman -S git`. + +### macOS + +Vous devez installer Homebew. Suivez les instructions sur la [page de Homebrew](https://brew.sh). + +Une fois Homebrew installé, continuez avec _Configurer QMK_. Dans cette étape, nous lancerons un script qui va installer d'autres paquets. + +### Linux + +Vous devez installer Git. Il est très probable que vous l'ayez déjà installé, mais sinon, une des commandes suivantes devrait l'installer: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> Docker est aussi une option sur toutes les plateformes. [Appuyez ici pour plus de détail.](getting_started_build_tools.md#docker) + +## Configurer QMK + +Une fois votre environnement Linux/Unix configuré, vous êtes prêt à télécharger QMK. Nous allons le faire en utilisant Git pour "cloner" le dépôt de QMK. Ouvrez un terminal ou une fenêtre MSYS2 MinGW et gardez le ouvert pour le reste de ce guide. Dans ce terminal, lancez ces deux commandes: + +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> Si vous savez déjà [comment utiliser GitHub](getting_started_github.md), nous recommandons que vous créez et clonez votre propre fork. Si vous ne savez pas ce que cela veut dire, vous pouvez sans problème ignorer ce message. + +QMK vient avec un script pour vous aider à configurer le reste de ce que vous aurez besoin. Vous devez le lancer en tapant la ligne de commande suivante: + + util/qmk_install.sh + +## Testez votre environnement de compilation + +Maintenant que votre environnement de compilation de QMK est configuré, vous pouvez compiler un firmware pour votre clavier. Démarrez en compilant la keymap par défaut du clavier. Vous devriez pouvoir le faire avec une commande de ce format: + + make :default + +Par exemple, pour compiler un firmware pour une Clueboard 66%, vous utiliserez: + + make clueboard/66/rev3:default + +Une fois ceci fait, vous devriez avoir beaucoup d'information dans votre sortie qui devrait se terminer par quelque chose de similaire à ça: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# Créer votre Keymap + +Vous êtes maintenant prêt à créer votre propre keymap! Passez à l'étape [Compiler votre premier firmware](newbs_building_firmware.md) pour ce faire. diff --git a/docs/fr-fr/newbs_learn_more_resources.md b/docs/fr-fr/newbs_learn_more_resources.md new file mode 100644 index 0000000000..01b1c9e8eb --- /dev/null +++ b/docs/fr-fr/newbs_learn_more_resources.md @@ -0,0 +1,14 @@ +# Ressources d'apprentissage + +Ces ressources permettent de donner aux nouveaux membres de la communauté QMK plus de compréhension aux informations données dans la documentation Newbs. + +Ressources Git: + +* [Tutoriel général](https://www.codecademy.com/learn/learn-git) +* [Jeu Git pour apprendre avec des exemples](https://learngitbranching.js.org/) +* [Des ressources Git pour en savoir plus à propos de GitHub](getting_started_github.md) +* [Des ressources Git spécifiques à QMK](contributing.md) + +Ressources sur les lignes de commande: + +* [Bon tutoriel général sur la ligne de commande](https://www.codecademy.com/learn/learn-the-command-line) diff --git a/docs/fr-fr/newbs_testing_debugging.md b/docs/fr-fr/newbs_testing_debugging.md new file mode 100644 index 0000000000..680d7644ed --- /dev/null +++ b/docs/fr-fr/newbs_testing_debugging.md @@ -0,0 +1,102 @@ +# Test et débugage + +Une fois votre clavier configuré avec un firmware custom, vous êtes prêt à le tester. Avec un peu de chance, tout fonctionne parfaitement bien, dans le cas contraire, ce document vous aidera à trouver où se trouve le problème. + +## Tester + +Tester votre clavier est normalement assez simple. Appuyez chaque touche de votre clavier et assurez-vous qu'il envoie les touches auquel vous vous attendiez. Il existe même des programmes qui vous aideront à vérifier qu'aucune touche ne soit oubliée. + +Note: ces programmes ne sont ni fournis ni approuvés par QMK. + +* [QMK Configurator](https://config.qmk.fm/#/test/) (Web) +* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows seulement) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac seulement) +* [Keyboard Tester](http://www.keyboardtester.com) (Web) +* [Keyboard Checker](http://keyboardchecker.com) (Web) + +## Débuguer + +Votre clavier va envoyer des informations de débugage si vous avez `CONSOLE_ENABLE = yes` dans votre fichier `rules.mk`. Par défaut, la sortie est très limitée, mais vous pouvez activer le mode debug pour augmenter la quantité de sortie de débugage. Utilisez le keycode `DEBUG` dans votre keymap, utilisez la fonction [Commande](feature_command.md) pour activer le mode debug ou ajoutez le code suivant à votre keymap. + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### Débuguer avec QMK Toolbox + +Pour les plateformes compatibles, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) peut être utilisé pour afficher les messages de débugage pour votre clavier. + +### Débuguer avec hid_listen + +Vous préférez une solution basée sur le terminal? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), fourni par PJRC, peut aussi être utilisé pour afficher des messages de débugage. Des versions compilées pour Windows, Linux et MacOS sont disponibles. + + + +## Envoyer vos propres messages de débugage + +Parfois, il est utile d'afficher des messages de débugage depuis votre [code custom](custom_quantum_functions.md). Le faire est assez simple. Commencez par ajouter `print.h` au début de votre fichier: + + #include + +Une fois fait, vous pouvez utiliser les fonctions print suivantes: + +* `print("string")`: Affiche une simple chaîne de caractères. +* `uprintf("%s string", var)`: Affiche une chaîne de caractères formatée. +* `dprint("string")` Affiche une chaîne de caractère simple, mais uniquement lorsque le mode debug est activé. +* `dprintf("%s string", var)`: Affiche une chaîne de caractère formatée, mais uniquement lorsque le mode debug est activé. + +## Exemples de debugage + +Si dessous se trouve une liste d'exemples réels de débugage. Pour plus d'information, référez-vous à [Débuguer/Dépanner QMK](faq_debug.md). + +### A quelle position de la matrice se trouve cette activation de touche? + +Lors du portage ou lorsque vous essayez de diagnostiquer un problème de PCB, il est utile de savoir si une activation de touche est enregistrée correctement. Pour activer le log de ce scénario, ajoutez le code suivant à votre fichier keymaps `keymap.c`. + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +Exemple de sortie + +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### Combien de temps cela a pris pour une activation de touche? + +Lorsque vous testez des problèmes de performance, il peut être utile de savoir à quelle fréquence la matrice est scannée. Pour activer le log dans ce scénario, ajoutez la ligne suivante à votre fichier `config.h` de votre keymaps. + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +Exemple de sortie + +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index 268cc94c38..2721a9a031 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -112,21 +112,6 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro * The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations * You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work. -## Windows (Vista and Later) (Deprecated) - -These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended). - -1. If you have ever installed WinAVR, uninstall it. -2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. -3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). -4. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -5. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. -6. Open the `\util` folder. -7. Double-click on the `1-setup-path-win` batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. -8. Right-click on the `2-setup-environment-win` batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! - -If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder. - ## Docker If this is a bit complex for you, Docker might be the turnkey solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap: @@ -145,7 +130,7 @@ util/docker_build.sh There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: ```bash util/docker_build.sh keyboard:keymap:target -# For example: util/docker_build.sh planck/rev6:default:dfu-util +# For example: util/docker_build.sh planck/rev6:default:flash ``` If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index 75eafd42cc..d2596b2e2b 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -14,8 +14,8 @@ The full syntax of the `make` command is `::`, The `` means the following * If no target is given, then it's the same as `all` below * `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck. -* `dfu`, `teensy`, `avrdude` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. - * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`. +* `flash`, `dfu`, `teensy`, `avrdude`, `dfu-util`, or `bootloadHID` compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. + * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:flash`. * `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems. You can also add extra options at the end of the make command line, after the target @@ -31,7 +31,7 @@ Here are some examples commands * `make all:all` builds everything (all keyboard folders, all keymaps). Running just `make` from the `root` will also run this. * `make ergodox_infinity:algernon:clean` will clean the build output of the Ergodox Infinity keyboard. -* `make planck/rev4:default:dfu COLOR=false` builds and uploads the keymap without color output. +* `make planck/rev4:default:flash COLOR=false` builds and uploads the keymap without color output. ## `rules.mk` Options @@ -41,8 +41,6 @@ Set these variables to `no` to disable them, and `yes` to enable them. This allows you to hold a key and the salt key (space by default) and have access to a various EEPROM settings that persist over power loss. It's advised you keep this disabled, as the settings are often changed by accident, and produce confusing results that makes it difficult to debug. It's one of the more common problems encountered in help sessions. -Consumes about 1000 bytes. - `MOUSEKEY_ENABLE` This gives you control over cursor movements and clicks via keycodes/custom functions. @@ -67,8 +65,6 @@ To see the text, open `hid_listen` and enjoy looking at your printed messages. **NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files. -Consumes about 400 bytes. - `COMMAND_ENABLE` This enables magic commands, typically fired with the default magic key combo `LSHIFT+RSHIFT+KEY`. Magic commands include turning on debugging messages (`MAGIC+D`) or temporarily toggling NKRO (`MAGIC+N`). @@ -83,7 +79,7 @@ This allows the keyboard to tell the host OS that up to 248 keys are held down a `BACKLIGHT_ENABLE` -This enables your backlight on Timer1 and ports B5, B6, or B7 (for now). You can specify your port by putting this in your `config.h`: +This enables the in-switch LED backlighting. You can specify the backlight pin by putting this in your `config.h`: #define BACKLIGHT_PIN B7 @@ -125,11 +121,9 @@ Use this to debug changes to variable values, see the [tracing variables](unit_t This enables using the Quantum SYSEX API to send strings (somewhere?) -This consumes about 5390 bytes. - `KEY_LOCK_ENABLE` -This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes. +This enables [key lock](feature_key_lock.md). `SPLIT_KEYBOARD` diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md index 848a43a1f9..da26682d7f 100644 --- a/docs/getting_started_vagrant.md +++ b/docs/getting_started_vagrant.md @@ -1,16 +1,20 @@ # Vagrant Quick Start -This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter. +This project includes a `Vagrantfile` that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter. ## Requirements -Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion). +Using the `Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as a supported provider installed: -*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** `vagrant plugin install vagrant-vbguest` +* [VirtualBox](https://www.virtualbox.org/) (Version at least 5.0.12) + * Sold as 'the most accessible platform to use Vagrant' +* [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) + * The (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion +* [Docker](https://www.docker.com/) -Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below. +Other than having Vagrant, a suitable provider installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start an environment (either a virtual machine or container) that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below. -# Flashing the Firmware +## Flashing the Firmware The "easy" way to flash the firmware is using a tool from your host OS: @@ -19,3 +23,35 @@ The "easy" way to flash the firmware is using a tool from your host OS: * [Atmel FLIP](http://www.atmel.com/tools/flip.aspx) If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version. + +## Vagrantfile Overview +The development environment is configured to run the QMK Docker image, `qmkfm/base_container`. This not only ensures predictability between systems, it also mirrors the CI environment. + +## FAQ + +### Why am I seeing issues under Virtualbox? +Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** + +```console +vagrant plugin install vagrant-vbguest +``` + +### How do I remove an existing environment? +Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: + +```console +vagrant destroy +``` + +### What if I want to use Docker directly? +Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker: +```console +vagrant up --provider=docker +``` + +### How do I access the virtual machine instead of the Docker container? +Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image: + +```console +vagrant ssh -c 'sudo -i' +``` diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 25db9341b8..0e750f160a 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -1,19 +1,18 @@ -# Quantum Hand-Wiring Guide +# Hand-Wiring Guide -Parts list: -* *x* keyswitches (MX, Matias, Gateron, etc) -* *x* diodes -* Keyboard plate (metal, plastic, cardboard, etc) -* Wire (strained for wiring to the Teensy, anything for the rows/columns) -* Soldering iron set at 600ºF or 315ºC (if temperature-controlled) -* Rosin-cored solder (leaded or lead-free) -* Adequate ventilation/a fan -* Tweezers (optional) -* Wire cutters/snippers +## Preamble: How a Keyboard Matrix Works (and why we need diodes) -## How the Matrix Works (Why We Need Diodes) +The collapsible section below covers why keyboards are wired the way they are, as outlined in this guide. It isn't required reading to make your own hand wired keyboard, but provides background information. -The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example: +
+ +Click for details + +Without a matrix circuit each switch would require its own wire directly to the controller. + +Simply put, when the circuit is arranged in rows and columns, if a key is pressed, a column wire makes contact with a row wire and completes a circuit. The keyboard controller detects this closed circuit and registers it as a key press. + +The microcontroller will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example: Column 0 being scanned Column 1 being scanned x x @@ -100,30 +99,132 @@ Things act as they should! Which will get us the following data: The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS. -# The Actual Hand-Wiring +Further reading: +- [Wikipedia article](https://en.wikipedia.org/wiki/Keyboard_matrix_circuit) +- [Deskthority article](https://deskthority.net/wiki/Keyboard_matrix) +- [Keyboard Matrix Help by Dave Dribin (2000)](https://www.dribin.org/dave/keyboard/one_html/) +- [How Key Matrices Works by PCBheaven](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) (animated examples) +- [How keyboards work - QMK documentation](how_keyboards_work.md) -## Getting Things in Place +
-When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards. -To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns. +## Parts list -Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps. +You will need: (where *x* is the number of keys on your planned keyboard) -Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy. +* QMK compatible microcontroller board (Teensy, Pro-Micro, QMK Proton C etc.) +* *x* keyswitches (MX, Matias, Gateron, etc) +* *x* through hole diodes +* Keyboard plate and plate mount stabilisers +* Wire +* Soldering iron +* Rosin-cored solder +* Adequate ventilation/a fan +* Wire cutters/snippers -## Preparing the Diodes +Optional but useful: -It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads): +* Wire strippers/a sharp knife +* Tweezers and/or small needle nose pliers +* Soldering station/Helping hands -``` - ┌─────┬─┐ - ───┤ │ ├─┐ - └─────┴─┘ │ - │ -``` +## Starting the build -We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row. +There are many ways to hand wire a PCB matrix, this guide will describe the fundamentals as well as some recommended ways to go about it. + +As we are dealing with hand wiring, it is assumed that you already have a plate. If you are planning a completely custom layout, tools such as [ai03 Plate Generator](https://kbplate.ai03.me/) and [Swillkb Plate & Case Builder](http://builder.swillkb.com/) can help when designing one. + +Start by installing the switches and stabilisers in the plate. Depending on the thickness and material this may also involve hot gluing it in place. + +## Planning the matrix + +If you are following a pre-existing handwire guide (e.g. for the keyboards in the [handwire firmware section](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired) you can skip this step, just ensure you wire the matrix as described. + +What you want to achieve is one leg from each switch being attached to the corresponding switches next to it (rows) and the other leg being attached to the switches above and below it (columns) and a diode to one of the legs, mosy commonly this will be the leg attached to the rows, and the diode will face away from it (Column to Row) i.e. with the wire furthest from the black line on the diode connected to the switch (as current will only travel in one direction through a diode) + +It is fairly simple to plan for an ortholinear keyboard (like a Planck). + +![Example planck matrix](https://i.imgur.com/FRShcLD.png) +Image from [RoastPotatoes' "How to hand wire a Planck"](https://blog.roastpotatoes.co/guide/2015/11/04/how-to-handwire-a-planck/) + +But the larger and more complicated your keyboard, the more complex the matrix. [Keyboard Firmware Builder](https://kbfirmware.com/) can help you plan your matrix layout (shown here with a basic fullsize ISO keyboard imported from [Keyboard Layout Editor](http://www.keyboard-layout-editor.com). + +![Example ISO matrix](https://i.imgur.com/UlJ4ZDP.png) + + Bear in mind that the number of rows plus the number of columns can not exceed the number of I/O pins on your controller. So the fullsize matrix shown above would be possible on a Proton C or Teensy++, but not on a regular Teensy or Pro Micro + +#### Common Microcontroller Boards + +| Board | Controller | # I/O | Pinout | +| :------------ |:-------------:| ------:| ------ | +| Pro Micro* | ATmega32u4 | 20 | [link](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro#Teensy++_2.0) | +| Teensy 2.0 | ATmega32u4 | 25 | [link](https://www.pjrc.com/teensy/pinout.html) | +| [QMK Proton C](https://qmk.fm/proton-c/) | STM32F303xC | 36 | [link 1](https://i.imgur.com/RhtrAlc.png), [2](https://deskthority.net/wiki/QMK_Proton_C) | +| Teensy++ 2.0 | AT90USB1286 | 46 | [link](https://www.pjrc.com/teensy/pinout.html#Teensy_2.0) | + +*Elite C is essentially the same as a pro micro with a USB-C instead of Micro-USB + +There are also a number of boards designed specifically for handwiring that mount directly to a small number of switches and offer pinouts for the rest. Though these are generally more expensive and may be more difficult to get hold of. + +Postage board mini mounted in place + +| Board | Controller | # I/O | +| :------------ |:-------------:| ------:| +| [Swiss helper](https://www.reddit.com/r/MechanicalKeyboards/comments/8jg5d6/hand_wiring_this_might_help/) | ATmega32u4 | 20 | +| [Postage board](https://github.com/LifeIsOnTheWire/Postage-Board/)| ATmega32u4| 25 | +| [Postage board mini](https://geekhack.org/index.php?topic=101460.0)| ATmega32u4| 25 | + +## Wiring the matrix + +There is no one right way to do this. What you want to achieve is good connection at all of the joints planned and no unintentional shorts. + +Established materials and techniques include: + +| Technique | Examples | Pros | Cons | Image +| :-----------| :------- | :------ | :--- | :--- +| Lengths of wire with stripped segments | [Sasha Solomon's Dactyl](https://medium.com/@sachee/building-my-first-keyboard-and-you-can-too-512c0f8a4c5f) and [Cribbit's modern hand wire](https://geekhack.org/index.php?topic=87689.0) | Neat and tidy | Some effort in stripping the wire | ![Stripped wire](https://i.imgur.com/0GNIYY0.jpg) +| Short lengths of wire | [u/xicolinguada's ortho build](https://www.reddit.com/r/MechanicalKeyboards/comments/c39k4f/my_first_hand_wired_keyboard_its_not_perfect_but/) | Easier to strip the wire | More difficult to place | ![individual wire lengths](https://i.imgur.com/mBe5vkL.jpg) +| Magnet/Enamelled wire | [Brett Kosinski's handwired alpha](http://blog.b-ark.ca/Blog-2019-01-27) and [fknraiden's custom board](https://geekhack.org/index.php?topic=74223.0) | Can be directly soldered onto (insulation burns off with heat) | Appearance? | ![Magnet wire](https://i.imgur.com/b4b7KDb.jpg) +| Bending the legs of the diodes for the rows | [Matt3o's Brownfox](https://deskthority.net/viewtopic.php?f=7&t=6050) | Fewer solder joints required | Uninsulated | ![Bent diode legs](https://i.imgur.com/aTnG8TV.jpg) +| Using ridid wiring (e.g. brass tube) | [u/d_stilgar's invisible hardline](https://www.reddit.com/r/MechanicalKeyboards/comments/8aw5j2/invisible_hardline_keyboard_progress_update_april/) and [u/jonasfasler's first attempt](https://www.reddit.com/r/MechanicalKeyboards/comments/de1jyv/my_first_attempt_at_handwiring_a_keyboard/) | Very pretty | More difficult. No physical insulation | ![Hardline hand wire](https://i.imgur.com/CnASmPo.jpg) +| Bare wire with insulation added after (e.g. kapton tape) | [Matt3o's 65% on his website](https://matt3o.com/hand-wiring-a-custom-keyboard/) | Easier (no wire stripping required) | Not as attractive | ![Bare wire](https://i.imgur.com/AvXZShD.jpg) +| Copper tape | [ManuForm Dactyl](https://github.com/tshort/dactyl-keyboard) | Very easy | Only really works when your plate/case aligns with the bottom of your switches | ![Copper tape](https://i.imgur.com/RFyNMlL.jpg) + + +Note that these methods can be combined. Prepare your lengths of wire before moving on to soldering. + + +### A note on split keyboards + +If you are planning a split keyboard (e.g. Dactyl) each half will require a controller and a means of communicating between them (like a TRRS or hardwired cable). Further information can be found in the [QMK split keyboard documentation.](feature_split_keyboard.md) + + +### Soldering + +There are a lot of soldering guides and tips available elsewhere but here are some of the most useful and relevant for hand wiring: + +To ensure a strong solder joint you want a good amount of contact between the solder and the 2 peices of metal you are connecting, a good way of doing this (though not required) is looping around pins or twisting wires together before applying solder. + +Looped around rod Looped diode leg + +If your diodes are on a packaging strip and need a bend in them (either the start of a loop or for connecting to its neighbour) this can easily done by bending it over something straight like the edge of a box, table, or ruler. This also helps keep track of the direction of the diode as all the bends will be on the same side. + +Bent diode legs + +If your iron has temperature control, set it to 315ºC (600ºF). + +Once heated, tin your soldering iron - this means melting a small amount of solder on the end of the iron and then quickly wiping it off on a wet sponge or wire cleaning pad, leaving a shiny silvery coating on the end which helps keep oxidisation at bay and helps solder to flow. + +When you come to apply the solder, hold the soldering iron against the two surfaces for a second to heat it, then apply a small amount of solder to join the two pieces together. Heating the surfaces ensures that the solder adheres to it and that it does not cool too quickly. + +Don't hold the iron on the solder/joint longer than necessary. Heat will be conducted through the surfaces and can damage components (melt switch housings etc.). Also, solder contains flux, which aids in ["wetting"](https://en.m.wikipedia.org/wiki/Wetting). The longer heat is applied to the solder the more flux will evaporate meaning you may end up with a bad solder joint with peaks which, apart from looking bad, may also increase the risk of electrical shorts. + +The following collapsible section describes in detail how to solder rows using the bent diode technique and columns using short lengths of wire. + +
+ +Click for details ## Soldering the Diodes @@ -169,34 +270,52 @@ Before beginning to solder, it helps to have your wire pre-bent (if using single If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes. -## Wiring Things to the Teensy +
-Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple. +# Wiring up the controller -The pins you'll absolutely have to avoid are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware. +Now that the matrix itself is complete, it's time to connect what you've done to the microcontroller board. -Place the Teensy where you plan to put it - you'll have to cut wires to length in the next step, and you'll want to make sure they reach. +Place the microcontroller where you want it to be located, give thought to mounting and case alignment. Bear in mind that the location of the USB socket can be different from the controller by using a short male to female cable if required,. -Starting with the first column on the right side, measure out how much wire you'll need to connect it to the first pin on the Teensy - it helps to pick a side that you'll be able to work down, to keep the wires from overlapping too much. It may help to leave a little bit of slack so things aren't too tight. Cut the piece of wire, and solder it to the Teensy, and then the column - you can solder it anywhere along the column, but it may be easiest at the keyswitch. Just be sure the wire doesn't separate from the keyswitch when soldering. +Find the pinout/documentation for your microcontroller board ([links here](#common-microcontroller-boards)) and make a note of all the digital I/O pins on it (note that on some controllers, like the teensy, analogue I/O can double as digital) as these are the pins you want to connect your wires to. -As you move from column to column, it'll be helpful to write the locations of the pins down. We'll use this data to setup the matrix in the future. +
-When you're done with the columns, start with the rows in the same process, from top to bottom, and write them all down. Again, you can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work. +Specific instructions for the Teensy 2.0 -As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain! + There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple. -## Additional guides +The pins you'll absolutely have to avoid, as with any controller, are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware. + +
+ +Cut wires to the length of the distance from the a point on each column/row to the controller. You can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work. + +Ribbon cable can be used to keep this extra tidy. You may also want to consider routing the wires beneath the exisiting columns/rows. + +Ribbon Cable + +As you solder the wires to the controller make a note of which row/column is going to which pin on the controller as we'll use this data to setup the matrix when we create the firmware. + +As you move along, be sure that the controller is staying in place - recutting and soldering the wires is a pain! -If you're more of a visual learner, or want some additional tips and something more to follow along, these two visual step by step guides may be helpful: -- [BrownFox's step by step guide](https://deskthority.net/viewtopic.php?f=7&t=6050) -- [Cribbit's modern hand wiring guide](https://geekhack.org/index.php?topic=87689.0) # Getting Some Basic Firmware Set Up -From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. +From here, you should have a working keyboard once you program a firmware. -To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free). +Simple firmware can be created easily using the [Keyboard Firmware Builder](https://kbfirmware.com/) website. Recreate your layout using [Keyboard Layout Editor](http://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, and the .zip of source files can be modified for advanced functionality and compiled locally using the method described in the collapsable section below, or using the more comprehensive [getting started guide.](newbs_getting_started) + + +
+ +Creating and compiling your firmware locally (command line method) + +To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free). The first thing we're going to do is create a new keyboard. In your terminal, run this command, which will ask you some questions and generate a basic keyboard project: @@ -319,9 +438,22 @@ Once everything is installed, running `make` in the terminal should get you some Once you have your `.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards//` folder, and select the `.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go! +
+ +## Flashing the Firmware + +Install [QMK toolbox](https://github.com/qmk/qmk_toolbox). + +![QMK Toolbox](https://i.imgur.com/86Cz30H.png) + +Under "Local File" navigate to your newly created .hex file. Under "Microcontroller", select the corresponding one for your controller board (common ones available [here](#common-microcontroller-boards)). + +Plug in your keyboard and press the reset button (or short the Reset and Ground pins if there is no button) and click the "Flash" button in QMK toolbox. + + ## Testing Your Firmware -Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys: +Use a website such as [keyboard tester](https://www.keyboardtester.com/tester.html)/[keyboard checker](http://keyboardchecker.com/) or just open a text editor and try typing - you should get the characters that you put into your keymap. Test each key, and make a note of the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys: 0. Flip the keyboard back over and short the keyswitch's contacts with a piece wire - this will eliminate the possibility of the keyswitch being bad and needing to be replaced. 1. Check the solder points on the keyswitch - these need to be plump and whole. If you touch it with a moderate amount of force and it comes apart, it's not strong enough. @@ -330,11 +462,25 @@ Carefully flip your keyboard over, open up a new text document, and try typing - 4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides. 5. Check the `.h` file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable. 6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly. +7. Use a multimeter to check that the switch is actually closing when actuated (completing the circuit when pressed down). If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end. -# Securing the Teensy, Finishing Your Hardware, Getting Fancier Firmware +# Finishing up + +Once you have confirmed that the keyboard is working, if you have used a seperate (non handwire specific) controller you will want to secure it in place. This can be done in many different ways e.g. hot glue, double sided sticky tape, 3D printed caddy, electrical tape. + +If you found this fullfilling you could experiment by adding additional features such as [in switch LEDs](https://geekhack.org/index.php?topic=94258.0), [in switch RGB](https://www.reddit.com/r/MechanicalKeyboards/comments/5s1l5u/photoskeyboard_science_i_made_a_handwired_rgb/), [RGB underglow](https://medium.com/@DavidNZ/hand-wired-custom-keyboard-cdd14429c7b3#.7a1ovebsk) or even an [OLED display!](https://www.reddit.com/r/olkb/comments/5zy7og/adding_ssd1306_oled_display_to_your_build/) + +There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards to see how people use all of them. You can always stop by [the OLKB subreddit](http://reddit.com/r/olkb) or [QMK Discord](https://discord.gg/Uq7gcHh) for help! + +# Links to other guides: + +- [matt3o's step by step guide (BrownFox build)](https://deskthority.net/viewtopic.php?f=7&t=6050) also his [website](https://matt3o.com/hand-wiring-a-custom-keyboard/) and [video guide](https://www.youtube.com/watch?v=LVzpsjFWPP4) +- [Cribbit's "Modern hand wiring guide - stronger, cleaner, easier"](https://geekhack.org/index.php?topic=87689.0) +- [Sasha Solomon's "Building my first Keyboard"](https://medium.com/@sachee/building-my-first-keyboard-and-you-can-too-512c0f8a4c5f) +- [RoastPotatoes' "How to hand wire a Planck"](https://blog.roastpotatoes.co/guide/2015/11/04/how-to-handwire-a-planck/) +- [Masterzen's "Handwired keyboard build log"](http://www.masterzen.fr/2018/12/16/handwired-keyboard-build-log-part-1/) + -Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. -There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index 7c28ab6dbc..697c55d2a8 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -1,6 +1,6 @@ # Keyboards with AVR Processors -This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCU's that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today. +This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCUs that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today. If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK. @@ -78,7 +78,7 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r #define DESCRIPTION A custom keyboard ``` -?> Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. ?> On Linux these values will not be visible in lsusb by default, since Linux takes the information from the list maintained by [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. lsusb will show the information reported by the device when executed with -v option. It is also present in kernel logs after plugging in the device. +?> Windows and macOS will display the `MANUFACTURER` and `PRODUCT` in the list of USB devices. `lsusb` on Linux instead takes these from the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. `lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in. ### Keyboard Matrix Configuration @@ -125,7 +125,7 @@ To configure a keyboard where each switch is connected to a separate pin and gro ### Backlight Configuration -By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md). +QMK supports backlighting on most GPIO pins. A select few of these can be driven by the MCU in hardware. For more details see the [Backlight Documentation](feature_backlight.md). ```c #define BACKLIGHT_PIN B7 @@ -134,8 +134,6 @@ By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are us #define BREATHING_PERIOD 6 ``` -?> You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details. - ### Other Configuration Options There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details. diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 023e92982c..1651877957 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -20,9 +20,9 @@ Support for SSD1306 based OLED displays. For more information see the [OLED Driv ## uGFX -You can make use of uGFX within QMK to drive character and graphic LCD's, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. +You can make use of uGFX within QMK to drive character and graphic LCDs, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. -## WS2812 (AVR Only) +## WS2812 Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index c8aec40e07..5d9968f6d7 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -67,7 +67,7 @@ The presence of this file means that the folder is a keyboard target and can be ### `` -This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxillary hardware this file can be blank. +This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxiliary hardware this file can be blank. The following functions are typically defined in this file: diff --git a/docs/he-il/README.md b/docs/he-il/README.md new file mode 100644 index 0000000000..db0ad43c3c --- /dev/null +++ b/docs/he-il/README.md @@ -0,0 +1,34 @@ +
+# קושחה עבור Quantum Mechanical Keyboard + +[![גירסה נוכחית](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![מצב הבניה](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![ערוץ דיסקורד](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![מצב מסמכים](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![תומכי GitHub](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![מזלגות GitHub](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## מה היא קושחת QMK? + +QMK (*Quantum Mechanical Keyboard*) היא קהילת קוד פתוח (open source) שמתחזקת את קושחת QMK, QMK Toolbox, qmk.fm, והמסמכים המתאימים. קושחת QMK היא קושחה עבור מקלדות המבוססת על [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) עם כמה תוספות עבור בקרי Atmel AVR ובאופן ספציפי יותר - [מוצרי OLKB](http://olkb.com), מקלדת [ErgoDox EZ](http://www.ergodox-ez.com), וגם [מוצרי Clueboard](http://clueboard.co/). בנוסף, הקושחה עברה פורט עבור שבבי ARM באמצעות ChibiOS. ניתן להשתמש בה על מנת להפעיל את מקלדות ה PCB המקוסטמות שלך. + +## איך להשיג אותה + +אם אתם מתכננים לתרום מיפוי מקשים, מקלדת או יכולת ל QMK, הדבר הקל ביותר הוא [לעשות פורק לריפו בGithub](https://github.com/qmk/qmk_firmware#fork-destination-box), ולעשות קלון לריפו בסביבה המקומית ושם לבצע את השינויים שלכם, לדחוף אותם ולפתוח [Pull Request](https://github.com/qmk/qmk_firmware/pulls) מהפורק שלך. + +אחרת, אפשר להוריד את הקושחה באופן ישיר ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), או לשכפל אותה באמצעות git (`git@github.com:qmk/qmk_firmware.git`), או https (`https://github.com/qmk/qmk_firmware.git`). + +## איך לקמפל + +לפני שתצליחו לקמפל, תדרשו [להתקין סביבה](getting_started_build_tools.md) עבור פיתוח AVR ו/או ARM. ברגע שהדבר בוצע, תוכלו להריץ פקודת `make` כדי לבנות מקלדת ומיפוי עם התחביר הבא: + + make planck/rev4:default + +כך תוכלו לבנות את גרסא `rev4` של ה `planck` עם מיפוי ברירת המחדל (`default`). לא כל המקלדות בעלות גרסאות (נקרא גם תת-פרוייקט או תיקייה), במקרה כזה, אפשר להריץ את הפקודה הבאה: + + make preonic:default + +## איך להתאים + +לQMK יש המון [יכולות](features.md) שאפשר לנווט בהן, וכמות נכבדת של [תיעוד ודוקומנטציה](http://docs.qmk.fm) בה אפשר לנבור. רוב הפיצ׳רים באים לידי ביטוי על ידי שינוי [מיפוי המקלדת](keymap.md) ושינוי [קודי המקשים](keycodes.md). +
diff --git a/docs/he-il/_summary.md b/docs/he-il/_summary.md new file mode 100644 index 0000000000..acc0546d09 --- /dev/null +++ b/docs/he-il/_summary.md @@ -0,0 +1,138 @@ +
+**בשפה העברית** +* [המדריך המלא למתחילים](newbs.md) + * [מקורות ללמידה](he-il/newbs_learn_more_resources.md) +* [בסיס QMK](he-il/README.md) + * [מבוא לQMK](he-il/getting_started_introduction.md) + * [איך להשתמש בGithub](he-il/getting_started_github.md) + * [קבלת עזרה](he-il/getting_started_getting_help.md) +* [שאלות נפוצות](he-il/faq.md) + * [שאלות נפוצות כלליות](he-il/faq_general.md) +* [חומרה](he-il/hardware.md) +* התייחסויות + * [איך לתעד נכון](he-il/documentation_best_practices.md) + +**בשפה האנגלית** +* [המדריך המלא למתחילים](newbs.md) + * [התחלה](newbs_getting_started.md) + * [בנייה של הקושחה הראשונה שלך](newbs_building_firmware.md) + * [צריבה של הקושחה](newbs_flashing.md) + * [בדיקות ודיבאגינג](newbs_testing_debugging.md) + * [עבודה נכונה ב GIT](newbs_best_practices.md) + * [מקורות ללמידה](newbs_learn_more_resources.md) + +* [בסיס QMK](README.md) + * [מבוא לQMK](getting_started_introduction.md) + * [QMK CLI](cli.md) + * [QMK CLI Config](cli_configuration.md) + * [תרומה ל QMK](contributing.md) + * [איך להשתמש בGithub](getting_started_github.md) + * [קבלת עזרה](getting_started_getting_help.md) + +* [שינויים משמעותיים](breaking_changes.md) + * [2019 Aug 30](ChangeLog/20190830.md) + +* [שאלות נפוצות](faq.md) + * [שאלות נפוצות כלליות](faq_general.md) + * [בנייה/קומפילציה של QMK](faq_build.md) + * [דיבאגינג ופתרון תקלות של QMK](faq_debug.md) + * [מיפוי מקשים](faq_keymap.md) + * [התקנת דרייברים עם Zadig](driver_installation_zadig.md) + +* מדריכים מפורטים + * [התקנת כלי Build](getting_started_build_tools.md) + * [מדריך Vagrant](getting_started_vagrant.md) + * [הוראות בנייה/קומפילציה](getting_started_make_guide.md) + * [צריבת קושחה](flashing.md) + * [התאמה אישית של הפונקציונאליות](custom_quantum_functions.md) + * [מיפוי מקשים](keymap.md) + +* [חומרה](hardware.md) + * [מעבדי AVR](hardware_avr.md) + * [דרייברים](hardware_drivers.md) + +* התייחסויות + * [מדריך למקלדות](hardware_keyboard_guidelines.md) + * [אפשרויות הגדרות](config_options.md) + * [קודי מקשים](keycodes.md) + * [קונבנציות קוד - C](coding_conventions_c.md) + * [קונבנציות קוד - Python](coding_conventions_python.md) + * [איך לתעד נכון](documentation_best_practices.md) + * [טמפלטים לדוקומנטציה](documentation_templates.md) + * [מילון](reference_glossary.md) + * [בדיקות יחידה](unit_testing.md) + * [פונקציות שימושיות](ref_functions.md) + * [תמיכה בConfigurator](reference_configurator_support.md) + * [פורמט info.json](reference_info_json.md) + * [פיתוח בPython CLI](cli_development.md) + +* [תכונות](features.md) + * [Basic Keycodes](keycodes_basic.md) + * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) + * [Quantum Keycodes](quantum_keycodes.md) + * [Advanced Keycodes](feature_advanced_keycodes.md) + * [Audio](feature_audio.md) + * [Auto Shift](feature_auto_shift.md) + * [Backlight](feature_backlight.md) + * [Bluetooth](feature_bluetooth.md) + * [Bootmagic](feature_bootmagic.md) + * [Combos](feature_combo.md) + * [Command](feature_command.md) + * [Debounce API](feature_debounce_type.md) + * [DIP Switch](feature_dip_switch.md) + * [Dynamic Macros](feature_dynamic_macros.md) + * [Encoders](feature_encoders.md) + * [Grave Escape](feature_grave_esc.md) + * [Haptic Feedback](feature_haptic_feedback.md) + * [HD44780 LCD Controller](feature_hd44780.md) + * [Key Lock](feature_key_lock.md) + * [Layouts](feature_layouts.md) + * [Leader Key](feature_leader_key.md) + * [LED Matrix](feature_led_matrix.md) + * [Macros](feature_macros.md) + * [Mouse Keys](feature_mouse_keys.md) + * [OLED Driver](feature_oled_driver.md) + * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) + * [Pointing Device](feature_pointing_device.md) + * [PS/2 Mouse](feature_ps2_mouse.md) + * [RGB Lighting](feature_rgblight.md) + * [RGB Matrix](feature_rgb_matrix.md) + * [Space Cadet](feature_space_cadet.md) + * [Split Keyboard](feature_split_keyboard.md) + * [Stenography](feature_stenography.md) + * [Swap Hands](feature_swap_hands.md) + * [Tap Dance](feature_tap_dance.md) + * [Terminal](feature_terminal.md) + * [Thermal Printer](feature_thermal_printer.md) + * [Unicode](feature_unicode.md) + * [Userspace](feature_userspace.md) + * [Velocikey](feature_velocikey.md) + +* למייקרים ומודרים + * [מדריך לכתיבה ידנית](hand_wire.md) + * [מדריך לצריבת ISP](isp_flashing_guide.md) + * [מדריך לדיבאגינג ARM](arm_debugging.md) + * [מנהל התקן I2C](i2c_driver.md) + * [בקרת GPIO](internals_gpio_control.md) + * [המרת Proton C](proton_c_conversion.md) + +* להבנה עמוקה יותר + * [איך עובדות מקלדות](how_keyboards_work.md) + * [להבין את QMK](understanding_qmk.md) + +* נושאים נוספים + * [שימוש ב - Eclipse עם QMK](other_eclipse.md) + * [שימוש ב - VSCode עם QMK](other_vscode.md) + * [תמיכה](support.md) + * [כיצד להוסיף תרגום](translating.md) + +* QMK מבפנים (בתהליך) + * [Defines](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Midi Device](internals_midi_device.md) + * [Midi Device Setup Process](internals_midi_device_setup_process.md) + * [Midi Util](internals_midi_util.md) + * [Send Functions](internals_send_functions.md) + * [Sysex Tools](internals_sysex_tools.md) + +
diff --git a/docs/he-il/becoming_a_qmk_collaborator.md b/docs/he-il/becoming_a_qmk_collaborator.md new file mode 100644 index 0000000000..4c14441bdb --- /dev/null +++ b/docs/he-il/becoming_a_qmk_collaborator.md @@ -0,0 +1,11 @@ +
+# איך להפוך לשותף של QMK + +שותף של QMK הוא יצרן מקלדות או מעצב שמעוניין בלעזור ל-QMK לגדול ולתמוך במקלד(ו)ת שלהם, ולעודד את המשתמשים והצרכנים להוסיף יכולות, רעיונות ומיפויים. אנחנו תמיד מחפשים עוד מקלדות ומשתפי פעולה, אבל אנחנו מבקשים שיעמדו בדרישות הבאות: + +* **קיום לוח PCB למכירה.** לצערינו, יש יותר מידי הסתבכויות ובעיות עם מקלדות המחווטות ידנית. +* **תחזוק המקלדת ב-QMK.** זה אולי רק ידרוש הגדרה בסיסית כדי לגרום למקלדת לעבוד, אבל זה גם יכול לכלול התאמה של שינויים בקוד הליבה של QMK שיכול לשבור קוד ייחודי שלכם. +* **אישור ומיזוג Pull Requests של מיפויי מקלדת עבור המקלדת** אנחנו רוצים לעודד משתמשים לתרום את מיפויי המקלדת שלהם לאחרים כדי לעזור לאחרים להתחיל ליצור את שלהם. + +אם אתם עומדים בדרישות הללו, שלחו לנו מייל לכתובת hello@qmk.fm עם מבוא וקישורים עבור המקלדת שלכם. +
\ No newline at end of file diff --git a/docs/he-il/documentation_best_practices.md b/docs/he-il/documentation_best_practices.md new file mode 100644 index 0000000000..90c4a137a0 --- /dev/null +++ b/docs/he-il/documentation_best_practices.md @@ -0,0 +1,67 @@ +
+# איך לתעד נכון + +עמוד זה קיים כדי לתעד את השיטות הטובות ביותר כאשר כותבים תיעוד עבור QMK. מעקב אחר הוראות אלה יעזור לשמור על סגנון וטון עקביים, אשר בתורם יעזרו לאנשים אחרים להבין טוב יותר את QMK. + +# פתיחת עמוד + +התיעוד שלך צריך בד״כ להפתח עם כותרת בגודל H1, אחריה פסקה אחת של תיאור של מה המשתמש ימצא בעמוד זה. +זכור כי כותרת זו והפסקה ימוקמו ליד תוכן העניינים, אז חשוב לשמור על כותרת קצרה ולהמנע ממשפטים ארוכים ללא פיסוק. + +לדוגמה: + +``` +# הכותרת שלי + +עמוד זה מדבר על היכולת הסופר-מגניבה שלי. אתה יכול להשתמש ביכולת זו כדי להכין קפה, לסחוט תפוזים ולקבל משלוח של ביצים ועוגות מהסופר הקרוב באמצעות רחפן. +``` + +# כותרות + +עמוד התיעוד צריך לאופן כללי לכלול מס׳ כותרות בגודל "H1". רק כותרות מגודל H1 ו- H2 יכללו בתוכן העניינים, אז חשוב לתכנן אותם בהתאם. הכותרות לא להיות רחבות מידי כדי למנוע מתוכן העניינים להפוך להיות רחב מידי + +# בלוקי רמיזה מעוצבים + +ניתן להוסיף בלוקי רמיזה מעוצבים שמצויירים מסביב לטקסט כדי למשוך תשומת לב אליו. + +### חשוב + +``` +!> זה חשוב +``` + +יתרנדר כ: + +!> זה חשוב + +### טיפים כלליים + +``` +?> זהו טיפ שימושי. +``` + +יתרנדר כ: + +?> זהו טיפ שימושי. + + +# תיעוד יכולות ופיצ׳ריםDocumenting Features + +אם יוצרים יכולת חדשה ב QMK, צרו עמוד תיעוד עבורה. העמוד לא צריך להיות ארוך במיוחד, מספר משפטים המתארים את היכולת (פיצ׳ר) וטבלה המתארת קודי מקשים רלוונטיים זה מספיק. הנה דוגמה בסיסית: + +```markdown +# הפיצ׳ר המגניב שלי + +עמוד זה מדבר על היכולת הסופר-מגניבה שלי. אתה יכול להשתמש ביכולת זו כדי להכין קפה, לסחוט תפוזים ולקבל משלוח של ביצים ועוגות מהסופר הקרוב באמצעות רחפן. + +## קודי המקשים המגניבים של היכולת שלי + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_COFFEE||Make Coffee| +|KC_CREAM||Order Cream| +|KC_SUGAR||Order Sugar| +``` + +מקמו את התיעוד שלכם בתוך `docs/feature_.md`, והוסיפו קישור לקובץ זה במקום המתאים ב `docs/_sidebar.md`. אם הוספתם קודי מקשים נוספים, תקפידו להוסיף אותם ל- `docs/keycodes.md` עם לינק לעמוד היכולת שלכם. +
\ No newline at end of file diff --git a/docs/he-il/faq.md b/docs/he-il/faq.md new file mode 100644 index 0000000000..88ea07fbe7 --- /dev/null +++ b/docs/he-il/faq.md @@ -0,0 +1,8 @@ +
+# שאלות נפוצות + +* [כללי](faq_general.md) +* [בנייה או קומפילציה של QMK](faq_build.md) +* [דיבאגינג ופתרון בעיות של QMK](faq_debug.md) +* [מיפוי מקשים](faq_keymap.md) +
\ No newline at end of file diff --git a/docs/he-il/faq_general.md b/docs/he-il/faq_general.md new file mode 100644 index 0000000000..26286d552f --- /dev/null +++ b/docs/he-il/faq_general.md @@ -0,0 +1,17 @@ +
+# שאלות נפוצות + +## מה זה QMK? + +[QMK](https://github.com/qmk), קיצור עבור Quantum Mechanical Keyboard, הוא קבוצה של אנשים הבונים כלים עבור מקלדות מותאמות אישית. התחלנו עם [קושחת QMK](https://github.com/qmk/qmk_firmware), פורק של [TMK](https://github.com/tmk/tmk_keyboard) אשר שונה באופן ניכר. + +## מה ההבדלים העיקריים בין QMK ו-Keymap TMK? + +TMK עוצב ומומש במקור ע״י [Jun Wako](https://github.com/tmk). QMK התחיל כפורק של [Jack Humbert](https://github.com/jackhumbert) של הפרוייקט של TMK עבור Planck. אחרי כמה זמן הפורק של ג׳ק השתנה מזה של TMK וב- 2015 ג׳ק החליט לשנות את שמו של הפורק ל- QMK. + +מנק׳ מבט טכנית, QMK נבנה על גבי TMK ע״י הוספת יכולות ופיצ׳רים חדשים. ראוי לציון ש- QMK הרחיב את מס׳ קודי המקלדת האפשריים ומשתמש בהם למימוש יכולות מתקדמות כמו `S()`, `LCTL()`, ו- `MO()`. ניתן לראות רשימה מלאה של קודי המקלדת האלה ב - [קודי מקלדת](keycodes.md). + +מנק׳ מבט של הפרוייקט וניהול הקהילה, TMK מנהל את כל המקלדות הנתמכות בעצמו, עם מעט תמיכה מהקהילה. כל אחד יכול לעשות פורק מהפרוייקט עבור מקלדות אחרות. רק מס׳ מיפויי מקשים נמצאים בברירת המחדל כך שאנשים בד״כ לא משתפים מיפויי מקשים זה עם זה. QMK מעודד את השיתוף של המקלדות וקודי המקשים דרך רפוזיטורי בניהול מרכזי, אשר מקבל את כל בקשות ה- Pull Requests שעומדות בסטנדרט האיכות. רובם מנוהלות ע״י הקהילה, אבל הצוות של QMK עוזר כשנדרש. + +לשתי הגישות יש יתרונות וחסרונות וקוד עובר בחופשיות בין TMK ל- QMK כשצריך. +
\ No newline at end of file diff --git a/docs/he-il/getting_started_getting_help.md b/docs/he-il/getting_started_getting_help.md new file mode 100644 index 0000000000..1a2edc3133 --- /dev/null +++ b/docs/he-il/getting_started_getting_help.md @@ -0,0 +1,17 @@ +
+# קבלת עזרה + +ישנם משאבים רבים לצורך קבלת עזרה עם QMK. + +## צ׳אט בזמן אמת + +אפשר למצוא מפתחי QMK ומשתמשים [בשרת ה-Discord הראשי שלנו](https://discord.gg/Uq7gcHh). ישנם ערוצים ספציפיים בשרת לצורך שיחות על הקושחה, ארגז הכלים, חומרה והמגדיר. + +## סאב-רדיט OLKB + +הפורום הרשמי של QMK נמצא ב - [/r/olkb](https://reddit.com/r/olkb) באתר [reddit.com](https://reddit.com). + +## סוגיות Github + +ניתן לפתוח [סוגייה ב-GitHub](https://github.com/qmk/qmk_firmware/issues). הדבר שימושי במיוחד כאשר הסוגיה דורשת דיון עמוק וארוך או דיבאגינג. +
\ No newline at end of file diff --git a/docs/he-il/getting_started_github.md b/docs/he-il/getting_started_github.md new file mode 100644 index 0000000000..55602c8142 --- /dev/null +++ b/docs/he-il/getting_started_github.md @@ -0,0 +1,69 @@ +
+# איך להשתמש ב-Github עם QMK + +Github עלול להיות קצת טריקי למי שלא מכיר את העבודה איתו - מדריך זה ילווה אתכם שלב אחר שלב דרך ביצוע פעולות fork, clone ו-pull request עם QMK. + +?> מדריך זה מניח שאתם מרגישים בנוח עם הרצה של פקודות בסביבת command line (שורת הפקודה) ו-git מותקן במערכת שלכם. + +התחילו ב- [עמוד של QMK ב-Github](https://github.com/qmk/qmk_firmware), ותצמאו כפתור בחלק העליון מימין עם התיכוב "Fork": + +![Fork ב-Github](http://i.imgur.com/8Toomz4.jpg) + +אם אתם חלק מארגון, תצטרכו לבחור לאיזה חשבון לבצע פעולת fork. ברוב המבקרים, תרצו לבצע fork לתוך החשבון הפרטי שלכם. ברגע שה-fork הסתיים (לפעמים זה יכול לקחת קצת זמן) הקליקו על כפתור ה-"Clone or Download": + +![הורדה מ-Github](http://i.imgur.com/N1NYcSz.jpg) + +תוודאו שאתם בוחרים באופצייה של "HTTPS", בחרו את הקישור והעתיקו אותו: + +![קישור HTTPS](http://i.imgur.com/eGO0ohO.jpg) + +מכאן והלאה, הקיש `git clone ` בשורת הפקודה והדביקו את הלינק שלכם: + +
+ +``` +user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +
+ +כעת, יש לכם את ה-fork של QMK על המכונה המקומית שלכם ואתם יכולים להוסיף את מיפויי המקשים שלכם, לקמפל את הפרוייקט ולצרוב אותו על הלוח שלכם. כשאתם שלמים עם השינוי שעשיתם, תוכלו להוסיף, לבצע פעולת commit ולדחוף את השינויים ל-fork שלכם באופן הבא: + +
+ +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +
+ +השינויים שלכם יופיעו ב-fork שלכם ב-GitHub - אם תחזרו לשם (`https://github.com//qmk_firmware`), תוכלו ליצור "Pull Request חדש" ע״י הקשה על הכפתור הבא: + +![Pull Request חדש](http://i.imgur.com/DxMHpJ8.jpg) + +כאן תוכלו לראות בדיוק למה עשיתם commit - אם הכל נראה תקין, תוכלו להשלים את הפעולה ע״י הקשה על "Create Pull Request": + +![צרו Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +אחרי שהגשתם, אנו עלולים לפנות אליכם לגבי השינויים שהצעתם, נבקש שתבצעו שינויים ובסופו של דבר נקבל את השינויים! תודה שתרמתם לפרוייקט QMK :) +
\ No newline at end of file diff --git a/docs/he-il/getting_started_introduction.md b/docs/he-il/getting_started_introduction.md new file mode 100644 index 0000000000..4b7f56b2a7 --- /dev/null +++ b/docs/he-il/getting_started_introduction.md @@ -0,0 +1,72 @@ +
+# מבוא + +עמוד זה מנסה להסביר את המידע הבסיסי אותו תדרשו לדעת כדי לעבוד עם פרוייקט QMK. הוא מניח שאתם יודעים איך לנווט בסביבת Unix Shell, אבל לא מניח שאתם מכירים את שפת C או קומפילציה באמצעות make. + +## מבנה QMK בסיסי + +QMK הוא פורק של הפרוייקט [tmk_keyboard](https://github.com/tmk/tmk_keyboard) של [Jun Wako](https://github.com/tmk). קוד הTMK המקורי, עם התאמות, יכול להמצא בתיקיית `tmk`. התוספות של QMK לפרוייקט יכולות להמצא בתיקיית `quantum`. פרוייקטי מקלדות יכולות להמצא בתיקיות `handwired` ו- `keyboard`. + +### מבנה אחסון המשתמש + +בתוך תיקיית `users` יש תיקייה לכל משתמש. זה המקום למשתמשים להוסיף קוד שהם רוצים להשתמש בו במקלדות שונות. מומלץ לעיין במסמך [תכונות אחסון המשתמש](feature_userspace.md) לקבלת מידע נוסף. + +### מבנה פרוייקט המקלדת + +בתוך תיקיית `keyboards`, תת התיקייה `handwired` ותת התיקיות של היצרן והמוכר, לדוגמה `clueboard` היא תיקייה לכל פרוייקט מקלדת - `qmk_firmware/keyboards/clueboard/2x1800` בתוך התיקייה הזאת תמצאו את המבנה הבא: + + +* `keymaps/`: מיפויי מקשים שונים היכולים להבנות +* `rules.mk`: קובץ המגדיר את הגדרות ברירת המחדל של `make`. נא לא לערוך את הקובץ ישירות, במקום זאת, השתמשו בקובץ מיפוי המקשים ספציפי `rules.mk`. +* `config.h`: הקובץ מכיל הגדרות לזמן הקומפילציה. נא לא לערוך את הקובץ ישירות אלא להשתמש בקובץ `config.h` לכל מיפויי מקשים. +* `info.json`: הקובץ מכיל הגדרות פריסה עבור QMK Configurator. צפו ב [תמיכת Configurator](reference_configurator_support.md) למידע נוסף. +* `readme.md`: סקירה כללית של המקלדת. +* `.h`: הקובץ בו פריסת המקלדת מוגדרת אל מול מטריצת המתגים של המקלדת. +* `.c`: הקובץ בו ניתן למצוא קוד מותאם למקלדת. + +למידע נוסף - אנא הכנסו ל [QMK](hardware_keyboard_guidelines.md). +For more information on project structure, see [QMK מדריך למקלדת](hardware_keyboard_guidelines.md). + +### מבנה מפיוי המקשים + +בכל ספריית מיפוי מקשים, הקבצים הבאים עלולים להמצא. רק הקובץ `keymap.c` הוא חובה, אם השאר לא נמצאים, אפשרויות ברירת המחדל יבחרו. +In every keymap folder, the following files may be found. Only `keymap.c` is required, and if the rest of the files are not found the default options will be chosen. + +* `config.h`: ההגדרות השונות עבור מיפוי המקשים. +* `keymap.c`: כל הקודים של מיפוי המקשים, קובץ חובה +* `rules.mk`: אילו יכולות של QMK מאופשרות. +* `readme.md`: הסבר על מיפוי המקשים, איך אחרים ישתמשו בו והסבר על היכולות. נא להעלות תמונות לשירותים כמו imgur. + +# קובץ `config.h` + +לקובץ `config.h` יש 3 מיקומים אפשריים: + +* keyboard (`/keyboards//config.h`) +* userspace (`/users//config.h`) +* keymap (`/keyboards//keymaps//config.h`) + +מערכת הבילד אוטומטית בוחרת את קובץ ההגדרות לפי הסדר הנ״ל. אם רוצים לדרוס הגדרה מסויימת שהוגדרה בקובץ `config.h` קודם, ראשית תצטרכו להשתמש בקוד מוכן עבור ההגדרות שאתם רוצים לשנות. + +
+ +``` +#pragma once +``` + +
+ +כדי לדרוס הגדרות מקובץ `config.h` קודם, אתם מוכרחים להשתמש בפקודת `#undef` ואז שוב `#define`. + +דוגמה לקוד כזה נראית כך: +
+ +``` +#pragma once + +// overrides go here! +#undef MY_SETTING +#define MY_SETTING 4 +``` + +
+
\ No newline at end of file diff --git a/docs/he-il/hardware.md b/docs/he-il/hardware.md new file mode 100644 index 0000000000..441792e031 --- /dev/null +++ b/docs/he-il/hardware.md @@ -0,0 +1,10 @@ +
+# חומרה + +QMK רצה על מגוון של חומרות. אם המעבד שלך יכול להיות ממוקד (מטורגט) ע״י [LUFA](http://www.fourwalledcubicle.com/LUFA.php) או [ChibiOS](http://www.chibios.com) כנראה שתוכל לגרום ל QMK לרוץ על המעבד. קטע זה מדבר על הרצת QMK, ותקשורת עם, סוגים שונים של חומרות. + +* [מדריך למקלדת](hardware_keyboard_guidelines.md) +* [מעבדי AVR](hardware_avr.md) +* מעבדי ARM (TBD) +* [מנהלי התקנים](hardware_drivers.md) +
\ No newline at end of file diff --git a/docs/he-il/newbs_learn_more_resources.md b/docs/he-il/newbs_learn_more_resources.md new file mode 100644 index 0000000000..8792a9de0a --- /dev/null +++ b/docs/he-il/newbs_learn_more_resources.md @@ -0,0 +1,16 @@ +
+# מקורות ללמידה + +המקורות הבאים מטרתם היא לתת למשתמשים חדשים בקהילת QMK כדי להבין לעומק את המידע שמגיע במסמכי המתחילים. + +מקורות גיט: + +* [מדריך כללי מעולה](https://www.codecademy.com/learn/learn-git) +* [משחק גיט כדי ללמוד מדוגמאות](https://learngitbranching.js.org/) +* [מקורות גיט כדי ללמוד עוד על GitHub](getting_started_github.md) +* [מקור גיט כדי ללמוד במפורש על QMK](contributing.md) + +מקורות לפקודות שורה (Command Line): + +* [מדריך טוב על Command Line](https://www.codecademy.com/learn/learn-the-command-line) +
\ No newline at end of file diff --git a/docs/he-il/proton_c_conversion.md b/docs/he-il/proton_c_conversion.md new file mode 100644 index 0000000000..9642ca3090 --- /dev/null +++ b/docs/he-il/proton_c_conversion.md @@ -0,0 +1,36 @@ +
+# המרה של לוח להשתמש ב-Proton C + +אם לוח נתמך ב-QMK משתמש בלוח Pro Micro (או כל לוח נתמך) ואתם רוצים להשתמש ב-Proton C, ניתן לייצר את החומרה ע"י הוספה של הפקודה `CONVERT_TO_PROTON_C=yes` (או `CTPC=yes`) לפקודת make, כמו כאן: +
+ +``` + make 40percentclub/mf68:default CTPC=yes +``` + +
+ניתן להוסיף את אותו ארגומנט לקובץ `rules.mk` במיפוי המקשים שלכם, שתיצור את אותה התוצאה. + +הדבר חושף את דגל `CONVERT_TO_PROTON_C` שניתן להשתמש בו בקוד שלכם באמצעות פקודת `#ifdef`, כמו כאן: +
+ +``` + #ifdef CONVERT_TO_PROTON_C + // Proton C code + #else + // Pro Micro code + #endif +``` + +
+לפני שתצליחו לקמפל, יכול להיות שתקבלו שגיאות שונות לגבי `PORTB/DDRB`, וכו' שלא הוגדרו, אם כך, תצטרכו להמיר את קודי המקלדת להשתמש ב - [בקרי GPIO](internals_gpio_control.md) שיעבדו עבור ARM וגם AVR. הדבר לא אמור להשפיע על הבילדים של AVR בכלל. + +ל-Proton C יש רק מנורת LED אחת על הלוח (C13), וכברירת מחדל, TXLED (D5) ממופה אליו. אם תרצו במקום, למפות אליו את RXLED (B0), הוסיפו את השורה הבא לקובץ `config.h`: +
+ +``` + #define CONVERT_TO_PROTON_C_RXLED +``` + +
+
diff --git a/docs/he-il/quantum_keycodes.md b/docs/he-il/quantum_keycodes.md new file mode 100644 index 0000000000..3ca545e977 --- /dev/null +++ b/docs/he-il/quantum_keycodes.md @@ -0,0 +1,35 @@ +
+# קודי מקלדת Quantum + +קודי מקלדת Quantum מאפשרים התאמה נוחה יותר של מיפוי המקשים שלך מעבר למה שהבסיסי מאפשר, ללא צורך בהגדרת של פעולות מותאמות אישית. + +כל קודי המקלדת בתוך quantum הם מספרים בין `0x0000` ֿֿֿ ל-`0xFFFF`. בתוך הקובץ `keymap.c` זה עלול להראות כאילו יש לך פונקציות ומקרים יחודיים נוספים, אבל בסופו של דבר הקדם-מעבד של שפת C יתרגם אלה לתוך מספר יחיד בין 4 בתים. QMK שמרה את מרחב הכתובות בין `0x0000` עד ל- `0x00FF` עבור קודי מקשים סטנדרטיים. קודי מקשים אלה, כגון `KC_A`, `KC_1`, ו- `KC_LCTL`, אשר מתארים מקשים בסיסיים מוגדרים בתוך USB HID specification. + +בעמודו זה יש לנו את קודי המקשים מתועדים בין `0x00FF` ֿֿ ל- `0xFFFF` אשר משומשים בשביל לממש יכולות מתקדמות של quantum. אם תגדירו קודי מקשים משלכם, הם יתווספו לתוך המרחב הזה גם כן. + +## קודי מקשים של QMK +
+ +``` +|Key |Aliases |Description | +|---------------|-----------|---------------------------------------------------------------------| +|`RESET` | |Put the keyboard into DFU mode for flashing | +|`DEBUG` | |Toggle debug mode | +|`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it | +|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| +|`KC_LSPO` | |Left Shift when held, `(` when tapped | +|`KC_RSPC` | |Right Shift when held, `)` when tapped | +|`KC_LCPO` | |Left Control when held, `(` when tapped | +|`KC_RCPC` | |Right Control when held, `)` when tapped | +|`KC_LAPO` | |Left Alt when held, `(` when tapped | +|`KC_RAPC` | |Right Alt when held, `)` when tapped | +|`KC_SFTENT` | |Right Shift when held, Enter when tapped | +|`KC_LEAD` | |The [Leader key](feature_leader_key.md) | +|`KC_LOCK` | |The [Lock key](feature_key_lock.md) | +|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | +|`M(n)` | |Call macro `n` | +|`MACROTAP(n)` | |Macro-tap `n` idk FIXME | +``` + +
+
diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index 5697a21872..3dcbc64522 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -33,7 +33,11 @@ The firmware does not send actual letters or characters, but only scancodes. Thus, by modifying the firmware, you can only modify what scancode is sent over USB for a given key. -## 3. What the Operating System Does +## 3. What the Event Input/Kernel Does + +The *scancode* is mapped to a *keycode* dependent on the keyboard [60-keyboard.hwdb at Master](https://github.com/systemd/systemd/blob/master/hwdb.d/60-keyboard.hwdb). Without this mapping, the operating system will not receive a valid keycode and will be unable to do anything useful with that key press. + +## 4. What the Operating System Does Once the keycode reaches the operating system, a piece of software has to have it match an actual character thanks to a keyboard layout. For example, if your diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index 4a47a92b11..d5c340edce 100644 --- a/docs/i2c_driver.md +++ b/docs/i2c_driver.md @@ -7,7 +7,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta |Function |Description | |------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. | -|`uint8_t i2c_start(uint8_t address);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. | +|`uint8_t i2c_start(uint8_t address, uint16_t timeout);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. | |`uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. | |`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. | |`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. | @@ -34,7 +34,6 @@ The following defines can be used to configure the I2C master driver. |Variable |Description |Default| |------------------|---------------------------------------------------|-------| |`F_SCL` |Clock frequency in Hz |400KHz | -|`Prescaler` |Divides master clock to aid in I2C clock selection |1 | AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required. @@ -73,7 +72,22 @@ STM32 MCUs allows a variety of pins to be configured as I2C pins depending on th | `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` | | `I2C1_BANK` (deprecated) | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`), superceded by `I2C1_SCL_BANK`, `I2C1_SDA_BANK` | `GPIOB` | -STM32 MCUs allow for different timing parameters when configuring I2C. These can be modified using the following parameters, using https://www.st.com/en/embedded-software/stsw-stm32126.html as a reference: +The ChibiOS I2C driver configuration depends on STM32 MCU: + + STM32F1xx, STM32F2xx, STM32F4xx, STM32L0xx and STM32L1xx use I2Cv1; + STM32F0xx, STM32F3xx, STM32F7xx and STM32L4xx use I2Cv2; + +#### I2Cv1 +STM32 MCUs allow for different clock and duty parameters when configuring I2Cv1. These can be modified using the following parameters, using as a reference: + +| Variable | Default | +|--------------------|------------------| +| `I2C1_OPMODE` | `OPMODE_I2C` | +| `I2C1_CLOCK_SPEED` | `100000` | +| `I2C1_DUTY_CYCLE` | `STD_DUTY_CYCLE` | + +#### I2Cv2 +STM32 MCUs allow for different timing parameters when configuring I2Cv2. These can be modified using the following parameters, using as a reference: | Variable | Default | |-----------------------|---------| @@ -83,13 +97,14 @@ STM32 MCUs allow for different timing parameters when configuring I2C. These can | `I2C1_TIMINGR_SCLH` | `15U` | | `I2C1_TIMINGR_SCLL` | `21U` | -STM32 MCUs allow for different "alternate function" modes when configuring GPIO pins. These are required to switch the pins used to I2C mode. See the respective datasheet for the appropriate values for your MCU. +STM32 MCUs allow for different "alternate function" modes when configuring GPIO pins. These are required to switch the pins used to I2Cv2 mode. See the respective datasheet for the appropriate values for your MCU. | Variable | Default | |---------------------|---------| | `I2C1_SCL_PAL_MODE` | `4` | | `I2C1_SDA_PAL_MODE` | `4` | +#### Other You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function: ```C diff --git a/docs/index.html b/docs/index.html index 8190450728..d2ba99897c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,12 +3,13 @@ QMK Firmware + - + - + @@ -20,19 +21,54 @@
diff --git a/docs/internals_gpio_control.md b/docs/internals_gpio_control.md index 51a549f1c9..8b8351382d 100644 --- a/docs/internals_gpio_control.md +++ b/docs/internals_gpio_control.md @@ -6,18 +6,17 @@ QMK has a GPIO control abstraction layer which is microcontroller agnostic. This The following functions can provide basic control of GPIOs and are found in `quantum/quantum.h`. -|Function |Description | -|----------------------|------------------------------------------------------------------| -|`setPinInput(pin)` |Set pin as input with high impedance (High-Z) | -|`setPinInputHigh(pin)`|Set pin as input with build in pull-up | -|`setPinInputLow(pin)` |Set pin as input with build in pull-down (Supported only on STM32)| -|`setPinOutput(pin)` |Set pin as output | -|`writePinHigh(pin)` |Set pin level as high, assuming it is an output | -|`writePinLow(pin)` |Set pin level as low, assuming it is an output | -|`writePin(pin, level)`|Set pin level, assuming it is an output | -|`readPin(pin)` |Returns the level of the pin | +|Function |Description | Old AVR Examples | Old ChibiOS/ARM Examples | +|----------------------|------------------------------------------------------------------|------------------------------------------------|-------------------------------------------------| +|`setPinInput(pin)` |Set pin as input with high impedance (High-Z) | `DDRB &= ~(1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT)` | +|`setPinInputHigh(pin)`|Set pin as input with builtin pull-up resistor | `DDRB &= ~(1<<2); PORTB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)` | +|`setPinInputLow(pin)` |Set pin as input with builtin pull-down resistor | N/A (Not supported on AVR) | `palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)` | +|`setPinOutput(pin)` |Set pin as output | `DDRB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL)` | +|`writePinHigh(pin)` |Set pin level as high, assuming it is an output | `PORTB \|= (1<<2)` | `palSetLine(pin)` | +|`writePinLow(pin)` |Set pin level as low, assuming it is an output | `PORTB &= ~(1<<2)` | `palClearLine(pin)` | +|`writePin(pin, level)`|Set pin level, assuming it is an output | `(level) ? PORTB \|= (1<<2) : PORTB &= ~(1<<2)` | `(level) ? palSetLine(pin) : palClearLine(pin)` | +|`readPin(pin)` |Returns the level of the pin | `_SFR_IO8(pin >> 4) & _BV(pin & 0xF)` | `palReadLine(pin)` | ## Advanced Settings Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used. - diff --git a/docs/ja/newbs.md b/docs/ja/newbs.md new file mode 100644 index 0000000000..d1043a4a16 --- /dev/null +++ b/docs/ja/newbs.md @@ -0,0 +1,41 @@ +# QMK 初心者ガイド + + + +QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。 +QMK を使用して、シンプルかつ強力な方法でキーボードをカスタマイズできます。 +完全な初心者からプログラマーに至るまで、あらゆるスキルレベルの人々が QMK を使用してキーボードをカスタマイズしています。 +このガイドは、あなたのスキルにかかわらず、同じことを行う手助けをします。 + +お使いのキーボードで QMK を実行できるかどうか不明ですか? +もし作成したキーボードがメカニカルキーボードの場合、実行できる可能性が高いです。 +QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポートしているため、もし現在のキーボードで QMK を実行できない場合でも、ニーズに合ったキーボードを見つけるのに問題はないはずです。 + +## 概要 + +このガイドには7つの主要なセクションがあります。 + +* [はじめに](newbs_getting_started.md) +* [コマンドラインを使用して初めてのファームウェアを構築する](newbs_building_firmware.md) +* [オンライン GUI を使用して初めてのファームウェアを構築する](newbs_building_firmware_configurator.md) +* [ファームウェアを書きこむ](newbs_flashing.md) +* [テストとデバッグ](newbs_testing_debugging.md) +* [QMK における Git 運用作法](newbs_best_practices.md) +* [さらに学ぶための学習リソース](newbs_learn_more_resources.md) + +このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。 +その観点から選択と推奨を行います。 +これらの手順の多くには代替方法があり、これらの代替方法のほとんどをサポートしています。 +タスクを達成する方法について疑問がある場合は、[案内を求めることができます](getting_started_getting_help.md)。 + +## 追加のリソース(英語) + +* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 新規ユーザ視点から見た QMK ファームウェアの基本的な使用方法をカバーしたユーザ作成のブログ。 + +## 追加のリソース(日本語) + +_日本語のリソース情報を募集中です。_ diff --git a/docs/ja/newbs_best_practices.md b/docs/ja/newbs_best_practices.md new file mode 100644 index 0000000000..2e90ffcabe --- /dev/null +++ b/docs/ja/newbs_best_practices.md @@ -0,0 +1,263 @@ + +# QMK における Git 運用作法 + + + + +## または、如何にして私は心配することをやめて Git を愛することを学んだか。 + + + +この文書は、QMK への貢献をスムーズに行なう最もよい方法を初心者に教えることを目的としています。 +QMK に貢献するプロセスを順を追って説明し、この作業を簡単にするいくつかの方法を詳しく説明します。 +その後、意図的に一部を壊してみせて、それらを修正する方法を教えます。 + + +このドキュメントは以下のことを前提としています: + + + + + + +1. あなたは GitHub アカウントがあり、アカウントに [qmk_firmware リポジトリをフォーク](getting_started_github.md) している。 +2. あなたは、[環境構築](newbs_getting_started.md#環境構築) と [QMK の設定](newbs_getting_started.md#qmk-の設定) を両方とも完了している。 + + +## あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと + + + +QMK の開発では、何がどこで行われているかにかかわらず、`master` ブランチを最新の状態に保つことを強くお勧めします、しかし `master` ブランチには***絶対に直接コミットしないでください***。 +代わりに、あなたのすべての変更は開発ブランチで行い、あなたが開発する時にはそのブランチからプルリクエストを発行します。 + + + +マージの競合 — これは 2人以上のユーザーがファイルの同じ部分をそれぞれ異なる編集をして統合できなくなった状態 — の可能性を減らすため `master` ブランチをなるべく最新の状態に保ち、新しいブランチを作成して新しい開発を開始します。 + + +### あなたの master ブランチを更新する + + + +`master` ブランチを最新の状態に保つには、git のリモートリポジトリとして QMK ファームウェアのリポジトリ(以降、QMK リポジトリ)を追加することをお勧めします。 +これを行うには、Git コマンドラインインターフェイスを開き、次のように入力します。 + +``` +git remote add upstream https://github.com/qmk/qmk_firmware.git +``` + + + +リポジトリが追加されたことを確認するには、`git remote -v` を実行します。 +次のように表示されます。(訳注: `upstream` は`上流`という意味です。) + +``` +$ git remote -v +origin https://github.com//qmk_firmware.git (fetch) +origin https://github.com//qmk_firmware.git (push) +upstream https://github.com/qmk/qmk_firmware.git (fetch) +upstream https://github.com/qmk/qmk_firmware.git (push) +``` + + + +これが完了すると、`git fetch upstream` を実行してリポジトリの更新を確認できます。 +このコマンドは `upstream` というニックネームを持つ QMK リポジトリから、ブランチとタグ — "refs" と総称されます — を取得します。 +これで、あなたのフォーク `origin` のデータを QMK が保持するデータと比較できます。 + + + +あなたのフォークの `master` を更新するには、次を実行します、各行の後にEnterキーを押してください: + +``` +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` + + + +これにより、あなたの `master` ブランチに切り替わり、QMK リポジトリから 'refs' を取得し、現在の QMK の `master` ブランチをコンピュータにダウンロードしてから、あなたのフォークにアップロードします。 + + +### 変更を行なう + + + +変更するには、以下を入力して新しいブランチを作成します: + +``` +git checkout -b dev_branch +git push --set-upstream origin dev_branch +``` + + + +これにより、`dev_branch` という名前の新しいブランチが作成され、チェックアウトされ、新しいブランチがあなたのフォークに保存されます。 +`--set-upstream` 引数は、このブランチから `git push` または `git pull` を使用するたびに、あなたのフォークと `dev_branch` ブランチを使用するように git に指示します。 +この引数は最初のプッシュでのみ使用する必要があります。 +その後、残りの引数なしで `git push` または `git pull` を安全に使用できます。 + + + +!> `git push` では、`-set-upstream` の代わりに `-u` を使用できます、 `-u` は `--set-upstream` のエイリアスです。 + + + +ブランチにはほぼ任意の名前を付けることができますが、あなたが行なう変更を表す名前を付けることをお勧めします。 + + + +デフォルトでは、`git checkout -b`は、今チェックアウトされているブランチに基づいて新しいブランチを作成します。 +コマンド末尾に既存のブランチの名前を追加指定することにより、チェックアウトされていない既存のブランチを基にして新しいブランチを作成できます: + +``` +git checkout -b dev_branch master +``` + + + +これで開発ブランチができたのでテキストエディタを開き必要な変更を加えます。 +ブランチに対して多くの小さなコミットを行うことをお勧めします。 +そうすることで、問題を引き起こす変更をより簡単に特定し必要に応じて元に戻すことができます。 +変更を加えるには、更新が必要なファイルを編集して保存し、Git の *ステージングエリア* に追加してから、ブランチにコミットします: + +``` +git add path/to/updated_file +git commit -m "My commit message." +``` + + + +`git add`は、変更されたファイルを Git の *ステージングエリア* に追加します。 +これは、Git の「ロードゾーン」です。 +これには、`git commit` によって *コミット* される変更が含まれており、リポジトリへの変更が保存されます。 +変更内容が一目でわかるように、説明的なコミットメッセージを使用します。 + + + +!> 多くのファイルを変更したが、すべてのファイルが同じ変更の一部である場合、各ファイルを個別に追加するのではなく、 `git add .` を使用して、現在のディレクトリにあるすべての変更されたファイルを追加できます。 + + +### 変更を公開する + + + +最後のステップは、変更をフォークにプッシュすることです。これを行うには、`git push`と入力します。 +Git は `dev_branch` の現在の状態をフォークに公開します。 + + +## マージの競合の解決 + + + +ブランチでの作業の完了に時間がかかる場合、他の人が行った変更が、プルリクエストを開いたときにブランチに加えた変更と競合することがあります。 +これは *マージの競合* と呼ばれ、複数の人が同じファイルの同じ部分を編集すると発生します。 + + +### 変更のリベース + + + +*リベース* は、ある時点で適用された変更を取得し、それらを元に戻し、次に同じ変更を別のポイントに適用する Git の方法です。 +マージの競合が発生した場合、ブランチをリベースして、ブランチを作成してから現在までに行われた変更を取得できます。 + + + +開始するには、次を実行します: + +``` +git fetch upstream +git rev-list --left-right --count HEAD...upstream/master +``` + + + +ここに入力された `git rev-list` コマンドは、現在のブランチと QMK の master ブランチで異なるコミットの数を返します。 +最初に `git fetch` を実行して、upstream リポジトリの現在の状態を表す refs があることを確認します。 +入力された `git rev-list` コマンドの出力は2つの数値を返します: + +``` +$ git rev-list --left-right --count HEAD...upstream/master +7 35 +``` + + + +最初の数字は、現在のブランチが作成されてからのコミット数を表し、2番目の数字は、現在のブランチが作成されてから `upstream/master` に対して行われたコミットの数であり、したがって、現在のブランチに記録されていない変更です。 + + + +現在のブランチと upstream リポジトリの両方の現在の状態がわかったので、リベース操作を開始できます: + +``` +git rebase upstream/master +``` + + + +これにより、Git は現在のブランチのコミットを取り消してから、QMK の master ブランチに対してコミットを再適用します。 + +``` +$ git rebase upstream/master +First, rewinding head to replay your work on top of it... +Applying: Commit #1 +Using index info to reconstruct a base tree... +M conflicting_file_1.txt +Falling back to patching base and 3-way merge... +Auto-merging conflicting_file_1.txt +CONFLICT (content): Merge conflict in conflicting_file_1.txt +error: Failed to merge in the changes. +hint: Use 'git am --show-current-patch' to see the failed patch +Patch failed at 0001 Commit #1 + +Resolve all conflicts manually, mark them as resolved with +"git add/rm ", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort". +``` + + + +これにより、マージの競合があることがわかり、競合のあるファイルの名前が示されます。 +テキストエディタで競合するファイルを開くと、ファイルのどこかに次のような行があります: + +``` +<<<<<<< HEAD +

For help with any issues, email us at support@webhost.us.

+======= +

Need help? Email support@webhost.us.

+>>>>>>> Commit #1 +``` + + + +行 `<<<<<<< HEAD` はマージ競合の始まりを示し、行 `>>>>>>> commit #1` は終了を示し、競合するセクションは `=======` で区切られます。 +`HEAD` 側の部分はファイルの QMK master バージョンからのものであり、コミットメッセージでマークされた部分は現在のブランチとコミットからのものです。 + + + +Git はファイルの内容ではなく *ファイルへの変更* を直接追跡するため、Git がコミットの前にファイル内にあったテキストを見つけられない場合、ファイルの編集方法がわかりません。 +ファイルを再編集して、競合を解決します。 +変更を加えてから、ファイルを保存します。 + +``` +

Need help? Email support@webhost.us.

+``` + +そしてコマンド実行: + +``` +git add conflicting_file_1.txt +git rebase --continue +``` + + + +Git は、競合するファイルへの変更をログに記録し、ブランチのコミットが最後に達するまで適用し続けます。 diff --git a/docs/ja/newbs_building_firmware.md b/docs/ja/newbs_building_firmware.md new file mode 100644 index 0000000000..5fb10d4243 --- /dev/null +++ b/docs/ja/newbs_building_firmware.md @@ -0,0 +1,99 @@ +# 初めてのファームウェアを構築する(コマンドライン版) + + + +ビルド環境をセットアップしたので、カスタムファームウェアのビルドを開始する準備ができました。 +ガイドのこのセクションでは、ファイルマネージャ、テキストエディタ、ターミナルウィンドウの3つのプログラム間を行き来します。 +キーボードファームウェアが完成して満足するまで、この3つすべてを開いたままにします。 + +ガイドの最初の部分を読んだ後でターミナルウィンドウを閉じて再度開いていた場合は、ターミナルが正しいディレクトリにあるように `cd qmk_firmware` を忘れないでください。 + +## キーマップフォルダに移動する + +あなたのキーボードの `keymaps`フォルダに移動することから始めます。 + +macOS または Windows を使用している場合は、キーマップフォルダを簡単に開くために使用できるコマンドがあります。 + +### macOS: + +``` open keyboards//keymaps ``` + +### Windows: + +``` start .\\keyboards\\\\keymaps ``` + +## `default` キーマップのコピーを作成する + +`keymaps` フォルダを開いたら、`default`フォルダのコピーを作成します。 +フォルダには、あなたの GitHub でのユーザー名と同じ名前を付けることを強くお勧めしますが、小文字、数字、アンダースコアのみが含まれている限り、任意の名前を使用できます。 + +この手順を自動化するために、`new_keymap.sh`スクリプトを実行する方法もあります。 + +`qmk_firmware/util` ディレクトリに移動して、次を入力します。 + +``` +./new_keymap.sh +``` + +たとえば、John という名前のユーザーが 1up60hse の新しいキーマップを作成しようとするには、次のように入力します。 + +``` +./new_keymap.sh 1upkeyboards/1up60hse john +``` + +## あなたの好みのテキストエディタで `keymap.c` を開く + +`keymap.c`を開きます。 +このファイル内には、キーボードの動作を制御する構造があります。 +`keymap.c`の上部には、キーマップを読みやすくする `define` と `enum` があります。 +さらに下には、次のような行があります。 + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +この行はレイヤーのリストの開始を表わしています。 +その下には、`LAYOUT` または `KEYMAP` のいずれかを含む行があり、これらの行はレイヤーの開始を表わしています。 +その行の下には、その特定のレイヤーを構成するキーのリストがあります。 + +!> キーマップファイルを編集するときは、カンマを追加したり削除したりしないように注意してください。そうするとファームウェアのコンパイルができなくなり、余分であったり欠落していたりするカンマがどこにあるのかを容易に把握できない場合があります。 + +## 好みに合わせてレイアウトをカスタマイズ + +納得のいくまでこのステップを繰り返します。 +気になる点をひとつづつ変更して試すのもよし、全部作りなおすのもよし。 +あるレイヤー全体が必要ない場合はレイヤーを削除することもでき、必要があれば、合計 32 個までレイヤーを追加することもできます。 +ここで定義できる内容については、次のドキュメントを参照してください。 + +* [キーコード](keycodes.md) +* [機能](features.md) +* [FAQ](faq.md) + +?> キーマップがどのように機能するかを感じながら、各変更を小さくしてください。大きな変更は、発生する問題のデバッグを困難にします。 + +## ファームウェアをビルドする + +キーマップの変更が完了したら、ファームウェアをビルドする必要があります。これを行うには、ターミナルウィンドウに戻り、ビルドコマンドを実行します: + + make : + +たとえば、キーマップの名前が "xyverz" で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します: + + make planck/rev5:xyverz + +これがコンパイルされる間、どのファイルがコンパイルされているかを知らせる多くの出力が画面に表示されます。 +次のような出力で終わるはずです。 + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## ファームウェアを書きこむ + +[「ファームウェアを書きこむ」](newbs_flashing.md) に移動して、キーボードに新しいファームウェアを書き込む方法を学習します。 diff --git a/docs/ja/newbs_building_firmware_configurator.md b/docs/ja/newbs_building_firmware_configurator.md new file mode 100644 index 0000000000..b44504ade4 --- /dev/null +++ b/docs/ja/newbs_building_firmware_configurator.md @@ -0,0 +1,113 @@ +# QMK Configurator + + + +[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの hex ファイルを生成するオンライングラフィカルユーザーインターフェイスです。 + +?> **次の手順を順番に実行してください。** + +[Video Tutorial](https://youtu.be/tx54jkRC9ZY) を見てください。 + +QMK Configurator は Chrome/Firefox で最適に動作します。 + +!> **KLE や kbfirmware などの他のツールのファイルは、QMK Configurator と互換性がありません。それらをロードしたり、インポートしたりしないでください。QMK Configurator は異なるツールです。** + +## キーボードを選ぶ + +ドロップダウンボックスをクリックして、キーマップを作成するキーボードを選択します。 + +?> **キーボードに複数のバージョンがある場合は、正しいバージョンを選択してください。** + +大事なことなのでもう一度言います。 + +!> **正しいバージョンを選択してください!** + +キーボードが QMK を搭載していると宣伝されていてもリストにない場合は、開発者がまだ作業中か、私たちがまだマージするきっかけがなかった可能性があります。 +アクティブな [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) がない場合、[qmk_firmware](https://github.com/qmk/qmk_firmware/issues)で報告して、その特定のキーボードのサポートをリクエストします。 +製作者自身の github アカウントにある QMK 搭載キーボードもあります。 +それも再確認してください。 + +## キーボードのレイアウトを選択する + +作成したいと思うキーマップに最も近いレイアウトを選択します。一部のキーボードには、まだ十分なレイアウトまたは正しいレイアウトが定義されていません。これらは将来サポートされる予定です。 + +## キーマップの名前 + +お好みの名前をキーマップにつけます。 + +?> コンパイル時に問題が発生した場合は、もしかすると QMK ファームウェアリポジトリに既に同じ名前が存在しているのかもしれません、名前を変更してみてください。 + +## キーマップを作る + +キーコード入力は3つの方法で実行できます。 +1. ドラッグ・アンド・ドロップ +2. レイアウト上の空の場所をクリックして、希望するキーコードをクリックします +3. レイアウト上の空の場所をクリックして、キーボードの物理キーを押します + +マウスをキーの上に置くと、そのキーコードの機能の短い説明文が出ます。より詳細な説明については以下を見てください。 + +[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic) +[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes) + +キーマップをサポートするレイアウトが見つからない場合、例えばスペースバーが3分割されていたり、バックスペースが2分割されていたり、シフトが2分割されているような場合、それらを全て埋めてください。 + +### 例: + +3分割のスペースバー: 全てスペースバーで埋めます。 + +2分割のバックスペース: 両方ともバックスペースで埋めます。 + +2分割の右シフト: 両方とも右シフトで埋めます。 + +左シフトとISOサポート用に1つずつ: 両方とも左シフトで埋めます。 + +5分割だが4キーのみ: 以前やったことがある人を推測して確認するか尋ねてください。 + +## 後日のためにキーマップを保存する + +キーマップに満足するか、または後で作業したい場合は、`Export Keymap' ボタンを押します。上記で選択した名前に .json が追加されたキーマップが保存されます。 + +後日、`Import Keymap` ボタンを押すことで、この .json ファイルをロードできます。 + +!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .jsonファイルと同じ形式ではありません。これらのツールにこれを使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、キーボードが **爆発** する可能性があります。 + +## ファームウェアファイルを生成する + +緑色の `Compile` ボタンを押します。 + +コンパイルが完了すると、緑色の `Download Firmware` ボタンを押すことができます。 + +## キーボードに書き込む(フラッシュする) + +[ファームウェアを書きこむ](newbs_flashing.md) を参照してください。 + +## トラブルシューティング + +#### 私の .json ファイルが動きません + +.json ファイルが QMK Configurator で作ったものの場合、おめでとうございます。バグに遭遇しました。 [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。 + +そうでない場合は、... 他の .json ファイルを使用しないようにという、上に書いた注意書きを見逃してませんか? + +#### レイアウトに余分なスペースがありますか?どうすればいいですか? + +もしスペースバーが3つに分かれている場合は、全てスペースバーで埋めるのが最善の方法です。バックスペースやシフトについても同じことができます。 + +#### キーコードってなに? + +以下を見てください。 + +[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic) +[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes) + +#### コンパイルできません + +キーマップの他のレイヤーを再確認して、ランダムなキーが存在しないことを確認してください。 + +## 問題とバグ + +私たちは利用者の依頼やバグレポートを常に受け入れています。[qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。 diff --git a/docs/ja/newbs_flashing.md b/docs/ja/newbs_flashing.md new file mode 100644 index 0000000000..0c85514cf5 --- /dev/null +++ b/docs/ja/newbs_flashing.md @@ -0,0 +1,400 @@ +# ファームウェアを書きこむ + + + +カスタムファームウェアは出来たので、キーボードに書き込みたくなるでしょう/フラッシュしたくなるでしょう。 + +## QMK Toolbox を使ってキーボードに書き込む + +キーボードに書き込む最も簡単な方法は [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) を使うことです。 + +ただし、QMK Toolbox は、現在は Windows と macOS でしか使えません。 +Linuxを使用している場合(および、コマンドラインでファームウェアを書き込みたい場合)は、下の方で概説する[方法](newbs_flashing.md#コマンドラインでファームウェアを書き込む)で行なう必要があります。 + +### QMK Toolbox にファイルをロードする + +まず QMK Toolbox アプリケーションを起動します。 +Finder またはエクスプローラーでファームウェアのファイルを探します。 +ファイル名は `.hex` または `.bin` のどちらかの形式です。 +ビルド時に QMK は、キーボードに適した形式のものを `qmk_firmware` のトップフォルダにコピーしているはずです。 + +Windows か macOS を使用しているときは現在のファームウェアフォルダをエクスプローラーか Finder で簡単に開くためのコマンドがあります。 + +#### Windows + +``` +start . +``` + +#### macOS + +``` +open . +``` + +ファームウェアファイルは常に以下の命名形式に従っています。 + +``` +_.{bin,hex} +``` + +例えば、`plank/rev5` の `default` キーマップのファイル名は以下のようになります。 + +``` +planck_rev5_default.hex +``` + +ファームウェアファイルを見つけたら、QMK Toolbox の "Local file" ボックスにドラッグするか、"Open" をクリックしてファームウェアファイルを指定します。 + +### キーボードを DFU (Bootloader) モードにする + +ファームウェアを書き込むには、キーボードを普段とは違う特別な状態、フラッシュモードにする必要があります。 +このモードでは、キーボードはキーボードとしての機能をはたしません。 +ファームウェアの書き込み中にキーボードのケーブルを抜いたり、書き込みプロセスを中断したりしないことが非常に重要です。 + +キーボードによって、この特別なモードに入る方法は異なります。 +キーボードが現在 QMK または TMK を実行しており、キーボードメーカーから具体的な指示が与えられていない場合は、次を順番に試してください。 + +* 両方のシフトキーを押しながら、`Pause` キーを押す +* 両方のシフトキーを押しながら、`B` キーを押す +* キーボードのケーブルを抜いて、スペースバーとBを同時に押しながら、キーボードを再び接続し、1秒待ってからキーを放す +* 基板(PCB)に付けられている物理的な `RESET` ボタンを押す +* PCB 上の `BOOT0` か `RESET` のラベルの付いたヘッダピンを探し、PCB 接続中にそれらを互いにショートする + +うまくいけば、QMK Toolboxに次のようなメッセージが表示されます。 + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### キーボードへの書き込み + +QMK Toolbox の `Flash` ボタンをクリックします。 +次のような出力が表示されます。 + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## コマンドラインでファームウェアを書き込む + +これは、以前のものと比較して非常に単純になりました。 +ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::flash + +たとえば、キーマップの名前が xyverz で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します。 + + make planck/rev5:xyverz:flash + +これにより、キーボードの構成が確認され、指定されたブートローダに基づいてキーボードへの書き込みが試行されます。 +これはあなたがキーボードが使用するブートローダを知る必要がないことを意味します。 +コマンドをただ実行して、コマンド自身に難しい処理を任せます。 + +ただし、これはキーボードごとに設定されているブートローダに依存します。 +もしこの情報が設定されていない場合、または使用しているキーボードのファームウェアの書き込みにサポートしていないターゲットが設定されている場合、次のエラーが表示されます。 + + WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time. + +この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。 + +ブートローダは主に 5 種類のものが使われています。 +Pro Micro とそのクローンは Caterina を、Teensy は HalfKay を、OLKBの AVR ボードは QMK-DFU を、その他の ATmega32U4 ボードは DFU を、そして多くの ARM ボードは ARM DFU を使います。 + +より詳しいブートローダの情報は、[Flashing Instructions and Bootloader Information](flashing.md) にあります。 + +使用しているブートローダがわかっているならば、ファームウェアをコンパイルするときに、実は `make` コマンドにブートローダを指定するテキストを追加して、書き込みプロセスを自動化できます。 + +### DFU + +DFU ブートローダの場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::dfu + +たとえば、キーマップの名前が xyverz で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します。 + + make planck/rev5:xyverz:dfu + +コンパイルが終了すると、以下の出力になるはずです。 + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +ここまでくると、ビルドスクリプトは5秒ごとに DFU ブートローダを探します。 +デバイスが見つかるか、あなたがキャンセルするまで、以下を繰り返します。 + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +これを実行したら、コントローラーをリセットする必要があります。 +そして下のような出力が表示されます。 + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +?> `dfu-programmer:no device present` など、これに関する問題がある場合は、[よくある質問](faq_build.md) を参照してください。 + +#### DFU コマンド + +ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:dfu` - これが通常のオプションで、DFUデバイスが使用可能になるまで待機したのちファームウェアを書き込みます。5秒ごとに、DFUデバイスが存在するかチェックしています。 +* `:dfu-ee` - 通常の hex ファイルの代わりに `eep` ファイルを書き込みます。これを使用するのはまれです。 +* `:dfu-split-left` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ +* `:dfu-split-right` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ + + +### Caterina + +Arduino ボードとそれらのクローンの場合(たとえば SparkFun ProMicro)、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::avrdude + +たとえば、キーマップの名前が xyverz で、rev2 Lets Split のキーマップを作成している場合、次のコマンドを使用します。 + + make lets_split/rev2:xyverz:avrdude + +ファームウェアのコンパイルが完了すると、以下のように出力されます。 + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +この時点で、キーボードをリセットすると、スクリプトがブートローダを検出し、キーボードに書き込みます。出力は次のようになります。 + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` +うまくいかない時は、以下のようにする必要があるかもしれません。 + + sudo make ::avrdude + + +#### Caterina コマンド + +ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:avrdude` - これが通常のオプションで、Caterina デバイスが(新しい COM ポートを検出して)使用可能になるまで待機し、ファームウェアを書き込みます。 +* `:avrdude-loop` - これは `:avrdude` と同じです。ただし書き込みが終了すると再び Caterina デバイスの書き込み待ちに戻ります。これは何台ものデバイスへの書き込みに便利です。_Control+C を押して、手動でこの繰り返しを終了させる必要があります。_ +* `:avrdude-split-left` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ +* `:avrdude-split-right` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ + +### HalfKay + +PJRC デバイス(Teensy シリーズ)の場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::teensy + +たとえば、キーマップの名前が xyverz で、Ergodox または Ergodox EZ のキーマップを作成している場合、次のコマンドを使用します。 + + make ergodox_ez:xyverz:teensy + +ファームウェアのコンパイルが完了すると、以下のように出力されます。 + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +この時点で、キーボードをリセットします。すると、次のような出力が表示されます。 + + ``` + Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................................................................................................................................ +................................................... +Booting +``` + +### STM32 (ARM) + +主な ARM ボード (Proton C, Planck Rev 6, Preonic Rev 3 を含む)の場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::dfu-util + +たとえば、キーマップの名前が xyverz で、Planck Revision 6 のキーマップを作成している場合、次のコマンドを使用し、(コンパイルが終わる前に)キーボードを再起動してブートローダを起動します: + + make planck/rev6:xyverz:dfu-util + +ファームウェアのコンパイルが完了すると、以下のように出力されます。 + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +#### STM32 コマンド + +ファームウェアを STM32 デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:dfu-util` - STM32 デバイスに書き込むためのデフォルトコマンドで、STM32 ブートローダが見つかるまで待機します。 +* `:dfu-util-split-left` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。 ただし、分割キーボードの「左側の」EEPROM の設定も行われます。 +* `:dfu-util-split-right` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。 ただし、分割キーボードの「右側の」EEPROM の設定も行われます。 +* `:st-link-cli` - dfu-util ではなく、ST-LINK の CLI ユーティリティを介してファームウェアを書き込めます。 + +### BootloadHID + +Bootmapper Client(BMC)/bootloadHID/ATmega32A ベースのキーボードの場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::bootloaderHID + +たとえば、キーマップの名前が xyverz で、jj40 のキーマップを作成している場合、次のコマンドを使用します。 + + make jj40:xyverz:bootloaderHID + +ファームウェアのコンパイルが完了すると、以下のように出力されます。 + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +ここまでくると、ビルドスクリプトは5秒ごとに DFU ブートローダを探します。 +デバイスが見つかるか、あなたがキャンセルするまで、以下を繰り返します。 + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +これを実行したら、コントローラーをリセットする必要があります。 +そして下のような出力が表示されます。 + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + +## テストしましょう! + +おめでとうございます! カスタムファームウェアがキーボードにプログラムされました! + +使ってみて、すべてがあなたの望むように動作するかどうか確認してください。 +この初心者ガイドを完全なものにするために [テストとデバッグ](newbs_testing_debugging.md) を書いたので、カスタム機能のトラブルシューティング方法については、こちらをご覧ください。 diff --git a/docs/ja/newbs_getting_started.md b/docs/ja/newbs_getting_started.md new file mode 100644 index 0000000000..a57e6e054b --- /dev/null +++ b/docs/ja/newbs_getting_started.md @@ -0,0 +1,122 @@ +# イントロダクション + + + +キーボードにはプロセッサが入っており、それはコンピュータに入っているものと大して違わないものです。 +このプロセッサでは、キーボードのボタンの押し下げの検出を担当しキーボードのどのボタンが押されている/離されているかのレポートをコンピュータに送信するソフトウェアが動作しています。 +QMK は、そのソフトウェアの役割を果たし、ボタンの押下を検出しその情報をホストコンピュータに渡します。 +カスタムキーマップを作るということは、キーボード上で動くプログラムを作るということなのです。 + +QMK は、簡単なことは簡単に、そして、難しいことを可能なことにすることで、あなたの手にたくさんのパワーをもたらします。 +パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけでOKです。 + +# はじめに + +キーマップをビルドする前に、いくつかのソフトウェアをインストールしてビルド環境を構築する必要があります。 +ファームウェアをコンパイルするキーボードの数に関わらず、この作業を一度だけ実行する必要があります。 + +もし、GUI で作業をしたい場合、オンラインで作業できる [QMK Configurator](https://config.qmk.fm) を使ってください。 +使い方は [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md) を参照してください。 + +## ソフトウェアのダウンロード + +### テキストエディタ + +GUI を使わない場合、プレーンテキストを編集・保存できるエディタが必要です。 +Windows の場合、メモ帳が使えます。Linux の場合、gedit が使えます。 +どちらもシンプルですが機能的なテキストエディタです。 +macOS では、デフォルトのテキストエディットアプリに注意してください。_フォーマット_ メニューから _標準テキストにする_ を選択しない限り、プレーンテキストとして保存されません。 + +[Sublime Text](https://www.sublimetext.com/) や [VS Code](https://code.visualstudio.com/) のような専用のテキストエディタをダウンロードしてインストールすることもできます。これらのプログラムはコードを編集するために特別に作成されているため、これはプラットフォームに関係なくベストな方法です。 + +?> どのエディタを使えば良いか分からない場合、Laurence Bradford が書いたこの記事 [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) を読んでください。 + +### QMK Toolbox + +QMK Toolbox は、Windows と macOS で使える GUI を備えたプログラムで、カスタムキーボードのプログラミングとデバッグの両方ができます。 +このプログラムは、キーボードに簡単にファームウェアを書き込んだり、出力されるデバッグメッセージを確認する際に、かけがえのないものであることがわかるでしょう。 + +[QMK Toolbox の最新版](https://github.com/qmk/qmk_toolbox/releases/latest) + +* Windows 版: `qmk_toolbox.exe` (portable) または `qmk_toolbox_install.exe` (installer) +* macOS 版: `QMK.Toolbox.app.zip` (portable) または `QMK.Toolbox.pkg` (installer) + +## 環境構築 + +私たちは、QMK を可能な限り簡単に構築できるように努力しています。 +Linux か Unix 環境を用意するだけで、QMK に残りをインストールさせることができます。 + +?> もし、Linux か Unix のコマンドを使ったことがない場合、こちらで基本的な概念や各種コマンドを学んでください。これらの教材で QMK を使うのに必要なことを学ぶことができます。 + +[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
+[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +MSYS2 と Git のインストールが必要です。 + +* [MSYS2 homepage](http://www.msys2.org) の手順に従って MSYS2 をインストールします。 +* 開いている MSYS2 の全ターミナル画面を閉じて、新しい MSYS2 MinGW 64-bit のターミナル画面を開きます。 +* `pacman -S git` を実行して Git をインストールします。 + +### macOS + +[Homebrew homepage](https://brew.sh) の手順に従って Homebrew をインストールしてください。 + +Homebrew をインストールしたら、以下の _QMK の設定_ に進んでください。そのステップでは、他のパッケージをインストールするスクリプトを実行します。 + +### Linux + +Git のインストールが必要です。既にインストールされている可能性は高いですが、そうでない場合、次のコマンドでインストールできます。 + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> 全てのプラットフォームにおいて、Docker を使うことも可能です。[詳細はこちらをクリックしてください](getting_started_build_tools.md#docker)。 + +## QMK の設定 + +Linux/Unix 環境が準備できたら QMK のダウンロードの準備は完了です。Git を使用して QMK のリポジトリを「クローン」することで QMK をダウンロードします。ターミナルか MSYS2 MinGW ウィンドウを開いて、このガイドの残りの部分では開いたままにします。そのウィンドウ内で、次の2つのコマンドを実行します。 + +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> 既に [GitHub の使いかた](getting_started_github.md)を知っているなら、clone ではなく fork を勧めます。この一文の意味が分からない場合、このメッセージは無視してかまいません。 + +QMK には、必要な残りの設定を手助けするスクリプトが含まれています。 +セットアップ作業を完了させるため、次のコマンドを実行します。 + + util/qmk_install.sh + +## ビルド環境の確認 + +これで QMK のビルド環境が用意できましたので、キーボードのファームウェアをビルドできます。 +キーボードのデフォルトキーマップをビルドすることから始めます。次の形式のコマンドでビルドできるはずです。 + + make :default + +例)Clueboard 66% のファームウェアをビルドする + + make clueboard/66/rev3:default + +大量の出力の最後に次のように出力されると完了です。 + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# キーマップの作成 + +これであなた専用のキーマップを作成する準備ができました! +次は [Building Your First Firmware](newbs_building_firmware.md) で専用のキーマップを作成します。 diff --git a/docs/ja/newbs_learn_more_resources.md b/docs/ja/newbs_learn_more_resources.md new file mode 100644 index 0000000000..632cd9100a --- /dev/null +++ b/docs/ja/newbs_learn_more_resources.md @@ -0,0 +1,32 @@ +# 学習リソース + + + +これらのリソースは、QMKコミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。 + +## Git に関するリース: + +### 英語 + +* [Great General Tutorial](https://www.codecademy.com/learn/learn-git) +* [Git Game To Learn From Examples](https://learngitbranching.js.org/) +* [Git Resources to Learn More About Github](getting_started_github.md) +* [Git Resources Aimed Specifically toward QMK](contributing.md) + +### 日本語 + +_日本語のリソース情報を募集中です。_ + +## コマンドラインに関するリソース: + +### 英語 + +* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line) + +### 日本語 + +_日本語のリソース情報を募集中です。_ diff --git a/docs/ja/newbs_testing_debugging.md b/docs/ja/newbs_testing_debugging.md new file mode 100644 index 0000000000..a96406187b --- /dev/null +++ b/docs/ja/newbs_testing_debugging.md @@ -0,0 +1,107 @@ +# テストとデバッグ + + + +カスタムファームウェアをキーボードへ書き込んだら、テストする準備が整います。運が良ければ全て問題なく動作しているはずですが、もしそうでなければこのドキュメントがどこが悪いのか調べるのに役立ちます。 + +## テスト + +通常、キーボードをテストするのは非常に簡単です。全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。キーを押したことを見逃さないためのプログラムもあります。 + +メモ: これらのプログラムはQMKによって提供・承認されたものではありません。 + +* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based) +* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only) +* [Keyboard Tester](http://www.keyboardtester.com) (Web Based) +* [Keyboard Checker](http://keyboardchecker.com) (Web Based) + +## デバッグ + +`rules.mk`へ`CONSOLE_ENABLE = yes`の設定をするとキーボードはデバッグ情報を出力します。デフォルトの出力は非常に限られたものですが、デバッグモードをオンにすることでデバッグ情報の量を増やすことが出来ます。キーマップの`DEBUG`キーコードを使用するか、デバッグモードを有効にする [Command](feature_command.md) 機能を使用するか、以下のコードをキーマップに追加します。 + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### QMK Toolboxを使ったデバッグ + +互換性のある環境では、[QMK Toolbox](https://github.com/qmk/qmk_toolbox)を使うことでキーボードからのデバッグメッセージを表示できます。 + +### hid_listenを使ったデバッグ + +ターミナルベースの方法がお好みですか?PJRCが提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルはWindows, Linux, MacOS用が用意されています。 + + + +## 独自のデバッグメッセージを送信する + +[custom code](custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します: + + #include + +そのあとは、いくつかの異なったprint関数を使用することが出来ます。 + +* `print("string")`: シンプルな文字列を出力します +* `uprintf("%s string", var)`: フォーマットされた文字列を出力します +* `dprint("string")` デバッグモードが有効な場合のみ、シンプルな文字列を出力します +* `dprintf("%s string", var)`: デバッグモードが有効な場合のみ、フォーマットされた文字列を出力します + +## デバッグの例 + +以下は現実世界での実際のデバッグ手法の例を集めたものです。追加情報は[Debugging/Troubleshooting QMK](faq_debug.md)を参照してください。 + +### マトリックス上のどの場所でキー押下が起こったか? + +移植する、PCBの問題を診断する場合、キー入力が正しくスキャンされているかどうかを確認することが役立つ場合があります。この手法でのロギングを有効化するには、`keymap.c`へ以下のコードを追加します。 + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // コンソールが有効化されている場合、マトリックス上の位置とキー押下状態を出力します +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +出力の例 +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### キースキャンにかかる時間の測定 + +パフォーマンスの問題をテストする場合、スイッチマトリックスをスキャンする頻度を知ることが役立ちます。この手法でのロギングを有効化するには`config.h`へ以下のコードを追加します。 + + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +出力例 +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` diff --git a/docs/keycodes.md b/docs/keycodes.md index bd4dd61a5b..fa01df63dc 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -55,7 +55,7 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_EQUAL` |`KC_EQL` |`=` and `+` | |`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | |`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | -|`KC_BSLASH` |`KC_BSLS` |`\` and | | +|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | |`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | |`KC_SCOLON` |`KC_SCLN` |`;` and `:` | |`KC_QUOTE` |`KC_QUOT` |`'` and `"` | @@ -106,7 +106,7 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up | |`KC_KP_0` |`KC_P0` |Keypad `0` and Insert | |`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete | -|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and | | +|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` | |`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) | |`KC_POWER` | |System Power (macOS) | |`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` | @@ -143,7 +143,7 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | |`KC_INT1` |`KC_RO` |JIS `\` and `_` | |`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana | -|`KC_INT3` |`KC_JYEN` |JIS `¥` and | | +|`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` | |`KC_INT4` |`KC_HENK` |JIS Henkan | |`KC_INT5` |`KC_MHEN` |JIS Muhenkan | |`KC_INT6` | |JIS Numpad `,` | @@ -185,8 +185,8 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_AUDIO_MUTE` |`KC_MUTE` |Mute | |`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up | |`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down | -|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) | -|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) | +|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track | +|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track | |`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track (Windows) | |`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track | |`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player (Windows) | @@ -257,28 +257,37 @@ This is a reference only. Each group of keys links to the page documenting their ## [Bootmagic](feature_bootmagic.md) -|Key |Aliases |Description | -|----------------------------------|---------|------------------------------------| -|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Caps Lock and Left Control | -|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control | -|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI | -|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI | -|`MAGIC_NO_GUI` | |Disable the GUI key | -|`MAGIC_SWAP_GRAVE_ESC` | |Swap ` and Escape | -|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace | -|`MAGIC_HOST_NKRO` | |Force NKRO on | -|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides | -|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Caps Lock and Left Control | -|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Control | -|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI | -|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI | -|`MAGIC_UNNO_GUI` | |Enable the GUI key | -|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap ` and Escape| -|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace | -|`MAGIC_UNHOST_NKRO` | |Force NKRO off | -|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides | -|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides| -|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off | +|Key |Aliases |Description | +|----------------------------------|---------|-------------------------------------------| +|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Caps Lock and Left Control | +|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control | +|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and GUI | +|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and GUI | +|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI | +|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI | +|`MAGIC_NO_GUI` | |Disable the GUI key | +|`MAGIC_SWAP_GRAVE_ESC` | |Swap ` and Escape | +|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace | +|`MAGIC_HOST_NKRO` | |Force NKRO on | +|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides | +|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)| +|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Caps Lock and Left Control | +|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Control | +|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and GUI | +|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and GUI | +|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI | +|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI | +|`MAGIC_UNNO_GUI` | |Enable the GUI key | +|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap ` and Escape | +|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace | +|`MAGIC_UNHOST_NKRO` | |Force NKRO off | +|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides | +|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI on both sides | +|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides | +|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap on both sides | +|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off | +|`MAGIC_EE_HANDS_LEFT` | |Set "Left Hand" for EE_HANDS handedness | +|`MAGIC_EE_HANDS_RIGHT` | |Set "Right Hand" for EE_HANDS handedness | ## [Bluetooth](feature_bluetooth.md) @@ -288,6 +297,16 @@ This is a reference only. Each group of keys links to the page documenting their |`OUT_USB` |USB only | |`OUT_BT` |Bluetooth only | +## [Dynamic Macros](feature_dynamic_macros.md) + +|Key |Alias |Description | +|-----------------|---------|--------------------------------------------------| +|`DYN_REC_START1` |`DM_REC1`|Start recording Macro 1 | +|`DYN_REC_START2` |`DM_REC2`|Start recording Macro 2 | +|`DYN_MACRO_PLAY1`|`DM_PLY1`|Replay Macro 1 | +|`DYN_MACRO_PLAY2`|`DM_PLY2`|Replay Macro 2 | +|`DYN_REC_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.| + ## [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) |Key |Description | @@ -411,29 +430,29 @@ This is a reference only. Each group of keys links to the page documenting their ## [US ANSI Shifted Symbols](keycodes_us_ansi_shifted.md) -|Key |Aliases |Description | -|------------------------|-------------------|-------------------| -|`KC_TILDE` |`KC_TILD` |`~` | -|`KC_EXCLAIM` |`KC_EXLM` |`!` | -|`KC_AT` | |`@` | -|`KC_HASH` | |`#` | -|`KC_DOLLAR` |`KC_DLR` |`$` | -|`KC_PERCENT` |`KC_PERC` |`%` | -|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | -|`KC_AMPERSAND` |`KC_AMPR` |`&` | -|`KC_ASTERISK` |`KC_ASTR` |`*` | -|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | -|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | -|`KC_UNDERSCORE` |`KC_UNDS` |`_` | -|`KC_PLUS` | |`+` | -|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | -|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | -|`KC_PIPE` | ||| -|`KC_COLON` |`KC_COLN` |`:` | -|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` | -|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` | -|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` | -|`KC_QUESTION` |`KC_QUES` |`?` | +|Key |Aliases |Description| +|------------------------|-------------------|-----------| +|`KC_TILDE` |`KC_TILD` |`~` | +|`KC_EXCLAIM` |`KC_EXLM` |`!` | +|`KC_AT` | |`@` | +|`KC_HASH` | |`#` | +|`KC_DOLLAR` |`KC_DLR` |`$` | +|`KC_PERCENT` |`KC_PERC` |`%` | +|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | +|`KC_AMPERSAND` |`KC_AMPR` |`&` | +|`KC_ASTERISK` |`KC_ASTR` |`*` | +|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | +|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | +|`KC_UNDERSCORE` |`KC_UNDS` |`_` | +|`KC_PLUS` | |`+` | +|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | +|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | +|`KC_PIPE` | |`\|` | +|`KC_COLON` |`KC_COLN` |`:` | +|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` | +|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` | +|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` | +|`KC_QUESTION` |`KC_QUES` |`?` | ## [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index 6f21cabd2a..75d58c1f1b 100644 --- a/docs/keycodes_basic.md +++ b/docs/keycodes_basic.md @@ -85,7 +85,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 |`KC_EQUAL` |`KC_EQL` |`=` and `+` | |`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | |`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | -|`KC_BSLASH` |`KC_BSLS` |`\` and | | +|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | |`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | |`KC_SCOLON` |`KC_SCLN` |`;` and `:` | |`KC_QUOTE` |`KC_QUOT` |`'` and `"` | @@ -93,7 +93,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 |`KC_COMMA` |`KC_COMM` |`,` and `<` | |`KC_DOT` | |`.` and `>` | |`KC_SLASH` |`KC_SLSH` |`/` and `?` | -|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and | | +|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and `\|` | ## Lock Keys @@ -121,26 +121,26 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 ## International -|Key |Aliases |Description | -|----------|---------|-------------------------------| -|`KC_INT1` |`KC_RO` |JIS `\` and `_` | -|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana | -|`KC_INT3` |`KC_JYEN`|JIS `¥` and || -|`KC_INT4` |`KC_HENK`|JIS Henkan | -|`KC_INT5` |`KC_MHEN`|JIS Muhenkan | -|`KC_INT6` | |JIS Numpad `,` | -|`KC_INT7` | |International 7 | -|`KC_INT8` | |International 8 | -|`KC_INT9` | |International 9 | -|`KC_LANG1`|`KC_HAEN`|Hangul/English | -|`KC_LANG2`|`KC_HANJ`|Hanja | -|`KC_LANG3`| |JIS Katakana | -|`KC_LANG4`| |JIS Hiragana | -|`KC_LANG5`| |JIS Zenkaku/Hankaku | -|`KC_LANG6`| |Language 6 | -|`KC_LANG7`| |Language 7 | -|`KC_LANG8`| |Language 8 | -|`KC_LANG9`| |Language 9 | +|Key |Aliases |Description | +|----------|---------|---------------------| +|`KC_INT1` |`KC_RO` |JIS `\` and `_` | +|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana| +|`KC_INT3` |`KC_JYEN`|JIS `¥` and `\|` | +|`KC_INT4` |`KC_HENK`|JIS Henkan | +|`KC_INT5` |`KC_MHEN`|JIS Muhenkan | +|`KC_INT6` | |JIS Numpad `,` | +|`KC_INT7` | |International 7 | +|`KC_INT8` | |International 8 | +|`KC_INT9` | |International 9 | +|`KC_LANG1`|`KC_HAEN`|Hangul/English | +|`KC_LANG2`|`KC_HANJ`|Hanja | +|`KC_LANG3`| |JIS Katakana | +|`KC_LANG4`| |JIS Hiragana | +|`KC_LANG5`| |JIS Zenkaku/Hankaku | +|`KC_LANG6`| |Language 6 | +|`KC_LANG7`| |Language 7 | +|`KC_LANG8`| |Language 8 | +|`KC_LANG9`| |Language 9 | ## Commands @@ -191,7 +191,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` keycodes are found in the Generic Desktop page, and the rest are located in the Consumer page. -Windows and macOS use different keycodes for "next track" and "previous track". Make sure you choose the keycode that corresponds to your OS. +?> Some of these keycodes may behave differently depending on the OS. For example, on macOS, the keycodes `KC_MEDIA_FAST_FORWARD`, `KC_MEDIA_REWIND`, `KC_MEDIA_NEXT_TRACK` and `KC_MEDIA_PREV_TRACK` skip within the current track when held, but skip the entire track when tapped. |Key |Aliases |Description | |-----------------------|---------|-----------------------------| @@ -201,8 +201,8 @@ Windows and macOS use different keycodes for "next track" and "previous track". |`KC_AUDIO_MUTE` |`KC_MUTE`|Mute | |`KC_AUDIO_VOL_UP` |`KC_VOLU`|Volume Up | |`KC_AUDIO_VOL_DOWN` |`KC_VOLD`|Volume Down | -|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track (Windows) | -|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track (Windows) | +|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track | +|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track | |`KC_MEDIA_STOP` |`KC_MSTP`|Stop Track (Windows) | |`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY`|Play/Pause Track | |`KC_MEDIA_SELECT` |`KC_MSEL`|Launch Media Player (Windows)| diff --git a/docs/keycodes_us_ansi_shifted.md b/docs/keycodes_us_ansi_shifted.md index 41d6035929..85dd61759f 100644 --- a/docs/keycodes_us_ansi_shifted.md +++ b/docs/keycodes_us_ansi_shifted.md @@ -12,26 +12,26 @@ To fix this, open Remote Desktop Connection, click on "Show Options", open the t ## Keycodes -|Key |Aliases |Description | -|------------------------|-------------------|-------------------| -|`KC_TILDE` |`KC_TILD` |`~` | -|`KC_EXCLAIM` |`KC_EXLM` |`!` | -|`KC_AT` | |`@` | -|`KC_HASH` | |`#` | -|`KC_DOLLAR` |`KC_DLR` |`$` | -|`KC_PERCENT` |`KC_PERC` |`%` | -|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | -|`KC_AMPERSAND` |`KC_AMPR` |`&` | -|`KC_ASTERISK` |`KC_ASTR` |`*` | -|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | -|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | -|`KC_UNDERSCORE` |`KC_UNDS` |`_` | -|`KC_PLUS` | |`+` | -|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | -|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | -|`KC_PIPE` | ||| -|`KC_COLON` |`KC_COLN` |`:` | -|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` | -|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` | -|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` | -|`KC_QUESTION` |`KC_QUES` |`?` | +|Key |Aliases |Description| +|------------------------|-------------------|-----------| +|`KC_TILDE` |`KC_TILD` |`~` | +|`KC_EXCLAIM` |`KC_EXLM` |`!` | +|`KC_AT` | |`@` | +|`KC_HASH` | |`#` | +|`KC_DOLLAR` |`KC_DLR` |`$` | +|`KC_PERCENT` |`KC_PERC` |`%` | +|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | +|`KC_AMPERSAND` |`KC_AMPR` |`&` | +|`KC_ASTERISK` |`KC_ASTR` |`*` | +|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | +|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | +|`KC_UNDERSCORE` |`KC_UNDS` |`_` | +|`KC_PLUS` | |`+` | +|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | +|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | +|`KC_PIPE` | |`\|` | +|`KC_COLON` |`KC_COLN` |`:` | +|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` | +|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` | +|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` | +|`KC_QUESTION` |`KC_QUES` |`?` | diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md index fabfefb190..5a8f181b8c 100644 --- a/docs/newbs_building_firmware.md +++ b/docs/newbs_building_firmware.md @@ -8,15 +8,15 @@ If you have closed and reopened your terminal window since following the first p Start by navigating to the `keymaps` folder for your keyboard. -?> If you are on macOS or Windows there are commands you can use to easily open the keymaps folder. +If you are on macOS or Windows there are commands you can use to easily open the keymaps folder. -?> macOS: +### macOS: - open keyboards//keymaps +``` open keyboards//keymaps ``` -?> Windows: +### Windows: - start .\\keyboards\\\\keymaps +``` start .\\keyboards\\\\keymaps ``` ## Create a Copy Of The `default` Keymap diff --git a/docs/newbs_building_firmware_configurator.md b/docs/newbs_building_firmware_configurator.md index 0ad609304a..becceb6693 100644 --- a/docs/newbs_building_firmware_configurator.md +++ b/docs/newbs_building_firmware_configurator.md @@ -4,7 +4,7 @@ The [QMK Configurator](https://config.qmk.fm) is an online graphical user interf ?> **Please follow these steps in order.** -Watch the [Video Tutorial](https://youtu.be/7RH-1pAbjvw) +Watch the [Video Tutorial](https://youtu.be/tx54jkRC9ZY) The QMK Configurator works best with Chrome/Firefox. diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index fa0a5e2ba5..428e698e24 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -12,23 +12,31 @@ However, the QMK Toolbox is only available for Windows and macOS currently. If Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory. -?> If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder. +If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder. -?> Windows: +#### Windows - start . +``` +start . +``` -?> macOS: +#### macOS - open . +``` +open . +``` The firmware file always follows this naming format: - _.{bin,hex} +``` +_.{bin,hex} +``` -For example, the `plank/rev5` with a `default` keymap will have this filename: +For example, the `planck/rev5` with a `default` keymap will have this filename: - planck_rev5_default.hex +``` +planck_rev5_default.hex +``` Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored. @@ -78,7 +86,23 @@ Click the `Flash` button in QMK Toolbox. You will see output similar to the foll ## Flash your Keyboard from the Command Line -First thing you'll need to know is which bootloader that your keyboard uses. There are four main bootloaders that are used, usually. Pro-Micro and clones use CATERINA, and Teensy's use Halfkay, OLKB boards use QMK-DFU, and other atmega32u4 chips use DFU. +This has been made pretty simple compared to what it used to be. When you are ready to compile and flash your firmware, open up your terminal window and run the build command: + + make ::flash + +For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command: + + make planck/rev5:xyverz:flash + +This will check the keyboard's configuration, and then attempt to flash it based on the specified bootloader. This means that you don't need to know which bootloader that your keyboard uses. Just run the command, and let the command do the heavy lifting. + +However, this does rely on the bootloader being set by the keyboard. If this information is not configured, or you're using a board that doesn't have a supported target to flash it, you will see this error: + + WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time. + +In this case, you'll have to fall back on specifying the bootloader. + +There are five main bootloaders that are used. Pro Micro and clones use Caterina, Teensys use HalfKay, OLKB's AVR boards use QMK-DFU, other ATmega32U4 boards use DFU, and most ARM boards use ARM DFU. You can find more information about the bootloaders in the [Flashing Instructions and Bootloader Information](flashing.md) page. @@ -109,7 +133,7 @@ After it gets to this point, the build script will look for the DFU bootloader e dfu-programmer: no device present. Error: Bootloader not found. Trying again in 5s. -Once it does this, you'll want to reset the controller. It should then show output similiar to this: +Once it does this, you'll want to reset the controller. It should then show output similar to this: ``` *** Attempting to flash, please don't remove device @@ -208,14 +232,17 @@ If you have any issues with this, you may need to this: sudo make ::avrdude -Additionally, if you want to flash multiple boards, use the following command: +#### Caterina commands - make ::avrdude-loop +There are a number of DFU commands that you can use to flash firmware to a DFU device: -When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop. +* `:avrdude` - This is the normal option which waits until a Caterina device is available (by detecting a new COM port), and then flashes the firmware. +* `:avrdude-loop` - This runs the same command as `:avrdude`, but after each device is flashed, it will attempt to flash again. This is useful for bulk flashing. _This requires you to manually escape the loop by hitting Control+C._ +* `:avrdude-split-left` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._ +* `:avrdude-split-right` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._ -## HalfKay +### HalfKay For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: @@ -223,7 +250,7 @@ For the PJRC devices (Teensy's), when you're ready to compile and flash your fir For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command: - make erdogox_ez:xyverz:teensy + make ergodox_ez:xyverz:teensy Once the firmware finishes compiling, it will output something like this: @@ -248,7 +275,7 @@ Programming..................................................................... Booting ``` -## STM32 (ARM) +### STM32 (ARM) For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: @@ -298,6 +325,52 @@ File downloaded successfully Transitioning to dfuMANIFEST state ``` +#### STM32 Commands + +There are a number of DFU commands that you can use to flash firmware to a STM32 device: + +* `:dfu-util` - The default command for flashing to STM32 devices, and will wait until an STM32 bootloader is present. . +* `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards. +* `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards. +* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. + + +### BootloadHID + +For Bootmapper Client(BMC)/bootloadHID/ATmega32A based boards, when you're ready to compile and flash your firmware, open up your terminal window and run the build command: + + make ::bootloaderHID + +For example, if your keymap is named "xyverz" and you're building a keymap for a jj40, you'll use this command: + + make jj40:xyverz:bootloaderHID + +Once the firmware finishes compiling, it will output something like this: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it. + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +Once it does this, you'll want to reset the controller. It should then show output similar to this: + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + ## Test It Out! Congrats! Your custom firmware has been programmed to your keyboard! diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md index 771846b409..4756a29bec 100644 --- a/docs/newbs_testing_debugging.md +++ b/docs/newbs_testing_debugging.md @@ -8,7 +8,8 @@ Testing your keyboard is usually pretty straightforward. Press every single key Note: These programs are not provided by or endorsed by QMK. -* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows Only) +* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based) +* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only) * [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only) * [Keyboard Tester](http://www.keyboardtester.com) (Web Based) * [Keyboard Checker](http://keyboardchecker.com) (Web Based) diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md index 979eafbc80..bce9f9dc9b 100644 --- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md +++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md @@ -34,7 +34,7 @@ For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. -`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported. +`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. `BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap. diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md index be7d50a9f4..8014a35e04 100644 --- a/docs/proton_c_conversion.md +++ b/docs/proton_c_conversion.md @@ -19,3 +19,13 @@ Before being able to compile, you may get some errors about `PORTB/DDRB`, etc no The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is mapped to it. If you want the RXLED (B0) mapped to it instead, add this like to your `config.h`: #define CONVERT_TO_PROTON_C_RXLED + +## Feature Conversion + +These are defaults based on what has been implemented for ARM boards. + +| Feature | Notes | +|-------------------------------------|------------------------------------------------------------------------------------------------------------------| +| [Audio](feature_audio.md) | Enabled | +| [RGB Lighting](feature_rgblight.md) | Disabled | +| [Backlight](feature_backlight.md) | Forces [task driven PWM](feature_backlight.md#software-pwm-driver) until ARM can provide automatic configuration | diff --git a/docs/redirects.json b/docs/redirects.json index 814518f405..651148c2c1 100644 --- a/docs/redirects.json +++ b/docs/redirects.json @@ -43,6 +43,10 @@ { "from": "unicode.html", "to": "feature_unicode.html" + }, + { + "from": "python_development.html", + "to": "cli_development.html" } ] } diff --git a/docs/ref_functions.md b/docs/ref_functions.md index 174d9a95a6..1ac83cec42 100644 --- a/docs/ref_functions.md +++ b/docs/ref_functions.md @@ -50,7 +50,7 @@ The caveat to this method is that you cannot access the `z` layer without having #### Example ```c -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } ``` @@ -58,7 +58,7 @@ uint32_t layer_state_set_user(uint32_t state) { Alternatively, you don't have to immediately "return" the value. This is useful if you want to add multiple tri layers, or if you want to add additional effects. ```c -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); state = update_tri_layer_state(state, _RAISE, _SYMB, _SPECIAL); return state; diff --git a/docs/reference_glossary.md b/docs/reference_glossary.md index 422abb2ece..08a22050cf 100644 --- a/docs/reference_glossary.md +++ b/docs/reference_glossary.md @@ -1,16 +1,16 @@ # Glossary of QMK Terms ## ARM -A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. +A line of 32-bit MCUs produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. ## AVR -A line of 8-bit MCU's produced by [Atmel](http://www.microchip.com/). AVR was the original platform that TMK supported. +A line of 8-bit MCUs produced by [Atmel](http://www.microchip.com/). AVR was the original platform that TMK supported. ## AZERTY The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard. ## Backlight -A generic term for lighting on a keyboard. The backlight is typically, but not always, an array of LED's that shine through keycaps and/or switches. +A generic term for lighting on a keyboard. The backlight is typically, but not always, an array of LEDs that shine through keycaps and/or switches. ## Bluetooth A short range peer to peer wireless protocol. Most common wireless protocol for a keyboard. @@ -147,7 +147,7 @@ A feature that lets you assign multiple keycodes to the same key based on how ma A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollars more due to its halfkay bootloader, which makes flashing very simple. ## Underlight -A generic term for LEDs that light the underside of the board. These LED's typically shine away from the bottom of the PCB and towards the surface the keyboard rests on. +A generic term for LEDs that light the underside of the board. These LEDs typically shine away from the bottom of the PCB and towards the surface the keyboard rests on. ## Unicode In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes. diff --git a/docs/ru-ru/README.md b/docs/ru-ru/README.md new file mode 100644 index 0000000000..366a76036e --- /dev/null +++ b/docs/ru-ru/README.md @@ -0,0 +1,32 @@ +# Quantum Mechanical Keyboard Firmware + +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## Что такое QMK Firmware? + +QMK (*Quantum Mechanical Keyboard*) — это сообщество, работающее над ПО с открытым исходным кодом, которое разрабатывает QMK Firmware, QMK Toolbox, qmk.fm и эту документацию. QMK Firmware — это прошивка для клавиатур, основанная на [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) с множеством полезных функций для микроконтроллеров Atmel AVR, а именно, для продуктов компаний [OLKB](http://olkb.com), [ErgoDox EZ](http://www.ergodox-ez.com) и [Clueboard](http://clueboard.co/). Она также была портирована на чипы ARM при помощи ChibiOS. Вы можете использовать ее для клавиатуры, собранной вручную или имеющей нестандартную печатную плату. + +## Как скачать + +Если вы собираетесь добавить раскладку, клавиатуру или новые функции в QMK, то самый простой путь реализации — это [сделать форк репозитория на GitHub](https://github.com/qmk/qmk_firmware#fork-destination-box), клонировать ваш репозиторий локально для дальнейшего внесения изменений, сделать пуш изменений, а затем открыть [пулреквест](https://github.com/qmk/qmk_firmware/pulls) из вашего форка. + +Также вы можете либо скачать репозиторий ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), либо клонировать его через git (`git@github.com:qmk/qmk_firmware.git`) или https (`https://github.com/qmk/qmk_firmware.git`). + +## Как скомпилировать + +Перед компиляцией вам необходимо [настроить окружение](ru-ru/getting_started_build_tools.md) разработчика для AVR или/и ARM. После этого используйте команду `make` со следующим синтаксисом, чтобы собрать клавиатуру и раскладку: + + make planck/rev4:default + +Данная команда соберет ревизию `rev4` клавиатуры `planck` с раскладкой `default`. Не все клавиатуры имеют ревизии (они также называются subprojects или folders), в этом случае она может быть опущена: + + make preonic:default + +## Как настроить + +QMK обладает множеством [функций](ru-ru/features.md) для исследования, и [справочная документация](http://docs.qmk.fm) может стать хорошей отправной точкой для знакомства с ними. Большинством функций можно воспользоваться модифицируя [раскладку](ru-ru/keymap.md) и изменяя [коды клавиш](ru-ru/keycodes.md). diff --git a/docs/ru-ru/getting_started_build_tools.md b/docs/ru-ru/getting_started_build_tools.md new file mode 100644 index 0000000000..facdf35633 --- /dev/null +++ b/docs/ru-ru/getting_started_build_tools.md @@ -0,0 +1,153 @@ +# Установка инструментов для сборки + +Данная страница описывает процесс установки окружения для сборки QMK. Эти инструкции относятся к процессорам AVR (таким как atmega32u4). + + + +**Примечание:** Если вы здесь впервые, ознакомьтесь с [Руководством для полных новичков](ru-ru/newbs.md). + +Прежде, чем продолжить, убедитесь, что у вас обновлены подмодули (сторонние библиотеки), выполнив `make git-submodule`. + +## Linux + +Чтобы всегда быть уверенными, что у вас установлены последние версии ПО, можно просто выполнить команду `sudo util/qmk_install.sh`. Она должна установить все необходимые зависимости. **Это выполнит `apt-get upgrade`.** + +Вы также можете устанавливать все вручную, но в данной документации список требований может не всегда быть актуальным. + +Текущие требования представлены ниже, но не все они могут быть необходимы, так как зависят от того, что вы делаете. Также стоит отметить, что в некоторых системах не все зависимости доступны в виде пакетов, или они могут называться по-другому. + +``` +build-essential +gcc +unzip +wget +zip +gcc-avr +binutils-avr +avr-libc +dfu-programmer +dfu-util +gcc-arm-none-eabi +binutils-arm-none-eabi +libnewlib-arm-none-eabi +git +``` + +Установите все зависимости при помощи вашего любимого менеджера пакетов. + +Пример для Debian / Ubuntu: + + sudo apt-get update + sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi + +Пример для Fedora / Red Hat: + + sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib + +Пример для Arch / Manjaro: + + pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util + +## Nix + +Если вы используете [NixOS](https://nixos.org/), или у вас установлена Nix в Linux или macOS, выполните `nix-shell` из корня репозитория, чтобы настроить окружение для сборки. + +По умолчанию, это скачает компиляторы для AVR и ARM. Если вам не нужны они оба, отключите `avr` или `arm` с помощью аргумента, например: + + nix-shell --arg arm false + +## macOS + +Если вы пользуетесь [Homebrew](https://brew.sh/), вы можете использовать следующие команды: + + brew tap osx-cross/avr + brew tap PX4/homebrew-px4 + brew update + brew install avr-gcc@8 + brew link --force avr-gcc@8 + brew install dfu-programmer + brew install dfu-util + brew install gcc-arm-none-eabi + brew install avrdude + +Данный метод является рекомендуемым. Если у вас нет Homebrew, [установите его!](http://brew.sh/) Он очень сильно пригодится тем, кто работает с командной строкой. Стоит отметить, что часть с `make` и `make install` во время установки `avr-gcc@8` из Homebrew может занимать более 20 минут и сильно нагружать CPU. + +## Windows с MSYS2 (рекомендуется) + +Наилучшим окружение для Windows Vista и всех последующих версий (тестировалось с 7 и 10) является [MSYS2](https://www.msys2.org). + +* Для установки MSYS2, скачайте его и следуйте дальнейшим указаниям отсюда: http://www.msys2.org +* Откройте ``MSYS2 MingGW 64-bit`` ярлык +* Перейдите в свой репозиторий QMK. Например, если он находится в корне вашего диска C: + * `$ cd /c/qmk_firmware` +* Запустите `util/qmk_install.sh` и следуйте подсказкам + +## Windows 10 (устарело) + +Это устаревшие инструкции для Windows 10. Мы рекомендуем использовать [MSYS2, как сказано выше](#windows-с-msys2-рекомендуется). + +### Обновление для дизайнеров (Creators Update) + +Если у вас Windows 10 с Обновлением для дизайнеров или новее, вы можете собрать прошивку и прошить ей напрямую. До Обновления для дизайнеров было возможно только собрать прошивку. Если у вас его еще нет, или вы не уверены, следуйте [этим инструкциям](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update). + +### Подсистема Windows для Linux (Windows Subsystem for Linux, WSL) + +В дополнение к Обновлению для дизайнеров вам необходима подсистема Windows для Linux, поэтому установите ее, следуя [иснтрукциям здесь](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). Если у вас уже есть подсистема Windows для Linux из Юбилейного обновления (Anniversary update), рекомендуется ее [обновить](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) до 16.04LTS, потому что некоторые клавиатуры не компилируются с набором инструментов из 14.04LTS. Стоит отметить, что вы четко должны понимать, что вы делаете, если выбрали метод `sudo do-release-upgrade`. + +### Git + +Если вы уже клонировали репозиторий в файловую систему Windows, вы можете пропустить данную секцию. + +Вам нужно клонировать репозиторий в файловую систему Windows при помощи обычного Git для Windows, а **не** WSL Git. Так что, если вы ещё не установили Git, [скачайте](https://git-scm.com/download/win) и установите его. Затем [настройте его](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup). Важно указать свой адрес электронной почты и имя пользователя, особенно если вы планируете вносить свой вклад в проект. + +Как только Git будет установлен, откройте командную строку Git Bash и поменяйте директорию на ту, в которую хотите клонировать QMK; обратите внимание, что вы должны использовать косую черту, и что доступ к вашему диску C осуществляется примерно так: `/c/path/to/where/you/want/to/go`. Затем выполните `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, это создаст новую папку `qmk_firmware` в текущей директории. + +### Установка инструментов (Toolchain) + +Установка инструментов (Toolchain) осуществляется через подсистему Windows для Linux, и процесс полностью автоматизирован. Если вы хотите выполнить установку вручную, то не существует никакой другой инструкции помимо самого скрипта. Однако, вы всегда можете открыть ишью и запросить дополнительную информацию. + +1. Откройте "Bash On Ubuntu On Windows" в меню Пуск. +2. Перейдите в папку, в которую клонирована `qmk_firmware`. Обратите внимание, что пути начинаются с `/mnt/` в WSL, так что вы должны написать, например, `cd /mnt/c/path/to/qmk_firmware`. +3. Запустите `util/wsl_install.sh` и следуйте инструкциям на экране. +4. Закройте окно командной строки Bash, и откройте его снова. +5. Все готово, чтобы скомпилировать прошивку и прошить ей! + +### Несколько важных вещей, которые надо запомнить + +* Вы можете запустить `util/wsl_install.sh` еще раз, чтобы установить все последние обновления. +* Ваш репозиторий QMK должен находиться в файловой системе Windows, поскольку WSL не может запускать выполняемые файлы извне. +* WSL Git **не** совместим с Windows Git, поэтому используйте Windows Git Bash или Windows Git GUI для всех операций с Git. +* Вы можете изменять файлы как внутри WSL, так и просто через Windows. Но обратите внимание, что если вы изменяете makefiles или сценарии командной строки, вы должны убедиться, что используете текстовый редактор, который сохраняет файлы с переводом строки в стиле Unix (Unix line endings). В противном случае компиляция может не работать. + +## Docker + +Если это немного сложновато для вас, Docker может стать готовым решением, которое вы ищите. После установки [Docker CE](https://docs.docker.com/install/#supported-platforms) выполните следующую команду из директории `qmk_firmware`, чтобы собрать клавиатуру/раскладку: + +```bash +util/docker_build.sh keyboard:keymap +# Например: util/docker_build.sh ergodox_ez:steno +``` + +Это скомпилирует указанную клавиатуру/раскладку и создаст для вас `.hex` или `.bin` файл с результатом, готовым к процессу прошивки, в директории QMK. Если опустить `:keymap`, будет использована раскладка `default`. Заметьте, что формат параметров такой же, как и в случае сборки командой `make`. + +Вы также можете запустить скрипт без параметров. Тогда он попросит вас ввести поочередно параметры сборки. Возможно, вам это покажется более удобным: + +```bash +util/docker_build.sh +# Читает параметры из пользовательского ввода (оставьте пустым для значений по умолчанию) +``` + +Также имеется поддержка сборки _и_ прошивки клавиатуры прямо из Docker. Для этого укажите еще один параметр `target`: + +```bash +util/docker_build.sh keyboard:keymap:target +# Например: util/docker_build.sh planck/rev6:default:dfu-util +``` + +Если вы используете Linux, это должно работать прямо из коробки. На Windows и macOS это требует запуска [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/). Ее довольно утомительно настраивать, поэтому мы не рекомендуем это; используйте вместо этого [QMK Toolbox](https://github.com/qmk/qmk_toolbox). + +!> Docker для Windows требует включения [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v). Это означает, что он не работает на версиях Windows без Hyper-V, например, на Windows 7, Windows 8 и **Windows 10 Home**. + +## Vagrant + +Если у вас возникли проблемы при сборке прошивки, вы можете попробовать установить инструмент под названием Vagrant. Он сконфигурирует виртуальный компьютер с такими параметрами, которые подходят для сборки прошивки. У OLKB НЕТ файлов такого виртуально компьютера. Подробности о том, как настроить Vagrant, можно найти в [Руководстве по Vagrant](ru-ru/getting_started_vagrant.md). diff --git a/docs/ru-ru/getting_started_getting_help.md b/docs/ru-ru/getting_started_getting_help.md new file mode 100644 index 0000000000..75be44310e --- /dev/null +++ b/docs/ru-ru/getting_started_getting_help.md @@ -0,0 +1,15 @@ +# Получение помощи + +Существует много ресурсов для получения помощи по работе с QMK. + +## Чат в реальном времени + +Вы можете найти разработчиков и пользователей QMK на нашем главном [сервере Discord](https://discord.gg/Uq7gcHh). На сервере есть специальные каналы для разговоров о прошивке, Toolbox, оборудовании и конфигураторе. + +## OLKB Сабреддит + +Официальный форум QMK [/r/olkb](https://reddit.com/r/olkb) на [reddit.com](https://reddit.com). + +## GitHub ишью + +Вы можете открыть [ишью на GitHub](https://github.com/qmk/qmk_firmware/issues). Это особенно удобно, когда ваша проблема потребует длительного обсуждения или отладки. diff --git a/docs/ru-ru/getting_started_github.md b/docs/ru-ru/getting_started_github.md new file mode 100644 index 0000000000..8a0fd07a27 --- /dev/null +++ b/docs/ru-ru/getting_started_github.md @@ -0,0 +1,58 @@ +# Как использовать GitHub с QMK + +GitHub может показаться несколько сложным для тех, кто никогда с ним не работал. В данном руководстве будет разобран каждый шаг создания форка, клонирования и отправки пулреквеста в QMK. + +?> В этом руководстве предполагается, что вы в какой-то степени знакомы с работой в командной строке, и в вашей системе установлен git. + +Откройте [страницу QMK на GitHub] (https://github.com/qmk/qmk_firmware), и в правом верхнем углу вы увидите кнопку с надписью "Fork": + +![Fork on Github](http://i.imgur.com/8Toomz4.jpg) + +Если вы состоите в какой-либо организации, вам нужно выбрать учетную запись, к которой будет привязан форк. В большинстве случаев это будет личной аккаунт. Как только ваш форк будет завершен (иногда это занимает немного времени), нажмите кнопку "Clone or Download": +![Download from Github](http://i.imgur.com/N1NYcSz.jpg) + +И обязательно выберите "HTTPS", затем выделите ссылку и скопируйте ее: + +![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) + +Теперь введите `git clone` в командную строку, а затем вставьте ссылку: + +``` +user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом: + +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +Ваши изменения теперь существуют в вашем форке на GitHub - если вернуться туда (`https://github.com//qmk_firmware`), вы сможете создать "New Pull Request" нажатием на кнопку: + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +Здесь вы сможете увидеть, какие именно изменения были внесены, - если все выглядит хорошо, вы можете завершить его, нажав "Create Pull Request": + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +После отправки мы можем расспросить вас о ваших изменениях, попросить внести корректировки и в конечном итоге принять их! Спасибо за ваш вклад в QMK :) diff --git a/docs/ru-ru/newbs.md b/docs/ru-ru/newbs.md new file mode 100644 index 0000000000..0e7bd6499c --- /dev/null +++ b/docs/ru-ru/newbs.md @@ -0,0 +1,23 @@ +# Руководство по QMK для полных новичков + +QMK ― это мощная прошивка с открытым исходным кодом для вашей механической клавиатуры. Вы можете использовать QMK для легкой и мощной персонализации своей клавиатуры. Люди с разным уровнем умений, от совсем новичков до крутых программистов, успешно применяли QMK, чтобы персонализировать свои клавиатуры. Данное руководство поможет вам сделать то же самое, независимо от уровня вашего мастерства. + +Не уверены, поддерживает ли ваша клавиатура QMK? Если это механическая клавиатура, которую вы собрали сами, шансы достаточно велики. Мы поддерживаем [большое число любительских клавиатур](https://qmk.fm/keyboards/), поэтому, даже если ваша текущая клавиатура не совместима с QMK, у вас не должно возникнуть проблем с нахождением подходящей для ваших нужд. + +## Обзор + +В данном руководстве 7 основных секций: + +* [Первое знакомство](ru-ru/newbs_getting_started.md) +* [Собираем вашу первую прошивку с помощью командной строки](ru-ru/newbs_building_firmware.md) +* [Собираем вашу первую прошивку с помощью онлайн GUI](ru-ru/newbs_building_firmware_configurator.md) +* [Прошиваем файл прошивки](ru-ru/newbs_flashing.md) +* [Тестируем и отлаживаем](ru-ru/newbs_testing_debugging.md) +* [Лучшие практики по Git](ru-ru/newbs_best_practices.md) +* [Узнайте больше на этих ресурсах](ru-ru/newbs_learn_more_resources.md) + +Данное руководство сосредоточено на помощи тем, кто никогда раньше не компилировал ПО. Приятие решений и рекомендации делаются с учетом именно этого. Существует много альтернативных методов для описанных процедур, и мы поддерживаем большинство из них. Если у вас есть сомнения о том, как выполнить задачу, вы можете [попросить у нас совета](ru-ru/getting_started_getting_help.md). + +## Дополнительные ресурсы + +* [Блог Томаса Баарта (Thomas Baart) об основах QMK](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Созданный пользователем блог, охватывающий основы использования QMK Firmware с точки зрения нового пользователя. diff --git a/docs/ru-ru/newbs_getting_started.md b/docs/ru-ru/newbs_getting_started.md new file mode 100644 index 0000000000..a301e9adba --- /dev/null +++ b/docs/ru-ru/newbs_getting_started.md @@ -0,0 +1,102 @@ +# Введение + +У вашей компьютерной клавиатуры внутри есть процессор, похожий на тот, что внутри вашего компьютера. Этот процессор выполняет программное обеспечение, которое отвечает за обнаружение нажатий клавиш и отсылку сигналов состояния клавиатуры, когда клавиши нажимаются и отпускаются. Роль такого ПО выполняет QMK, детектируя нажатия клавиш и отсылая эту информацию главному компьютеру. Сбор собственной раскладки эквивалентен сборке выполняемой программы для вашей клавиатуры. + +QMK старается дать вам большую силу, оставляя простые вещи легкими и делай сложные — возможными. Вам не надо уметь программировать, чтобы создавать мощные прошивки — вам только надо следовать нескольким простым синтаксическим правилам. + +# Первое знакомство + +Перед тем, как вы сможете собирать раскладки, вам необходимо установить некоторое программное обеспечение и настроить ваше окружение для сборки. Это нужно сделать только один раз, вне зависимости от того, для скольких клавиатур вы планируете компилировать прошивки. + +Если вы предпочитаете графический пользовательский интерфейс, пожалуйста, рассмотрите возможность использования онлайн [QMK Конфигуратора](https://config.qmk.fm). Пожалуйста, обратитесь к [Собираем вашу первую прошивку с помощью онлайн GUI](ru-ru/newbs_building_firmware_configurator.md). + + +## Загрузка ПО + +### Текстовый редактор + +Вам понадобится программа, умеющая редактировать и сохранять **обычные текстовые** файлы. Если вы используете Windows, вы можете делать это Блокнотом, а в Linux вы можете использовать gedit. Обе программы являются простыми, но функциональными редакторами. В macOS остерегайтесь стандартного приложения TextEdit: он не будет сохранять обычные текстовые файлы, пока вы явно не выберите _Make Plain Text_ из меню _Format_. + +Вы также можете скачать и установить отдельный текстовый редактор наподобие [Sublime Text](https://www.sublimetext.com/) или [VS Code](https://code.visualstudio.com/). Возможно, это наилучший вариант независимо от платформы, поскольку эти программы сделаны специально для редактирования кода. + +?> Не уверены, какой выбрать текстовый редактор? Лоуренс Брэдфорд (Laurence Bradford) написал [отличное введение](https://learntocodewith.me/programming/basics/text-editors/) в тему. + +### QMK Toolbox + +QMK Toolbox является дополнительной графической программой для Windows и macOS, которая позволяет вам разрабатывать и отлаживать вашу клавиатуру. Вы, вероятно, посчитаете ее бесценной для легкого процесса прошивки вашей клавиатуры и просмотра отладочных сообщений, которые она отображает. + +[Скачайте последний выпуск здесь.](https://github.com/qmk/qmk_toolbox/releases/latest) + +* Для Windows: `qmk_toolbox.exe` (переносимое приложение) или `qmk_toolbox_install.exe` (установщик) +* Для macOS: `QMK.Toolbox.app.zip` (переносимое приложение) или `QMK.Toolbox.pkg` (установщик) + +## Настройте ваше окружение + +Мы постарались сделать установку QMK максимально легкой. Вам нужно только подготовить ваше Linux или Unix окружение, после этого позвольте QMK установить все остальное. + +?> Если вы никогда раньше не работали с командной строкой Linux/Unix, существует несколько базовых концептов и команд, которые необходимо выучить. Эти ресурсы дадут вам достаточно знаний, чтобы работать с QMK:
+[Обязательные к изучению команды Linux](https://www.guru99.com/must-know-linux-commands.html)
+[Несколько базовых команд Unix](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +Вам нужно будет установить MSYS2 и Git. + +* Следуйте инструкциям по установки на [домашней странице MSYS2](https://www.msys2.org). +* Закройте все открытые терминалы MSYS2 и откройте новый терминал MSYS2 MinGW 64-bit. +* Установите Git, выполнив эту команду: `pacman -S git`. + +### macOS + +Вам нужно будет установить Homebrew. Следуйте инструкциям на [домашней странице Homebrew](https://brew.sh). + +После установки Homebrew продолжите чтение с _Установите QMK_. На этом шаге вам надо будет запустить скрипт, который установит остальные пакеты. + +### Linux + +Вам нужно будет установить Git. Скорее всего, он у вас уже есть, но если нет, одна из следующих команд должна установить его: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> Docker также является вариантом для всех платформ. [Нажмите сюда для получения подробностей.](ru-ru/getting_started_build_tools.md#docker) + +## Установите QMK + +Как только вы настроили ваше Linux/Unix окружение, вы готовы к загрузке QMK. Мы сделаем это при помощи Git, "клонировав" репозиторий QMK. Откройте Терминал или окно MSYS2 MinGW и оставьте его открытым до конца данного руководства. Выполните эти команды внутри него: + +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> Если вы уже знаете, [как пользоваться GitHub](ru-ru/getting_started_github.md), мы рекомендуем вам вместо этого создать и клонировать свой собственный форк. Если вы не понимаете, что это значит, просто проигнорируйте это сообщение. + +QMK включает в себя скрипт, который поможет вам установить все оставшееся, что вам понадобится. Вы должны запустить его, набрав эту команду: + + util/qmk_install.sh + +## Протестируйте ваше окружение для сборки + +Теперь, когда ваше окружение QMK для сборки настроено, вы можете собрать прошивку для вашей клавиатуры. Начните с попытки собрать раскладку для клавиатуры по умолчанию. У вас должно это получиться с помощью команды в этом формате: + + make :default + +Например, чтобы собрать прошивку для Clueboard 66%, вы введете: + + make clueboard/66/rev3:default + +Когда все закончится, вы должны увидеть большой лог, который заканчивается примерно так: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# Создаем вашу раскладку + +Теперь вы готовы создать свою персональную раскладку! Для этого перейдите к [Собираем вашу первую прошивку](ru-ru/newbs_building_firmware.md). diff --git a/docs/translating.md b/docs/translating.md new file mode 100644 index 0000000000..6eb268763a --- /dev/null +++ b/docs/translating.md @@ -0,0 +1,29 @@ +# How to translate the QMK docs into different languages + +All files in the root folder (`docs/`) should be in English - all other languages should be in subfolders with the ISO 639-1 language codes, followed by `-` and the country code where relevant. [A list of common ones can be found here](https://www.andiamo.co.uk/resources/iso-language-codes/). If this folder doesn't exist, you may create it. Each of the translated files should have the same name as the English version, so things can fall back successfully. + +A `_summary.md` file should exist in this folder with a list of links to each file, with a translated name, and link preceded by the language folder: + + * [QMK简介](zh-cn/getting_started_introduction.md) + +Once you've finished translating a new language, you'll also need to modify the following files: + +* [`docs/_langs.md`](https://github.com/qmk/qmk_firmware/blob/master/docs/_langs.md) + Each line should contain a country flag in the format `:us:` followed by the name represented in its own language: + + - [:cn: 中文](/zh-cn/) + +* [`docs/index.html`](https://github.com/qmk/qmk_firmware/blob/master/docs/index.html) + Both `placeholder` and `noData` objects should have a dictionary entry for the language folder in a string: + + '/zh-cn/': '没有结果!', + +## Previewing the translations + +Before opening a pull request, you can preview your additions if you have Python 3 installed by running this command in the `docs/` folder: + + python -m http.server 9000 + +and navigating to http://localhost:9000/ - you should be able to select your new language from the "Translations" menu at the top-right. + +Once you're happy with your work, feel free to open a pull request! diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index a94c9c3191..81cedfcf53 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -22,7 +22,7 @@ This section of code is called "The Main Loop" because it's responsible for loop keyboard_task(); ``` -This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LED's on and off. +This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LEDs on and off. Within `keyboard_task()` you'll find code to handle: @@ -30,7 +30,7 @@ Within `keyboard_task()` you'll find code to handle: * Mouse Handling * Serial Link(s) * Visualizer -* Keyboard status LED's (Caps Lock, Num Lock, Scroll Lock) +* Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock) #### Matrix Scanning @@ -175,7 +175,7 @@ FIXME: This needs to be written FIXME: This needs to be written -#### Keyboard state LED's (Caps Lock, Num Lock, Scroll Lock) +#### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) FIXME: This needs to be written diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md new file mode 100644 index 0000000000..67481c458d --- /dev/null +++ b/docs/ws2812_driver.md @@ -0,0 +1,42 @@ +# WS2812 Driver +This driver powers the [RGB Lighting](feature_rgblight.md) and [RGB Matrix](feature_rgb_matrix.md) features. + +Currently QMK supports the following addressable LEDs (however, the white LED in RGBW variants is not supported): + + WS2811, WS2812, WS2812B, WS2812C, etc. + SK6812, SK6812MINI, SK6805 + +These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs. + +## Supported Driver Types + +| | AVR | ARM | +|----------|--------------------|--------------------| +| bit bang | :heavy_check_mark: | :heavy_check_mark: | +| I2C | :heavy_check_mark: | | +| SPI | | Soon™ | +| PWM | | Soon™ | + +## Driver configuration + +### Bitbang +Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk: + +```make +WS2812_DRIVER = bitbang +``` + +!> This driver is not hardware accelerated and may not be performant on heavily loaded systems. + +### I2C +Targeting boards where WS2812 support is offloaded to a 2nd MCU. Currently the driver is limited to AVR given the known consumers are ps2avrGB/BMC. To configure it, add this to your rules.mk: + +```make +WS2812_DRIVER = i2c +``` + +Configure the hardware via your config.h: +```c +#define WS2812_ADDRESS 0xb0 // default: 0xb0 +#define WS2812_TIMEOUT 100 // default: 100 +``` diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md index b0d9f1c068..033fecde42 100644 --- a/docs/zh-cn/_summary.md +++ b/docs/zh-cn/_summary.md @@ -1,106 +1,106 @@ -* [完全菜鸟指南](newbs.md) - * [入门](newbs_getting_started.md) - * [构建你的第一个固件](newbs_building_firmware.md) - * [刷新固件](newbs_flashing.md) - * [测试和调试](newbs_testing_debugging.md) - * [Git最佳实践](newbs_best_practices.md) - * [学习资源](newbs_learn_more_resources.md) +* [完全菜鸟指南](zh-cn/newbs.md) + * [入门](zh-cn/newbs_getting_started.md) + * [构建你的第一个固件](zh-cn/newbs_building_firmware.md) + * [刷新固件](zh-cn/newbs_flashing.md) + * [测试和调试](zh-cn/newbs_testing_debugging.md) + * [Git最佳实践](zh-cn/newbs_best_practices.md) + * [学习资源](zh-cn/newbs_learn_more_resources.md) -* [QMK基础](README.md) - * [QMK简介](getting_started_introduction.md) - * [向QMK贡献](contributing.md) - * [如何使用Github](getting_started_github.md) - * [获得帮助](getting_started_getting_help.md) +* [QMK基础](zh-cn/README.md) + * [QMK简介](zh-cn/getting_started_introduction.md) + * [向QMK贡献](zh-cn/contributing.md) + * [如何使用Github](zh-cn/getting_started_github.md) + * [获得帮助](zh-cn/getting_started_getting_help.md) -* [问题解答](faq.md) - * [一般问题](faq_general.md) - * [构建/编译](faq_build.md) - * [调试/故障排除](faq_debug.md) - * [键盘映射](faq_keymap.md) +* [问题解答](zh-cn/faq.md) + * [一般问题](zh-cn/faq_general.md) + * [构建/编译](zh-cn/faq_build.md) + * [调试/故障排除](zh-cn/faq_debug.md) + * [键盘映射](zh-cn/faq_keymap.md) * 详细指南 - * [安装构建工具](getting_started_build_tools.md) - * [vagrant指南](getting_started_vagrant.md) - * [构建/编译指令](getting_started_make_guide.md) - * [刷新固件](flashing.md) - * [定制功能](custom_quantum_functions.md) - * [映射概述](keymap.md) + * [安装构建工具](zh-cn/getting_started_build_tools.md) + * [vagrant指南](zh-cn/getting_started_vagrant.md) + * [构建/编译指令](zh-cn/getting_started_make_guide.md) + * [刷新固件](zh-cn/flashing.md) + * [定制功能](zh-cn/custom_quantum_functions.md) + * [映射概述](zh-cn/keymap.md) -* [硬件](hardware.md) - * [AVR处理器](hardware_avr.md) - * [驱动](hardware_drivers.md) +* [硬件](zh-cn/hardware.md) + * [AVR处理器](zh-cn/hardware_avr.md) + * [驱动](zh-cn/hardware_drivers.md) * 参考 - * [键盘指南](hardware_keyboard_guidelines.md) - * [配置选项](config_options.md) - * [键码](keycodes.md) - * [记录最佳实践](documentation_best_practices.md) - * [文档模板](documentation_templates.md) - * [术语表](reference_glossary.md) - * [单元测试](unit_testing.md) - * [有用的功能](ref_functions.md) - * [配置器支持](reference_configurator_support.md) - * [info.json 格式](reference_info_json.md) + * [键盘指南](zh-cn/hardware_keyboard_guidelines.md) + * [配置选项](zh-cn/config_options.md) + * [键码](zh-cn/keycodes.md) + * [记录最佳实践](zh-cn/documentation_best_practices.md) + * [文档模板](zh-cn/documentation_templates.md) + * [术语表](zh-cn/reference_glossary.md) + * [单元测试](zh-cn/unit_testing.md) + * [有用的功能](zh-cn/ref_functions.md) + * [配置器支持](zh-cn/reference_configurator_support.md) + * [info.json 格式](zh-cn/reference_info_json.md) -* [特性](features.md) - * [基本键码](keycodes_basic.md) - * [US ANSI控制码](keycodes_us_ansi_shifted.md) - * [量子键码](quantum_keycodes.md) - * [高级键码](feature_advanced_keycodes.md) - * [音频](feature_audio.md) - * [自动shift](feature_auto_shift.md) - * [背光](feature_backlight.md) - * [蓝牙](feature_bluetooth.md) - * [热改键](feature_bootmagic.md) - * [组合](feature_combo) - * [命令](feature_command.md) - * [动态宏指令](feature_dynamic_macros.md) - * [编码器](feature_encoders.md) - * [重音号Esc复合键](feature_grave_esc.md) - * [自锁键](feature_key_lock.md) - * [布局](feature_layouts.md) - * [前导键](feature_leader_key.md) - * [LED阵列](feature_led_matrix.md) - * [宏指令](feature_macros.md) - * [鼠标键](feature_mouse_keys.md) - * [一键功能](feature_advanced_keycodes.md#one-shot-keys) - * [指针设备](feature_pointing_device.md) - * [PS/2鼠标](feature_ps2_mouse.md) - * [RGB灯光](feature_rgblight.md) - * [RGB矩阵](feature_rgb_matrix.md) - * [空格候补换挡](feature_space_cadet_shift.md) - * [空格候补换挡回车](feature_space_cadet_shift_enter.md) - * [速录机](feature_stenography.md) - * [换手](feature_swap_hands.md) - * [多击键](feature_tap_dance.md) - * [终端](feature_terminal.md) - * [热敏打印机](feature_thermal_printer.md) - * [Unicode](feature_unicode.md) - * [用户空间](feature_userspace.md) - * [速度键](feature_velocikey.md) +* [特性](zh-cn/features.md) + * [基本键码](zh-cn/keycodes_basic.md) + * [US ANSI控制码](zh-cn/keycodes_us_ansi_shifted.md) + * [量子键码](zh-cn/quantum_keycodes.md) + * [高级键码](zh-cn/feature_advanced_keycodes.md) + * [音频](zh-cn/feature_audio.md) + * [自动shift](zh-cn/feature_auto_shift.md) + * [背光](zh-cn/feature_backlight.md) + * [蓝牙](zh-cn/feature_bluetooth.md) + * [热改键](zh-cn/feature_bootmagic.md) + * [组合](zh-cn/feature_combo) + * [命令](zh-cn/feature_command.md) + * [拨动开关](zh-cn/feature_dip_switch.md) + * [动态宏指令](zh-cn/feature_dynamic_macros.md) + * [编码器](zh-cn/feature_encoders.md) + * [重音号Esc复合键](zh-cn/feature_grave_esc.md) + * [自锁键](zh-cn/feature_key_lock.md) + * [布局](zh-cn/feature_layouts.md) + * [前导键](zh-cn/feature_leader_key.md) + * [LED阵列](zh-cn/feature_led_matrix.md) + * [宏指令](zh-cn/feature_macros.md) + * [鼠标键](zh-cn/feature_mouse_keys.md) + * [一键功能](zh-cn/feature_advanced_keycodes.md#one-shot-keys) + * [指针设备](zh-cn/feature_pointing_device.md) + * [PS/2鼠标](zh-cn/feature_ps2_mouse.md) + * [RGB灯光](zh-cn/feature_rgblight.md) + * [RGB矩阵](zh-cn/feature_rgb_matrix.md) + * [空格候补换挡](zh-cn/feature_space_cadet.md) + * [速录机](zh-cn/feature_stenography.md) + * [换手](zh-cn/feature_swap_hands.md) + * [多击键](zh-cn/feature_tap_dance.md) + * [终端](zh-cn/feature_terminal.md) + * [热敏打印机](zh-cn/feature_thermal_printer.md) + * [Unicode](zh-cn/feature_unicode.md) + * [用户空间](zh-cn/feature_userspace.md) + * [速度键](zh-cn/feature_velocikey.md) * 针对制造者和定制者 - * [手工连线指南](hand_wire.md) - * [ISP刷新指南](isp_flashing_guide.md) - * [ARM调试指南](arm_debugging.md) - * [I2C驱动](i2c_driver.md) - * [GPIO控制器](internals_gpio_control.md) - * [Proton C转换](proton_c_conversion.md) + * [手工连线指南](zh-cn/hand_wire.md) + * [ISP刷新指南](zh-cn/isp_flashing_guide.md) + * [ARM调试指南](zh-cn/arm_debugging.md) + * [I2C驱动](zh-cn/i2c_driver.md) + * [GPIO控制器](zh-cn/internals_gpio_control.md) + * [Proton C转换](zh-cn/proton_c_conversion.md) * 深入了解 - * [键盘如何工作](how_keyboards_work.md) - * [理解QMK](understanding_qmk.md) + * [键盘如何工作](zh-cn/how_keyboards_work.md) + * [理解QMK](zh-cn/understanding_qmk.md) * 其他话题 - * [使用Eclipse开发QMK](other_eclipse.md) - * [使用VSCode开发QMK](other_vscode.md) - * [支持](support.md) + * [使用Eclipse开发QMK](zh-cn/other_eclipse.md) + * [使用VSCode开发QMK](zh-cn/other_vscode.md) + * [支持](zh-cn/support.md) * QMK 内构 (正在编写) - * [定义](internals_defines.md) - * [输入回调寄存器](internals_input_callback_reg.md) - * [Midi设备](internals_midi_device.md) - * [Midi设备设置过程](internals_midi_device_setup_process.md) - * [Midi工具库](internals_midi_util.md) - * [发送函数](internals_send_functions.md) - * [Sysex工具](internals_sysex_tools.md) + * [定义](zh-cn/internals_defines.md) + * [输入回调寄存器](zh-cn/internals_input_callback_reg.md) + * [Midi设备](zh-cn/internals_midi_device.md) + * [Midi设备设置过程](zh-cn/internals_midi_device_setup_process.md) + * [Midi工具库](zh-cn/internals_midi_util.md) + * [发送函数](zh-cn/internals_send_functions.md) + * [Sysex工具](zh-cn/internals_sysex_tools.md) diff --git a/docs/zh-cn/faq_debug.md b/docs/zh-cn/faq_debug.md index ca8b3fd25d..a3cc7c510c 100644 --- a/docs/zh-cn/faq_debug.md +++ b/docs/zh-cn/faq_debug.md @@ -173,23 +173,6 @@ EXTRAKEY_ENABLE = yes # 音频控制和系统控制 Arduino Leonardo和micro使用**ATMega32U4**,该芯片TMK可用,但Arduino的bootloader会导致问题。 - -## 在USB AVR使用PF4-7针脚? -你要置位MCUCR寄存器JTD位来将PF4-7设置为GPIO。这些针脚默认是JTAG功能。 像ATMega*U* or AT90USB*这样的MCU会受影响。 - -如果是用Teensy的话就不需要了。Tennsy自带JTAGEN位未编程来失能该功能。 - -代码如下。 -``` - // F接口JTAG失能。在四个周期内写入两次JTD位。 - MCUCR |= (1<> 1), data, length, 0, 0, MS2ST(timeout)); - return chibios_to_qmk(&status); +i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); + return chibios_to_qmk(&status); } -i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) -{ - i2c_address = address; - i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); - return chibios_to_qmk(&status); +i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); + return chibios_to_qmk(&status); } -i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) -{ - i2c_address = devaddr; - i2cStart(&I2C_DRIVER, &i2cconfig); +i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); - uint8_t complete_packet[length + 1]; - for(uint8_t i = 0; i < length; i++) - { - complete_packet[i+1] = data[i]; - } - complete_packet[0] = regaddr; + uint8_t complete_packet[length + 1]; + for (uint8_t i = 0; i < length; i++) { + complete_packet[i + 1] = data[i]; + } + complete_packet[0] = regaddr; - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); - return chibios_to_qmk(&status); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); + return chibios_to_qmk(&status); } -i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout) -{ - i2c_address = devaddr; - i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); - return chibios_to_qmk(&status); +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout)); + return chibios_to_qmk(&status); } -void i2c_stop(void) -{ - i2cStop(&I2C_DRIVER); -} +void i2c_stop(void) { i2cStop(&I2C_DRIVER); } diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index 1bb74c800f..efe3909a66 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -1,9 +1,9 @@ /* Copyright 2018 Jack Humbert * Copyright 2018 Yiancar * - * This program is free sofare: you can redistribute it and/or modify + * 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 Sofare Foundation, either version 2 of the License, or + * 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, @@ -22,71 +22,88 @@ * Please ensure that HAL_USE_I2C is TRUE in the halconf.h file and that * STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. */ +#pragma once #include "ch.h" #include +#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32L0xx) || defined(STM32L1xx) +# define USE_I2CV1 +#endif + #ifdef I2C1_BANK - #define I2C1_SCL_BANK I2C1_BANK - #define I2C1_SDA_BANK I2C1_BANK +# define I2C1_SCL_BANK I2C1_BANK +# define I2C1_SDA_BANK I2C1_BANK #endif #ifndef I2C1_SCL_BANK - #define I2C1_SCL_BANK GPIOB +# define I2C1_SCL_BANK GPIOB #endif #ifndef I2C1_SDA_BANK - #define I2C1_SDA_BANK GPIOB +# define I2C1_SDA_BANK GPIOB #endif #ifndef I2C1_SCL - #define I2C1_SCL 6 +# define I2C1_SCL 6 #endif #ifndef I2C1_SDA - #define I2C1_SDA 7 +# define I2C1_SDA 7 #endif +#ifdef USE_I2CV1 +# ifndef I2C1_OPMODE +# define I2C1_OPMODE OPMODE_I2C +# endif +# ifndef I2C1_CLOCK_SPEED +# define I2C1_CLOCK_SPEED 100000 /* 400000 */ +# endif +# ifndef I2C1_DUTY_CYCLE +# define I2C1_DUTY_CYCLE STD_DUTY_CYCLE /* FAST_DUTY_CYCLE_2 */ +# endif +#else // The default PAL alternate modes are used to signal that the pins are used for I2C -#ifndef I2C1_SCL_PAL_MODE - #define I2C1_SCL_PAL_MODE 4 -#endif -#ifndef I2C1_SDA_PAL_MODE - #define I2C1_SDA_PAL_MODE 4 -#endif +# ifndef I2C1_SCL_PAL_MODE +# define I2C1_SCL_PAL_MODE 4 +# endif +# ifndef I2C1_SDA_PAL_MODE +# define I2C1_SDA_PAL_MODE 4 +# endif // The default timing values below configures the I2C clock to 400khz assuming a 72Mhz clock // For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html -#ifndef I2C1_TIMINGR_PRESC - #define I2C1_TIMINGR_PRESC 15U -#endif -#ifndef I2C1_TIMINGR_SCLDEL - #define I2C1_TIMINGR_SCLDEL 4U -#endif -#ifndef I2C1_TIMINGR_SDADEL - #define I2C1_TIMINGR_SDADEL 2U -#endif -#ifndef I2C1_TIMINGR_SCLH - #define I2C1_TIMINGR_SCLH 15U -#endif -#ifndef I2C1_TIMINGR_SCLL - #define I2C1_TIMINGR_SCLL 21U +# ifndef I2C1_TIMINGR_PRESC +# define I2C1_TIMINGR_PRESC 0U +# endif +# ifndef I2C1_TIMINGR_SCLDEL +# define I2C1_TIMINGR_SCLDEL 7U +# endif +# ifndef I2C1_TIMINGR_SDADEL +# define I2C1_TIMINGR_SDADEL 0U +# endif +# ifndef I2C1_TIMINGR_SCLH +# define I2C1_TIMINGR_SCLH 38U +# endif +# ifndef I2C1_TIMINGR_SCLL +# define I2C1_TIMINGR_SCLL 129U +# endif #endif #ifndef I2C_DRIVER - #define I2C_DRIVER I2CD1 +# define I2C_DRIVER I2CD1 #endif typedef int16_t i2c_status_t; #define I2C_STATUS_SUCCESS (0) -#define I2C_STATUS_ERROR (-1) +#define I2C_STATUS_ERROR (-1) #define I2C_STATUS_TIMEOUT (-2) -void i2c_init(void); +void i2c_init(void); i2c_status_t i2c_start(uint8_t address); i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); -i2c_status_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length); +i2c_status_t i2c_transmit_receive(uint8_t address, uint8_t* tx_body, uint16_t tx_length, uint8_t* rx_body, uint16_t rx_length); i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); -i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout); -void i2c_stop(void); +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); +void i2c_stop(void); diff --git a/drivers/arm/ws2812.c b/drivers/arm/ws2812.c new file mode 100644 index 0000000000..fa702fca98 --- /dev/null +++ b/drivers/arm/ws2812.c @@ -0,0 +1,95 @@ +#include "quantum.h" +#include "ws2812.h" +#include "ch.h" +#include "hal.h" + +/* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */ + +#ifndef NOP_FUDGE +# if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F0XX) || defined(STM32F0xx) || defined(STM32F3XX) || defined(STM32F3xx) || defined(STM32L0XX) || defined(STM32L0xx) +# define NOP_FUDGE 0.4 +# else +# error("NOP_FUDGE configuration required") +# define NOP_FUDGE 1 // this just pleases the compile so the above error is easier to spot +# endif +#endif + +#define NUMBER_NOPS 6 +#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE) +#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives +#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) +#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) + +#define wait_ns(x) \ + do { \ + for (int i = 0; i < NS_TO_CYCLES(x); i++) { \ + __asm__ volatile("nop\n\t" \ + "nop\n\t" \ + "nop\n\t" \ + "nop\n\t" \ + "nop\n\t" \ + "nop\n\t"); \ + } \ + } while (0) + +// These are the timing constraints taken mostly from the WS2812 datasheets +// These are chosen to be conservative and avoid problems rather than for maximum throughput + +#define T1H 900 // Width of a 1 bit in ns +#define T1L (1250 - T1H) // Width of a 1 bit in ns + +#define T0H 350 // Width of a 0 bit in ns +#define T0L (1250 - T0H) // Width of a 0 bit in ns + +// The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased +// to values like 600000 ns. If it is too small, the pixels will show nothing most of the time. +#define RES 10000 // Width of the low gap between bits to cause a frame to latch + +void sendByte(uint8_t byte) { + // WS2812 protocol wants most significant bits first + for (unsigned char bit = 0; bit < 8; bit++) { + bool is_one = byte & (1 << (7 - bit)); + // using something like wait_ns(is_one ? T1L : T0L) here throws off timings + if (is_one) { + // 1 + writePinHigh(RGB_DI_PIN); + wait_ns(T1H); + writePinLow(RGB_DI_PIN); + wait_ns(T1L); + } else { + // 0 + writePinHigh(RGB_DI_PIN); + wait_ns(T0H); + writePinLow(RGB_DI_PIN); + wait_ns(T0L); + } + } +} + +void ws2812_init(void) { setPinOutput(RGB_DI_PIN); } + +// Setleds for standard RGB +void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { + static bool s_init = false; + if (!s_init) { + ws2812_init(); + s_init = true; + } + + // this code is very time dependent, so we need to disable interrupts + chSysLock(); + + for (uint8_t i = 0; i < leds; i++) { + // WS2812 protocol dictates grb order + sendByte(ledarray[i].g); + sendByte(ledarray[i].r); + sendByte(ledarray[i].b); +#ifdef RGBW + sendByte(ledarray[i].w); +#endif + } + + wait_ns(RES); + + chSysUnlock(); +} diff --git a/drivers/arm/ws2812.h b/drivers/arm/ws2812.h new file mode 100644 index 0000000000..41c22a00b8 --- /dev/null +++ b/drivers/arm/ws2812.h @@ -0,0 +1,16 @@ +#pragma once + +#include "quantum/color.h" + +/* User Interface + * + * Input: + * ledarray: An array of GRB data describing the LED colors + * number_of_leds: The number of LEDs to write + * + * The functions will perform the following actions: + * - Set the data-out pin as output + * - Send out the LED data + * - Wait 50us to reset the LEDs + */ +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); diff --git a/drivers/arm/ws2812_pwm.c b/drivers/arm/ws2812_pwm.c new file mode 100644 index 0000000000..2094e50098 --- /dev/null +++ b/drivers/arm/ws2812_pwm.c @@ -0,0 +1 @@ +#error("NOT SUPPORTED") \ No newline at end of file diff --git a/drivers/arm/ws2812_spi.c b/drivers/arm/ws2812_spi.c new file mode 100644 index 0000000000..2094e50098 --- /dev/null +++ b/drivers/arm/ws2812_spi.c @@ -0,0 +1 @@ +#error("NOT SUPPORTED") \ No newline at end of file diff --git a/drivers/avr/analog.c b/drivers/avr/analog.c index 1ec38df75d..1a8da4261d 100644 --- a/drivers/avr/analog.c +++ b/drivers/avr/analog.c @@ -21,49 +21,38 @@ #include #include "analog.h" +static uint8_t aref = (1 << REFS0); // default to AREF = Vcc -static uint8_t aref = (1<= 12) return 0; - return adc_read(pgm_read_byte(pin_to_mux + pin)); + static const uint8_t PROGMEM pin_to_mux[] = {0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20}; + if (pin >= 12) return 0; + return adc_read(pgm_read_byte(pin_to_mux + pin)); #elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) - if (pin >= 8) return 0; - return adc_read(pin); + if (pin >= 8) return 0; + return adc_read(pin); #else - return 0; + return 0; #endif } // Mux input -int16_t adc_read(uint8_t mux) -{ +int16_t adc_read(uint8_t mux) { #if defined(__AVR_AT90USB162__) - return 0; + return 0; #else - uint8_t low; + uint8_t low; - ADCSRA = (1< -void analogReference(uint8_t mode); +#ifdef __cplusplus +extern "C" { +#endif +void analogReference(uint8_t mode); int16_t analogRead(uint8_t pin); int16_t adc_read(uint8_t mux); +#ifdef __cplusplus +} +#endif -#define ADC_REF_POWER (1<. -*/ + * APA102 lib V1.0a + * + * Controls APA102 RGB-LEDs + * Author: Mikkel (Duckle29 on github) + * + * Dec 22th, 2017 v1.0a Initial Version + * + * 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 . + */ #include "apa102.h" #include @@ -27,75 +27,70 @@ #include "debug.h" // Setleds for standard RGB -void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds){ - apa102_setleds_pin(ledarray,leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF)); +void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds) { apa102_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF)); } + +void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK) { + pinMode(RGB_DI_PIN, PinDirectionOutput); + pinMode(RGB_CLK_PIN, PinDirectionOutput); + + apa102_send_array((uint8_t *)ledarray, leds) } -void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK){ - pinMode(RGB_DI_PIN, PinDirectionOutput); - pinMode(RGB_CLK_PIN, PinDirectionOutput); - - apa102_send_array((uint8_t*)ledarray,leds) +void apa102_send_array(uint8_t *data, uint16_t leds) { // Data is struct of 3 bytes. RGB - leds is number of leds in data + apa102_start_frame(); + while (leds--) { + apa102_send_frame(0xFF000000 | (data->b << 16) | (data->g << 8) | data->r); + data++; + } + apa102_end_frame(leds); } -void apa102_send_array(uint8_t *data, uint16_t leds){ // Data is struct of 3 bytes. RGB - leds is number of leds in data - apa102_start_frame(); - while(leds--){ - apa102_send_frame(0xFF000000 | (data->b << 16) | (data->g << 8) | data->r); - data++; - } - apa102_end_frame(leds); +void apa102_send_frame(uint32_t frame) { + for (uint32_t i = 0xFF; i > 0;) { + apa102_send_byte(frame & i); + i = i << 8; + } } -void apa102_send_frame(uint32_t frame){ - for(uint32_t i=0xFF; i>0;){ - apa102_send_byte(frame & i); - i = i << 8; - } +void apa102_start_frame() { apa102_send_frame(0); } + +void apa102_end_frame(uint16_t leds) { + // This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h + // and adapted. The code is MIT licensed. I think thats compatible? + + // We need to send some more bytes to ensure that all the LEDs in the + // chain see their new color and start displaying it. + // + // The data stream seen by the last LED in the chain will be delayed by + // (count - 1) clock edges, because each LED before it inverts the clock + // line and delays the data by one clock edge. Therefore, to make sure + // the last LED actually receives the data we wrote, the number of extra + // edges we send at the end of the frame must be at least (count - 1). + // For the APA102C, that is sufficient. + // + // The SK9822 only updates after it sees 32 zero bits followed by one more + // rising edge. To avoid having the update time depend on the color of + // the last LED, we send a dummy 0xFF byte. (Unfortunately, this means + // that partial updates of the beginning of an LED strip are not possible; + // the LED after the last one you are trying to update will be black.) + // After that, to ensure that the last LED in the chain sees 32 zero bits + // and a rising edge, we need to send at least 65 + (count - 1) edges. It + // is sufficent and simpler to just send (5 + count/16) bytes of zeros. + // + // We are ignoring the specification for the end frame in the APA102/SK9822 + // datasheets because it does not actually ensure that all the LEDs will + // start displaying their new colors right away. + + apa102_send_byte(0xFF); + for (uint16_t i = 0; i < 5 + leds / 16; i++) { + apa102_send_byte(0); + } } -void apa102_start_frame(){ - apa102_send_frame(0); -} - -void apa102_end_frame(uint16_t leds) -{ - // This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h - // and adapted. The code is MIT licensed. I think thats compatible? - - // We need to send some more bytes to ensure that all the LEDs in the - // chain see their new color and start displaying it. - // - // The data stream seen by the last LED in the chain will be delayed by - // (count - 1) clock edges, because each LED before it inverts the clock - // line and delays the data by one clock edge. Therefore, to make sure - // the last LED actually receives the data we wrote, the number of extra - // edges we send at the end of the frame must be at least (count - 1). - // For the APA102C, that is sufficient. - // - // The SK9822 only updates after it sees 32 zero bits followed by one more - // rising edge. To avoid having the update time depend on the color of - // the last LED, we send a dummy 0xFF byte. (Unfortunately, this means - // that partial updates of the beginning of an LED strip are not possible; - // the LED after the last one you are trying to update will be black.) - // After that, to ensure that the last LED in the chain sees 32 zero bits - // and a rising edge, we need to send at least 65 + (count - 1) edges. It - // is sufficent and simpler to just send (5 + count/16) bytes of zeros. - // - // We are ignoring the specification for the end frame in the APA102/SK9822 - // datasheets because it does not actually ensure that all the LEDs will - // start displaying their new colors right away. - - apa102_send_byte(0xFF); - for (uint16_t i = 0; i < 5 + leds / 16; i++){ - apa102_send_byte(0); - } -} - -void apa102_send_byte(uint8_t byte){ - uint8_t i; - for (i = 0; i < 8; i++){ +void apa102_send_byte(uint8_t byte) { + uint8_t i; + for (i = 0; i < 8; i++) { digitalWrite(RGB_DI_PIN, !!(byte & (1 << (7-i))); digitalWrite(RGB_CLK_PIN, PinLevelHigh); - } + } } diff --git a/drivers/avr/apa102.h b/drivers/avr/apa102.h old mode 100755 new mode 100644 index 5d852e0673..d4c1e18ee1 --- a/drivers/avr/apa102.h +++ b/drivers/avr/apa102.h @@ -27,7 +27,6 @@ #include "color.h" - /* User Interface * * Input: @@ -41,6 +40,6 @@ * - Wait 50�s to reset the LEDs */ -void apa102_setleds (LED_TYPE *ledarray, uint16_t number_of_leds); -void apa102_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask); +void apa102_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); +void apa102_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pinmask); void apa102_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); diff --git a/drivers/avr/glcdfont.c b/drivers/avr/glcdfont.c index 6f88bd23a7..2c332ea6db 100644 --- a/drivers/avr/glcdfont.c +++ b/drivers/avr/glcdfont.c @@ -5,272 +5,30 @@ #define FONT5X7_H #ifdef __AVR__ - #include - #include +# include +# include #elif defined(ESP8266) - #include +# include #else - #define PROGMEM +# define PROGMEM #endif // Standard ASCII 5x7 font static const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, - 0x00, 0x18, 0x3C, 0x18, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, - 0x00, 0x18, 0x24, 0x18, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, - 0x30, 0x48, 0x3A, 0x06, 0x0E, - 0x26, 0x29, 0x79, 0x29, 0x26, - 0x40, 0x7F, 0x05, 0x05, 0x07, - 0x40, 0x7F, 0x05, 0x25, 0x3F, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, - 0x14, 0x22, 0x7F, 0x22, 0x14, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, - 0x06, 0x09, 0x7F, 0x01, 0x7F, - 0x00, 0x66, 0x89, 0x95, 0x6A, - 0x60, 0x60, 0x60, 0x60, 0x60, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, - 0x08, 0x04, 0x7E, 0x04, 0x08, - 0x10, 0x20, 0x7E, 0x20, 0x10, - 0x08, 0x08, 0x2A, 0x1C, 0x08, - 0x08, 0x1C, 0x2A, 0x08, 0x08, - 0x1E, 0x10, 0x10, 0x10, 0x10, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, - 0x30, 0x38, 0x3E, 0x38, 0x30, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, - 0x23, 0x13, 0x08, 0x64, 0x62, - 0x36, 0x49, 0x56, 0x20, 0x50, - 0x00, 0x08, 0x07, 0x03, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, - 0x08, 0x08, 0x3E, 0x08, 0x08, - 0x00, 0x80, 0x70, 0x30, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, - 0x00, 0x00, 0x60, 0x60, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, - 0x3E, 0x51, 0x49, 0x45, 0x3E, - 0x00, 0x42, 0x7F, 0x40, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, - 0x21, 0x41, 0x49, 0x4D, 0x33, - 0x18, 0x14, 0x12, 0x7F, 0x10, - 0x27, 0x45, 0x45, 0x45, 0x39, - 0x3C, 0x4A, 0x49, 0x49, 0x31, - 0x41, 0x21, 0x11, 0x09, 0x07, - 0x36, 0x49, 0x49, 0x49, 0x36, - 0x46, 0x49, 0x49, 0x29, 0x1E, - 0x00, 0x00, 0x14, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, - 0x14, 0x14, 0x14, 0x14, 0x14, - 0x00, 0x41, 0x22, 0x14, 0x08, - 0x02, 0x01, 0x59, 0x09, 0x06, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, - 0x7C, 0x12, 0x11, 0x12, 0x7C, - 0x7F, 0x49, 0x49, 0x49, 0x36, - 0x3E, 0x41, 0x41, 0x41, 0x22, - 0x7F, 0x41, 0x41, 0x41, 0x3E, - 0x7F, 0x49, 0x49, 0x49, 0x41, - 0x7F, 0x09, 0x09, 0x09, 0x01, - 0x3E, 0x41, 0x41, 0x51, 0x73, - 0x7F, 0x08, 0x08, 0x08, 0x7F, - 0x00, 0x41, 0x7F, 0x41, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, - 0x7F, 0x08, 0x14, 0x22, 0x41, - 0x7F, 0x40, 0x40, 0x40, 0x40, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, - 0x7F, 0x04, 0x08, 0x10, 0x7F, - 0x3E, 0x41, 0x41, 0x41, 0x3E, - 0x7F, 0x09, 0x09, 0x09, 0x06, - 0x3E, 0x41, 0x51, 0x21, 0x5E, - 0x7F, 0x09, 0x19, 0x29, 0x46, - 0x26, 0x49, 0x49, 0x49, 0x32, - 0x03, 0x01, 0x7F, 0x01, 0x03, - 0x3F, 0x40, 0x40, 0x40, 0x3F, - 0x1F, 0x20, 0x40, 0x20, 0x1F, - 0x3F, 0x40, 0x38, 0x40, 0x3F, - 0x63, 0x14, 0x08, 0x14, 0x63, - 0x03, 0x04, 0x78, 0x04, 0x03, - 0x61, 0x59, 0x49, 0x4D, 0x43, - 0x00, 0x7F, 0x41, 0x41, 0x41, - 0x02, 0x04, 0x08, 0x10, 0x20, - 0x00, 0x41, 0x41, 0x41, 0x7F, - 0x04, 0x02, 0x01, 0x02, 0x04, - 0x40, 0x40, 0x40, 0x40, 0x40, - 0x00, 0x03, 0x07, 0x08, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, - 0x7F, 0x28, 0x44, 0x44, 0x38, - 0x38, 0x44, 0x44, 0x44, 0x28, - 0x38, 0x44, 0x44, 0x28, 0x7F, - 0x38, 0x54, 0x54, 0x54, 0x18, - 0x00, 0x08, 0x7E, 0x09, 0x02, - 0x18, 0xA4, 0xA4, 0x9C, 0x78, - 0x7F, 0x08, 0x04, 0x04, 0x78, - 0x00, 0x44, 0x7D, 0x40, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, - 0x7C, 0x08, 0x04, 0x04, 0x78, - 0x38, 0x44, 0x44, 0x44, 0x38, - 0xFC, 0x18, 0x24, 0x24, 0x18, - 0x18, 0x24, 0x24, 0x18, 0xFC, - 0x7C, 0x08, 0x04, 0x04, 0x08, - 0x48, 0x54, 0x54, 0x54, 0x24, - 0x04, 0x04, 0x3F, 0x44, 0x24, - 0x3C, 0x40, 0x40, 0x20, 0x7C, - 0x1C, 0x20, 0x40, 0x20, 0x1C, - 0x3C, 0x40, 0x30, 0x40, 0x3C, - 0x44, 0x28, 0x10, 0x28, 0x44, - 0x4C, 0x90, 0x90, 0x90, 0x7C, - 0x44, 0x64, 0x54, 0x4C, 0x44, - 0x00, 0x08, 0x36, 0x41, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, - 0x3C, 0x26, 0x23, 0x26, 0x3C, - 0x1E, 0xA1, 0xA1, 0x61, 0x12, - 0x3A, 0x40, 0x40, 0x20, 0x7A, - 0x38, 0x54, 0x54, 0x55, 0x59, - 0x21, 0x55, 0x55, 0x79, 0x41, - 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut - 0x21, 0x55, 0x54, 0x78, 0x40, - 0x20, 0x54, 0x55, 0x79, 0x40, - 0x0C, 0x1E, 0x52, 0x72, 0x12, - 0x39, 0x55, 0x55, 0x55, 0x59, - 0x39, 0x54, 0x54, 0x54, 0x59, - 0x39, 0x55, 0x54, 0x54, 0x58, - 0x00, 0x00, 0x45, 0x7C, 0x41, - 0x00, 0x02, 0x45, 0x7D, 0x42, - 0x00, 0x01, 0x45, 0x7C, 0x40, - 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut - 0xF0, 0x28, 0x25, 0x28, 0xF0, - 0x7C, 0x54, 0x55, 0x45, 0x00, - 0x20, 0x54, 0x54, 0x7C, 0x54, - 0x7C, 0x0A, 0x09, 0x7F, 0x49, - 0x32, 0x49, 0x49, 0x49, 0x32, - 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut - 0x32, 0x4A, 0x48, 0x48, 0x30, - 0x3A, 0x41, 0x41, 0x21, 0x7A, - 0x3A, 0x42, 0x40, 0x20, 0x78, - 0x00, 0x9D, 0xA0, 0xA0, 0x7D, - 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut - 0x3D, 0x40, 0x40, 0x40, 0x3D, - 0x3C, 0x24, 0xFF, 0x24, 0x24, - 0x48, 0x7E, 0x49, 0x43, 0x66, - 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, - 0xFF, 0x09, 0x29, 0xF6, 0x20, - 0xC0, 0x88, 0x7E, 0x09, 0x03, - 0x20, 0x54, 0x54, 0x79, 0x41, - 0x00, 0x00, 0x44, 0x7D, 0x41, - 0x30, 0x48, 0x48, 0x4A, 0x32, - 0x38, 0x40, 0x40, 0x22, 0x7A, - 0x00, 0x7A, 0x0A, 0x0A, 0x72, - 0x7D, 0x0D, 0x19, 0x31, 0x7D, - 0x26, 0x29, 0x29, 0x2F, 0x28, - 0x26, 0x29, 0x29, 0x29, 0x26, - 0x30, 0x48, 0x4D, 0x40, 0x20, - 0x38, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x38, - 0x2F, 0x10, 0xC8, 0xAC, 0xBA, - 0x2F, 0x10, 0x28, 0x34, 0xFA, - 0x00, 0x00, 0x7B, 0x00, 0x00, - 0x08, 0x14, 0x2A, 0x14, 0x22, - 0x22, 0x14, 0x2A, 0x14, 0x08, - 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code - 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block - 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block - 0x00, 0x00, 0x00, 0xFF, 0x00, - 0x10, 0x10, 0x10, 0xFF, 0x00, - 0x14, 0x14, 0x14, 0xFF, 0x00, - 0x10, 0x10, 0xFF, 0x00, 0xFF, - 0x10, 0x10, 0xF0, 0x10, 0xF0, - 0x14, 0x14, 0x14, 0xFC, 0x00, - 0x14, 0x14, 0xF7, 0x00, 0xFF, - 0x00, 0x00, 0xFF, 0x00, 0xFF, - 0x14, 0x14, 0xF4, 0x04, 0xFC, - 0x14, 0x14, 0x17, 0x10, 0x1F, - 0x10, 0x10, 0x1F, 0x10, 0x1F, - 0x14, 0x14, 0x14, 0x1F, 0x00, - 0x10, 0x10, 0x10, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x1F, 0x10, - 0x10, 0x10, 0x10, 0x1F, 0x10, - 0x10, 0x10, 0x10, 0xF0, 0x10, - 0x00, 0x00, 0x00, 0xFF, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xFF, 0x10, - 0x00, 0x00, 0x00, 0xFF, 0x14, - 0x00, 0x00, 0xFF, 0x00, 0xFF, - 0x00, 0x00, 0x1F, 0x10, 0x17, - 0x00, 0x00, 0xFC, 0x04, 0xF4, - 0x14, 0x14, 0x17, 0x10, 0x17, - 0x14, 0x14, 0xF4, 0x04, 0xF4, - 0x00, 0x00, 0xFF, 0x00, 0xF7, - 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0xF7, 0x00, 0xF7, - 0x14, 0x14, 0x14, 0x17, 0x14, - 0x10, 0x10, 0x1F, 0x10, 0x1F, - 0x14, 0x14, 0x14, 0xF4, 0x14, - 0x10, 0x10, 0xF0, 0x10, 0xF0, - 0x00, 0x00, 0x1F, 0x10, 0x1F, - 0x00, 0x00, 0x00, 0x1F, 0x14, - 0x00, 0x00, 0x00, 0xFC, 0x14, - 0x00, 0x00, 0xF0, 0x10, 0xF0, - 0x10, 0x10, 0xFF, 0x10, 0xFF, - 0x14, 0x14, 0x14, 0xFF, 0x14, - 0x10, 0x10, 0x10, 0x1F, 0x00, - 0x00, 0x00, 0x00, 0xF0, 0x10, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, - 0xFF, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, - 0x38, 0x44, 0x44, 0x38, 0x44, - 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta - 0x7E, 0x02, 0x02, 0x06, 0x06, - 0x02, 0x7E, 0x02, 0x7E, 0x02, - 0x63, 0x55, 0x49, 0x41, 0x63, - 0x38, 0x44, 0x44, 0x3C, 0x04, - 0x40, 0x7E, 0x20, 0x1E, 0x20, - 0x06, 0x02, 0x7E, 0x02, 0x02, - 0x99, 0xA5, 0xE7, 0xA5, 0x99, - 0x1C, 0x2A, 0x49, 0x2A, 0x1C, - 0x4C, 0x72, 0x01, 0x72, 0x4C, - 0x30, 0x4A, 0x4D, 0x4D, 0x30, - 0x30, 0x48, 0x78, 0x48, 0x30, - 0xBC, 0x62, 0x5A, 0x46, 0x3D, - 0x3E, 0x49, 0x49, 0x49, 0x00, - 0x7E, 0x01, 0x01, 0x01, 0x7E, - 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, - 0x44, 0x44, 0x5F, 0x44, 0x44, - 0x40, 0x51, 0x4A, 0x44, 0x40, - 0x40, 0x44, 0x4A, 0x51, 0x40, - 0x00, 0x00, 0xFF, 0x01, 0x03, - 0xE0, 0x80, 0xFF, 0x00, 0x00, - 0x08, 0x08, 0x6B, 0x6B, 0x08, - 0x36, 0x12, 0x36, 0x24, 0x36, - 0x06, 0x0F, 0x09, 0x0F, 0x06, - 0x00, 0x00, 0x18, 0x18, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x00, - 0x30, 0x40, 0xFF, 0x01, 0x01, - 0x00, 0x1F, 0x01, 0x01, 0x1E, - 0x00, 0x19, 0x1D, 0x17, 0x12, - 0x00, 0x3C, 0x3C, 0x3C, 0x3C, - 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24, 0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49, 0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41, 0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41, 0x22, 0x14, 0x08, 0x02, 0x01, 0x59, 0x09, 0x06, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40, 0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41, 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut + 0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54, 0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55, 0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00, 0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45, 0x7C, 0x40, 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut + 0xF0, 0x28, 0x25, 0x28, 0xF0, 0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A, 0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut + 0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A, 0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut + 0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24, 0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09, 0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09, 0x03, 0x20, 0x54, 0x54, 0x79, 0x41, 0x00, 0x00, 0x44, 0x7D, 0x41, 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38, 0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19, 0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26, 0x30, 0x48, 0x4D, 0x40, 0x20, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 0x2F, 0x10, 0x28, 0x34, 0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x08, 0x14, 0x2A, 0x14, 0x22, 0x22, 0x14, 0x2A, 0x14, 0x08, 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code + 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block + 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x14, 0x14, 0x17, 0x10, 0x1F, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F, + 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta + 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP }; -#endif // FONT5X7_H +#endif // FONT5X7_H diff --git a/drivers/avr/hd44780.c b/drivers/avr/hd44780.c index 51414d8f91..f71069dece 100644 --- a/drivers/avr/hd44780.c +++ b/drivers/avr/hd44780.c @@ -3,7 +3,7 @@ Author: Peter Fleury http://tinyurl.com/peterfleury License: GNU General Public License Version 3 File: $Id: lcd.c,v 1.15.2.2 2015/01/17 12:16:05 peter Exp $ - Software: AVR-GCC 3.3 + Software: AVR-GCC 3.3 Target: any AVR device, memory mapped mode only for AT90S4414/8515/Mega DESCRIPTION @@ -13,15 +13,15 @@ changed lcd_init(), added additional constants for lcd_command(), added 4-bit I/O mode, improved and optimized code. - Library can be operated in memory mapped mode (LCD_IO_MODE=0) or in + Library can be operated in memory mapped mode (LCD_IO_MODE=0) or in 4-bit IO port mode (LCD_IO_MODE=1). 8-bit IO port mode not supported. - + Memory mapped mode compatible with Kanda STK200, but supports also generation of R/W signal through A8 address line. USAGE See the C include lcd.h file for a description of each function - + *****************************************************************************/ #include #include @@ -29,55 +29,54 @@ #include #include "hd44780.h" -/* -** constants/macros +/* +** constants/macros */ -#define DDR(x) (*(&x - 1)) /* address of data direction register of port x */ +#define DDR(x) (*(&x - 1)) /* address of data direction register of port x */ #if defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__) - /* on ATmega64/128 PINF is on port 0x00 and not 0x60 */ - #define PIN(x) ( &PORTF==&(x) ? _SFR_IO8(0x00) : (*(&x - 2)) ) +/* on ATmega64/128 PINF is on port 0x00 and not 0x60 */ +# define PIN(x) (&PORTF == &(x) ? _SFR_IO8(0x00) : (*(&x - 2))) #else - #define PIN(x) (*(&x - 2)) /* address of input register of port x */ -#endif - - -#if LCD_IO_MODE -#define lcd_e_delay() _delay_us(LCD_DELAY_ENABLE_PULSE) -#define lcd_e_high() LCD_E_PORT |= _BV(LCD_E_PIN); -#define lcd_e_low() LCD_E_PORT &= ~_BV(LCD_E_PIN); -#define lcd_e_toggle() toggle_e() -#define lcd_rw_high() LCD_RW_PORT |= _BV(LCD_RW_PIN) -#define lcd_rw_low() LCD_RW_PORT &= ~_BV(LCD_RW_PIN) -#define lcd_rs_high() LCD_RS_PORT |= _BV(LCD_RS_PIN) -#define lcd_rs_low() LCD_RS_PORT &= ~_BV(LCD_RS_PIN) +# define PIN(x) (*(&x - 2)) /* address of input register of port x */ #endif #if LCD_IO_MODE -#if LCD_LINES==1 -#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_4BIT_1LINE -#else -#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_4BIT_2LINES +# define lcd_e_delay() _delay_us(LCD_DELAY_ENABLE_PULSE) +# define lcd_e_high() LCD_E_PORT |= _BV(LCD_E_PIN); +# define lcd_e_low() LCD_E_PORT &= ~_BV(LCD_E_PIN); +# define lcd_e_toggle() toggle_e() +# define lcd_rw_high() LCD_RW_PORT |= _BV(LCD_RW_PIN) +# define lcd_rw_low() LCD_RW_PORT &= ~_BV(LCD_RW_PIN) +# define lcd_rs_high() LCD_RS_PORT |= _BV(LCD_RS_PIN) +# define lcd_rs_low() LCD_RS_PORT &= ~_BV(LCD_RS_PIN) #endif + +#if LCD_IO_MODE +# if LCD_LINES == 1 +# define LCD_FUNCTION_DEFAULT LCD_FUNCTION_4BIT_1LINE +# else +# define LCD_FUNCTION_DEFAULT LCD_FUNCTION_4BIT_2LINES +# endif #else -#if LCD_LINES==1 -#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_8BIT_1LINE -#else -#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_8BIT_2LINES -#endif +# if LCD_LINES == 1 +# define LCD_FUNCTION_DEFAULT LCD_FUNCTION_8BIT_1LINE +# else +# define LCD_FUNCTION_DEFAULT LCD_FUNCTION_8BIT_2LINES +# endif #endif #if LCD_CONTROLLER_KS0073 -#if LCD_LINES==4 +# if LCD_LINES == 4 -#define KS0073_EXTENDED_FUNCTION_REGISTER_ON 0x2C /* |0|010|1100 4-bit mode, extension-bit RE = 1 */ -#define KS0073_EXTENDED_FUNCTION_REGISTER_OFF 0x28 /* |0|010|1000 4-bit mode, extension-bit RE = 0 */ -#define KS0073_4LINES_MODE 0x09 /* |0|000|1001 4 lines mode */ +# define KS0073_EXTENDED_FUNCTION_REGISTER_ON 0x2C /* |0|010|1100 4-bit mode, extension-bit RE = 1 */ +# define KS0073_EXTENDED_FUNCTION_REGISTER_OFF 0x28 /* |0|010|1000 4-bit mode, extension-bit RE = 0 */ +# define KS0073_4LINES_MODE 0x09 /* |0|000|1001 4 lines mode */ -#endif +# endif #endif -/* -** function prototypes +/* +** function prototypes */ #if LCD_IO_MODE static void toggle_e(void); @@ -87,93 +86,83 @@ static void toggle_e(void); ** local functions */ - -/************************************************************************* +/************************************************************************* delay for a minimum of microseconds the number of loops is calculated at compile-time from MCU clock frequency *************************************************************************/ -#define delay(us) _delay_us(us) - +#define delay(us) _delay_us(us) #if LCD_IO_MODE /* toggle Enable Pin to initiate write */ -static void toggle_e(void) -{ +static void toggle_e(void) { lcd_e_high(); lcd_e_delay(); lcd_e_low(); } #endif - /************************************************************************* Low-level function to write byte to LCD controller Input: data byte to write to LCD - rs 1: write data + rs 1: write data 0: write instruction Returns: none *************************************************************************/ #if LCD_IO_MODE -static void lcd_write(uint8_t data,uint8_t rs) -{ - unsigned char dataBits ; +static void lcd_write(uint8_t data, uint8_t rs) { + unsigned char dataBits; - - if (rs) { /* write data (RS=1, RW=0) */ - lcd_rs_high(); - } else { /* write instruction (RS=0, RW=0) */ - lcd_rs_low(); + if (rs) { /* write data (RS=1, RW=0) */ + lcd_rs_high(); + } else { /* write instruction (RS=0, RW=0) */ + lcd_rs_low(); } - lcd_rw_low(); /* RW=0 write mode */ + lcd_rw_low(); /* RW=0 write mode */ - if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT ) - && (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) ) - { + if ((&LCD_DATA0_PORT == &LCD_DATA1_PORT) && (&LCD_DATA1_PORT == &LCD_DATA2_PORT) && (&LCD_DATA2_PORT == &LCD_DATA3_PORT) && (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3)) { /* configure data pins as output */ DDR(LCD_DATA0_PORT) |= 0x0F; /* output high nibble first */ - dataBits = LCD_DATA0_PORT & 0xF0; - LCD_DATA0_PORT = dataBits |((data>>4)&0x0F); + dataBits = LCD_DATA0_PORT & 0xF0; + LCD_DATA0_PORT = dataBits | ((data >> 4) & 0x0F); lcd_e_toggle(); /* output low nibble */ - LCD_DATA0_PORT = dataBits | (data&0x0F); + LCD_DATA0_PORT = dataBits | (data & 0x0F); lcd_e_toggle(); /* all data pins high (inactive) */ LCD_DATA0_PORT = dataBits | 0x0F; - } - else - { + } else { /* configure data pins as output */ DDR(LCD_DATA0_PORT) |= _BV(LCD_DATA0_PIN); DDR(LCD_DATA1_PORT) |= _BV(LCD_DATA1_PIN); DDR(LCD_DATA2_PORT) |= _BV(LCD_DATA2_PIN); DDR(LCD_DATA3_PORT) |= _BV(LCD_DATA3_PIN); - + /* output high nibble first */ LCD_DATA3_PORT &= ~_BV(LCD_DATA3_PIN); LCD_DATA2_PORT &= ~_BV(LCD_DATA2_PIN); LCD_DATA1_PORT &= ~_BV(LCD_DATA1_PIN); LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN); - if(data & 0x80) LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN); - if(data & 0x40) LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN); - if(data & 0x20) LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN); - if(data & 0x10) LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); + if (data & 0x80) LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN); + if (data & 0x40) LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN); + if (data & 0x20) LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN); + if (data & 0x10) LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); lcd_e_toggle(); - + /* output low nibble */ LCD_DATA3_PORT &= ~_BV(LCD_DATA3_PIN); LCD_DATA2_PORT &= ~_BV(LCD_DATA2_PIN); LCD_DATA1_PORT &= ~_BV(LCD_DATA1_PIN); LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN); - if(data & 0x08) LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN); - if(data & 0x04) LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN); - if(data & 0x02) LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN); - if(data & 0x01) LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); - lcd_e_toggle(); - + if (data & 0x08) LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN); + if (data & 0x04) LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN); + if (data & 0x02) LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN); + if (data & 0x01) LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); + lcd_e_toggle(); + /* all data pins high (inactive) */ LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN); @@ -182,85 +171,81 @@ static void lcd_write(uint8_t data,uint8_t rs) } } #else -#define lcd_write(d,rs) if (rs) *(volatile uint8_t*)(LCD_IO_DATA) = d; else *(volatile uint8_t*)(LCD_IO_FUNCTION) = d; +# define lcd_write(d, rs) \ + if (rs) \ + *(volatile uint8_t *)(LCD_IO_DATA) = d; \ + else \ + *(volatile uint8_t *)(LCD_IO_FUNCTION) = d; /* rs==0 -> write instruction to LCD_IO_FUNCTION */ /* rs==1 -> write data to LCD_IO_DATA */ #endif - /************************************************************************* Low-level function to read byte from LCD controller -Input: rs 1: read data +Input: rs 1: read data 0: read busy flag / address counter Returns: byte read from LCD controller *************************************************************************/ #if LCD_IO_MODE -static uint8_t lcd_read(uint8_t rs) -{ +static uint8_t lcd_read(uint8_t rs) { uint8_t data; - - + if (rs) - lcd_rs_high(); /* RS=1: read data */ + lcd_rs_high(); /* RS=1: read data */ else - lcd_rs_low(); /* RS=0: read busy flag */ - lcd_rw_high(); /* RW=1 read mode */ - - if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT ) - && ( LCD_DATA0_PIN == 0 )&& (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) ) - { - DDR(LCD_DATA0_PORT) &= 0xF0; /* configure data pins as input */ - - lcd_e_high(); - lcd_e_delay(); - data = PIN(LCD_DATA0_PORT) << 4; /* read high nibble first */ - lcd_e_low(); - - lcd_e_delay(); /* Enable 500ns low */ - + lcd_rs_low(); /* RS=0: read busy flag */ + lcd_rw_high(); /* RW=1 read mode */ + + if ((&LCD_DATA0_PORT == &LCD_DATA1_PORT) && (&LCD_DATA1_PORT == &LCD_DATA2_PORT) && (&LCD_DATA2_PORT == &LCD_DATA3_PORT) && (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3)) { + DDR(LCD_DATA0_PORT) &= 0xF0; /* configure data pins as input */ + lcd_e_high(); lcd_e_delay(); - data |= PIN(LCD_DATA0_PORT)&0x0F; /* read low nibble */ + data = PIN(LCD_DATA0_PORT) << 4; /* read high nibble first */ lcd_e_low(); - } - else - { + + lcd_e_delay(); /* Enable 500ns low */ + + lcd_e_high(); + lcd_e_delay(); + data |= PIN(LCD_DATA0_PORT) & 0x0F; /* read low nibble */ + lcd_e_low(); + } else { /* configure data pins as input */ DDR(LCD_DATA0_PORT) &= ~_BV(LCD_DATA0_PIN); DDR(LCD_DATA1_PORT) &= ~_BV(LCD_DATA1_PIN); DDR(LCD_DATA2_PORT) &= ~_BV(LCD_DATA2_PIN); DDR(LCD_DATA3_PORT) &= ~_BV(LCD_DATA3_PIN); - + /* read high nibble first */ lcd_e_high(); - lcd_e_delay(); + lcd_e_delay(); data = 0; - if ( PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN) ) data |= 0x10; - if ( PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN) ) data |= 0x20; - if ( PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN) ) data |= 0x40; - if ( PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN) ) data |= 0x80; + if (PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN)) data |= 0x10; + if (PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN)) data |= 0x20; + if (PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN)) data |= 0x40; + if (PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN)) data |= 0x80; lcd_e_low(); - lcd_e_delay(); /* Enable 500ns low */ - - /* read low nibble */ + lcd_e_delay(); /* Enable 500ns low */ + + /* read low nibble */ lcd_e_high(); lcd_e_delay(); - if ( PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN) ) data |= 0x01; - if ( PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN) ) data |= 0x02; - if ( PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN) ) data |= 0x04; - if ( PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN) ) data |= 0x08; + if (PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN)) data |= 0x01; + if (PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN)) data |= 0x02; + if (PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN)) data |= 0x04; + if (PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN)) data |= 0x08; lcd_e_low(); } return data; } #else -#define lcd_read(rs) (rs) ? *(volatile uint8_t*)(LCD_IO_DATA+LCD_IO_READ) : *(volatile uint8_t*)(LCD_IO_FUNCTION+LCD_IO_READ) +# define lcd_read(rs) (rs) ? *(volatile uint8_t *)(LCD_IO_DATA + LCD_IO_READ) : *(volatile uint8_t *)(LCD_IO_FUNCTION + LCD_IO_READ) /* rs==0 -> read instruction from LCD_IO_FUNCTION */ /* rs==1 -> read data from LCD_IO_DATA */ #endif - /************************************************************************* loops while lcd is busy, returns address counter *************************************************************************/ @@ -268,65 +253,62 @@ static uint8_t lcd_waitbusy(void) { register uint8_t c; - + /* wait until busy flag is cleared */ - while ( (c=lcd_read(0)) & (1<= LCD_START_LINE2) && (pos < LCD_START_LINE3) ) + else if ((pos >= LCD_START_LINE2) && (pos < LCD_START_LINE3)) addressCounter = LCD_START_LINE3; - else if ( (pos >= LCD_START_LINE3) && (pos < LCD_START_LINE4) ) + else if ((pos >= LCD_START_LINE3) && (pos < LCD_START_LINE4)) addressCounter = LCD_START_LINE4; - else + else addressCounter = LCD_START_LINE1; -#else - if ( pos < LCD_START_LINE3 ) +# else + if (pos < LCD_START_LINE3) addressCounter = LCD_START_LINE2; - else if ( (pos >= LCD_START_LINE2) && (pos < LCD_START_LINE4) ) + else if ((pos >= LCD_START_LINE2) && (pos < LCD_START_LINE4)) addressCounter = LCD_START_LINE3; - else if ( (pos >= LCD_START_LINE3) && (pos < LCD_START_LINE2) ) + else if ((pos >= LCD_START_LINE3) && (pos < LCD_START_LINE2)) addressCounter = LCD_START_LINE4; - else + else addressCounter = LCD_START_LINE1; +# endif #endif -#endif - lcd_command((1<>4; - LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); // LCD_FUNCTION_8BIT>>4; + LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN); // LCD_FUNCTION>>4; + LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); // LCD_FUNCTION_8BIT>>4; lcd_e_toggle(); - delay(LCD_DELAY_INIT); /* delay, busy flag can't be checked here */ - - /* repeat last command */ - lcd_e_toggle(); - delay(LCD_DELAY_INIT_REP); /* delay, busy flag can't be checked here */ - + delay(LCD_DELAY_INIT); /* delay, busy flag can't be checked here */ + + /* repeat last command */ + lcd_e_toggle(); + delay(LCD_DELAY_INIT_REP); /* delay, busy flag can't be checked here */ + /* repeat last command a third time */ - lcd_e_toggle(); - delay(LCD_DELAY_INIT_REP); /* delay, busy flag can't be checked here */ + lcd_e_toggle(); + delay(LCD_DELAY_INIT_REP); /* delay, busy flag can't be checked here */ /* now configure for 4bit mode */ - LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN); // LCD_FUNCTION_4BIT_1LINE>>4 + LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN); // LCD_FUNCTION_4BIT_1LINE>>4 lcd_e_toggle(); - delay(LCD_DELAY_INIT_4BIT); /* some displays need this additional delay */ - - /* from now the LCD only accepts 4 bit I/O, we can use lcd_command() */ + delay(LCD_DELAY_INIT_4BIT); /* some displays need this additional delay */ + + /* from now the LCD only accepts 4 bit I/O, we can use lcd_command() */ #else /* * Initialize LCD to 8 bit memory mapped mode */ - - /* enable external SRAM (memory mapped lcd) and one wait state */ + + /* enable external SRAM (memory mapped lcd) and one wait state */ MCUCR = _BV(SRE) | _BV(SRW); /* reset LCD */ - delay(LCD_DELAY_BOOTUP); /* wait 16ms after power-on */ - lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */ - delay(LCD_DELAY_INIT); /* wait 5ms */ - lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */ - delay(LCD_DELAY_INIT_REP); /* wait 64us */ - lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */ - delay(LCD_DELAY_INIT_REP); /* wait 64us */ + delay(LCD_DELAY_BOOTUP); /* wait 16ms after power-on */ + lcd_write(LCD_FUNCTION_8BIT_1LINE, 0); /* function set: 8bit interface */ + delay(LCD_DELAY_INIT); /* wait 5ms */ + lcd_write(LCD_FUNCTION_8BIT_1LINE, 0); /* function set: 8bit interface */ + delay(LCD_DELAY_INIT_REP); /* wait 64us */ + lcd_write(LCD_FUNCTION_8BIT_1LINE, 0); /* function set: 8bit interface */ + delay(LCD_DELAY_INIT_REP); /* wait 64us */ #endif #if KS0073_4LINES_MODE /* Display with KS0073 controller requires special commands for enabling 4 line mode */ - lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_ON); - lcd_command(KS0073_4LINES_MODE); - lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_OFF); + lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_ON); + lcd_command(KS0073_4LINES_MODE); + lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_OFF); #else - lcd_command(LCD_FUNCTION_DEFAULT); /* function set: display lines */ + lcd_command(LCD_FUNCTION_DEFAULT); /* function set: display lines */ #endif - lcd_command(LCD_DISP_OFF); /* display off */ - lcd_clrscr(); /* display clear */ - lcd_command(LCD_MODE_DEFAULT); /* set entry mode */ - lcd_command(dispAttr); /* display/cursor control */ - -}/* lcd_init */ + lcd_command(LCD_DISP_OFF); /* display off */ + lcd_clrscr(); /* display clear */ + lcd_command(LCD_MODE_DEFAULT); /* set entry mode */ + lcd_command(dispAttr); /* display/cursor control */ +} /* lcd_init */ diff --git a/drivers/avr/hd44780.h b/drivers/avr/hd44780.h index 7421c8131f..e60817e989 100644 --- a/drivers/avr/hd44780.h +++ b/drivers/avr/hd44780.h @@ -6,7 +6,7 @@ License: GNU General Public License Version 3 File: $Id: lcd.h,v 1.14.2.4 2015/01/20 17:16:07 peter Exp $ Software: AVR-GCC 4.x - Hardware: any AVR device, memory mapped mode only for AVR with + Hardware: any AVR device, memory mapped mode only for AVR with memory mapped interface (AT90S8515/ATmega8515/ATmega128) ***************************************************************************/ @@ -15,333 +15,315 @@ Collection of libraries for AVR-GCC @author Peter Fleury pfleury@gmx.ch http://tinyurl.com/peterfleury @copyright (C) 2015 Peter Fleury, GNU General Public License Version 3 - + @file @defgroup pfleury_lcd LCD library @code #include @endcode - + @brief Basic routines for interfacing a HD44780U-based character LCD display - LCD character displays can be found in many devices, like espresso machines, laser printers. - The Hitachi HD44780 controller and its compatible controllers like Samsung KS0066U have become an industry standard for these types of displays. - + LCD character displays can be found in many devices, like espresso machines, laser printers. + The Hitachi HD44780 controller and its compatible controllers like Samsung KS0066U have become an industry standard for these types of displays. + This library allows easy interfacing with a HD44780 compatible display and can be - operated in memory mapped mode (LCD_IO_MODE defined as 0 in the include file lcd.h.) or in + operated in memory mapped mode (LCD_IO_MODE defined as 0 in the include file lcd.h.) or in 4-bit IO port mode (LCD_IO_MODE defined as 1). 8-bit IO port mode is not supported. Memory mapped mode is compatible with old Kanda STK200 starter kit, but also supports generation of R/W signal through A8 address line. @see The chapter Interfacing a HD44780 Based LCD to an AVR - on my home page, which shows example circuits how to connect an LCD to an AVR controller. + on my home page, which shows example circuits how to connect an LCD to an AVR controller. @author Peter Fleury pfleury@gmx.ch http://tinyurl.com/peterfleury - + @version 2.0 - + @copyright (C) 2015 Peter Fleury, GNU General Public License Version 3 - + */ #include #include #if (__GNUC__ * 100 + __GNUC_MINOR__) < 405 -#error "This library requires AVR-GCC 4.5 or later, update to newer AVR-GCC compiler !" +# error "This library requires AVR-GCC 4.5 or later, update to newer AVR-GCC compiler !" #endif - /**@{*/ /* - * LCD and target specific definitions below can be defined in a separate include file with name lcd_definitions.h instead modifying this file + * LCD and target specific definitions below can be defined in a separate include file with name lcd_definitions.h instead modifying this file * by adding -D_LCD_DEFINITIONS_FILE to the CDEFS section in the Makefile * All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h */ #ifdef _LCD_DEFINITIONS_FILE -#include "lcd_definitions.h" +# include "lcd_definitions.h" #endif - /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ -#ifndef LCD_CONTROLLER_KS0073 -#define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ +#ifndef LCD_CONTROLLER_KS0073 +# define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ #endif -/** - * @name Definitions for Display Size +/** + * @name Definitions for Display Size * Change these definitions to adapt setting to your display * - * These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by + * These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by * adding -D_LCD_DEFINITIONS_FILE to the CDEFS section in the Makefile. * All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h * */ #ifndef LCD_LINES -#define LCD_LINES 2 /**< number of visible lines of the display */ +# define LCD_LINES 2 /**< number of visible lines of the display */ #endif #ifndef LCD_DISP_LENGTH -#define LCD_DISP_LENGTH 16 /**< visibles characters per line of the display */ +# define LCD_DISP_LENGTH 16 /**< visibles characters per line of the display */ #endif #ifndef LCD_LINE_LENGTH -#define LCD_LINE_LENGTH 0x40 /**< internal line length of the display */ +# define LCD_LINE_LENGTH 0x40 /**< internal line length of the display */ #endif #ifndef LCD_START_LINE1 -#define LCD_START_LINE1 0x00 /**< DDRAM address of first char of line 1 */ +# define LCD_START_LINE1 0x00 /**< DDRAM address of first char of line 1 */ #endif #ifndef LCD_START_LINE2 -#define LCD_START_LINE2 0x40 /**< DDRAM address of first char of line 2 */ +# define LCD_START_LINE2 0x40 /**< DDRAM address of first char of line 2 */ #endif #ifndef LCD_START_LINE3 -#define LCD_START_LINE3 0x14 /**< DDRAM address of first char of line 3 */ +# define LCD_START_LINE3 0x14 /**< DDRAM address of first char of line 3 */ #endif #ifndef LCD_START_LINE4 -#define LCD_START_LINE4 0x54 /**< DDRAM address of first char of line 4 */ +# define LCD_START_LINE4 0x54 /**< DDRAM address of first char of line 4 */ #endif #ifndef LCD_WRAP_LINES -#define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */ +# define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */ #endif - /** * @name Definitions for 4-bit IO mode * - * The four LCD data lines and the three control lines RS, RW, E can be on the - * same port or on different ports. + * The four LCD data lines and the three control lines RS, RW, E can be on the + * same port or on different ports. * Change LCD_RS_PORT, LCD_RW_PORT, LCD_E_PORT if you want the control lines on - * different ports. + * different ports. * * Normally the four data lines should be mapped to bit 0..3 on one port, but it * is possible to connect these data lines in different order or even on different * ports by adapting the LCD_DATAx_PORT and LCD_DATAx_PIN definitions. * - * Adjust these definitions to your target.\n - * These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by + * Adjust these definitions to your target.\n + * These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by * adding \b -D_LCD_DEFINITIONS_FILE to the \b CDEFS section in the Makefile. * All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h - * + * */ -#define LCD_IO_MODE 1 /**< 0: memory mapped mode, 1: IO port mode */ +#define LCD_IO_MODE 1 /**< 0: memory mapped mode, 1: IO port mode */ #if LCD_IO_MODE -#ifndef LCD_PORT -#define LCD_PORT PORTA /**< port for the LCD lines */ -#endif -#ifndef LCD_DATA0_PORT -#define LCD_DATA0_PORT LCD_PORT /**< port for 4bit data bit 0 */ -#endif -#ifndef LCD_DATA1_PORT -#define LCD_DATA1_PORT LCD_PORT /**< port for 4bit data bit 1 */ -#endif -#ifndef LCD_DATA2_PORT -#define LCD_DATA2_PORT LCD_PORT /**< port for 4bit data bit 2 */ -#endif -#ifndef LCD_DATA3_PORT -#define LCD_DATA3_PORT LCD_PORT /**< port for 4bit data bit 3 */ -#endif -#ifndef LCD_DATA0_PIN -#define LCD_DATA0_PIN 4 /**< pin for 4bit data bit 0 */ -#endif -#ifndef LCD_DATA1_PIN -#define LCD_DATA1_PIN 5 /**< pin for 4bit data bit 1 */ -#endif -#ifndef LCD_DATA2_PIN -#define LCD_DATA2_PIN 6 /**< pin for 4bit data bit 2 */ -#endif -#ifndef LCD_DATA3_PIN -#define LCD_DATA3_PIN 7 /**< pin for 4bit data bit 3 */ -#endif -#ifndef LCD_RS_PORT -#define LCD_RS_PORT LCD_PORT /**< port for RS line */ -#endif -#ifndef LCD_RS_PIN -#define LCD_RS_PIN 3 /**< pin for RS line */ -#endif -#ifndef LCD_RW_PORT -#define LCD_RW_PORT LCD_PORT /**< port for RW line */ -#endif -#ifndef LCD_RW_PIN -#define LCD_RW_PIN 2 /**< pin for RW line */ -#endif -#ifndef LCD_E_PORT -#define LCD_E_PORT LCD_PORT /**< port for Enable line */ -#endif -#ifndef LCD_E_PIN -#define LCD_E_PIN 1 /**< pin for Enable line */ -#endif +# ifndef LCD_PORT +# define LCD_PORT PORTA /**< port for the LCD lines */ +# endif +# ifndef LCD_DATA0_PORT +# define LCD_DATA0_PORT LCD_PORT /**< port for 4bit data bit 0 */ +# endif +# ifndef LCD_DATA1_PORT +# define LCD_DATA1_PORT LCD_PORT /**< port for 4bit data bit 1 */ +# endif +# ifndef LCD_DATA2_PORT +# define LCD_DATA2_PORT LCD_PORT /**< port for 4bit data bit 2 */ +# endif +# ifndef LCD_DATA3_PORT +# define LCD_DATA3_PORT LCD_PORT /**< port for 4bit data bit 3 */ +# endif +# ifndef LCD_DATA0_PIN +# define LCD_DATA0_PIN 4 /**< pin for 4bit data bit 0 */ +# endif +# ifndef LCD_DATA1_PIN +# define LCD_DATA1_PIN 5 /**< pin for 4bit data bit 1 */ +# endif +# ifndef LCD_DATA2_PIN +# define LCD_DATA2_PIN 6 /**< pin for 4bit data bit 2 */ +# endif +# ifndef LCD_DATA3_PIN +# define LCD_DATA3_PIN 7 /**< pin for 4bit data bit 3 */ +# endif +# ifndef LCD_RS_PORT +# define LCD_RS_PORT LCD_PORT /**< port for RS line */ +# endif +# ifndef LCD_RS_PIN +# define LCD_RS_PIN 3 /**< pin for RS line */ +# endif +# ifndef LCD_RW_PORT +# define LCD_RW_PORT LCD_PORT /**< port for RW line */ +# endif +# ifndef LCD_RW_PIN +# define LCD_RW_PIN 2 /**< pin for RW line */ +# endif +# ifndef LCD_E_PORT +# define LCD_E_PORT LCD_PORT /**< port for Enable line */ +# endif +# ifndef LCD_E_PIN +# define LCD_E_PIN 1 /**< pin for Enable line */ +# endif -#elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || defined(__AVR_ATmega64__) || \ - defined(__AVR_ATmega8515__)|| defined(__AVR_ATmega103__) || defined(__AVR_ATmega128__) || \ - defined(__AVR_ATmega161__) || defined(__AVR_ATmega162__) +#elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || defined(__AVR_ATmega64__) || defined(__AVR_ATmega8515__) || defined(__AVR_ATmega103__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega161__) || defined(__AVR_ATmega162__) /* * memory mapped mode is only supported when the device has an external data memory interface */ -#define LCD_IO_DATA 0xC000 /* A15=E=1, A14=RS=1 */ -#define LCD_IO_FUNCTION 0x8000 /* A15=E=1, A14=RS=0 */ -#define LCD_IO_READ 0x0100 /* A8 =R/W=1 (R/W: 1=Read, 0=Write */ +# define LCD_IO_DATA 0xC000 /* A15=E=1, A14=RS=1 */ +# define LCD_IO_FUNCTION 0x8000 /* A15=E=1, A14=RS=0 */ +# define LCD_IO_READ 0x0100 /* A8 =R/W=1 (R/W: 1=Read, 0=Write */ #else -#error "external data memory interface not available for this device, use 4-bit IO port mode" +# error "external data memory interface not available for this device, use 4-bit IO port mode" #endif - /** * @name Definitions of delays * Used to calculate delay timers. * Adapt the F_CPU define in the Makefile to the clock frequency in Hz of your target * - * These delay times can be adjusted, if some displays require different delays.\n - * These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by + * These delay times can be adjusted, if some displays require different delays.\n + * These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by * adding \b -D_LCD_DEFINITIONS_FILE to the \b CDEFS section in the Makefile. * All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h */ #ifndef LCD_DELAY_BOOTUP -#define LCD_DELAY_BOOTUP 16000 /**< delay in micro seconds after power-on */ +# define LCD_DELAY_BOOTUP 16000 /**< delay in micro seconds after power-on */ #endif #ifndef LCD_DELAY_INIT -#define LCD_DELAY_INIT 5000 /**< delay in micro seconds after initialization command sent */ +# define LCD_DELAY_INIT 5000 /**< delay in micro seconds after initialization command sent */ #endif #ifndef LCD_DELAY_INIT_REP -#define LCD_DELAY_INIT_REP 64 /**< delay in micro seconds after initialization command repeated */ +# define LCD_DELAY_INIT_REP 64 /**< delay in micro seconds after initialization command repeated */ #endif #ifndef LCD_DELAY_INIT_4BIT -#define LCD_DELAY_INIT_4BIT 64 /**< delay in micro seconds after setting 4-bit mode */ +# define LCD_DELAY_INIT_4BIT 64 /**< delay in micro seconds after setting 4-bit mode */ #endif #ifndef LCD_DELAY_BUSY_FLAG -#define LCD_DELAY_BUSY_FLAG 4 /**< time in micro seconds the address counter is updated after busy flag is cleared */ +# define LCD_DELAY_BUSY_FLAG 4 /**< time in micro seconds the address counter is updated after busy flag is cleared */ #endif #ifndef LCD_DELAY_ENABLE_PULSE -#define LCD_DELAY_ENABLE_PULSE 1 /**< enable signal pulse width in micro seconds */ +# define LCD_DELAY_ENABLE_PULSE 1 /**< enable signal pulse width in micro seconds */ #endif - /** * @name Definitions for LCD command instructions - * The constants define the various LCD controller instructions which can be passed to the + * The constants define the various LCD controller instructions which can be passed to the * function lcd_command(), see HD44780 data sheet for a complete description. */ /* instruction register bit positions, see HD44780U data sheet */ -#define LCD_CLR 0 /* DB0: clear display */ -#define LCD_HOME 1 /* DB1: return to home position */ -#define LCD_ENTRY_MODE 2 /* DB2: set entry mode */ -#define LCD_ENTRY_INC 1 /* DB1: 1=increment, 0=decrement */ -#define LCD_ENTRY_SHIFT 0 /* DB2: 1=display shift on */ -#define LCD_ON 3 /* DB3: turn lcd/cursor on */ -#define LCD_ON_DISPLAY 2 /* DB2: turn display on */ -#define LCD_ON_CURSOR 1 /* DB1: turn cursor on */ -#define LCD_ON_BLINK 0 /* DB0: blinking cursor ? */ -#define LCD_MOVE 4 /* DB4: move cursor/display */ -#define LCD_MOVE_DISP 3 /* DB3: move display (0-> cursor) ? */ -#define LCD_MOVE_RIGHT 2 /* DB2: move right (0-> left) ? */ -#define LCD_FUNCTION 5 /* DB5: function set */ -#define LCD_FUNCTION_8BIT 4 /* DB4: set 8BIT mode (0->4BIT mode) */ -#define LCD_FUNCTION_2LINES 3 /* DB3: two lines (0->one line) */ -#define LCD_FUNCTION_10DOTS 2 /* DB2: 5x10 font (0->5x7 font) */ -#define LCD_CGRAM 6 /* DB6: set CG RAM address */ -#define LCD_DDRAM 7 /* DB7: set DD RAM address */ -#define LCD_BUSY 7 /* DB7: LCD is busy */ +#define LCD_CLR 0 /* DB0: clear display */ +#define LCD_HOME 1 /* DB1: return to home position */ +#define LCD_ENTRY_MODE 2 /* DB2: set entry mode */ +#define LCD_ENTRY_INC 1 /* DB1: 1=increment, 0=decrement */ +#define LCD_ENTRY_SHIFT 0 /* DB2: 1=display shift on */ +#define LCD_ON 3 /* DB3: turn lcd/cursor on */ +#define LCD_ON_DISPLAY 2 /* DB2: turn display on */ +#define LCD_ON_CURSOR 1 /* DB1: turn cursor on */ +#define LCD_ON_BLINK 0 /* DB0: blinking cursor ? */ +#define LCD_MOVE 4 /* DB4: move cursor/display */ +#define LCD_MOVE_DISP 3 /* DB3: move display (0-> cursor) ? */ +#define LCD_MOVE_RIGHT 2 /* DB2: move right (0-> left) ? */ +#define LCD_FUNCTION 5 /* DB5: function set */ +#define LCD_FUNCTION_8BIT 4 /* DB4: set 8BIT mode (0->4BIT mode) */ +#define LCD_FUNCTION_2LINES 3 /* DB3: two lines (0->one line) */ +#define LCD_FUNCTION_10DOTS 2 /* DB2: 5x10 font (0->5x7 font) */ +#define LCD_CGRAM 6 /* DB6: set CG RAM address */ +#define LCD_DDRAM 7 /* DB7: set DD RAM address */ +#define LCD_BUSY 7 /* DB7: LCD is busy */ /* set entry mode: display shift on/off, dec/inc cursor move direction */ -#define LCD_ENTRY_DEC 0x04 /* display shift off, dec cursor move dir */ -#define LCD_ENTRY_DEC_SHIFT 0x05 /* display shift on, dec cursor move dir */ -#define LCD_ENTRY_INC_ 0x06 /* display shift off, inc cursor move dir */ -#define LCD_ENTRY_INC_SHIFT 0x07 /* display shift on, inc cursor move dir */ +#define LCD_ENTRY_DEC 0x04 /* display shift off, dec cursor move dir */ +#define LCD_ENTRY_DEC_SHIFT 0x05 /* display shift on, dec cursor move dir */ +#define LCD_ENTRY_INC_ 0x06 /* display shift off, inc cursor move dir */ +#define LCD_ENTRY_INC_SHIFT 0x07 /* display shift on, inc cursor move dir */ /* display on/off, cursor on/off, blinking char at cursor position */ -#define LCD_DISP_OFF 0x08 /* display off */ -#define LCD_DISP_ON 0x0C /* display on, cursor off */ -#define LCD_DISP_ON_BLINK 0x0D /* display on, cursor off, blink char */ -#define LCD_DISP_ON_CURSOR 0x0E /* display on, cursor on */ -#define LCD_DISP_ON_CURSOR_BLINK 0x0F /* display on, cursor on, blink char */ +#define LCD_DISP_OFF 0x08 /* display off */ +#define LCD_DISP_ON 0x0C /* display on, cursor off */ +#define LCD_DISP_ON_BLINK 0x0D /* display on, cursor off, blink char */ +#define LCD_DISP_ON_CURSOR 0x0E /* display on, cursor on */ +#define LCD_DISP_ON_CURSOR_BLINK 0x0F /* display on, cursor on, blink char */ /* move cursor/shift display */ -#define LCD_MOVE_CURSOR_LEFT 0x10 /* move cursor left (decrement) */ -#define LCD_MOVE_CURSOR_RIGHT 0x14 /* move cursor right (increment) */ -#define LCD_MOVE_DISP_LEFT 0x18 /* shift display left */ -#define LCD_MOVE_DISP_RIGHT 0x1C /* shift display right */ +#define LCD_MOVE_CURSOR_LEFT 0x10 /* move cursor left (decrement) */ +#define LCD_MOVE_CURSOR_RIGHT 0x14 /* move cursor right (increment) */ +#define LCD_MOVE_DISP_LEFT 0x18 /* shift display left */ +#define LCD_MOVE_DISP_RIGHT 0x1C /* shift display right */ /* function set: set interface data length and number of display lines */ -#define LCD_FUNCTION_4BIT_1LINE 0x20 /* 4-bit interface, single line, 5x7 dots */ -#define LCD_FUNCTION_4BIT_2LINES 0x28 /* 4-bit interface, dual line, 5x7 dots */ -#define LCD_FUNCTION_8BIT_1LINE 0x30 /* 8-bit interface, single line, 5x7 dots */ -#define LCD_FUNCTION_8BIT_2LINES 0x38 /* 8-bit interface, dual line, 5x7 dots */ +#define LCD_FUNCTION_4BIT_1LINE 0x20 /* 4-bit interface, single line, 5x7 dots */ +#define LCD_FUNCTION_4BIT_2LINES 0x28 /* 4-bit interface, dual line, 5x7 dots */ +#define LCD_FUNCTION_8BIT_1LINE 0x30 /* 8-bit interface, single line, 5x7 dots */ +#define LCD_FUNCTION_8BIT_2LINES 0x38 /* 8-bit interface, dual line, 5x7 dots */ +#define LCD_MODE_DEFAULT ((1 << LCD_ENTRY_MODE) | (1 << LCD_ENTRY_INC)) -#define LCD_MODE_DEFAULT ((1<. + */ /* Library made by: g4lvanix * Github repository: https://github.com/g4lvanix/I2C-master-lib */ @@ -10,200 +25,200 @@ #include "wait.h" #ifndef F_SCL -# define F_SCL 400000UL // SCL frequency +# define F_SCL 400000UL // SCL frequency #endif -#define Prescaler 1 -#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16) / 2) + +#define TWBR_val (((F_CPU / F_SCL) - 16) / 2) void i2c_init(void) { - TWSR = 0; /* no prescaler */ - TWBR = (uint8_t)TWBR_val; + TWSR = 0; /* no prescaler */ + TWBR = (uint8_t)TWBR_val; - #ifdef __AVR_ATmega32A__ - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; +#ifdef __AVR_ATmega32A__ + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); - #endif + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +#endif } i2c_status_t i2c_start(uint8_t address, uint16_t timeout) { - // reset TWI control register - TWCR = 0; - // transmit START condition - TWCR = (1 << TWINT) | (1 << TWSTA) | (1 << TWEN); + // reset TWI control register + TWCR = 0; + // transmit START condition + TWCR = (1 << TWINT) | (1 << TWSTA) | (1 << TWEN); - uint16_t timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; + uint16_t timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } } - } - // check if the start condition was successfully transmitted - if (((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)) { - return I2C_STATUS_ERROR; - } - - // load slave address into data register - TWDR = address; - // start transmission of address - TWCR = (1 << TWINT) | (1 << TWEN); - - timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; + // check if the start condition was successfully transmitted + if (((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)) { + return I2C_STATUS_ERROR; } - } - // check if the device has acknowledged the READ / WRITE mode - uint8_t twst = TW_STATUS & 0xF8; - if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) { - return I2C_STATUS_ERROR; - } + // load slave address into data register + TWDR = address; + // start transmission of address + TWCR = (1 << TWINT) | (1 << TWEN); - return I2C_STATUS_SUCCESS; + timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } + } + + // check if the device has acknowledged the READ / WRITE mode + uint8_t twst = TW_STATUS & 0xF8; + if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) { + return I2C_STATUS_ERROR; + } + + return I2C_STATUS_SUCCESS; } i2c_status_t i2c_write(uint8_t data, uint16_t timeout) { - // load data into data register - TWDR = data; - // start transmission of data - TWCR = (1 << TWINT) | (1 << TWEN); + // load data into data register + TWDR = data; + // start transmission of data + TWCR = (1 << TWINT) | (1 << TWEN); - uint16_t timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; + uint16_t timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } } - } - if ((TW_STATUS & 0xF8) != TW_MT_DATA_ACK) { - return I2C_STATUS_ERROR; - } + if ((TW_STATUS & 0xF8) != TW_MT_DATA_ACK) { + return I2C_STATUS_ERROR; + } - return I2C_STATUS_SUCCESS; + return I2C_STATUS_SUCCESS; } int16_t i2c_read_ack(uint16_t timeout) { - // start TWI module and acknowledge data after reception - TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWEA); + // start TWI module and acknowledge data after reception + TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWEA); - uint16_t timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; + uint16_t timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } } - } - // return received data from TWDR - return TWDR; + // return received data from TWDR + return TWDR; } int16_t i2c_read_nack(uint16_t timeout) { - // start receiving without acknowledging reception - TWCR = (1 << TWINT) | (1 << TWEN); + // start receiving without acknowledging reception + TWCR = (1 << TWINT) | (1 << TWEN); - uint16_t timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; + uint16_t timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } } - } - // return received data from TWDR - return TWDR; + // return received data from TWDR + return TWDR; } i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); + i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); - for (uint16_t i = 0; i < length && status >= 0; i++) { - status = i2c_write(data[i], timeout); - } + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(data[i], timeout); + } - i2c_stop(); + i2c_stop(); - return status; + return status; } i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(address | I2C_READ, timeout); + i2c_status_t status = i2c_start(address | I2C_READ, timeout); - for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { - status = i2c_read_ack(timeout); - if (status >= 0) { - data[i] = status; + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { + status = i2c_read_ack(timeout); + if (status >= 0) { + data[i] = status; + } } - } - if (status >= 0) { - status = i2c_read_nack(timeout); if (status >= 0) { - data[(length - 1)] = status; + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } } - } - i2c_stop(); + i2c_stop(); - return (status < 0) ? status : I2C_STATUS_SUCCESS; + return (status < 0) ? status : I2C_STATUS_SUCCESS; } i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(devaddr | 0x00, timeout); - if (status >= 0) { - status = i2c_write(regaddr, timeout); + i2c_status_t status = i2c_start(devaddr | 0x00, timeout); + if (status >= 0) { + status = i2c_write(regaddr, timeout); - for (uint16_t i = 0; i < length && status >= 0; i++) { - status = i2c_write(data[i], timeout); + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(data[i], timeout); + } } - } - i2c_stop(); + i2c_stop(); - return status; + return status; } i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(devaddr, timeout); - if (status < 0) { - goto error; - } - - status = i2c_write(regaddr, timeout); - if (status < 0) { - goto error; - } - - status = i2c_start(devaddr | 0x01, timeout); - - for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { - status = i2c_read_ack(timeout); - if (status >= 0) { - data[i] = status; + i2c_status_t status = i2c_start(devaddr, timeout); + if (status < 0) { + goto error; } - } - if (status >= 0) { - status = i2c_read_nack(timeout); - if (status >= 0) { - data[(length - 1)] = status; + status = i2c_write(regaddr, timeout); + if (status < 0) { + goto error; + } + + status = i2c_start(devaddr | 0x01, timeout); + + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { + status = i2c_read_ack(timeout); + if (status >= 0) { + data[i] = status; + } + } + + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } } - } error: - i2c_stop(); + i2c_stop(); - return (status < 0) ? status : I2C_STATUS_SUCCESS; + return (status < 0) ? status : I2C_STATUS_SUCCESS; } void i2c_stop(void) { - // transmit STOP condition - TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO); + // transmit STOP condition + TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO); } diff --git a/drivers/avr/i2c_master.h b/drivers/avr/i2c_master.h old mode 100755 new mode 100644 index b4613115d9..0a3b6c508c --- a/drivers/avr/i2c_master.h +++ b/drivers/avr/i2c_master.h @@ -1,3 +1,18 @@ +/* Copyright (C) 2019 Elia Ritterbusch + + + * 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 3 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 . + */ /* Library made by: g4lvanix * Github repository: https://github.com/g4lvanix/I2C-master-lib */ @@ -11,21 +26,21 @@ typedef int16_t i2c_status_t; #define I2C_STATUS_SUCCESS (0) -#define I2C_STATUS_ERROR (-1) +#define I2C_STATUS_ERROR (-1) #define I2C_STATUS_TIMEOUT (-2) #define I2C_TIMEOUT_IMMEDIATE (0) #define I2C_TIMEOUT_INFINITE (0xFFFF) -void i2c_init(void); +void i2c_init(void); i2c_status_t i2c_start(uint8_t address, uint16_t timeout); i2c_status_t i2c_write(uint8_t data, uint16_t timeout); -int16_t i2c_read_ack(uint16_t timeout); -int16_t i2c_read_nack(uint16_t timeout); +int16_t i2c_read_ack(uint16_t timeout); +int16_t i2c_read_nack(uint16_t timeout); i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); -void i2c_stop(void); +void i2c_stop(void); -#endif // I2C_MASTER_H +#endif // I2C_MASTER_H diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c old mode 100755 new mode 100644 index dbb9fb0df3..3fb684f70a --- a/drivers/avr/i2c_slave.c +++ b/drivers/avr/i2c_slave.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2019 Elia Ritterbusch + + + * 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 3 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 . + */ /* Library made by: g4lvanix * Github repository: https://github.com/g4lvanix/I2C-slave-lib */ @@ -12,24 +27,24 @@ volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; static volatile uint8_t buffer_address; -static volatile bool slave_has_register_set = false; +static volatile bool slave_has_register_set = false; -void i2c_slave_init(uint8_t address){ +void i2c_slave_init(uint8_t address) { // load address into TWI address register TWAR = address; // set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN); } -void i2c_slave_stop(void){ +void i2c_slave_stop(void) { // clear acknowledge and enable bits TWCR &= ~((1 << TWEA) | (1 << TWEN)); } -ISR(TWI_vect){ +ISR(TWI_vect) { uint8_t ack = 1; - switch(TW_STATUS){ + switch (TW_STATUS) { case TW_SR_SLA_ACK: // The device is now a slave receiver slave_has_register_set = false; @@ -38,14 +53,14 @@ ISR(TWI_vect){ case TW_SR_DATA_ACK: // This device is a slave receiver and has received data // First byte is the location then the bytes will be writen in buffer with auto-incriment - if(!slave_has_register_set){ + if (!slave_has_register_set) { buffer_address = TWDR; if (buffer_address >= I2C_SLAVE_REG_COUNT) { // address out of bounds dont ack - ack = 0; - buffer_address = 0; + ack = 0; + buffer_address = 0; } - slave_has_register_set = true; // address has been receaved now fill in buffer + slave_has_register_set = true; // address has been receaved now fill in buffer } else { i2c_slave_reg[buffer_address] = TWDR; buffer_address++; @@ -68,4 +83,4 @@ ISR(TWI_vect){ // Reset i2c state machine to be ready for next interrupt TWCR |= (1 << TWIE) | (1 << TWINT) | (ack << TWEA) | (1 << TWEN); -} \ No newline at end of file +} diff --git a/drivers/avr/i2c_slave.h b/drivers/avr/i2c_slave.h old mode 100755 new mode 100644 index 7b5dcbdc3e..5ed0b11a8e --- a/drivers/avr/i2c_slave.h +++ b/drivers/avr/i2c_slave.h @@ -1,3 +1,18 @@ +/* Copyright (C) 2019 Elia Ritterbusch + + + * 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 3 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 . + */ /* Library made by: g4lvanix * Github repository: https://github.com/g4lvanix/I2C-slave-lib @@ -15,4 +30,4 @@ extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; void i2c_slave_init(uint8_t address); void i2c_slave_stop(void); -#endif // I2C_SLAVE_H \ No newline at end of file +#endif // I2C_SLAVE_H diff --git a/drivers/avr/pro_micro.h b/drivers/avr/pro_micro.h index f9e7ed75d9..762a99a058 100644 --- a/drivers/avr/pro_micro.h +++ b/drivers/avr/pro_micro.h @@ -90,14 +90,14 @@ #undef OCR2_6 #undef OCR2_7 -#define NUM_DIGITAL_PINS 30 +#define NUM_DIGITAL_PINS 30 #define NUM_ANALOG_INPUTS 12 -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) +#define TX_RX_LED_INIT DDRD |= (1 << 5), DDRB |= (1 << 0) +#define TXLED0 PORTD |= (1 << 5) +#define TXLED1 PORTD &= ~(1 << 5) +#define RXLED0 PORTB |= (1 << 0) +#define RXLED1 PORTB &= ~(1 << 0) static const uint8_t SDA = 2; static const uint8_t SCL = 3; @@ -111,27 +111,27 @@ static const uint8_t SCK = 15; // Mapping of analog pins as digital I/O // A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 +static const uint8_t ADC0 = 18; +static const uint8_t ADC1 = 19; +static const uint8_t ADC2 = 20; +static const uint8_t ADC3 = 21; +static const uint8_t ADC4 = 22; +static const uint8_t ADC5 = 23; +static const uint8_t ADC6 = 24; // D4 +static const uint8_t ADC7 = 25; // D6 +static const uint8_t ADC8 = 26; // D8 +static const uint8_t ADC9 = 27; // D9 static const uint8_t ADC10 = 28; // D10 static const uint8_t ADC11 = 29; // D12 -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) +#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) #define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) +#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) +#define digitalPinToPCMSKbit(p) (((p) >= 8 && (p) <= 11) ? (p)-4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) // __AVR_ATmega32U4__ has an unusual mapping of pins to channels extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) +#define analogPinToChannel(P) (pgm_read_byte(analog_pin_to_channel_PGM + (P))) #define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) @@ -182,159 +182,121 @@ extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; // appropriate addresses for various functions (e.g. reading // and writing) const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, + NOT_A_PORT, NOT_A_PORT, (uint16_t)&DDRB, (uint16_t)&DDRC, (uint16_t)&DDRD, (uint16_t)&DDRE, (uint16_t)&DDRF, }; const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, + NOT_A_PORT, NOT_A_PORT, (uint16_t)&PORTB, (uint16_t)&PORTC, (uint16_t)&PORTD, (uint16_t)&PORTE, (uint16_t)&PORTF, }; const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, + NOT_A_PORT, NOT_A_PORT, (uint16_t)&PINB, (uint16_t)&PINC, (uint16_t)&PIND, (uint16_t)&PINE, (uint16_t)&PINF, }; const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 + PD, // D0 - PD2 + PD, // D1 - PD3 + PD, // D2 - PD1 + PD, // D3 - PD0 + PD, // D4 - PD4 + PC, // D5 - PC6 + PD, // D6 - PD7 + PE, // D7 - PE6 - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 + PB, // D8 - PB4 + PB, // D9 - PB5 + PB, // D10 - PB6 + PB, // D11 - PB7 + PD, // D12 - PD6 + PC, // D13 - PC7 - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 + PB, // D14 - MISO - PB3 + PB, // D15 - SCK - PB1 + PB, // D16 - MOSI - PB2 + PB, // D17 - SS - PB0 - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 + PF, // D18 - A0 - PF7 + PF, // D19 - A1 - PF6 + PF, // D20 - A2 - PF5 + PF, // D21 - A3 - PF4 + PF, // D22 - A4 - PF1 + PF, // D23 - A5 - PF0 - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 + PD, // D24 - PD5 + PD, // D25 / D6 - A7 - PD7 + PB, // D26 / D8 - A8 - PB4 + PB, // D27 / D9 - A9 - PB5 + PB, // D28 / D10 - A10 - PB6 + PD, // D29 / D12 - A11 - PD6 }; const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 + _BV(2), // D0 - PD2 + _BV(3), // D1 - PD3 + _BV(1), // D2 - PD1 + _BV(0), // D3 - PD0 + _BV(4), // D4 - PD4 + _BV(6), // D5 - PC6 + _BV(7), // D6 - PD7 + _BV(6), // D7 - PE6 - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 + _BV(4), // D8 - PB4 + _BV(5), // D9 - PB5 + _BV(6), // D10 - PB6 + _BV(7), // D11 - PB7 + _BV(6), // D12 - PD6 + _BV(7), // D13 - PC7 - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 + _BV(3), // D14 - MISO - PB3 + _BV(1), // D15 - SCK - PB1 + _BV(2), // D16 - MOSI - PB2 + _BV(0), // D17 - SS - PB0 - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 + _BV(7), // D18 - A0 - PF7 + _BV(6), // D19 - A1 - PF6 + _BV(5), // D20 - A2 - PF5 + _BV(4), // D21 - A3 - PF4 + _BV(1), // D22 - A4 - PF1 + _BV(0), // D23 - A5 - PF0 - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 + _BV(5), // D24 - PD5 + _BV(7), // D25 / D6 - A7 - PD7 + _BV(4), // D26 / D8 - A8 - PB4 + _BV(5), // D27 / D9 - A9 - PB5 + _BV(6), // D28 / D10 - A10 - PB6 + _BV(6), // D29 / D12 - A11 - PD6 }; const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ + NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, TIMER0B, /* 3 */ + NOT_ON_TIMER, TIMER3A, /* 5 */ + TIMER4D, /* 6 */ NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ + NOT_ON_TIMER, TIMER1A, /* 9 */ + TIMER1B, /* 10 */ + TIMER0A, /* 11 */ - NOT_ON_TIMER, - TIMER4A, /* 13 */ + NOT_ON_TIMER, TIMER4A, /* 13 */ - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, + NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, + NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, }; const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 + 7, // A0 PF7 ADC7 + 6, // A1 PF6 ADC6 + 5, // A2 PF5 ADC5 + 4, // A3 PF4 ADC4 + 1, // A4 PF1 ADC1 + 0, // A5 PF0 ADC0 + 8, // A6 D4 PD4 ADC8 + 10, // A7 D6 PD7 ADC10 + 11, // A8 D8 PB4 ADC11 + 12, // A9 D9 PB5 ADC12 + 13, // A10 D10 PB6 ADC13 + 9 // A11 D12 PD6 ADC9 }; #endif /* ARDUINO_MAIN */ @@ -354,9 +316,9 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { // // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX // pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_USBVIRTUAL Serial +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 #endif /* Pins_Arduino_h */ diff --git a/drivers/avr/ssd1306.c b/drivers/avr/ssd1306.c index bb8938bba3..61d7a99531 100644 --- a/drivers/avr/ssd1306.c +++ b/drivers/avr/ssd1306.c @@ -1,325 +1,320 @@ #ifdef SSD1306OLED -#include "ssd1306.h" -#include "i2c.h" -#include -#include "print.h" -#include "glcdfont.c" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" +# include "ssd1306.h" +# include "i2c.h" +# include +# include "print.h" +# include "glcdfont.c" +# ifdef ADAFRUIT_BLE_ENABLE +# include "adafruit_ble.h" +# endif +# ifdef PROTOCOL_LUFA +# include "lufa.h" +# endif +# include "sendchar.h" +# include "timer.h" // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, // as the latency of printing most of the debug info messes // with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 +# define DEBUG_TO_SCREEN 0 -//static uint16_t last_battery_update; -//static uint32_t vbat; +// static uint16_t last_battery_update; +// static uint32_t vbat; //#define BatteryUpdateInterval 10000 /* milliseconds */ -#define ScreenOffInterval 300000 /* milliseconds */ -#if DEBUG_TO_SCREEN +# define ScreenOffInterval 300000 /* milliseconds */ +# if DEBUG_TO_SCREEN static uint8_t displaying; -#endif +# endif static uint16_t last_flush; // Write command sequence. // Returns true on success. static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; + bool res = false; - if (i2c_start_write(SSD1306_ADDRESS)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } - if (i2c_master_write(0x0 /* command byte follows */)) { - print("failed to write control byte\n"); + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); - goto done; - } + goto done; + } - if (i2c_master_write(cmd)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; done: - i2c_master_stop(); - return res; + i2c_master_stop(); + return res; } // Write 2-byte command sequence. // Returns true on success static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { - if (!_send_cmd1(cmd)) { - return false; - } - return _send_cmd1(opr); + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); } // Write 3-byte command sequence. // Returns true on success static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { - if (!_send_cmd1(cmd)) { - return false; - } - if (!_send_cmd1(opr1)) { - return false; - } - return _send_cmd1(opr2); + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); } -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} -#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} +# define send_cmd1(c) \ + if (!_send_cmd1(c)) { \ + goto done; \ + } +# define send_cmd2(c, o) \ + if (!_send_cmd2(c, o)) { \ + goto done; \ + } +# define send_cmd3(c, o1, o2) \ + if (!_send_cmd3(c, o1, o2)) { \ + goto done; \ + } static void clear_display(void) { - matrix_clear(&display); + matrix_clear(&display); - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); - send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < DisplayWidth; ++col) { - i2c_master_write(0); + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } } - } - display.dirty = false; + display.dirty = false; done: - i2c_master_stop(); + i2c_master_stop(); } -#if DEBUG_TO_SCREEN -#undef sendchar +# if DEBUG_TO_SCREEN +# undef sendchar static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); + sendchar(c); + iota_gfx_write_char(c); - if (!displaying) { - iota_gfx_flush(); - } - return 0; + if (!displaying) { + iota_gfx_flush(); + } + return 0; } -#endif +# endif bool iota_gfx_init(void) { - bool success = false; + bool success = false; - send_cmd1(DisplayOff); - send_cmd2(SetDisplayClockDiv, 0x80); - send_cmd2(SetMultiPlex, DisplayHeight - 1); + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); - send_cmd2(SetDisplayOffset, 0); + send_cmd2(SetDisplayOffset, 0); + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); - send_cmd1(SetStartLine | 0x0); - send_cmd2(SetChargePump, 0x14 /* Enable */); - send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); +# ifdef OLED_ROTATE180 + // the following Flip the display orientation 180 degrees + send_cmd1(SegRemap); + send_cmd1(ComScanInc); +# endif +# ifndef OLED_ROTATE180 + // Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); +# endif -#ifdef OLED_ROTATE180 -// the following Flip the display orientation 180 degrees - send_cmd1(SegRemap); - send_cmd1(ComScanInc); -#endif -#ifndef OLED_ROTATE180 -// Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); -#endif - - send_cmd2(SetComPins, 0x2); - send_cmd2(SetContrast, 0x8f); - send_cmd2(SetPreCharge, 0xf1); - send_cmd2(SetVComDetect, 0x40); - send_cmd1(DisplayAllOnResume); - send_cmd1(NormalDisplay); - send_cmd1(DeActivateScroll); - send_cmd1(DisplayOn); + send_cmd2(SetComPins, 0x2); + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); - send_cmd2(SetContrast, 0); // Dim + send_cmd2(SetContrast, 0); // Dim - clear_display(); + clear_display(); - success = true; + success = true; - iota_gfx_flush(); + iota_gfx_flush(); -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif +# if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +# endif done: - return success; + return success; } bool iota_gfx_off(void) { - bool success = false; + bool success = false; - send_cmd1(DisplayOff); - success = true; + send_cmd1(DisplayOff); + success = true; done: - return success; -} + return success; +} bool iota_gfx_on(void) { - bool success = false; + bool success = false; - send_cmd1(DisplayOn); - success = true; + send_cmd1(DisplayOn); + success = true; done: - return success; + return success; } void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; + *matrix->cursor = c; + ++matrix->cursor; - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, ' ', MatrixCols); - } + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } } void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; + matrix->dirty = true; - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, ' '); + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; } - return; - } - matrix_write_char_inner(matrix, c); + matrix_write_char_inner(matrix, c); } -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} +void iota_gfx_write_char(uint8_t c) { matrix_write_char(&display, c); } void matrix_write(struct CharacterMatrix *matrix, const char *data) { - const char *end = data + strlen(data); - while (data < end) { - matrix_write_char(matrix, *data); - ++data; - } + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } } -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} +void iota_gfx_write(const char *data) { matrix_write(&display, data); } void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; } - matrix_write_char(matrix, c); - ++data; - } } -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} +void iota_gfx_write_P(const char *data) { matrix_write_P(&display, data); } void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, ' ', sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; } -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} +void iota_gfx_clear_screen(void) { matrix_clear(&display); } void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif + last_flush = timer_read(); + iota_gfx_on(); +# if DEBUG_TO_SCREEN + ++displaying; +# endif - // Move to the home position - send_cmd3(PageAddr, 0, MatrixRows - 1); - send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * (FontWidth - 1)); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth - 1; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_master_write(colBits); - } - - // 1 column of space between chars (it's not included in the glyph) - i2c_master_write(0); + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; } - } - matrix->dirty = false; + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * (FontWidth - 1)); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth - 1; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + i2c_master_write(0); + } + } + + matrix->dirty = false; done: - i2c_master_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif + i2c_master_stop(); +# if DEBUG_TO_SCREEN + --displaying; +# endif } -void iota_gfx_flush(void) { - matrix_render(&display); -} +void iota_gfx_flush(void) { matrix_render(&display); } -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} +__attribute__((weak)) void iota_gfx_task_user(void) {} void iota_gfx_task(void) { - iota_gfx_task_user(); + iota_gfx_task_user(); - if (display.dirty) { - iota_gfx_flush(); - } + if (display.dirty) { + iota_gfx_flush(); + } - if (timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } + if (timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } } #endif diff --git a/drivers/avr/ssd1306.h b/drivers/avr/ssd1306.h index df6a75359f..825b0d7d5b 100644 --- a/drivers/avr/ssd1306.h +++ b/drivers/avr/ssd1306.h @@ -7,49 +7,49 @@ #include "config.h" enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, + DisplayOff = 0xAE, + DisplayOn = 0xAF, - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, }; // Controls the SSD1306 128x32 OLED display via i2c #ifndef SSD1306_ADDRESS -#define SSD1306_ADDRESS 0x3C +# define SSD1306_ADDRESS 0x3C #endif #define DisplayHeight 32 @@ -62,9 +62,9 @@ enum ssd1306_cmds { #define MatrixCols (DisplayWidth / FontWidth) struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; }; struct CharacterMatrix display; @@ -88,6 +88,4 @@ void matrix_write(struct CharacterMatrix *matrix, const char *data); void matrix_write_P(struct CharacterMatrix *matrix, const char *data); void matrix_render(struct CharacterMatrix *matrix); - - #endif diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c index 7c3cb5174d..82d985c20a 100644 --- a/drivers/avr/ws2812.c +++ b/drivers/avr/ws2812.c @@ -1,230 +1,61 @@ /* -* light weight WS2812 lib V2.0b -* -* Controls WS2811/WS2812/WS2812B RGB-LEDs -* Author: Tim (cpldcpu@gmail.com) -* -* Jan 18th, 2014 v2.0b Initial Version -* Nov 29th, 2015 v2.3 Added SK6812RGBW support -* -* 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 . -*/ + * light weight WS2812 lib V2.0b + * + * Controls WS2811/WS2812/WS2812B RGB-LEDs + * Author: Tim (cpldcpu@gmail.com) + * + * Jan 18th, 2014 v2.0b Initial Version + * Nov 29th, 2015 v2.3 Added SK6812RGBW support + * + * 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 . + */ #include "ws2812.h" #include #include #include -#include "debug.h" -#if !defined(LED_ARRAY) && defined(RGB_MATRIX_ENABLE) -// LED color buffer -LED_TYPE led[DRIVER_LED_TOTAL]; - #define LED_ARRAY led -#endif +/* + * Forward declare internal functions + * + * The functions take a byte-array and send to the data output as WS2812 bitstream. + * The length is the number of bytes to send - three per LED. + */ -#ifdef RGBW_BB_TWI - -// Port for the I2C -#define I2C_DDR DDRD -#define I2C_PIN PIND -#define I2C_PORT PORTD - -// Pins to be used in the bit banging -#define I2C_CLK 0 -#define I2C_DAT 1 - -#define I2C_DATA_HI()\ -I2C_DDR &= ~ (1 << I2C_DAT);\ -I2C_PORT |= (1 << I2C_DAT); -#define I2C_DATA_LO()\ -I2C_DDR |= (1 << I2C_DAT);\ -I2C_PORT &= ~ (1 << I2C_DAT); - -#define I2C_CLOCK_HI()\ -I2C_DDR &= ~ (1 << I2C_CLK);\ -I2C_PORT |= (1 << I2C_CLK); -#define I2C_CLOCK_LO()\ -I2C_DDR |= (1 << I2C_CLK);\ -I2C_PORT &= ~ (1 << I2C_CLK); - -#define I2C_DELAY 1 - -void I2C_WriteBit(unsigned char c) -{ - if (c > 0) - { - I2C_DATA_HI(); - } - else - { - I2C_DATA_LO(); - } - - I2C_CLOCK_HI(); - _delay_us(I2C_DELAY); - - I2C_CLOCK_LO(); - _delay_us(I2C_DELAY); - - if (c > 0) - { - I2C_DATA_LO(); - } - - _delay_us(I2C_DELAY); -} - -// Inits bitbanging port, must be called before using the functions below -// -void I2C_Init(void) -{ - I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); - - I2C_CLOCK_HI(); - I2C_DATA_HI(); - - _delay_us(I2C_DELAY); -} - -// Send a START Condition -// -void I2C_Start(void) -{ - // set both to high at the same time - I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); - _delay_us(I2C_DELAY); - - I2C_DATA_LO(); - _delay_us(I2C_DELAY); - - I2C_CLOCK_LO(); - _delay_us(I2C_DELAY); -} - -// Send a STOP Condition -// -void I2C_Stop(void) -{ - I2C_CLOCK_HI(); - _delay_us(I2C_DELAY); - - I2C_DATA_HI(); - _delay_us(I2C_DELAY); -} - -// write a byte to the I2C slave device -// -unsigned char I2C_Write(unsigned char c) -{ - for (char i = 0; i < 8; i++) - { - I2C_WriteBit(c & 128); - - c <<= 1; - } - - - I2C_WriteBit(0); - _delay_us(I2C_DELAY); - _delay_us(I2C_DELAY); - - // _delay_us(I2C_DELAY); - //return I2C_ReadBit(); - return 0; -} - - -#endif - -#ifdef RGB_MATRIX_ENABLE -// Set an led in the buffer to a color -void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b) -{ - led[i].r = r; - led[i].g = g; - led[i].b = b; -} - -void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b) -{ - for (int i = 0; i < sizeof(led)/sizeof(led[0]); i++) { - led[i].r = r; - led[i].g = g; - led[i].b = b; - } -} -#endif +void ws2812_sendarray(uint8_t *array, uint16_t length); +void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask); // Setleds for standard RGB -void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) -{ - // ws2812_setleds_pin(ledarray,leds, _BV(ws2812_pin)); - ws2812_setleds_pin(ledarray,leds, _BV(RGB_DI_PIN & 0xF)); +void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { + // ws2812_setleds_pin(ledarray,leds, _BV(ws2812_pin)); + ws2812_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF)); } -void inline ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask) -{ - // ws2812_DDRREG |= pinmask; // Enable DDR - // new universal format (DDR) - _SFR_IO8((RGB_DI_PIN >> 4) + 1) |= pinmask; +void inline ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask) { + // new universal format (DDR) + _SFR_IO8((RGB_DI_PIN >> 4) + 1) |= pinmask; - ws2812_sendarray_mask((uint8_t*)ledarray,leds+leds+leds,pinmask); - _delay_us(50); -} + ws2812_sendarray_mask((uint8_t *)ledarray, leds * sizeof(LED_TYPE), pinmask); -// Setleds for SK6812RGBW -void inline ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) -{ - - #ifdef RGBW_BB_TWI - uint8_t sreg_prev, twcr_prev; - sreg_prev=SREG; - twcr_prev=TWCR; - cli(); - TWCR &= ~(1<> 4) + 1) |= _BV(RGB_DI_PIN & 0xF); - - ws2812_sendarray_mask((uint8_t*)ledarray,leds<<2,_BV(RGB_DI_PIN & 0xF)); - - - #ifndef RGBW_BB_TWI +#ifdef RGBW _delay_us(80); - #endif +#else + _delay_us(50); +#endif } -void ws2812_sendarray(uint8_t *data,uint16_t datlen) -{ - ws2812_sendarray_mask(data,datlen,_BV(RGB_DI_PIN & 0xF)); -} +void ws2812_sendarray(uint8_t *data, uint16_t datlen) { ws2812_sendarray_mask(data, datlen, _BV(RGB_DI_PIN & 0xF)); } /* This routine writes an array of bytes with RGB values to the Dataout pin @@ -232,136 +63,133 @@ void ws2812_sendarray(uint8_t *data,uint16_t datlen) */ // Timing in ns -#define w_zeropulse 350 -#define w_onepulse 900 +#define w_zeropulse 350 +#define w_onepulse 900 #define w_totalperiod 1250 // Fixed cycles used by the inner loop -#define w_fixedlow 2 -#define w_fixedhigh 4 -#define w_fixedtotal 8 +#define w_fixedlow 2 +#define w_fixedhigh 4 +#define w_fixedtotal 8 // Insert NOPs to match the timing, if possible -#define w_zerocycles (((F_CPU/1000)*w_zeropulse )/1000000) -#define w_onecycles (((F_CPU/1000)*w_onepulse +500000)/1000000) -#define w_totalcycles (((F_CPU/1000)*w_totalperiod +500000)/1000000) +#define w_zerocycles (((F_CPU / 1000) * w_zeropulse) / 1000000) +#define w_onecycles (((F_CPU / 1000) * w_onepulse + 500000) / 1000000) +#define w_totalcycles (((F_CPU / 1000) * w_totalperiod + 500000) / 1000000) // w1 - nops between rising edge and falling edge - low -#define w1 (w_zerocycles-w_fixedlow) +#define w1 (w_zerocycles - w_fixedlow) // w2 nops between fe low and fe high -#define w2 (w_onecycles-w_fixedhigh-w1) +#define w2 (w_onecycles - w_fixedhigh - w1) // w3 nops to complete loop -#define w3 (w_totalcycles-w_fixedtotal-w1-w2) +#define w3 (w_totalcycles - w_fixedtotal - w1 - w2) -#if w1>0 - #define w1_nops w1 +#if w1 > 0 +# define w1_nops w1 #else - #define w1_nops 0 +# define w1_nops 0 #endif // The only critical timing parameter is the minimum pulse length of the "0" // Warn or throw error if this timing can not be met with current F_CPU settings. -#define w_lowtime ((w1_nops+w_fixedlow)*1000000)/(F_CPU/1000) -#if w_lowtime>550 - #error "Light_ws2812: Sorry, the clock speed is too low. Did you set F_CPU correctly?" -#elif w_lowtime>450 - #warning "Light_ws2812: The timing is critical and may only work on WS2812B, not on WS2812(S)." - #warning "Please consider a higher clockspeed, if possible" +#define w_lowtime ((w1_nops + w_fixedlow) * 1000000) / (F_CPU / 1000) +#if w_lowtime > 550 +# error "Light_ws2812: Sorry, the clock speed is too low. Did you set F_CPU correctly?" +#elif w_lowtime > 450 +# warning "Light_ws2812: The timing is critical and may only work on WS2812B, not on WS2812(S)." +# warning "Please consider a higher clockspeed, if possible" #endif -#if w2>0 -#define w2_nops w2 +#if w2 > 0 +# define w2_nops w2 #else -#define w2_nops 0 +# define w2_nops 0 #endif -#if w3>0 -#define w3_nops w3 +#if w3 > 0 +# define w3_nops w3 #else -#define w3_nops 0 +# define w3_nops 0 #endif -#define w_nop1 "nop \n\t" -#define w_nop2 "rjmp .+0 \n\t" -#define w_nop4 w_nop2 w_nop2 -#define w_nop8 w_nop4 w_nop4 +#define w_nop1 "nop \n\t" +#define w_nop2 "rjmp .+0 \n\t" +#define w_nop4 w_nop2 w_nop2 +#define w_nop8 w_nop4 w_nop4 #define w_nop16 w_nop8 w_nop8 -void inline ws2812_sendarray_mask(uint8_t *data,uint16_t datlen,uint8_t maskhi) -{ - uint8_t curbyte,ctr,masklo; - uint8_t sreg_prev; +void inline ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t maskhi) { + uint8_t curbyte, ctr, masklo; + uint8_t sreg_prev; - // masklo =~maskhi&ws2812_PORTREG; - // maskhi |= ws2812_PORTREG; - masklo =~maskhi&_SFR_IO8((RGB_DI_PIN >> 4) + 2); - maskhi |= _SFR_IO8((RGB_DI_PIN >> 4) + 2); - sreg_prev=SREG; - cli(); + // masklo =~maskhi&ws2812_PORTREG; + // maskhi |= ws2812_PORTREG; + masklo = ~maskhi & _SFR_IO8((RGB_DI_PIN >> 4) + 2); + maskhi |= _SFR_IO8((RGB_DI_PIN >> 4) + 2); + sreg_prev = SREG; + cli(); - while (datlen--) { - curbyte=(*data++); + while (datlen--) { + curbyte = (*data++); - asm volatile( - " ldi %0,8 \n\t" - "loop%=: \n\t" - " out %2,%3 \n\t" // '1' [01] '0' [01] - re -#if (w1_nops&1) -w_nop1 + asm volatile(" ldi %0,8 \n\t" + "loop%=: \n\t" + " out %2,%3 \n\t" // '1' [01] '0' [01] - re +#if (w1_nops & 1) + w_nop1 #endif -#if (w1_nops&2) -w_nop2 +#if (w1_nops & 2) + w_nop2 #endif -#if (w1_nops&4) -w_nop4 +#if (w1_nops & 4) + w_nop4 #endif -#if (w1_nops&8) -w_nop8 +#if (w1_nops & 8) + w_nop8 #endif -#if (w1_nops&16) -w_nop16 +#if (w1_nops & 16) + w_nop16 #endif - " sbrs %1,7 \n\t" // '1' [03] '0' [02] - " out %2,%4 \n\t" // '1' [--] '0' [03] - fe-low - " lsl %1 \n\t" // '1' [04] '0' [04] -#if (w2_nops&1) - w_nop1 + " sbrs %1,7 \n\t" // '1' [03] '0' [02] + " out %2,%4 \n\t" // '1' [--] '0' [03] - fe-low + " lsl %1 \n\t" // '1' [04] '0' [04] +#if (w2_nops & 1) + w_nop1 #endif -#if (w2_nops&2) - w_nop2 +#if (w2_nops & 2) + w_nop2 #endif -#if (w2_nops&4) - w_nop4 +#if (w2_nops & 4) + w_nop4 #endif -#if (w2_nops&8) - w_nop8 +#if (w2_nops & 8) + w_nop8 #endif -#if (w2_nops&16) - w_nop16 +#if (w2_nops & 16) + w_nop16 #endif - " out %2,%4 \n\t" // '1' [+1] '0' [+1] - fe-high -#if (w3_nops&1) -w_nop1 + " out %2,%4 \n\t" // '1' [+1] '0' [+1] - fe-high +#if (w3_nops & 1) + w_nop1 #endif -#if (w3_nops&2) -w_nop2 +#if (w3_nops & 2) + w_nop2 #endif -#if (w3_nops&4) -w_nop4 +#if (w3_nops & 4) + w_nop4 #endif -#if (w3_nops&8) -w_nop8 +#if (w3_nops & 8) + w_nop8 #endif -#if (w3_nops&16) -w_nop16 +#if (w3_nops & 16) + w_nop16 #endif - " dec %0 \n\t" // '1' [+2] '0' [+2] - " brne loop%=\n\t" // '1' [+3] '0' [+4] - : "=&d" (ctr) - : "r" (curbyte), "I" (_SFR_IO_ADDR(_SFR_IO8((RGB_DI_PIN >> 4) + 2))), "r" (maskhi), "r" (masklo) - ); - } + " dec %0 \n\t" // '1' [+2] '0' [+2] + " brne loop%=\n\t" // '1' [+3] '0' [+4] + : "=&d"(ctr) + : "r"(curbyte), "I"(_SFR_IO_ADDR(_SFR_IO8((RGB_DI_PIN >> 4) + 2))), "r"(maskhi), "r"(masklo)); + } - SREG=sreg_prev; + SREG = sreg_prev; } diff --git a/drivers/avr/ws2812.h b/drivers/avr/ws2812.h index 95f540b184..b869fb28c8 100644 --- a/drivers/avr/ws2812.h +++ b/drivers/avr/ws2812.h @@ -20,13 +20,7 @@ * along with this program. If not, see . */ -#ifndef LIGHT_WS2812_H_ -#define LIGHT_WS2812_H_ - -#include -#include -//#include "ws2812_config.h" -//#include "i2cmaster.h" +#pragma once #include "quantum/color.h" @@ -40,36 +34,7 @@ * The functions will perform the following actions: * - Set the data-out pin as output * - Send out the LED data - * - Wait 50�s to reset the LEDs + * - Wait 50us to reset the LEDs */ -#ifdef RGB_MATRIX_ENABLE -void ws2812_setled (int index, uint8_t r, uint8_t g, uint8_t b); -void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b); -#endif - -void ws2812_setleds (LED_TYPE *ledarray, uint16_t number_of_leds); -void ws2812_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask); -void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); - -/* - * Old interface / Internal functions - * - * The functions take a byte-array and send to the data output as WS2812 bitstream. - * The length is the number of bytes to send - three per LED. - */ - -void ws2812_sendarray (uint8_t *array,uint16_t length); -void ws2812_sendarray_mask(uint8_t *array,uint16_t length, uint8_t pinmask); - - -/* - * Internal defines - */ -#ifndef CONCAT -#define CONCAT(a, b) a ## b -#endif -#ifndef CONCAT_EXP -#define CONCAT_EXP(a, b) CONCAT(a, b) -#endif - -#endif /* LIGHT_WS2812_H_ */ +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); +void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pinmask); diff --git a/drivers/avr/ws2812_i2c.c b/drivers/avr/ws2812_i2c.c new file mode 100644 index 0000000000..1c332e24b6 --- /dev/null +++ b/drivers/avr/ws2812_i2c.c @@ -0,0 +1,27 @@ +#include "ws2812.h" +#include "i2c_master.h" + +#ifdef RGBW +# error "RGBW not supported" +#endif + +#ifndef WS2812_ADDRESS +# define WS2812_ADDRESS 0xb0 +#endif + +#ifndef WS2812_TIMEOUT +# define WS2812_TIMEOUT 100 +#endif + +void ws2812_init(void) { i2c_init(); } + +// Setleds for standard RGB +void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { + static bool s_init = false; + if (!s_init) { + ws2812_init(); + s_init = true; + } + + i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT); +} diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.c b/drivers/boards/GENERIC_STM32_F303XC/board.c index 4331155df4..60c191d9b1 100644 --- a/drivers/boards/GENERIC_STM32_F303XC/board.c +++ b/drivers/boards/GENERIC_STM32_F303XC/board.c @@ -23,42 +23,33 @@ * This variable is used by the HAL when initializing the PAL driver. */ const PALConfig pal_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} -#endif +# if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +# endif +# if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +# endif +# if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +# endif +# if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +# endif +# if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +# endif +# if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +# endif +# if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +# endif +# if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +# endif +# if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +# endif }; #endif @@ -70,8 +61,8 @@ void enter_bootloader_mode_if_requested(void); * and before any other initialization. */ void __early_init(void) { - enter_bootloader_mode_if_requested(); - stm32_clock_init(); + enter_bootloader_mode_if_requested(); + stm32_clock_init(); } #if HAL_USE_SDC || defined(__DOXYGEN__) @@ -79,20 +70,18 @@ void __early_init(void) { * @brief SDC card detection. */ bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; } /** * @brief SDC card write protection detection. */ bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; } #endif /* HAL_USE_SDC */ @@ -101,20 +90,18 @@ bool sdc_lld_is_write_protected(SDCDriver *sdcp) { * @brief MMC_SPI card detection. */ bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; } /** * @brief MMC_SPI card write protection detection. */ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; } #endif @@ -122,5 +109,4 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @brief Board-specific initialization code. * @todo Add your board-specific code, if any. */ -void boardInit(void) { -} +void boardInit(void) {} diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.h b/drivers/boards/GENERIC_STM32_F303XC/board.h index 11120dfd74..3579c82770 100644 --- a/drivers/boards/GENERIC_STM32_F303XC/board.h +++ b/drivers/boards/GENERIC_STM32_F303XC/board.h @@ -25,20 +25,20 @@ * Board identifier. */ #define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "STM32_F303" +#define BOARD_NAME "STM32_F303" /* * Board oscillators-related settings. * NOTE: LSE not fitted. */ #if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U +# define STM32_LSECLK 0U #endif -#define STM32_LSEDRV (3U << 3U) +#define STM32_LSEDRV (3U << 3U) #if !defined(STM32_HSECLK) -#define STM32_HSECLK 8000000U +# define STM32_HSECLK 8000000U #endif // #define STM32_HSE_BYPASS @@ -51,178 +51,177 @@ /* * IO pins assignments. */ -#define GPIOA_PIN0 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_USB_DM 11U -#define GPIOA_USB_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U +#define GPIOA_PIN0 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 15U +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_PIN8 8U +#define GPIOC_PIN9 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_PIN14 14U +#define GPIOC_PIN15 15U -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U -#define GPIOF_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U +#define GPIOF_I2C2_SDA 0U +#define GPIOF_I2C2_SCL 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U +#define GPIOG_PIN0 0U +#define GPIOG_PIN1 1U +#define GPIOG_PIN2 2U +#define GPIOG_PIN3 3U +#define GPIOG_PIN4 4U +#define GPIOG_PIN5 5U +#define GPIOG_PIN6 6U +#define GPIOG_PIN7 7U +#define GPIOG_PIN8 8U +#define GPIOG_PIN9 9U +#define GPIOG_PIN10 10U +#define GPIOG_PIN11 11U +#define GPIOG_PIN12 12U +#define GPIOG_PIN13 13U +#define GPIOG_PIN14 14U +#define GPIOG_PIN15 15U -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U +#define GPIOH_PIN0 0U +#define GPIOH_PIN1 1U +#define GPIOH_PIN2 2U +#define GPIOH_PIN3 3U +#define GPIOH_PIN4 4U +#define GPIOH_PIN5 5U +#define GPIOH_PIN6 6U +#define GPIOH_PIN7 7U +#define GPIOH_PIN8 8U +#define GPIOH_PIN9 9U +#define GPIOH_PIN10 10U +#define GPIOH_PIN11 11U +#define GPIOH_PIN12 12U +#define GPIOH_PIN13 13U +#define GPIOH_PIN14 14U +#define GPIOH_PIN15 15U /* * IO lines assignments. */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#define LINE_USB_DM PAL_LINE(GPIOA, 11U) -#define LINE_USB_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) +#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) -#define LINE_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) +#define LINE_PIN6 PAL_LINE(GPIOF, 0U) +#define LINE_PIN7 PAL_LINE(GPIOF, 1U) +#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) /* * I/O ports initial setup, this configuration is established soon after reset * in the initialization code. * Please refer to the STM32 Reference Manual for details. */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) +#define PIN_MODE_INPUT(n) (0U << ((n)*2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n)*2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n)*2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n)*2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n)*2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) /* * GPIOA setup: @@ -244,102 +243,13 @@ * PA14 - SWCLK (alternate 0). * PA15 - ROW4 */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - PIN_MODE_ALTERNATE(GPIOA_PIN1) | \ - PIN_MODE_INPUT(GPIOA_PIN2) | \ - PIN_MODE_INPUT(GPIOA_PIN3) | \ - PIN_MODE_INPUT(GPIOA_PIN4) | \ - PIN_MODE_INPUT(GPIOA_PIN5) | \ - PIN_MODE_INPUT(GPIOA_PIN6) | \ - PIN_MODE_INPUT(GPIOA_PIN7) | \ - PIN_MODE_INPUT(GPIOA_PIN8) | \ - PIN_MODE_INPUT(GPIOA_PIN9) | \ - PIN_MODE_INPUT(GPIOA_PIN10) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ - PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ - PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ - PIN_OSPEED_HIGH(GPIOA_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ - PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ - PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ - PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_PIN4) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_USB_DM) | \ - PIN_ODR_HIGH(GPIOA_USB_DP) | \ - PIN_ODR_HIGH(GPIOA_SWDIO) | \ - PIN_ODR_HIGH(GPIOA_SWCLK) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \ - PIN_AFIO_AF(GPIOA_PIN1, 1) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0)) +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_ALTERNATE(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_ALTERNATE(GPIOA_USB_DM) | PIN_MODE_ALTERNATE(GPIOA_USB_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | PIN_OSPEED_HIGH(GPIOA_PIN1) | PIN_OSPEED_VERYLOW(GPIOA_PIN2) | PIN_OSPEED_VERYLOW(GPIOA_PIN3) | PIN_OSPEED_VERYLOW(GPIOA_PIN4) | PIN_OSPEED_VERYLOW(GPIOA_PIN5) | PIN_OSPEED_VERYLOW(GPIOA_PIN6) | PIN_OSPEED_VERYLOW(GPIOA_PIN7) | PIN_OSPEED_VERYLOW(GPIOA_PIN8) | PIN_OSPEED_VERYLOW(GPIOA_PIN9) | PIN_OSPEED_VERYLOW(GPIOA_PIN10) | PIN_OSPEED_HIGH(GPIOA_USB_DM) | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_VERYLOW(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | PIN_PUPDR_FLOATING(GPIOA_PIN1) | PIN_PUPDR_PULLUP(GPIOA_PIN2) | PIN_PUPDR_PULLUP(GPIOA_PIN3) | PIN_PUPDR_PULLUP(GPIOA_PIN4) | PIN_PUPDR_PULLUP(GPIOA_PIN5) | PIN_PUPDR_PULLUP(GPIOA_PIN6) | PIN_PUPDR_FLOATING(GPIOA_PIN7) | PIN_PUPDR_PULLUP(GPIOA_PIN8) | PIN_PUPDR_PULLUP(GPIOA_PIN9) | PIN_PUPDR_PULLUP(GPIOA_PIN10) | PIN_PUPDR_FLOATING(GPIOA_USB_DM) | PIN_PUPDR_FLOATING(GPIOA_USB_DP) | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | PIN_ODR_HIGH(GPIOA_PIN1) | PIN_ODR_HIGH(GPIOA_PIN2) | PIN_ODR_HIGH(GPIOA_PIN3) | PIN_ODR_HIGH(GPIOA_PIN4) | PIN_ODR_HIGH(GPIOA_PIN5) | PIN_ODR_HIGH(GPIOA_PIN6) | PIN_ODR_HIGH(GPIOA_PIN7) | PIN_ODR_HIGH(GPIOA_PIN8) | PIN_ODR_HIGH(GPIOA_PIN9) | PIN_ODR_HIGH(GPIOA_PIN10) | PIN_ODR_HIGH(GPIOA_USB_DM) | PIN_ODR_HIGH(GPIOA_USB_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | PIN_AFIO_AF(GPIOA_PIN1, 1) | PIN_AFIO_AF(GPIOA_PIN2, 0) | PIN_AFIO_AF(GPIOA_PIN3, 0) | PIN_AFIO_AF(GPIOA_PIN4, 0) | PIN_AFIO_AF(GPIOA_PIN5, 5) | PIN_AFIO_AF(GPIOA_PIN6, 5) | PIN_AFIO_AF(GPIOA_PIN7, 5)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | PIN_AFIO_AF(GPIOA_PIN9, 0) | PIN_AFIO_AF(GPIOA_PIN10, 0) | PIN_AFIO_AF(GPIOA_USB_DM, 14) | PIN_AFIO_AF(GPIOA_USB_DP, 14) | PIN_AFIO_AF(GPIOA_SWDIO, 0) | PIN_AFIO_AF(GPIOA_SWCLK, 0) | PIN_AFIO_AF(GPIOA_PIN15, 0)) /* * GPIOB setup: @@ -361,102 +271,13 @@ * PB14 - PIN14 (input pullup). * PB15 - PIN15 (input pullup). */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - PIN_MODE_OUTPUT(GPIOB_PIN7) | \ - PIN_MODE_INPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_HIGH(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_PIN3) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_LOW(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0)) +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_ALTERNATE(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | PIN_OSPEED_VERYLOW(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_PIN3) | PIN_OSPEED_VERYLOW(GPIOB_PIN4) | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | PIN_OSPEED_HIGH(GPIOB_PIN6) | PIN_OSPEED_VERYLOW(GPIOB_PIN7) | PIN_OSPEED_VERYLOW(GPIOB_PIN8) | PIN_OSPEED_VERYLOW(GPIOB_PIN9) | PIN_OSPEED_VERYLOW(GPIOB_PIN10) | PIN_OSPEED_VERYLOW(GPIOB_PIN11) | PIN_OSPEED_VERYLOW(GPIOB_PIN12) | PIN_OSPEED_VERYLOW(GPIOB_PIN13) | PIN_OSPEED_VERYLOW(GPIOB_PIN14) | PIN_OSPEED_VERYLOW(GPIOB_PIN15)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_FLOATING(GPIOB_PIN3) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_FLOATING(GPIOB_PIN6) | PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_PIN8) | PIN_PUPDR_PULLUP(GPIOB_PIN9) | PIN_PUPDR_PULLUP(GPIOB_PIN10) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_PIN3) | PIN_ODR_HIGH(GPIOB_PIN4) | PIN_ODR_HIGH(GPIOB_PIN5) | PIN_ODR_HIGH(GPIOB_PIN6) | PIN_ODR_LOW(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_PIN8) | PIN_ODR_HIGH(GPIOB_PIN9) | PIN_ODR_HIGH(GPIOB_PIN10) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | PIN_AFIO_AF(GPIOB_PIN1, 0) | PIN_AFIO_AF(GPIOB_PIN2, 0) | PIN_AFIO_AF(GPIOB_PIN3, 0) | PIN_AFIO_AF(GPIOB_PIN4, 0) | PIN_AFIO_AF(GPIOB_PIN5, 0) | PIN_AFIO_AF(GPIOB_PIN6, 4) | PIN_AFIO_AF(GPIOB_PIN7, 0)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | PIN_AFIO_AF(GPIOB_PIN9, 0) | PIN_AFIO_AF(GPIOB_PIN10, 0) | PIN_AFIO_AF(GPIOB_PIN11, 0) | PIN_AFIO_AF(GPIOB_PIN12, 0) | PIN_AFIO_AF(GPIOB_PIN13, 0) | PIN_AFIO_AF(GPIOB_PIN14, 0) | PIN_AFIO_AF(GPIOB_PIN15, 0)) /* * GPIOC setup: @@ -478,102 +299,13 @@ * PC14 - PIN14 (input floating). * PC15 - PIN15 (input floating). */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - PIN_MODE_INPUT(GPIOC_PIN1) | \ - PIN_MODE_INPUT(GPIOC_PIN2) | \ - PIN_MODE_INPUT(GPIOC_PIN3) | \ - PIN_MODE_INPUT(GPIOC_PIN4) | \ - PIN_MODE_INPUT(GPIOC_PIN5) | \ - PIN_MODE_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0)) +#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | PIN_OSPEED_VERYLOW(GPIOC_PIN1) | PIN_OSPEED_VERYLOW(GPIOC_PIN2) | PIN_OSPEED_VERYLOW(GPIOC_PIN3) | PIN_OSPEED_VERYLOW(GPIOC_PIN4) | PIN_OSPEED_VERYLOW(GPIOC_PIN5) | PIN_OSPEED_VERYLOW(GPIOC_PIN6) | PIN_OSPEED_VERYLOW(GPIOC_PIN7) | PIN_OSPEED_VERYLOW(GPIOC_PIN8) | PIN_OSPEED_VERYLOW(GPIOC_PIN9) | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_PIN14) | PIN_OSPEED_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | PIN_PUPDR_PULLUP(GPIOC_PIN1) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_PULLUP(GPIOC_PIN3) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_PIN7) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_PIN14) | PIN_PUPDR_FLOATING(GPIOC_PIN15)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | PIN_ODR_HIGH(GPIOC_PIN1) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_PIN3) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_PIN7) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_PIN14) | PIN_ODR_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | PIN_AFIO_AF(GPIOC_PIN1, 0) | PIN_AFIO_AF(GPIOC_PIN2, 0) | PIN_AFIO_AF(GPIOC_PIN3, 0) | PIN_AFIO_AF(GPIOC_PIN4, 0) | PIN_AFIO_AF(GPIOC_PIN5, 0) | PIN_AFIO_AF(GPIOC_PIN6, 0) | PIN_AFIO_AF(GPIOC_PIN7, 0)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | PIN_AFIO_AF(GPIOC_PIN9, 0) | PIN_AFIO_AF(GPIOC_PIN10, 0) | PIN_AFIO_AF(GPIOC_PIN11, 0) | PIN_AFIO_AF(GPIOC_PIN12, 0) | PIN_AFIO_AF(GPIOC_PIN13, 0) | PIN_AFIO_AF(GPIOC_PIN14, 0) | PIN_AFIO_AF(GPIOC_PIN15, 0)) /* * GPIOD setup: @@ -595,102 +327,13 @@ * PD14 - PIN14 (input pullup). * PD15 - PIN15 (input pullup). */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ - PIN_MODE_INPUT(GPIOD_PIN1) | \ - PIN_MODE_INPUT(GPIOD_PIN2) | \ - PIN_MODE_INPUT(GPIOD_PIN3) | \ - PIN_MODE_INPUT(GPIOD_PIN4) | \ - PIN_MODE_INPUT(GPIOD_PIN5) | \ - PIN_MODE_INPUT(GPIOD_PIN6) | \ - PIN_MODE_INPUT(GPIOD_PIN7) | \ - PIN_MODE_INPUT(GPIOD_PIN8) | \ - PIN_MODE_INPUT(GPIOD_PIN9) | \ - PIN_MODE_INPUT(GPIOD_PIN10) | \ - PIN_MODE_INPUT(GPIOD_PIN11) | \ - PIN_MODE_INPUT(GPIOD_PIN12) | \ - PIN_MODE_INPUT(GPIOD_PIN13) | \ - PIN_MODE_INPUT(GPIOD_PIN14) | \ - PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_PIN4) | \ - PIN_ODR_HIGH(GPIOD_PIN5) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_HIGH(GPIOD_PIN12) | \ - PIN_ODR_HIGH(GPIOD_PIN13) | \ - PIN_ODR_HIGH(GPIOD_PIN14) | \ - PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0)) +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | PIN_MODE_INPUT(GPIOD_PIN1) | PIN_MODE_INPUT(GPIOD_PIN2) | PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11) | PIN_MODE_INPUT(GPIOD_PIN12) | PIN_MODE_INPUT(GPIOD_PIN13) | PIN_MODE_INPUT(GPIOD_PIN14) | PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | PIN_OSPEED_VERYLOW(GPIOD_PIN1) | PIN_OSPEED_VERYLOW(GPIOD_PIN2) | PIN_OSPEED_VERYLOW(GPIOD_PIN3) | PIN_OSPEED_VERYLOW(GPIOD_PIN4) | PIN_OSPEED_VERYLOW(GPIOD_PIN5) | PIN_OSPEED_VERYLOW(GPIOD_PIN6) | PIN_OSPEED_VERYLOW(GPIOD_PIN7) | PIN_OSPEED_VERYLOW(GPIOD_PIN8) | PIN_OSPEED_VERYLOW(GPIOD_PIN9) | PIN_OSPEED_VERYLOW(GPIOD_PIN10) | PIN_OSPEED_VERYLOW(GPIOD_PIN11) | PIN_OSPEED_VERYLOW(GPIOD_PIN12) | PIN_OSPEED_VERYLOW(GPIOD_PIN13) | PIN_OSPEED_VERYLOW(GPIOD_PIN14) | PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | PIN_PUPDR_PULLUP(GPIOD_PIN1) | PIN_PUPDR_PULLUP(GPIOD_PIN2) | PIN_PUPDR_PULLUP(GPIOD_PIN3) | PIN_PUPDR_PULLUP(GPIOD_PIN4) | PIN_PUPDR_PULLUP(GPIOD_PIN5) | PIN_PUPDR_PULLUP(GPIOD_PIN6) | PIN_PUPDR_PULLUP(GPIOD_PIN7) | PIN_PUPDR_PULLUP(GPIOD_PIN8) | PIN_PUPDR_PULLUP(GPIOD_PIN9) | PIN_PUPDR_PULLUP(GPIOD_PIN10) | PIN_PUPDR_PULLUP(GPIOD_PIN11) | PIN_PUPDR_PULLUP(GPIOD_PIN12) | PIN_PUPDR_PULLUP(GPIOD_PIN13) | PIN_PUPDR_PULLUP(GPIOD_PIN14) | PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | PIN_ODR_HIGH(GPIOD_PIN1) | PIN_ODR_HIGH(GPIOD_PIN2) | PIN_ODR_HIGH(GPIOD_PIN3) | PIN_ODR_HIGH(GPIOD_PIN4) | PIN_ODR_HIGH(GPIOD_PIN5) | PIN_ODR_HIGH(GPIOD_PIN6) | PIN_ODR_HIGH(GPIOD_PIN7) | PIN_ODR_HIGH(GPIOD_PIN8) | PIN_ODR_HIGH(GPIOD_PIN9) | PIN_ODR_HIGH(GPIOD_PIN10) | PIN_ODR_HIGH(GPIOD_PIN11) | PIN_ODR_HIGH(GPIOD_PIN12) | PIN_ODR_HIGH(GPIOD_PIN13) | PIN_ODR_HIGH(GPIOD_PIN14) | PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | PIN_AFIO_AF(GPIOD_PIN1, 0) | PIN_AFIO_AF(GPIOD_PIN2, 0) | PIN_AFIO_AF(GPIOD_PIN3, 0) | PIN_AFIO_AF(GPIOD_PIN4, 0) | PIN_AFIO_AF(GPIOD_PIN5, 0) | PIN_AFIO_AF(GPIOD_PIN6, 0) | PIN_AFIO_AF(GPIOD_PIN7, 0)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | PIN_AFIO_AF(GPIOD_PIN9, 0) | PIN_AFIO_AF(GPIOD_PIN10, 0) | PIN_AFIO_AF(GPIOD_PIN11, 0) | PIN_AFIO_AF(GPIOD_PIN12, 0) | PIN_AFIO_AF(GPIOD_PIN13, 0) | PIN_AFIO_AF(GPIOD_PIN14, 0) | PIN_AFIO_AF(GPIOD_PIN15, 0)) /* * GPIOE setup: @@ -712,102 +355,13 @@ * PE14 - PIN14 (output pushpull maximum). * PE15 - PIN15 (output pushpull maximum). */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) |\ - PIN_MODE_OUTPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) |\ - PIN_MODE_INPUT(GPIOE_PIN5) |\ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_OUTPUT(GPIOE_PIN8) | \ - PIN_MODE_OUTPUT(GPIOE_PIN9) | \ - PIN_MODE_OUTPUT(GPIOE_PIN10) | \ - PIN_MODE_OUTPUT(GPIOE_PIN11) | \ - PIN_MODE_OUTPUT(GPIOE_PIN12) | \ - PIN_MODE_OUTPUT(GPIOE_PIN13) | \ - PIN_MODE_OUTPUT(GPIOE_PIN14) | \ - PIN_MODE_OUTPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\ - PIN_OSPEED_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN4) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN5) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_LOW(GPIOE_PIN8) | \ - PIN_ODR_LOW(GPIOE_PIN9) | \ - PIN_ODR_LOW(GPIOE_PIN10) | \ - PIN_ODR_LOW(GPIOE_PIN11) | \ - PIN_ODR_LOW(GPIOE_PIN12) | \ - PIN_ODR_LOW(GPIOE_PIN13) | \ - PIN_ODR_LOW(GPIOE_PIN14) | \ - PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0) |\ - PIN_AFIO_AF(GPIOE_PIN3, 0) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0) |\ - PIN_AFIO_AF(GPIOE_PIN5, 0) |\ - PIN_AFIO_AF(GPIOE_PIN6, 0) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0)) +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_OUTPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_OUTPUT(GPIOE_PIN8) | PIN_MODE_OUTPUT(GPIOE_PIN9) | PIN_MODE_OUTPUT(GPIOE_PIN10) | PIN_MODE_OUTPUT(GPIOE_PIN11) | PIN_MODE_OUTPUT(GPIOE_PIN12) | PIN_MODE_OUTPUT(GPIOE_PIN13) | PIN_MODE_OUTPUT(GPIOE_PIN14) | PIN_MODE_OUTPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | PIN_OSPEED_VERYLOW(GPIOE_PIN1) | PIN_OSPEED_VERYLOW(GPIOE_PIN2) | PIN_OSPEED_HIGH(GPIOE_PIN3) | PIN_OSPEED_VERYLOW(GPIOE_PIN4) | PIN_OSPEED_VERYLOW(GPIOE_PIN5) | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_FLOATING(GPIOE_PIN3) | PIN_PUPDR_PULLUP(GPIOE_PIN4) | PIN_PUPDR_PULLUP(GPIOE_PIN5) | PIN_PUPDR_PULLUP(GPIOE_PIN6) | PIN_PUPDR_PULLUP(GPIOE_PIN7) | PIN_PUPDR_PULLUP(GPIOE_PIN8) | PIN_PUPDR_PULLUP(GPIOE_PIN9) | PIN_PUPDR_PULLUP(GPIOE_PIN10) | PIN_PUPDR_FLOATING(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_FLOATING(GPIOE_PIN13) | PIN_PUPDR_FLOATING(GPIOE_PIN14) | PIN_PUPDR_FLOATING(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | PIN_ODR_HIGH(GPIOE_PIN1) | PIN_ODR_HIGH(GPIOE_PIN2) | PIN_ODR_HIGH(GPIOE_PIN3) | PIN_ODR_HIGH(GPIOE_PIN4) | PIN_ODR_HIGH(GPIOE_PIN5) | PIN_ODR_HIGH(GPIOE_PIN6) | PIN_ODR_HIGH(GPIOE_PIN7) | PIN_ODR_LOW(GPIOE_PIN8) | PIN_ODR_LOW(GPIOE_PIN9) | PIN_ODR_LOW(GPIOE_PIN10) | PIN_ODR_LOW(GPIOE_PIN11) | PIN_ODR_LOW(GPIOE_PIN12) | PIN_ODR_LOW(GPIOE_PIN13) | PIN_ODR_LOW(GPIOE_PIN14) | PIN_ODR_LOW(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | PIN_AFIO_AF(GPIOE_PIN1, 0) | PIN_AFIO_AF(GPIOE_PIN2, 0) | PIN_AFIO_AF(GPIOE_PIN3, 0) | PIN_AFIO_AF(GPIOE_PIN4, 0) | PIN_AFIO_AF(GPIOE_PIN5, 0) | PIN_AFIO_AF(GPIOE_PIN6, 0) | PIN_AFIO_AF(GPIOE_PIN7, 0)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | PIN_AFIO_AF(GPIOE_PIN9, 0) | PIN_AFIO_AF(GPIOE_PIN10, 0) | PIN_AFIO_AF(GPIOE_PIN11, 0) | PIN_AFIO_AF(GPIOE_PIN12, 0) | PIN_AFIO_AF(GPIOE_PIN13, 0) | PIN_AFIO_AF(GPIOE_PIN14, 0) | PIN_AFIO_AF(GPIOE_PIN15, 0)) /* * GPIOF setup: @@ -829,102 +383,13 @@ * PF14 - PIN14 (input pullup). * PF15 - PIN15 (input pullup). */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \ - PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ - PIN_MODE_INPUT(GPIOF_PIN2) | \ - PIN_MODE_INPUT(GPIOF_PIN3) | \ - PIN_MODE_INPUT(GPIOF_PIN4) | \ - PIN_MODE_INPUT(GPIOF_PIN5) | \ - PIN_MODE_INPUT(GPIOF_PIN6) | \ - PIN_MODE_INPUT(GPIOF_PIN7) | \ - PIN_MODE_INPUT(GPIOF_PIN8) | \ - PIN_MODE_INPUT(GPIOF_PIN9) | \ - PIN_MODE_INPUT(GPIOF_PIN10) | \ - PIN_MODE_INPUT(GPIOF_PIN11) | \ - PIN_MODE_INPUT(GPIOF_PIN12) | \ - PIN_MODE_INPUT(GPIOF_PIN13) | \ - PIN_MODE_INPUT(GPIOF_PIN14) | \ - PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \ - PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \ - PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \ - PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \ - PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \ - PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0)) +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | PIN_MODE_INPUT(GPIOF_I2C2_SCL) | PIN_MODE_INPUT(GPIOF_PIN2) | PIN_MODE_INPUT(GPIOF_PIN3) | PIN_MODE_INPUT(GPIOF_PIN4) | PIN_MODE_INPUT(GPIOF_PIN5) | PIN_MODE_INPUT(GPIOF_PIN6) | PIN_MODE_INPUT(GPIOF_PIN7) | PIN_MODE_INPUT(GPIOF_PIN8) | PIN_MODE_INPUT(GPIOF_PIN9) | PIN_MODE_INPUT(GPIOF_PIN10) | PIN_MODE_INPUT(GPIOF_PIN11) | PIN_MODE_INPUT(GPIOF_PIN12) | PIN_MODE_INPUT(GPIOF_PIN13) | PIN_MODE_INPUT(GPIOF_PIN14) | PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | PIN_OSPEED_VERYLOW(GPIOF_PIN2) | PIN_OSPEED_VERYLOW(GPIOF_PIN3) | PIN_OSPEED_VERYLOW(GPIOF_PIN4) | PIN_OSPEED_VERYLOW(GPIOF_PIN5) | PIN_OSPEED_VERYLOW(GPIOF_PIN6) | PIN_OSPEED_VERYLOW(GPIOF_PIN7) | PIN_OSPEED_VERYLOW(GPIOF_PIN8) | PIN_OSPEED_VERYLOW(GPIOF_PIN9) | PIN_OSPEED_VERYLOW(GPIOF_PIN10) | PIN_OSPEED_VERYLOW(GPIOF_PIN11) | PIN_OSPEED_VERYLOW(GPIOF_PIN12) | PIN_OSPEED_VERYLOW(GPIOF_PIN13) | PIN_OSPEED_VERYLOW(GPIOF_PIN14) | PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | PIN_PUPDR_PULLUP(GPIOF_PIN2) | PIN_PUPDR_PULLUP(GPIOF_PIN3) | PIN_PUPDR_PULLUP(GPIOF_PIN4) | PIN_PUPDR_PULLUP(GPIOF_PIN5) | PIN_PUPDR_PULLUP(GPIOF_PIN6) | PIN_PUPDR_PULLUP(GPIOF_PIN7) | PIN_PUPDR_PULLUP(GPIOF_PIN8) | PIN_PUPDR_PULLUP(GPIOF_PIN9) | PIN_PUPDR_PULLUP(GPIOF_PIN10) | PIN_PUPDR_PULLUP(GPIOF_PIN11) | PIN_PUPDR_PULLUP(GPIOF_PIN12) | PIN_PUPDR_PULLUP(GPIOF_PIN13) | PIN_PUPDR_PULLUP(GPIOF_PIN14) | PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | PIN_ODR_HIGH(GPIOF_I2C2_SCL) | PIN_ODR_HIGH(GPIOF_PIN2) | PIN_ODR_HIGH(GPIOF_PIN3) | PIN_ODR_HIGH(GPIOF_PIN4) | PIN_ODR_HIGH(GPIOF_PIN5) | PIN_ODR_HIGH(GPIOF_PIN6) | PIN_ODR_HIGH(GPIOF_PIN7) | PIN_ODR_HIGH(GPIOF_PIN8) | PIN_ODR_HIGH(GPIOF_PIN9) | PIN_ODR_HIGH(GPIOF_PIN10) | PIN_ODR_HIGH(GPIOF_PIN11) | PIN_ODR_HIGH(GPIOF_PIN12) | PIN_ODR_HIGH(GPIOF_PIN13) | PIN_ODR_HIGH(GPIOF_PIN14) | PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | PIN_AFIO_AF(GPIOF_PIN2, 0) | PIN_AFIO_AF(GPIOF_PIN3, 0) | PIN_AFIO_AF(GPIOF_PIN4, 0) | PIN_AFIO_AF(GPIOF_PIN5, 0) | PIN_AFIO_AF(GPIOF_PIN6, 0) | PIN_AFIO_AF(GPIOF_PIN7, 0)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | PIN_AFIO_AF(GPIOF_PIN9, 0) | PIN_AFIO_AF(GPIOF_PIN10, 0) | PIN_AFIO_AF(GPIOF_PIN11, 0) | PIN_AFIO_AF(GPIOF_PIN12, 0) | PIN_AFIO_AF(GPIOF_PIN13, 0) | PIN_AFIO_AF(GPIOF_PIN14, 0) | PIN_AFIO_AF(GPIOF_PIN15, 0)) /* * GPIOG setup: @@ -946,102 +411,13 @@ * PG14 - PIN14 (input pullup). * PG15 - PIN15 (input pullup). */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ - PIN_MODE_INPUT(GPIOG_PIN1) | \ - PIN_MODE_INPUT(GPIOG_PIN2) | \ - PIN_MODE_INPUT(GPIOG_PIN3) | \ - PIN_MODE_INPUT(GPIOG_PIN4) | \ - PIN_MODE_INPUT(GPIOG_PIN5) | \ - PIN_MODE_INPUT(GPIOG_PIN6) | \ - PIN_MODE_INPUT(GPIOG_PIN7) | \ - PIN_MODE_INPUT(GPIOG_PIN8) | \ - PIN_MODE_INPUT(GPIOG_PIN9) | \ - PIN_MODE_INPUT(GPIOG_PIN10) | \ - PIN_MODE_INPUT(GPIOG_PIN11) | \ - PIN_MODE_INPUT(GPIOG_PIN12) | \ - PIN_MODE_INPUT(GPIOG_PIN13) | \ - PIN_MODE_INPUT(GPIOG_PIN14) | \ - PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0)) +#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) +#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) +#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | PIN_OSPEED_VERYLOW(GPIOG_PIN1) | PIN_OSPEED_VERYLOW(GPIOG_PIN2) | PIN_OSPEED_VERYLOW(GPIOG_PIN3) | PIN_OSPEED_VERYLOW(GPIOG_PIN4) | PIN_OSPEED_VERYLOW(GPIOG_PIN5) | PIN_OSPEED_VERYLOW(GPIOG_PIN6) | PIN_OSPEED_VERYLOW(GPIOG_PIN7) | PIN_OSPEED_VERYLOW(GPIOG_PIN8) | PIN_OSPEED_VERYLOW(GPIOG_PIN9) | PIN_OSPEED_VERYLOW(GPIOG_PIN10) | PIN_OSPEED_VERYLOW(GPIOG_PIN11) | PIN_OSPEED_VERYLOW(GPIOG_PIN12) | PIN_OSPEED_VERYLOW(GPIOG_PIN13) | PIN_OSPEED_VERYLOW(GPIOG_PIN14) | PIN_OSPEED_VERYLOW(GPIOG_PIN15)) +#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) +#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) +#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | PIN_AFIO_AF(GPIOG_PIN1, 0) | PIN_AFIO_AF(GPIOG_PIN2, 0) | PIN_AFIO_AF(GPIOG_PIN3, 0) | PIN_AFIO_AF(GPIOG_PIN4, 0) | PIN_AFIO_AF(GPIOG_PIN5, 0) | PIN_AFIO_AF(GPIOG_PIN6, 0) | PIN_AFIO_AF(GPIOG_PIN7, 0)) +#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | PIN_AFIO_AF(GPIOG_PIN9, 0) | PIN_AFIO_AF(GPIOG_PIN10, 0) | PIN_AFIO_AF(GPIOG_PIN11, 0) | PIN_AFIO_AF(GPIOG_PIN12, 0) | PIN_AFIO_AF(GPIOG_PIN13, 0) | PIN_AFIO_AF(GPIOG_PIN14, 0) | PIN_AFIO_AF(GPIOG_PIN15, 0)) /* * GPIOH setup: @@ -1063,103 +439,13 @@ * PH14 - PIN14 (input pullup). * PH15 - PIN15 (input pullup). */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ - PIN_MODE_INPUT(GPIOH_PIN1) | \ - PIN_MODE_INPUT(GPIOH_PIN2) | \ - PIN_MODE_INPUT(GPIOH_PIN3) | \ - PIN_MODE_INPUT(GPIOH_PIN4) | \ - PIN_MODE_INPUT(GPIOH_PIN5) | \ - PIN_MODE_INPUT(GPIOH_PIN6) | \ - PIN_MODE_INPUT(GPIOH_PIN7) | \ - PIN_MODE_INPUT(GPIOH_PIN8) | \ - PIN_MODE_INPUT(GPIOH_PIN9) | \ - PIN_MODE_INPUT(GPIOH_PIN10) | \ - PIN_MODE_INPUT(GPIOH_PIN11) | \ - PIN_MODE_INPUT(GPIOH_PIN12) | \ - PIN_MODE_INPUT(GPIOH_PIN13) | \ - PIN_MODE_INPUT(GPIOH_PIN14) | \ - PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ - PIN_ODR_HIGH(GPIOH_PIN1) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ - PIN_AFIO_AF(GPIOH_PIN1, 0) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0)) - +#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | PIN_MODE_INPUT(GPIOH_PIN1) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) +#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) +#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | PIN_OSPEED_VERYLOW(GPIOH_PIN1) | PIN_OSPEED_VERYLOW(GPIOH_PIN2) | PIN_OSPEED_VERYLOW(GPIOH_PIN3) | PIN_OSPEED_VERYLOW(GPIOH_PIN4) | PIN_OSPEED_VERYLOW(GPIOH_PIN5) | PIN_OSPEED_VERYLOW(GPIOH_PIN6) | PIN_OSPEED_VERYLOW(GPIOH_PIN7) | PIN_OSPEED_VERYLOW(GPIOH_PIN8) | PIN_OSPEED_VERYLOW(GPIOH_PIN9) | PIN_OSPEED_VERYLOW(GPIOH_PIN10) | PIN_OSPEED_VERYLOW(GPIOH_PIN11) | PIN_OSPEED_VERYLOW(GPIOH_PIN12) | PIN_OSPEED_VERYLOW(GPIOH_PIN13) | PIN_OSPEED_VERYLOW(GPIOH_PIN14) | PIN_OSPEED_VERYLOW(GPIOH_PIN15)) +#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | PIN_PUPDR_PULLUP(GPIOH_PIN1) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) +#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | PIN_ODR_HIGH(GPIOH_PIN1) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) +#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | PIN_AFIO_AF(GPIOH_PIN1, 0) | PIN_AFIO_AF(GPIOH_PIN2, 0) | PIN_AFIO_AF(GPIOH_PIN3, 0) | PIN_AFIO_AF(GPIOH_PIN4, 0) | PIN_AFIO_AF(GPIOH_PIN5, 0) | PIN_AFIO_AF(GPIOH_PIN6, 0) | PIN_AFIO_AF(GPIOH_PIN7, 0)) +#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | PIN_AFIO_AF(GPIOH_PIN9, 0) | PIN_AFIO_AF(GPIOH_PIN10, 0) | PIN_AFIO_AF(GPIOH_PIN11, 0) | PIN_AFIO_AF(GPIOH_PIN12, 0) | PIN_AFIO_AF(GPIOH_PIN13, 0) | PIN_AFIO_AF(GPIOH_PIN14, 0) | PIN_AFIO_AF(GPIOH_PIN15, 0)) /* * USB bus activation macro, required by the USB driver. @@ -1171,17 +457,19 @@ * USB bus de-activation macro, required by the USB driver. */ // #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) +#define usb_lld_disconnect_bus(usbp) \ + (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); \ + palClearPad(GPIOA, GPIOA_USB_DP) // #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) #if !defined(_FROM_ASM_) -#ifdef __cplusplus +# ifdef __cplusplus extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus +# endif +void boardInit(void); +# ifdef __cplusplus } -#endif +# endif #endif /* _FROM_ASM_ */ #endif /* _BOARD_H_ */ diff --git a/drivers/boards/IC_TEENSY_3_1/board.c b/drivers/boards/IC_TEENSY_3_1/board.c index 1e952883d8..63e3f64929 100644 --- a/drivers/boards/IC_TEENSY_3_1/board.c +++ b/drivers/boards/IC_TEENSY_3_1/board.c @@ -21,154 +21,109 @@ * @details Digital I/O ports static configuration as defined in @p board.h. * This variable is used by the HAL when initializing the PAL driver. */ -const PALConfig pal_default_config = -{ - .ports = { +const PALConfig pal_default_config = { + .ports = { - /* - * PORTA setup. - * - * PTA4 - PIN33 - * PTA5 - PIN24 - * PTA12 - PIN3 - * PTA13 - PIN4 - * - * PTA18/19 crystal - * PTA0/3 SWD - */ - .port = IOPORT1, - .pads = { - PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + { + /* + * PORTA setup. + * + * PTA4 - PIN33 + * PTA5 - PIN24 + * PTA12 - PIN3 + * PTA13 - PIN4 + * + * PTA18/19 crystal + * PTA0/3 SWD + */ + .port = IOPORT1, + .pads = + { + PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + { + /* + * PORTB setup. + * + * PTB0 - PIN16 + * PTB1 - PIN17 + * PTB2 - PIN19 + * PTB3 - PIN18 + * PTB16 - PIN0 - UART0_TX + * PTB17 - PIN1 - UART0_RX + * PTB18 - PIN32 + * PTB19 - PIN25 + */ + .port = IOPORT2, + .pads = + { + PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + { + /* + * PORTC setup. + * + * PTC0 - PIN15 + * PTC1 - PIN22 + * PTC2 - PIN23 + * PTC3 - PIN9 + * PTC4 - PIN10 + * PTC5 - PIN13 + * PTC6 - PIN11 + * PTC7 - PIN12 + * PTC8 - PIN28 + * PTC9 - PIN27 + * PTC10 - PIN29 + * PTC11 - PIN30 + */ + .port = IOPORT3, + .pads = + { + PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + { + /* + * PORTD setup. + * + * PTD0 - PIN2 + * PTD1 - PIN14 + * PTD2 - PIN7 + * PTD3 - PIN8 + * PTD4 - PIN6 + * PTD5 - PIN20 + * PTD6 - PIN21 + * PTD7 - PIN5 + */ + .port = IOPORT4, + .pads = + { + PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + { + /* + * PORTE setup. + * + * PTE0 - PIN31 + * PTE1 - PIN26 + */ + .port = IOPORT5, + .pads = + { + PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, }, }, - { - /* - * PORTB setup. - * - * PTB0 - PIN16 - * PTB1 - PIN17 - * PTB2 - PIN19 - * PTB3 - PIN18 - * PTB16 - PIN0 - UART0_TX - * PTB17 - PIN1 - UART0_RX - * PTB18 - PIN32 - * PTB19 - PIN25 - */ - .port = IOPORT2, - .pads = { - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3, - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - { - /* - * PORTC setup. - * - * PTC0 - PIN15 - * PTC1 - PIN22 - * PTC2 - PIN23 - * PTC3 - PIN9 - * PTC4 - PIN10 - * PTC5 - PIN13 - * PTC6 - PIN11 - * PTC7 - PIN12 - * PTC8 - PIN28 - * PTC9 - PIN27 - * PTC10 - PIN29 - * PTC11 - PIN30 - */ - .port = IOPORT3, - .pads = { - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - { - /* - * PORTD setup. - * - * PTD0 - PIN2 - * PTD1 - PIN14 - * PTD2 - PIN7 - * PTD3 - PIN8 - * PTD4 - PIN6 - * PTD5 - PIN20 - * PTD6 - PIN21 - * PTD7 - PIN5 - */ - .port = IOPORT4, - .pads = { - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - { - /* - * PORTE setup. - * - * PTE0 - PIN31 - * PTE1 - PIN26 - */ - .port = IOPORT5, - .pads = { - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - }, }; #endif // NOTE: This value comes from kiibohd/controller and is the location of a value // which needs to be checked before disabling the watchdog (which happens in // k20x_clock_init) -#define WDOG_TMROUTL *(volatile uint16_t *)0x40052012 +#define WDOG_TMROUTL *(volatile uint16_t *)0x40052012 /** * @brief Early initialization code. @@ -176,16 +131,16 @@ const PALConfig pal_default_config = * and before any other initialization. */ void __early_init(void) { - // This is a dirty hack and should only be used as a temporary fix until this - // is upstreamed. - while (WDOG_TMROUTL < 2); // Must wait for WDOG timer if already running, before jumping + // This is a dirty hack and should only be used as a temporary fix until this + // is upstreamed. + while (WDOG_TMROUTL < 2) + ; // Must wait for WDOG timer if already running, before jumping - k20x_clock_init(); + k20x_clock_init(); } /** * @brief Board-specific initialization code. * @todo Add your board-specific code, if any. */ -void boardInit(void) { -} +void boardInit(void) {} diff --git a/drivers/boards/IC_TEENSY_3_1/board.h b/drivers/boards/IC_TEENSY_3_1/board.h index 8853395efe..c8259ab0c7 100644 --- a/drivers/boards/IC_TEENSY_3_1/board.h +++ b/drivers/boards/IC_TEENSY_3_1/board.h @@ -25,13 +25,13 @@ * Board identifier. */ #define BOARD_PJRC_TEENSY_3_1 -#define BOARD_NAME "PJRC Teensy 3.1" +#define BOARD_NAME "PJRC Teensy 3.1" /* External 16 MHz crystal */ -#define KINETIS_XTAL_FREQUENCY 16000000UL +#define KINETIS_XTAL_FREQUENCY 16000000UL /* Use internal capacitors for the crystal */ -#define KINETIS_BOARD_OSCILLATOR_SETTING OSC_CR_SC8P|OSC_CR_SC2P +#define KINETIS_BOARD_OSCILLATOR_SETTING OSC_CR_SC8P | OSC_CR_SC2P /* * MCU type @@ -41,79 +41,79 @@ /* * IO pins assignments. */ -#define PORTA_PIN0 0 -#define PORTA_PIN1 1 -#define PORTA_PIN2 2 -#define PORTA_PIN3 3 -#define TEENSY_PIN33 4 -#define TEENSY_PIN24 5 -#define PORTA_PIN6 6 -#define PORTA_PIN7 7 -#define PORTA_PIN8 8 -#define PORTA_PIN9 9 -#define PORTA_PIN10 10 -#define PORTA_PIN11 11 -#define TEENSY_PIN3 12 -#define TEENSY_PIN4 13 -#define PORTA_PIN14 14 -#define PORTA_PIN15 15 -#define PORTA_PIN16 16 -#define PORTA_PIN17 17 -#define PORTA_PIN18 18 -#define PORTA_PIN19 19 -#define PORTA_PIN20 20 -#define PORTA_PIN21 21 -#define PORTA_PIN22 22 -#define PORTA_PIN23 23 -#define PORTA_PIN24 24 -#define PORTA_PIN25 25 -#define PORTA_PIN26 26 -#define PORTA_PIN27 27 -#define PORTA_PIN28 28 -#define PORTA_PIN29 29 -#define PORTA_PIN30 30 -#define PORTA_PIN31 31 +#define PORTA_PIN0 0 +#define PORTA_PIN1 1 +#define PORTA_PIN2 2 +#define PORTA_PIN3 3 +#define TEENSY_PIN33 4 +#define TEENSY_PIN24 5 +#define PORTA_PIN6 6 +#define PORTA_PIN7 7 +#define PORTA_PIN8 8 +#define PORTA_PIN9 9 +#define PORTA_PIN10 10 +#define PORTA_PIN11 11 +#define TEENSY_PIN3 12 +#define TEENSY_PIN4 13 +#define PORTA_PIN14 14 +#define PORTA_PIN15 15 +#define PORTA_PIN16 16 +#define PORTA_PIN17 17 +#define PORTA_PIN18 18 +#define PORTA_PIN19 19 +#define PORTA_PIN20 20 +#define PORTA_PIN21 21 +#define PORTA_PIN22 22 +#define PORTA_PIN23 23 +#define PORTA_PIN24 24 +#define PORTA_PIN25 25 +#define PORTA_PIN26 26 +#define PORTA_PIN27 27 +#define PORTA_PIN28 28 +#define PORTA_PIN29 29 +#define PORTA_PIN30 30 +#define PORTA_PIN31 31 -#define TEENSY_PIN3_IOPORT IOPORT1 -#define TEENSY_PIN4_IOPORT IOPORT1 +#define TEENSY_PIN3_IOPORT IOPORT1 +#define TEENSY_PIN4_IOPORT IOPORT1 #define TEENSY_PIN24_IOPORT IOPORT1 #define TEENSY_PIN33_IOPORT IOPORT1 -#define TEENSY_PIN16 0 -#define TEENSY_PIN17 1 -#define TEENSY_PIN19 2 -#define TEENSY_PIN18 3 -#define PORTB_PIN4 4 -#define PORTB_PIN5 5 -#define PORTB_PIN6 6 -#define PORTB_PIN7 7 -#define PORTB_PIN8 8 -#define PORTB_PIN9 9 -#define PORTB_PIN10 10 -#define PORTB_PIN11 11 -#define PORTB_PIN12 12 -#define PORTB_PIN13 13 -#define PORTB_PIN14 14 -#define PORTB_PIN15 15 -#define TEENSY_PIN0 16 -#define TEENSY_PIN1 17 -#define TEENSY_PIN32 18 -#define TEENSY_PIN25 19 -#define PORTB_PIN20 20 -#define PORTB_PIN21 21 -#define PORTB_PIN22 22 -#define PORTB_PIN23 23 -#define PORTB_PIN24 24 -#define PORTB_PIN25 25 -#define PORTB_PIN26 26 -#define PORTB_PIN27 27 -#define PORTB_PIN28 28 -#define PORTB_PIN29 29 -#define PORTB_PIN30 30 -#define PORTB_PIN31 31 +#define TEENSY_PIN16 0 +#define TEENSY_PIN17 1 +#define TEENSY_PIN19 2 +#define TEENSY_PIN18 3 +#define PORTB_PIN4 4 +#define PORTB_PIN5 5 +#define PORTB_PIN6 6 +#define PORTB_PIN7 7 +#define PORTB_PIN8 8 +#define PORTB_PIN9 9 +#define PORTB_PIN10 10 +#define PORTB_PIN11 11 +#define PORTB_PIN12 12 +#define PORTB_PIN13 13 +#define PORTB_PIN14 14 +#define PORTB_PIN15 15 +#define TEENSY_PIN0 16 +#define TEENSY_PIN1 17 +#define TEENSY_PIN32 18 +#define TEENSY_PIN25 19 +#define PORTB_PIN20 20 +#define PORTB_PIN21 21 +#define PORTB_PIN22 22 +#define PORTB_PIN23 23 +#define PORTB_PIN24 24 +#define PORTB_PIN25 25 +#define PORTB_PIN26 26 +#define PORTB_PIN27 27 +#define PORTB_PIN28 28 +#define PORTB_PIN29 29 +#define PORTB_PIN30 30 +#define PORTB_PIN31 31 -#define TEENSY_PIN0_IOPORT IOPORT2 -#define TEENSY_PIN1_IOPORT IOPORT2 +#define TEENSY_PIN0_IOPORT IOPORT2 +#define TEENSY_PIN1_IOPORT IOPORT2 #define TEENSY_PIN16_IOPORT IOPORT2 #define TEENSY_PIN17_IOPORT IOPORT2 #define TEENSY_PIN18_IOPORT IOPORT2 @@ -121,40 +121,40 @@ #define TEENSY_PIN25_IOPORT IOPORT2 #define TEENSY_PIN32_IOPORT IOPORT2 -#define TEENSY_PIN15 0 -#define TEENSY_PIN22 1 -#define TEENSY_PIN23 2 -#define TEENSY_PIN9 3 -#define TEENSY_PIN10 4 -#define TEENSY_PIN13 5 -#define TEENSY_PIN11 6 -#define TEENSY_PIN12 7 -#define TEENSY_PIN28 8 -#define TEENSY_PIN27 9 -#define TEENSY_PIN29 10 -#define TEENSY_PIN30 11 -#define PORTC_PIN12 12 -#define PORTC_PIN13 13 -#define PORTC_PIN14 14 -#define PORTC_PIN15 15 -#define PORTC_PIN16 16 -#define PORTC_PIN17 17 -#define PORTC_PIN18 18 -#define PORTC_PIN19 19 -#define PORTC_PIN20 20 -#define PORTC_PIN21 21 -#define PORTC_PIN22 22 -#define PORTC_PIN23 23 -#define PORTC_PIN24 24 -#define PORTC_PIN25 25 -#define PORTC_PIN26 26 -#define PORTC_PIN27 27 -#define PORTC_PIN28 28 -#define PORTC_PIN29 29 -#define PORTC_PIN30 30 -#define PORTC_PIN31 31 +#define TEENSY_PIN15 0 +#define TEENSY_PIN22 1 +#define TEENSY_PIN23 2 +#define TEENSY_PIN9 3 +#define TEENSY_PIN10 4 +#define TEENSY_PIN13 5 +#define TEENSY_PIN11 6 +#define TEENSY_PIN12 7 +#define TEENSY_PIN28 8 +#define TEENSY_PIN27 9 +#define TEENSY_PIN29 10 +#define TEENSY_PIN30 11 +#define PORTC_PIN12 12 +#define PORTC_PIN13 13 +#define PORTC_PIN14 14 +#define PORTC_PIN15 15 +#define PORTC_PIN16 16 +#define PORTC_PIN17 17 +#define PORTC_PIN18 18 +#define PORTC_PIN19 19 +#define PORTC_PIN20 20 +#define PORTC_PIN21 21 +#define PORTC_PIN22 22 +#define PORTC_PIN23 23 +#define PORTC_PIN24 24 +#define PORTC_PIN25 25 +#define PORTC_PIN26 26 +#define PORTC_PIN27 27 +#define PORTC_PIN28 28 +#define PORTC_PIN29 29 +#define PORTC_PIN30 30 +#define PORTC_PIN31 31 -#define TEENSY_PIN9_IOPORT IOPORT3 +#define TEENSY_PIN9_IOPORT IOPORT3 #define TEENSY_PIN10_IOPORT IOPORT3 #define TEENSY_PIN11_IOPORT IOPORT3 #define TEENSY_PIN12_IOPORT IOPORT3 @@ -167,129 +167,129 @@ #define TEENSY_PIN29_IOPORT IOPORT3 #define TEENSY_PIN30_IOPORT IOPORT3 -#define TEENSY_PIN2 0 -#define TEENSY_PIN14 1 -#define TEENSY_PIN7 2 -#define TEENSY_PIN8 3 -#define TEENSY_PIN6 4 -#define TEENSY_PIN20 5 -#define TEENSY_PIN21 6 -#define TEENSY_PIN5 7 -#define PORTD_PIN8 8 -#define PORTD_PIN9 9 -#define PORTD_PIN10 10 -#define PORTD_PIN11 11 -#define PORTD_PIN12 12 -#define PORTD_PIN13 13 -#define PORTD_PIN14 14 -#define PORTD_PIN15 15 -#define PORTD_PIN16 16 -#define PORTD_PIN17 17 -#define PORTD_PIN18 18 -#define PORTD_PIN19 19 -#define PORTD_PIN20 20 -#define PORTD_PIN21 21 -#define PORTD_PIN22 22 -#define PORTD_PIN23 23 -#define PORTD_PIN24 24 -#define PORTD_PIN25 25 -#define PORTD_PIN26 26 -#define PORTD_PIN27 27 -#define PORTD_PIN28 28 -#define PORTD_PIN29 29 -#define PORTD_PIN30 30 -#define PORTD_PIN31 31 +#define TEENSY_PIN2 0 +#define TEENSY_PIN14 1 +#define TEENSY_PIN7 2 +#define TEENSY_PIN8 3 +#define TEENSY_PIN6 4 +#define TEENSY_PIN20 5 +#define TEENSY_PIN21 6 +#define TEENSY_PIN5 7 +#define PORTD_PIN8 8 +#define PORTD_PIN9 9 +#define PORTD_PIN10 10 +#define PORTD_PIN11 11 +#define PORTD_PIN12 12 +#define PORTD_PIN13 13 +#define PORTD_PIN14 14 +#define PORTD_PIN15 15 +#define PORTD_PIN16 16 +#define PORTD_PIN17 17 +#define PORTD_PIN18 18 +#define PORTD_PIN19 19 +#define PORTD_PIN20 20 +#define PORTD_PIN21 21 +#define PORTD_PIN22 22 +#define PORTD_PIN23 23 +#define PORTD_PIN24 24 +#define PORTD_PIN25 25 +#define PORTD_PIN26 26 +#define PORTD_PIN27 27 +#define PORTD_PIN28 28 +#define PORTD_PIN29 29 +#define PORTD_PIN30 30 +#define PORTD_PIN31 31 -#define TEENSY_PIN2_IOPORT IOPORT4 -#define TEENSY_PIN5_IOPORT IOPORT4 -#define TEENSY_PIN6_IOPORT IOPORT4 -#define TEENSY_PIN7_IOPORT IOPORT4 -#define TEENSY_PIN8_IOPORT IOPORT4 +#define TEENSY_PIN2_IOPORT IOPORT4 +#define TEENSY_PIN5_IOPORT IOPORT4 +#define TEENSY_PIN6_IOPORT IOPORT4 +#define TEENSY_PIN7_IOPORT IOPORT4 +#define TEENSY_PIN8_IOPORT IOPORT4 #define TEENSY_PIN14_IOPORT IOPORT4 #define TEENSY_PIN20_IOPORT IOPORT4 #define TEENSY_PIN21_IOPORT IOPORT4 -#define TEENSY_PIN31 0 -#define TEENSY_PIN26 1 -#define PORTE_PIN2 2 -#define PORTE_PIN3 3 -#define PORTE_PIN4 4 -#define PORTE_PIN5 5 -#define PORTE_PIN6 6 -#define PORTE_PIN7 7 -#define PORTE_PIN8 8 -#define PORTE_PIN9 9 -#define PORTE_PIN10 10 -#define PORTE_PIN11 11 -#define PORTE_PIN12 12 -#define PORTE_PIN13 13 -#define PORTE_PIN14 14 -#define PORTE_PIN15 15 -#define PORTE_PIN16 16 -#define PORTE_PIN17 17 -#define PORTE_PIN18 18 -#define PORTE_PIN19 19 -#define PORTE_PIN20 20 -#define PORTE_PIN21 21 -#define PORTE_PIN22 22 -#define PORTE_PIN23 23 -#define PORTE_PIN24 24 -#define PORTE_PIN25 25 -#define PORTE_PIN26 26 -#define PORTE_PIN27 27 -#define PORTE_PIN28 28 -#define PORTE_PIN29 29 -#define PORTE_PIN30 30 -#define PORTE_PIN31 31 +#define TEENSY_PIN31 0 +#define TEENSY_PIN26 1 +#define PORTE_PIN2 2 +#define PORTE_PIN3 3 +#define PORTE_PIN4 4 +#define PORTE_PIN5 5 +#define PORTE_PIN6 6 +#define PORTE_PIN7 7 +#define PORTE_PIN8 8 +#define PORTE_PIN9 9 +#define PORTE_PIN10 10 +#define PORTE_PIN11 11 +#define PORTE_PIN12 12 +#define PORTE_PIN13 13 +#define PORTE_PIN14 14 +#define PORTE_PIN15 15 +#define PORTE_PIN16 16 +#define PORTE_PIN17 17 +#define PORTE_PIN18 18 +#define PORTE_PIN19 19 +#define PORTE_PIN20 20 +#define PORTE_PIN21 21 +#define PORTE_PIN22 22 +#define PORTE_PIN23 23 +#define PORTE_PIN24 24 +#define PORTE_PIN25 25 +#define PORTE_PIN26 26 +#define PORTE_PIN27 27 +#define PORTE_PIN28 28 +#define PORTE_PIN29 29 +#define PORTE_PIN30 30 +#define PORTE_PIN31 31 #define TEENSY_PIN26_IOPORT IOPORT5 #define TEENSY_PIN31_IOPORT IOPORT5 -#define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1) -#define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2) -#define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3) -#define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4) -#define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5) -#define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6) -#define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7) -#define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8) -#define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9) -#define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10) -#define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11) -#define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12) -#define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13) -#define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14) -#define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15) -#define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16) -#define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17) -#define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18) -#define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19) -#define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20) -#define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21) -#define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22) -#define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23) -#define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24) -#define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) -#define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) -#define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26) -#define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27) -#define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28) -#define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29) -#define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30) -#define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31) -#define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32) -#define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33) +#define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1) +#define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2) +#define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3) +#define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4) +#define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5) +#define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6) +#define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7) +#define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8) +#define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9) +#define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10) +#define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11) +#define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12) +#define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13) +#define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14) +#define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15) +#define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16) +#define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17) +#define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18) +#define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19) +#define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20) +#define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21) +#define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22) +#define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23) +#define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24) +#define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) +#define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) +#define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26) +#define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27) +#define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28) +#define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29) +#define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30) +#define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31) +#define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32) +#define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33) -#define LINE_LED LINE_PIN13 +#define LINE_LED LINE_PIN13 #if !defined(_FROM_ASM_) -#ifdef __cplusplus +# ifdef __cplusplus extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus +# endif +void boardInit(void); +# ifdef __cplusplus } -#endif +# endif #endif /* _FROM_ASM_ */ #endif /* _BOARD_H_ */ diff --git a/drivers/gpio/pca9555.c b/drivers/gpio/pca9555.c new file mode 100644 index 0000000000..496bbca04e --- /dev/null +++ b/drivers/gpio/pca9555.c @@ -0,0 +1,78 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "i2c_master.h" +#include "pca9555.h" + +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n << 1) +#define TIMEOUT 100 + +enum { + CMD_INPUT_0 = 0, + CMD_INPUT_1, + CMD_OUTPUT_0, + CMD_OUTPUT_1, + CMD_INVERSION_0, + CMD_INVERSION_1, + CMD_CONFIG_0, + CMD_CONFIG_1, +}; + +void pca9555_init(uint8_t slave_addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + + s_init = 1; + } + + // TODO: could check device connected + // i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); + // i2c_stop(); +} + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_config::FAILED\n"); + } +} + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_output::FAILED\n"); + } +} + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; + + uint8_t data = 0; + i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_readPins::FAILED\n"); + } + return data; +} diff --git a/keyboards/moon/pca9555.h b/drivers/gpio/pca9555.h similarity index 100% rename from keyboards/moon/pca9555.h rename to drivers/gpio/pca9555.h diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index 215e6be3e7..c40731913b 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c @@ -20,110 +20,111 @@ #include #include - uint8_t DRV2605L_transfer_buffer[2]; uint8_t DRV2605L_tx_register[0]; uint8_t DRV2605L_read_buffer[0]; uint8_t DRV2605L_read_register; - void DRV_write(uint8_t drv_register, uint8_t settings) { - DRV2605L_transfer_buffer[0] = drv_register; - DRV2605L_transfer_buffer[1] = settings; - i2c_transmit(DRV2605L_BASE_ADDRESS << 1, DRV2605L_transfer_buffer, 2, 100); + DRV2605L_transfer_buffer[0] = drv_register; + DRV2605L_transfer_buffer[1] = settings; + i2c_transmit(DRV2605L_BASE_ADDRESS << 1, DRV2605L_transfer_buffer, 2, 100); } uint8_t DRV_read(uint8_t regaddress) { #ifdef __AVR__ - i2c_readReg(DRV2605L_BASE_ADDRESS << 1, - regaddress, DRV2605L_read_buffer, 1, 100); - DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; + i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, DRV2605L_read_buffer, 1, 100); + DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; #else - DRV2605L_tx_register[0] = regaddress; - if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, - DRV2605L_tx_register, 1, - DRV2605L_read_buffer, 1 -)){ - printf("err reading reg \n"); - } - DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; + DRV2605L_tx_register[0] = regaddress; + if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, DRV2605L_tx_register, 1, DRV2605L_read_buffer, 1)) { + printf("err reading reg \n"); + } + DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; #endif -return DRV2605L_read_register; + return DRV2605L_read_register; } -void DRV_init(void) -{ - i2c_init(); - /* 0x07 sets DRV2605 into calibration mode */ - DRV_write(DRV_MODE,0x07); +void DRV_init(void) { + i2c_init(); + /* 0x07 sets DRV2605 into calibration mode */ + DRV_write(DRV_MODE, 0x07); -// DRV_write(DRV_FEEDBACK_CTRL,0xB6); - - #if FB_ERM_LRA == 0 + // DRV_write(DRV_FEEDBACK_CTRL,0xB6); + +#if FB_ERM_LRA == 0 /* ERM settings */ - DRV_write(DRV_RATED_VOLT, (RATED_VOLTAGE/21.33)*1000); - #if ERM_OPEN_LOOP == 0 - DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (((V_PEAK*(DRIVE_TIME+BLANKING_TIME+IDISS_TIME))/0.02133)/(DRIVE_TIME-0.0003))); - #elif ERM_OPEN_LOOP == 1 - DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK/0.02196)); - #endif - #elif FB_ERM_LRA == 1 - DRV_write(DRV_RATED_VOLT, ((V_RMS * sqrt(1 - ((4 * ((150+(SAMPLE_TIME*50))*0.000001)) + 0.0003)* F_LRA)/0.02071))); - #if LRA_OPEN_LOOP == 0 - DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, ((V_PEAK/sqrt(1-(F_LRA*0.0008))/0.02133))); - #elif LRA_OPEN_LOOP == 1 - DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK/0.02196)); - #endif - #endif - - DRVREG_FBR FB_SET; - FB_SET.Bits.ERM_LRA = FB_ERM_LRA; + DRV_write(DRV_RATED_VOLT, (RATED_VOLTAGE / 21.33) * 1000); +# if ERM_OPEN_LOOP == 0 + DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (((V_PEAK * (DRIVE_TIME + BLANKING_TIME + IDISS_TIME)) / 0.02133) / (DRIVE_TIME - 0.0003))); +# elif ERM_OPEN_LOOP == 1 + DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK / 0.02196)); +# endif +#elif FB_ERM_LRA == 1 + DRV_write(DRV_RATED_VOLT, ((V_RMS * sqrt(1 - ((4 * ((150 + (SAMPLE_TIME * 50)) * 0.000001)) + 0.0003) * F_LRA) / 0.02071))); +# if LRA_OPEN_LOOP == 0 + DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, ((V_PEAK / sqrt(1 - (F_LRA * 0.0008)) / 0.02133))); +# elif LRA_OPEN_LOOP == 1 + DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK / 0.02196)); +# endif +#endif + + DRVREG_FBR FB_SET; + FB_SET.Bits.ERM_LRA = FB_ERM_LRA; FB_SET.Bits.BRAKE_FACTOR = FB_BRAKEFACTOR; - FB_SET.Bits.LOOP_GAIN =FB_LOOPGAIN; - FB_SET.Bits.BEMF_GAIN = 0; /* auto-calibration populates this field*/ - DRV_write(DRV_FEEDBACK_CTRL, (uint8_t) FB_SET.Byte); - DRVREG_CTRL1 C1_SET; - C1_SET.Bits.C1_DRIVE_TIME = DRIVE_TIME; - C1_SET.Bits.C1_AC_COUPLE = AC_COUPLE; + FB_SET.Bits.LOOP_GAIN = FB_LOOPGAIN; + FB_SET.Bits.BEMF_GAIN = 0; /* auto-calibration populates this field*/ + DRV_write(DRV_FEEDBACK_CTRL, (uint8_t)FB_SET.Byte); + DRVREG_CTRL1 C1_SET; + C1_SET.Bits.C1_DRIVE_TIME = DRIVE_TIME; + C1_SET.Bits.C1_AC_COUPLE = AC_COUPLE; C1_SET.Bits.C1_STARTUP_BOOST = STARTUP_BOOST; - DRV_write(DRV_CTRL_1, (uint8_t) C1_SET.Byte); - DRVREG_CTRL2 C2_SET; - C2_SET.Bits.C2_BIDIR_INPUT = BIDIR_INPUT; - C2_SET.Bits.C2_BRAKE_STAB = BRAKE_STAB; - C2_SET.Bits.C2_SAMPLE_TIME = SAMPLE_TIME; + DRV_write(DRV_CTRL_1, (uint8_t)C1_SET.Byte); + DRVREG_CTRL2 C2_SET; + C2_SET.Bits.C2_BIDIR_INPUT = BIDIR_INPUT; + C2_SET.Bits.C2_BRAKE_STAB = BRAKE_STAB; + C2_SET.Bits.C2_SAMPLE_TIME = SAMPLE_TIME; C2_SET.Bits.C2_BLANKING_TIME = BLANKING_TIME; - C2_SET.Bits.C2_IDISS_TIME = IDISS_TIME; - DRV_write(DRV_CTRL_2, (uint8_t) C2_SET.Byte); - DRVREG_CTRL3 C3_SET; - C3_SET.Bits.C3_LRA_OPEN_LOOP = LRA_OPEN_LOOP; - C3_SET.Bits.C3_N_PWM_ANALOG = N_PWM_ANALOG; - C3_SET.Bits.C3_LRA_DRIVE_MODE = LRA_DRIVE_MODE; + C2_SET.Bits.C2_IDISS_TIME = IDISS_TIME; + DRV_write(DRV_CTRL_2, (uint8_t)C2_SET.Byte); + DRVREG_CTRL3 C3_SET; + C3_SET.Bits.C3_LRA_OPEN_LOOP = LRA_OPEN_LOOP; + C3_SET.Bits.C3_N_PWM_ANALOG = N_PWM_ANALOG; + C3_SET.Bits.C3_LRA_DRIVE_MODE = LRA_DRIVE_MODE; C3_SET.Bits.C3_DATA_FORMAT_RTO = DATA_FORMAT_RTO; C3_SET.Bits.C3_SUPPLY_COMP_DIS = SUPPLY_COMP_DIS; - C3_SET.Bits.C3_ERM_OPEN_LOOP = ERM_OPEN_LOOP; - C3_SET.Bits.C3_NG_THRESH = NG_THRESH; - DRV_write(DRV_CTRL_3, (uint8_t) C3_SET.Byte); - DRVREG_CTRL4 C4_SET; - C4_SET.Bits.C4_ZC_DET_TIME = ZC_DET_TIME; + C3_SET.Bits.C3_ERM_OPEN_LOOP = ERM_OPEN_LOOP; + C3_SET.Bits.C3_NG_THRESH = NG_THRESH; + DRV_write(DRV_CTRL_3, (uint8_t)C3_SET.Byte); + DRVREG_CTRL4 C4_SET; + C4_SET.Bits.C4_ZC_DET_TIME = ZC_DET_TIME; C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME; - DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte); - DRV_write(DRV_LIB_SELECTION,LIB_SELECTION); + DRV_write(DRV_CTRL_4, (uint8_t)C4_SET.Byte); + DRV_write(DRV_LIB_SELECTION, LIB_SELECTION); - DRV_write(DRV_GO, 0x01); + DRV_write(DRV_GO, 0x01); - /* 0x00 sets DRV2605 out of standby and to use internal trigger - * 0x01 sets DRV2605 out of standby and to use external trigger */ - DRV_write(DRV_MODE,0x00); + /* 0x00 sets DRV2605 out of standby and to use internal trigger + * 0x01 sets DRV2605 out of standby and to use external trigger */ + DRV_write(DRV_MODE, 0x00); -//Play greeting sequence - DRV_write(DRV_GO, 0x00); - DRV_write(DRV_WAVEFORM_SEQ_1, DRV_GREETING); - DRV_write(DRV_GO, 0x01); + // Play greeting sequence + DRV_write(DRV_GO, 0x00); + DRV_write(DRV_WAVEFORM_SEQ_1, DRV_GREETING); + DRV_write(DRV_GO, 0x01); } -void DRV_pulse(uint8_t sequence) -{ - DRV_write(DRV_GO, 0x00); - DRV_write(DRV_WAVEFORM_SEQ_1, sequence); - DRV_write(DRV_GO, 0x01); +void DRV_rtp_init(void) { + DRV_write(DRV_GO, 0x00); + DRV_write(DRV_RTP_INPUT, 20); // 20 is the lowest value I've found where haptics can still be felt. + DRV_write(DRV_MODE, 0x05); + DRV_write(DRV_GO, 0x01); +} + +void DRV_amplitude(uint8_t amplitude) { DRV_write(DRV_RTP_INPUT, amplitude); } + +void DRV_pulse(uint8_t sequence) { + DRV_write(DRV_GO, 0x00); + DRV_write(DRV_WAVEFORM_SEQ_1, sequence); + DRV_write(DRV_GO, 0x01); } \ No newline at end of file diff --git a/drivers/haptic/DRV2605L.h b/drivers/haptic/DRV2605L.h index 836e9cbcd2..535c777658 100644 --- a/drivers/haptic/DRV2605L.h +++ b/drivers/haptic/DRV2605L.h @@ -22,383 +22,385 @@ * Feedback Control Settings */ #ifndef FB_ERM_LRA -#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ +# define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ #endif #ifndef FB_BRAKEFACTOR -#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ +# define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ #endif #ifndef FB_LOOPGAIN -#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ +# define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ #endif /* LRA specific settings */ #if FB_ERM_LRA == 1 -#ifndef V_RMS -#define V_RMS 2.0 -#endif -#ifndef V_PEAK -#define V_PEAK 2.1 -#endif -#ifndef F_LRA -#define F_LRA 205 -#endif -#ifndef RATED_VOLTAGE -#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ -#endif +# ifndef V_RMS +# define V_RMS 2.0 +# endif +# ifndef V_PEAK +# define V_PEAK 2.1 +# endif +# ifndef F_LRA +# define F_LRA 205 +# endif +# ifndef RATED_VOLTAGE +# define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ +# endif #endif #ifndef RATED_VOLTAGE -#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ +# define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ #endif #ifndef V_PEAK -#define V_PEAK 2.8 +# define V_PEAK 2.8 #endif /* Library Selection */ #ifndef LIB_SELECTION -#if FB_ERM_LRA == 1 -#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ -#else -#define LIB_SELECTION 1 -#endif +# if FB_ERM_LRA == 1 +# define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ +# else +# define LIB_SELECTION 1 +# endif #endif #ifndef DRV_GREETING -#define DRV_GREETING alert_750ms +# define DRV_GREETING alert_750ms #endif #ifndef DRV_MODE_DEFAULT -#define DRV_MODE_DEFAULT strong_click1 +# define DRV_MODE_DEFAULT strong_click1 #endif /* Control 1 register settings */ #ifndef DRIVE_TIME -#define DRIVE_TIME 25 +# define DRIVE_TIME 25 #endif #ifndef AC_COUPLE -#define AC_COUPLE 0 +# define AC_COUPLE 0 #endif #ifndef STARTUP_BOOST -#define STARTUP_BOOST 1 +# define STARTUP_BOOST 1 #endif /* Control 2 Settings */ #ifndef BIDIR_INPUT -#define BIDIR_INPUT 1 +# define BIDIR_INPUT 1 #endif #ifndef BRAKE_STAB -#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ +# define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ #endif -#ifndef SAMPLE_TIME -#define SAMPLE_TIME 3 +#ifndef SAMPLE_TIME +# define SAMPLE_TIME 3 #endif #ifndef BLANKING_TIME -#define BLANKING_TIME 1 +# define BLANKING_TIME 1 #endif #ifndef IDISS_TIME -#define IDISS_TIME 1 +# define IDISS_TIME 1 #endif /* Control 3 settings */ #ifndef NG_THRESH -#define NG_THRESH 2 +# define NG_THRESH 2 #endif #ifndef ERM_OPEN_LOOP -#define ERM_OPEN_LOOP 1 +# define ERM_OPEN_LOOP 1 #endif #ifndef SUPPLY_COMP_DIS -#define SUPPLY_COMP_DIS 0 +# define SUPPLY_COMP_DIS 0 #endif #ifndef DATA_FORMAT_RTO -#define DATA_FORMAT_RTO 0 +# define DATA_FORMAT_RTO 0 #endif #ifndef LRA_DRIVE_MODE -#define LRA_DRIVE_MODE 0 +# define LRA_DRIVE_MODE 0 #endif #ifndef N_PWM_ANALOG -#define N_PWM_ANALOG 0 +# define N_PWM_ANALOG 0 #endif #ifndef LRA_OPEN_LOOP -#define LRA_OPEN_LOOP 0 +# define LRA_OPEN_LOOP 0 #endif /* Control 4 settings */ #ifndef ZC_DET_TIME -#define ZC_DET_TIME 0 +# define ZC_DET_TIME 0 #endif #ifndef AUTO_CAL_TIME -#define AUTO_CAL_TIME 3 +# define AUTO_CAL_TIME 3 #endif /* register defines -------------------------------------------------------- */ -#define DRV2605L_BASE_ADDRESS 0x5A /* DRV2605L Base address */ -#define DRV_STATUS 0x00 -#define DRV_MODE 0x01 -#define DRV_RTP_INPUT 0x02 -#define DRV_LIB_SELECTION 0x03 -#define DRV_WAVEFORM_SEQ_1 0x04 -#define DRV_WAVEFORM_SEQ_2 0x05 -#define DRV_WAVEFORM_SEQ_3 0x06 -#define DRV_WAVEFORM_SEQ_4 0x07 -#define DRV_WAVEFORM_SEQ_5 0x08 -#define DRV_WAVEFORM_SEQ_6 0x09 -#define DRV_WAVEFORM_SEQ_7 0x0A -#define DRV_WAVEFORM_SEQ_8 0x0B -#define DRV_GO 0x0C -#define DRV_OVERDRIVE_TIME_OFFSET 0x0D -#define DRV_SUSTAIN_TIME_OFFSET_P 0x0E -#define DRV_SUSTAIN_TIME_OFFSET_N 0x0F -#define DRV_BRAKE_TIME_OFFSET 0x10 -#define DRV_AUDIO_2_VIBE_CTRL 0x11 -#define DRV_AUDIO_2_VIBE_MIN_IN 0x12 -#define DRV_AUDIO_2_VIBE_MAX_IN 0x13 -#define DRV_AUDIO_2_VIBE_MIN_OUTDRV 0x14 -#define DRV_AUDIO_2_VIBE_MAX_OUTDRV 0x15 -#define DRV_RATED_VOLT 0x16 -#define DRV_OVERDRIVE_CLAMP_VOLT 0x17 -#define DRV_AUTO_CALIB_COMP_RESULT 0x18 -#define DRV_AUTO_CALIB_BEMF_RESULT 0x19 -#define DRV_FEEDBACK_CTRL 0x1A -#define DRV_CTRL_1 0x1B -#define DRV_CTRL_2 0x1C -#define DRV_CTRL_3 0x1D -#define DRV_CTRL_4 0x1E -#define DRV_CTRL_5 0x1F -#define DRV_OPEN_LOOP_PERIOD 0x20 -#define DRV_VBAT_VOLT_MONITOR 0x21 -#define DRV_LRA_RESONANCE_PERIOD 0x22 +#define DRV2605L_BASE_ADDRESS 0x5A /* DRV2605L Base address */ +#define DRV_STATUS 0x00 +#define DRV_MODE 0x01 +#define DRV_RTP_INPUT 0x02 +#define DRV_LIB_SELECTION 0x03 +#define DRV_WAVEFORM_SEQ_1 0x04 +#define DRV_WAVEFORM_SEQ_2 0x05 +#define DRV_WAVEFORM_SEQ_3 0x06 +#define DRV_WAVEFORM_SEQ_4 0x07 +#define DRV_WAVEFORM_SEQ_5 0x08 +#define DRV_WAVEFORM_SEQ_6 0x09 +#define DRV_WAVEFORM_SEQ_7 0x0A +#define DRV_WAVEFORM_SEQ_8 0x0B +#define DRV_GO 0x0C +#define DRV_OVERDRIVE_TIME_OFFSET 0x0D +#define DRV_SUSTAIN_TIME_OFFSET_P 0x0E +#define DRV_SUSTAIN_TIME_OFFSET_N 0x0F +#define DRV_BRAKE_TIME_OFFSET 0x10 +#define DRV_AUDIO_2_VIBE_CTRL 0x11 +#define DRV_AUDIO_2_VIBE_MIN_IN 0x12 +#define DRV_AUDIO_2_VIBE_MAX_IN 0x13 +#define DRV_AUDIO_2_VIBE_MIN_OUTDRV 0x14 +#define DRV_AUDIO_2_VIBE_MAX_OUTDRV 0x15 +#define DRV_RATED_VOLT 0x16 +#define DRV_OVERDRIVE_CLAMP_VOLT 0x17 +#define DRV_AUTO_CALIB_COMP_RESULT 0x18 +#define DRV_AUTO_CALIB_BEMF_RESULT 0x19 +#define DRV_FEEDBACK_CTRL 0x1A +#define DRV_CTRL_1 0x1B +#define DRV_CTRL_2 0x1C +#define DRV_CTRL_3 0x1D +#define DRV_CTRL_4 0x1E +#define DRV_CTRL_5 0x1F +#define DRV_OPEN_LOOP_PERIOD 0x20 +#define DRV_VBAT_VOLT_MONITOR 0x21 +#define DRV_LRA_RESONANCE_PERIOD 0x22 -void DRV_init(void); -void DRV_write(const uint8_t drv_register, const uint8_t settings); +void DRV_init(void); +void DRV_write(const uint8_t drv_register, const uint8_t settings); uint8_t DRV_read(const uint8_t regaddress); -void DRV_pulse(const uint8_t sequence); +void DRV_rtp_init(void); +void DRV_amplitude(const uint8_t amplitude); +void DRV_pulse(const uint8_t sequence); -typedef enum DRV_EFFECT{ - clear_sequence = 0, - strong_click = 1, - strong_click_60 = 2, - strong_click_30 = 3, - sharp_click = 4, - sharp_click_60 = 5, - sharp_click_30 = 6, - soft_bump = 7, - soft_bump_60 = 8, - soft_bump_30 = 9, - dbl_click = 10, - dbl_click_60 = 11, - trp_click = 12, - soft_fuzz = 13, - strong_buzz = 14, - alert_750ms = 15, - alert_1000ms = 16, - strong_click1 = 17, - strong_click2_80 = 18, - strong_click3_60 = 19, - strong_click4_30 = 20, - medium_click1 = 21, - medium_click2_80 = 22, - medium_click3_60 = 23, - sharp_tick1 = 24, - sharp_tick2_80 = 25, - sharp_tick3_60 = 26, - sh_dblclick_str = 27, - sh_dblclick_str_80 = 28, - sh_dblclick_str_60 = 29, - sh_dblclick_str_30 = 30, - sh_dblclick_med = 31, - sh_dblclick_med_80 = 32, - sh_dblclick_med_60 = 33, - sh_dblsharp_tick = 34, - sh_dblsharp_tick_80 = 35, - sh_dblsharp_tick_60 = 36, - lg_dblclick_str = 37, - lg_dblclick_str_80 = 38, - lg_dblclick_str_60 = 39, - lg_dblclick_str_30 = 40, - lg_dblclick_med = 41, - lg_dblclick_med_80 = 42, - lg_dblclick_med_60 = 43, - lg_dblsharp_tick = 44, - lg_dblsharp_tick_80 = 45, - lg_dblsharp_tick_60 = 46, - buzz = 47, - buzz_80 = 48, - buzz_60 = 49, - buzz_40 = 50, - buzz_20 = 51, - pulsing_strong = 52, - pulsing_strong_80 = 53, - pulsing_medium = 54, - pulsing_medium_80 = 55, - pulsing_sharp = 56, - pulsing_sharp_80 = 57, - transition_click = 58, - transition_click_80 = 59, - transition_click_60 = 60, - transition_click_40 = 61, - transition_click_20 = 62, - transition_click_10 = 63, - transition_hum = 64, - transition_hum_80 = 65, - transition_hum_60 = 66, - transition_hum_40 = 67, - transition_hum_20 = 68, - transition_hum_10 = 69, - transition_rampdown_long_smooth1 = 70, - transition_rampdown_long_smooth2 = 71, - transition_rampdown_med_smooth1 = 72, - transition_rampdown_med_smooth2 = 73, - transition_rampdown_short_smooth1 = 74, - transition_rampdown_short_smooth2 = 75, - transition_rampdown_long_sharp1 = 76, - transition_rampdown_long_sharp2 = 77, - transition_rampdown_med_sharp1 = 78, - transition_rampdown_med_sharp2 = 79, - transition_rampdown_short_sharp1 = 80, - transition_rampdown_short_sharp2 = 81, - transition_rampup_long_smooth1 = 82, - transition_rampup_long_smooth2 = 83, - transition_rampup_med_smooth1 = 84, - transition_rampup_med_smooth2 = 85, - transition_rampup_short_smooth1 = 86, - transition_rampup_short_smooth2 = 87, - transition_rampup_long_sharp1 = 88, - transition_rampup_long_sharp2 = 89, - transition_rampup_med_sharp1 = 90, - transition_rampup_med_sharp2 = 91, - transition_rampup_short_sharp1 = 92, - transition_rampup_short_sharp2 = 93, - transition_rampdown_long_smooth1_50 = 94, - transition_rampdown_long_smooth2_50 = 95, - transition_rampdown_med_smooth1_50 = 96, - transition_rampdown_med_smooth2_50 = 97, - transition_rampdown_short_smooth1_50 = 98, - transition_rampdown_short_smooth2_50 = 99, - transition_rampdown_long_sharp1_50 = 100, - transition_rampdown_long_sharp2_50 = 101, - transition_rampdown_med_sharp1_50 = 102, - transition_rampdown_med_sharp2_50 = 103, - transition_rampdown_short_sharp1_50 = 104, - transition_rampdown_short_sharp2_50 = 105, - transition_rampup_long_smooth1_50 = 106, - transition_rampup_long_smooth2_50 = 107, - transition_rampup_med_smooth1_50 = 108, - transition_rampup_med_smooth2_50 = 109, - transition_rampup_short_smooth1_50 = 110, - transition_rampup_short_smooth2_50 = 111, - transition_rampup_long_sharp1_50 = 112, - transition_rampup_long_sharp2_50 = 113, - transition_rampup_med_sharp1_50 = 114, - transition_rampup_med_sharp2_50 = 115, - transition_rampup_short_sharp1_50 = 116, - transition_rampup_short_sharp2_50 = 117, - long_buzz_for_programmatic_stopping = 118, - smooth_hum1_50 = 119, - smooth_hum2_40 = 120, - smooth_hum3_30 = 121, - smooth_hum4_20 = 122, - smooth_hum5_10 = 123, - drv_effect_max = 124, +typedef enum DRV_EFFECT { + clear_sequence = 0, + strong_click = 1, + strong_click_60 = 2, + strong_click_30 = 3, + sharp_click = 4, + sharp_click_60 = 5, + sharp_click_30 = 6, + soft_bump = 7, + soft_bump_60 = 8, + soft_bump_30 = 9, + dbl_click = 10, + dbl_click_60 = 11, + trp_click = 12, + soft_fuzz = 13, + strong_buzz = 14, + alert_750ms = 15, + alert_1000ms = 16, + strong_click1 = 17, + strong_click2_80 = 18, + strong_click3_60 = 19, + strong_click4_30 = 20, + medium_click1 = 21, + medium_click2_80 = 22, + medium_click3_60 = 23, + sharp_tick1 = 24, + sharp_tick2_80 = 25, + sharp_tick3_60 = 26, + sh_dblclick_str = 27, + sh_dblclick_str_80 = 28, + sh_dblclick_str_60 = 29, + sh_dblclick_str_30 = 30, + sh_dblclick_med = 31, + sh_dblclick_med_80 = 32, + sh_dblclick_med_60 = 33, + sh_dblsharp_tick = 34, + sh_dblsharp_tick_80 = 35, + sh_dblsharp_tick_60 = 36, + lg_dblclick_str = 37, + lg_dblclick_str_80 = 38, + lg_dblclick_str_60 = 39, + lg_dblclick_str_30 = 40, + lg_dblclick_med = 41, + lg_dblclick_med_80 = 42, + lg_dblclick_med_60 = 43, + lg_dblsharp_tick = 44, + lg_dblsharp_tick_80 = 45, + lg_dblsharp_tick_60 = 46, + buzz = 47, + buzz_80 = 48, + buzz_60 = 49, + buzz_40 = 50, + buzz_20 = 51, + pulsing_strong = 52, + pulsing_strong_80 = 53, + pulsing_medium = 54, + pulsing_medium_80 = 55, + pulsing_sharp = 56, + pulsing_sharp_80 = 57, + transition_click = 58, + transition_click_80 = 59, + transition_click_60 = 60, + transition_click_40 = 61, + transition_click_20 = 62, + transition_click_10 = 63, + transition_hum = 64, + transition_hum_80 = 65, + transition_hum_60 = 66, + transition_hum_40 = 67, + transition_hum_20 = 68, + transition_hum_10 = 69, + transition_rampdown_long_smooth1 = 70, + transition_rampdown_long_smooth2 = 71, + transition_rampdown_med_smooth1 = 72, + transition_rampdown_med_smooth2 = 73, + transition_rampdown_short_smooth1 = 74, + transition_rampdown_short_smooth2 = 75, + transition_rampdown_long_sharp1 = 76, + transition_rampdown_long_sharp2 = 77, + transition_rampdown_med_sharp1 = 78, + transition_rampdown_med_sharp2 = 79, + transition_rampdown_short_sharp1 = 80, + transition_rampdown_short_sharp2 = 81, + transition_rampup_long_smooth1 = 82, + transition_rampup_long_smooth2 = 83, + transition_rampup_med_smooth1 = 84, + transition_rampup_med_smooth2 = 85, + transition_rampup_short_smooth1 = 86, + transition_rampup_short_smooth2 = 87, + transition_rampup_long_sharp1 = 88, + transition_rampup_long_sharp2 = 89, + transition_rampup_med_sharp1 = 90, + transition_rampup_med_sharp2 = 91, + transition_rampup_short_sharp1 = 92, + transition_rampup_short_sharp2 = 93, + transition_rampdown_long_smooth1_50 = 94, + transition_rampdown_long_smooth2_50 = 95, + transition_rampdown_med_smooth1_50 = 96, + transition_rampdown_med_smooth2_50 = 97, + transition_rampdown_short_smooth1_50 = 98, + transition_rampdown_short_smooth2_50 = 99, + transition_rampdown_long_sharp1_50 = 100, + transition_rampdown_long_sharp2_50 = 101, + transition_rampdown_med_sharp1_50 = 102, + transition_rampdown_med_sharp2_50 = 103, + transition_rampdown_short_sharp1_50 = 104, + transition_rampdown_short_sharp2_50 = 105, + transition_rampup_long_smooth1_50 = 106, + transition_rampup_long_smooth2_50 = 107, + transition_rampup_med_smooth1_50 = 108, + transition_rampup_med_smooth2_50 = 109, + transition_rampup_short_smooth1_50 = 110, + transition_rampup_short_smooth2_50 = 111, + transition_rampup_long_sharp1_50 = 112, + transition_rampup_long_sharp2_50 = 113, + transition_rampup_med_sharp1_50 = 114, + transition_rampup_med_sharp2_50 = 115, + transition_rampup_short_sharp1_50 = 116, + transition_rampup_short_sharp2_50 = 117, + long_buzz_for_programmatic_stopping = 118, + smooth_hum1_50 = 119, + smooth_hum2_40 = 120, + smooth_hum3_30 = 121, + smooth_hum4_20 = 122, + smooth_hum5_10 = 123, + drv_effect_max = 124, } DRV_EFFECT; /* Register bit array unions */ typedef union DRVREG_STATUS { /* register 0x00 */ - uint8_t Byte; - struct { - uint8_t OC_DETECT :1; /* set to 1 when overcurrent event is detected */ - uint8_t OVER_TEMP :1; /* set to 1 when device exceeds temp threshold */ - uint8_t FB_STS :1; /* set to 1 when feedback controller has timed out */ - /* auto-calibration routine and diagnostic result - * result | auto-calibation | diagnostic | - * 0 | passed | actuator func normal | - * 1 | failed | actuator func fault* | - * * actuator is not present or is shorted, timing out, or giving out–of-range back-EMF */ - uint8_t DIAG_RESULT :1; - uint8_t :1; - uint8_t DEVICE_ID :3; /* Device IDs 3: DRV2605 4: DRV2604 5: DRV2604L 6: DRV2605L */ - } Bits; + uint8_t Byte; + struct { + uint8_t OC_DETECT : 1; /* set to 1 when overcurrent event is detected */ + uint8_t OVER_TEMP : 1; /* set to 1 when device exceeds temp threshold */ + uint8_t FB_STS : 1; /* set to 1 when feedback controller has timed out */ + /* auto-calibration routine and diagnostic result + * result | auto-calibation | diagnostic | + * 0 | passed | actuator func normal | + * 1 | failed | actuator func fault* | + * * actuator is not present or is shorted, timing out, or giving out–of-range back-EMF */ + uint8_t DIAG_RESULT : 1; + uint8_t : 1; + uint8_t DEVICE_ID : 3; /* Device IDs 3: DRV2605 4: DRV2604 5: DRV2604L 6: DRV2605L */ + } Bits; } DRVREG_STATUS; typedef union DRVREG_MODE { /* register 0x01 */ - uint8_t Byte; - struct { - uint8_t MODE :3; /* Mode setting */ - uint8_t :3; - uint8_t STANDBY :1; /* 0:standby 1:ready */ - } Bits; + uint8_t Byte; + struct { + uint8_t MODE : 3; /* Mode setting */ + uint8_t : 3; + uint8_t STANDBY : 1; /* 0:standby 1:ready */ + } Bits; } DRVREG_MODE; typedef union DRVREG_WAIT { - uint8_t Byte; - struct { - uint8_t WAIT_MODE :1; /* Set to 1 to interpret as wait for next 7 bits x10ms */ - uint8_t WAIT_TIME :7; - } Bits; + uint8_t Byte; + struct { + uint8_t WAIT_MODE : 1; /* Set to 1 to interpret as wait for next 7 bits x10ms */ + uint8_t WAIT_TIME : 7; + } Bits; } DRVREG_WAIT; -typedef union DRVREG_FBR{ /* register 0x1A */ - uint8_t Byte; - struct { - uint8_t BEMF_GAIN :2; - uint8_t LOOP_GAIN :2; - uint8_t BRAKE_FACTOR :3; - uint8_t ERM_LRA :1; - } Bits; +typedef union DRVREG_FBR { /* register 0x1A */ + uint8_t Byte; + struct { + uint8_t BEMF_GAIN : 2; + uint8_t LOOP_GAIN : 2; + uint8_t BRAKE_FACTOR : 3; + uint8_t ERM_LRA : 1; + } Bits; } DRVREG_FBR; -typedef union DRVREG_CTRL1{ /* register 0x1B */ - uint8_t Byte; - struct { - uint8_t C1_DRIVE_TIME :5; - uint8_t C1_AC_COUPLE :1; - uint8_t :1; - uint8_t C1_STARTUP_BOOST :1; - } Bits; +typedef union DRVREG_CTRL1 { /* register 0x1B */ + uint8_t Byte; + struct { + uint8_t C1_DRIVE_TIME : 5; + uint8_t C1_AC_COUPLE : 1; + uint8_t : 1; + uint8_t C1_STARTUP_BOOST : 1; + } Bits; } DRVREG_CTRL1; -typedef union DRVREG_CTRL2{ /* register 0x1C */ - uint8_t Byte; - struct { - uint8_t C2_IDISS_TIME :2; - uint8_t C2_BLANKING_TIME :2; - uint8_t C2_SAMPLE_TIME :2; - uint8_t C2_BRAKE_STAB :1; - uint8_t C2_BIDIR_INPUT :1; - } Bits; +typedef union DRVREG_CTRL2 { /* register 0x1C */ + uint8_t Byte; + struct { + uint8_t C2_IDISS_TIME : 2; + uint8_t C2_BLANKING_TIME : 2; + uint8_t C2_SAMPLE_TIME : 2; + uint8_t C2_BRAKE_STAB : 1; + uint8_t C2_BIDIR_INPUT : 1; + } Bits; } DRVREG_CTRL2; -typedef union DRVREG_CTRL3{ /* register 0x1D */ - uint8_t Byte; - struct { - uint8_t C3_LRA_OPEN_LOOP :1; - uint8_t C3_N_PWM_ANALOG :1; - uint8_t C3_LRA_DRIVE_MODE :1; - uint8_t C3_DATA_FORMAT_RTO :1; - uint8_t C3_SUPPLY_COMP_DIS :1; - uint8_t C3_ERM_OPEN_LOOP :1; - uint8_t C3_NG_THRESH :2; - } Bits; +typedef union DRVREG_CTRL3 { /* register 0x1D */ + uint8_t Byte; + struct { + uint8_t C3_LRA_OPEN_LOOP : 1; + uint8_t C3_N_PWM_ANALOG : 1; + uint8_t C3_LRA_DRIVE_MODE : 1; + uint8_t C3_DATA_FORMAT_RTO : 1; + uint8_t C3_SUPPLY_COMP_DIS : 1; + uint8_t C3_ERM_OPEN_LOOP : 1; + uint8_t C3_NG_THRESH : 2; + } Bits; } DRVREG_CTRL3; -typedef union DRVREG_CTRL4{ /* register 0x1E */ - uint8_t Byte; - struct { - uint8_t C4_OTP_PROGRAM :1; - uint8_t :1; - uint8_t C4_OTP_STATUS :1; - uint8_t :1; - uint8_t C4_AUTO_CAL_TIME :2; - uint8_t C4_ZC_DET_TIME :2; - } Bits; +typedef union DRVREG_CTRL4 { /* register 0x1E */ + uint8_t Byte; + struct { + uint8_t C4_OTP_PROGRAM : 1; + uint8_t : 1; + uint8_t C4_OTP_STATUS : 1; + uint8_t : 1; + uint8_t C4_AUTO_CAL_TIME : 2; + uint8_t C4_ZC_DET_TIME : 2; + } Bits; } DRVREG_CTRL4; -typedef union DRVREG_CTRL5{ /* register 0x1F */ - uint8_t Byte; - struct { - uint8_t C5_IDISS_TIME :2; - uint8_t C5_BLANKING_TIME :2; - uint8_t C5_PLAYBACK_INTERVAL :1; - uint8_t C5_LRA_AUTO_OPEN_LOOP :1; - uint8_t C5_AUTO_OL_CNT :2; - } Bits; +typedef union DRVREG_CTRL5 { /* register 0x1F */ + uint8_t Byte; + struct { + uint8_t C5_IDISS_TIME : 2; + uint8_t C5_BLANKING_TIME : 2; + uint8_t C5_PLAYBACK_INTERVAL : 1; + uint8_t C5_LRA_AUTO_OPEN_LOOP : 1; + uint8_t C5_AUTO_OL_CNT : 2; + } Bits; } DRVREG_CTRL5; \ No newline at end of file diff --git a/drivers/haptic/haptic.c b/drivers/haptic/haptic.c index a94f05565c..2ce279b753 100644 --- a/drivers/haptic/haptic.c +++ b/drivers/haptic/haptic.c @@ -19,230 +19,312 @@ #include "progmem.h" #include "debug.h" #ifdef DRV2605L -#include "DRV2605L.h" +# include "DRV2605L.h" #endif #ifdef SOLENOID_ENABLE -#include "solenoid.h" +# include "solenoid.h" #endif haptic_config_t haptic_config; void haptic_init(void) { - debug_enable = 1; //Debug is ON! - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - haptic_config.raw = eeconfig_read_haptic(); - if (haptic_config.mode < 1){ - haptic_config.mode = 1; - } - if (!haptic_config.mode){ - dprintf("No haptic config found in eeprom, setting default configs\n"); - haptic_reset(); - } - #ifdef SOLENOID_ENABLE + debug_enable = 1; // Debug is ON! + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + haptic_config.raw = eeconfig_read_haptic(); + if (haptic_config.mode < 1) { + haptic_config.mode = 1; + } + if (!haptic_config.mode) { + dprintf("No haptic config found in eeprom, setting default configs\n"); + haptic_reset(); + } +#ifdef SOLENOID_ENABLE solenoid_setup(); dprintf("Solenoid driver initialized\n"); - #endif - #ifdef DRV2605L +#endif +#ifdef DRV2605L DRV_init(); dprintf("DRV2605 driver initialized\n"); - #endif - eeconfig_debug_haptic(); +#endif + eeconfig_debug_haptic(); } void haptic_task(void) { - #ifdef SOLENOID_ENABLE - solenoid_check(); - #endif +#ifdef SOLENOID_ENABLE + solenoid_check(); +#endif } void eeconfig_debug_haptic(void) { - dprintf("haptic_config eprom\n"); - dprintf("haptic_config.enable = %d\n", haptic_config.enable); - dprintf("haptic_config.mode = %d\n", haptic_config.mode); + dprintf("haptic_config eprom\n"); + dprintf("haptic_config.enable = %d\n", haptic_config.enable); + dprintf("haptic_config.mode = %d\n", haptic_config.mode); } void haptic_enable(void) { - haptic_config.enable = 1; - xprintf("haptic_config.enable = %u\n", haptic_config.enable); - eeconfig_update_haptic(haptic_config.raw); + haptic_config.enable = 1; + xprintf("haptic_config.enable = %u\n", haptic_config.enable); + eeconfig_update_haptic(haptic_config.raw); } void haptic_disable(void) { - haptic_config.enable = 0; - xprintf("haptic_config.enable = %u\n", haptic_config.enable); - eeconfig_update_haptic(haptic_config.raw); + haptic_config.enable = 0; + xprintf("haptic_config.enable = %u\n", haptic_config.enable); + eeconfig_update_haptic(haptic_config.raw); } void haptic_toggle(void) { -if (haptic_config.enable) { - haptic_disable(); - } else { - haptic_enable(); - } - eeconfig_update_haptic(haptic_config.raw); + if (haptic_config.enable) { + haptic_disable(); + } else { + haptic_enable(); + } + eeconfig_update_haptic(haptic_config.raw); } -void haptic_feedback_toggle(void){ - haptic_config.feedback++; - if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX) - haptic_config.feedback = KEY_PRESS; - xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback); - eeconfig_update_haptic(haptic_config.raw); +void haptic_feedback_toggle(void) { + haptic_config.feedback++; + if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX) haptic_config.feedback = KEY_PRESS; + xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback); + eeconfig_update_haptic(haptic_config.raw); } void haptic_buzz_toggle(void) { - bool buzz_stat = !haptic_config.buzz; - haptic_config.buzz = buzz_stat; - haptic_set_buzz(buzz_stat); + bool buzz_stat = !haptic_config.buzz; + haptic_config.buzz = buzz_stat; + haptic_set_buzz(buzz_stat); } void haptic_mode_increase(void) { - uint8_t mode = haptic_config.mode + 1; - #ifdef DRV2605L - if (haptic_config.mode >= drv_effect_max) { - mode = 1; - } - #endif + uint8_t mode = haptic_config.mode + 1; +#ifdef DRV2605L + if (haptic_config.mode >= drv_effect_max) { + mode = 1; + } +#endif haptic_set_mode(mode); } void haptic_mode_decrease(void) { - uint8_t mode = haptic_config.mode -1; - #ifdef DRV2605L - if (haptic_config.mode < 1) { - mode = (drv_effect_max - 1); - } - #endif - haptic_set_mode(mode); + uint8_t mode = haptic_config.mode - 1; +#ifdef DRV2605L + if (haptic_config.mode < 1) { + mode = (drv_effect_max - 1); + } +#endif + haptic_set_mode(mode); } void haptic_dwell_increase(void) { - uint8_t dwell = haptic_config.dwell + 1; - #ifdef SOLENOID_ENABLE - if (haptic_config.dwell >= SOLENOID_MAX_DWELL) { - dwell = 1; - } - solenoid_set_dwell(dwell); - #endif - haptic_set_dwell(dwell); + uint8_t dwell = haptic_config.dwell + 1; +#ifdef SOLENOID_ENABLE + if (haptic_config.dwell >= SOLENOID_MAX_DWELL) { + dwell = 1; + } + solenoid_set_dwell(dwell); +#endif + haptic_set_dwell(dwell); } void haptic_dwell_decrease(void) { - uint8_t dwell = haptic_config.dwell -1; - #ifdef SOLENOID_ENABLE - if (haptic_config.dwell < SOLENOID_MIN_DWELL) { - dwell = SOLENOID_MAX_DWELL; - } - solenoid_set_dwell(dwell); - #endif - haptic_set_dwell(dwell); + uint8_t dwell = haptic_config.dwell - 1; +#ifdef SOLENOID_ENABLE + if (haptic_config.dwell < SOLENOID_MIN_DWELL) { + dwell = SOLENOID_MAX_DWELL; + } + solenoid_set_dwell(dwell); +#endif + haptic_set_dwell(dwell); } -void haptic_reset(void){ - haptic_config.enable = true; - uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT; - haptic_config.feedback = feedback; - #ifdef DRV2605L - uint8_t mode = HAPTIC_MODE_DEFAULT; +void haptic_reset(void) { + haptic_config.enable = true; + uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT; + haptic_config.feedback = feedback; +#ifdef DRV2605L + uint8_t mode = HAPTIC_MODE_DEFAULT; haptic_config.mode = mode; - #endif - #ifdef SOLENOID_ENABLE - uint8_t dwell = SOLENOID_DEFAULT_DWELL; +#endif +#ifdef SOLENOID_ENABLE + uint8_t dwell = SOLENOID_DEFAULT_DWELL; haptic_config.dwell = dwell; - #endif - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); - xprintf("haptic_config.mode = %u\n", haptic_config.mode); +#endif + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); + xprintf("haptic_config.mode = %u\n", haptic_config.mode); } void haptic_set_feedback(uint8_t feedback) { - haptic_config.feedback = feedback; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); + haptic_config.feedback = feedback; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); } void haptic_set_mode(uint8_t mode) { - haptic_config.mode = mode; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.mode = %u\n", haptic_config.mode); + haptic_config.mode = mode; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.mode = %u\n", haptic_config.mode); +} + +void haptic_set_amplitude(uint8_t amp) { + haptic_config.amplitude = amp; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude); +#ifdef DRV2605L + DRV_amplitude(amp); +#endif } void haptic_set_buzz(uint8_t buzz) { - haptic_config.buzz = buzz; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.buzz = %u\n", haptic_config.buzz); + haptic_config.buzz = buzz; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.buzz = %u\n", haptic_config.buzz); } void haptic_set_dwell(uint8_t dwell) { - haptic_config.dwell = dwell; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.dwell = %u\n", haptic_config.dwell); + haptic_config.dwell = dwell; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.dwell = %u\n", haptic_config.dwell); } uint8_t haptic_get_mode(void) { - if (!haptic_config.enable){ - return false; - } - return haptic_config.mode; + if (!haptic_config.enable) { + return false; + } + return haptic_config.mode; } uint8_t haptic_get_feedback(void) { - if (!haptic_config.enable){ - return false; - } - return haptic_config.feedback; + if (!haptic_config.enable) { + return false; + } + return haptic_config.feedback; } uint8_t haptic_get_dwell(void) { - if (!haptic_config.enable){ - return false; - } - return haptic_config.dwell; + if (!haptic_config.enable) { + return false; + } + return haptic_config.dwell; +} + +void haptic_enable_continuous(void) { + haptic_config.cont = 1; + xprintf("haptic_config.cont = %u\n", haptic_config.cont); + eeconfig_update_haptic(haptic_config.raw); +#ifdef DRV2605L + DRV_rtp_init(); +#endif +} + +void haptic_disable_continuous(void) { + haptic_config.cont = 0; + xprintf("haptic_config.cont = %u\n", haptic_config.cont); + eeconfig_update_haptic(haptic_config.raw); +#ifdef DRV2605L + DRV_write(DRV_MODE, 0x00); +#endif +} + +void haptic_toggle_continuous(void) { +#ifdef DRV2605L + if (haptic_config.cont) { + haptic_disable_continuous(); + } else { + haptic_enable_continuous(); + } + eeconfig_update_haptic(haptic_config.raw); +#endif +} + +void haptic_cont_increase(void) { + uint8_t amp = haptic_config.amplitude + 10; + if (haptic_config.amplitude >= 120) { + amp = 120; + } + haptic_set_amplitude(amp); +} + +void haptic_cont_decrease(void) { + uint8_t amp = haptic_config.amplitude - 10; + if (haptic_config.amplitude < 20) { + amp = 20; + } + haptic_set_amplitude(amp); } void haptic_play(void) { - #ifdef DRV2605L - uint8_t play_eff = 0; - play_eff = haptic_config.mode; - DRV_pulse(play_eff); - #endif - #ifdef SOLENOID_ENABLE - solenoid_fire(); - #endif +#ifdef DRV2605L + uint8_t play_eff = 0; + play_eff = haptic_config.mode; + DRV_pulse(play_eff); +#endif +#ifdef SOLENOID_ENABLE + solenoid_fire(); +#endif } bool process_haptic(uint16_t keycode, keyrecord_t *record) { - if (keycode == HPT_ON && record->event.pressed) { haptic_enable(); } - if (keycode == HPT_OFF && record->event.pressed) { haptic_disable(); } - if (keycode == HPT_TOG && record->event.pressed) { haptic_toggle(); } - if (keycode == HPT_RST && record->event.pressed) { haptic_reset(); } - if (keycode == HPT_FBK && record->event.pressed) { haptic_feedback_toggle(); } - if (keycode == HPT_BUZ && record->event.pressed) { haptic_buzz_toggle(); } - if (keycode == HPT_MODI && record->event.pressed) { haptic_mode_increase(); } - if (keycode == HPT_MODD && record->event.pressed) { haptic_mode_decrease(); } - if (keycode == HPT_DWLI && record->event.pressed) { haptic_dwell_increase(); } - if (keycode == HPT_DWLD && record->event.pressed) { haptic_dwell_decrease(); } - if (haptic_config.enable) { - if ( record->event.pressed ) { - // keypress - if (haptic_config.feedback < 2) { - haptic_play(); - } - } else { - //keyrelease - if (haptic_config.feedback > 0) { - haptic_play(); - } + if (keycode == HPT_ON && record->event.pressed) { + haptic_enable(); } - } - return true; + if (keycode == HPT_OFF && record->event.pressed) { + haptic_disable(); + } + if (keycode == HPT_TOG && record->event.pressed) { + haptic_toggle(); + } + if (keycode == HPT_RST && record->event.pressed) { + haptic_reset(); + } + if (keycode == HPT_FBK && record->event.pressed) { + haptic_feedback_toggle(); + } + if (keycode == HPT_BUZ && record->event.pressed) { + haptic_buzz_toggle(); + } + if (keycode == HPT_MODI && record->event.pressed) { + haptic_mode_increase(); + } + if (keycode == HPT_MODD && record->event.pressed) { + haptic_mode_decrease(); + } + if (keycode == HPT_DWLI && record->event.pressed) { + haptic_dwell_increase(); + } + if (keycode == HPT_DWLD && record->event.pressed) { + haptic_dwell_decrease(); + } + if (keycode == HPT_CONT && record->event.pressed) { + haptic_toggle_continuous(); + } + if (keycode == HPT_CONI && record->event.pressed) { + haptic_cont_increase(); + } + if (keycode == HPT_COND && record->event.pressed) { + haptic_cont_decrease(); + } + + if (haptic_config.enable) { + if (record->event.pressed) { + // keypress + if (haptic_config.feedback < 2) { + haptic_play(); + } + } else { + // keyrelease + if (haptic_config.feedback > 0) { + haptic_play(); + } + } + } + return true; } void haptic_shutdown(void) { - #ifdef SOLENOID_ENABLE - solenoid_shutdown(); - #endif - +#ifdef SOLENOID_ENABLE + solenoid_shutdown(); +#endif } diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h index d39dc5c3b9..5d3bd1c310 100644 --- a/drivers/haptic/haptic.h +++ b/drivers/haptic/haptic.h @@ -20,63 +20,62 @@ #include #include "quantum.h" #ifdef DRV2605L -#include "DRV2605L.h" +# include "DRV2605L.h" #endif - #ifndef HAPTIC_FEEDBACK_DEFAULT -#define HAPTIC_FEEDBACK_DEFAULT 0 +# define HAPTIC_FEEDBACK_DEFAULT 0 #endif #ifndef HAPTIC_MODE_DEFAULT -#define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT +# define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT #endif /* EEPROM config settings */ typedef union { - uint32_t raw; - struct { - bool enable :1; - uint8_t feedback :2; - uint8_t mode :7; - bool buzz :1; - uint8_t dwell :7; - uint16_t reserved :16; - }; + uint32_t raw; + struct { + bool enable : 1; + uint8_t feedback : 2; + uint8_t mode : 7; + bool buzz : 1; + uint8_t dwell : 7; + bool cont : 1; + uint8_t amplitude : 8; + uint16_t reserved : 7; + }; } haptic_config_t; -typedef enum HAPTIC_FEEDBACK{ - KEY_PRESS, - KEY_PRESS_RELEASE, - KEY_RELEASE, - HAPTIC_FEEDBACK_MAX, +typedef enum HAPTIC_FEEDBACK { + KEY_PRESS, + KEY_PRESS_RELEASE, + KEY_RELEASE, + HAPTIC_FEEDBACK_MAX, } HAPTIC_FEEDBACK; -bool process_haptic(uint16_t keycode, keyrecord_t *record); -void haptic_init(void); -void haptic_task(void); -void eeconfig_debug_haptic(void); -void haptic_enable(void); -void haptic_disable(void); -void haptic_toggle(void); -void haptic_feedback_toggle(void); -void haptic_mode_increase(void); -void haptic_mode_decrease(void); -void haptic_mode(uint8_t mode); -void haptic_reset(void); -void haptic_set_feedback(uint8_t feedback); -void haptic_set_mode(uint8_t mode); -void haptic_set_dwell(uint8_t dwell); -void haptic_set_buzz(uint8_t buzz); -void haptic_buzz_toggle(void); +bool process_haptic(uint16_t keycode, keyrecord_t *record); +void haptic_init(void); +void haptic_task(void); +void eeconfig_debug_haptic(void); +void haptic_enable(void); +void haptic_disable(void); +void haptic_toggle(void); +void haptic_feedback_toggle(void); +void haptic_mode_increase(void); +void haptic_mode_decrease(void); +void haptic_mode(uint8_t mode); +void haptic_reset(void); +void haptic_set_feedback(uint8_t feedback); +void haptic_set_mode(uint8_t mode); +void haptic_set_dwell(uint8_t dwell); +void haptic_set_buzz(uint8_t buzz); +void haptic_buzz_toggle(void); uint8_t haptic_get_mode(void); uint8_t haptic_get_feedback(void); -void haptic_dwell_increase(void); -void haptic_dwell_decrease(void); +void haptic_dwell_increase(void); +void haptic_dwell_decrease(void); +void haptic_toggle_continuous(void); +void haptic_cont_increase(void); +void haptic_cont_decrease(void); void haptic_play(void); void haptic_shutdown(void); - - - - - diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c index 2d39dbc179..d645c379ae 100644 --- a/drivers/haptic/solenoid.c +++ b/drivers/haptic/solenoid.c @@ -19,91 +19,77 @@ #include "solenoid.h" #include "haptic.h" -bool solenoid_on = false; -bool solenoid_buzzing = false; -uint16_t solenoid_start = 0; -uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; +bool solenoid_on = false; +bool solenoid_buzzing = false; +uint16_t solenoid_start = 0; +uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; extern haptic_config_t haptic_config; +void solenoid_buzz_on(void) { haptic_set_buzz(1); } -void solenoid_buzz_on(void) { - haptic_set_buzz(1); -} - -void solenoid_buzz_off(void) { - haptic_set_buzz(0); -} - -void solenoid_set_buzz(int buzz) { - haptic_set_buzz(buzz); -} +void solenoid_buzz_off(void) { haptic_set_buzz(0); } +void solenoid_set_buzz(int buzz) { haptic_set_buzz(buzz); } void solenoid_dwell_minus(uint8_t solenoid_dwell) { - if (solenoid_dwell > 0) solenoid_dwell--; + if (solenoid_dwell > 0) solenoid_dwell--; } void solenoid_dwell_plus(uint8_t solenoid_dwell) { - if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; + if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; } -void solenoid_set_dwell(uint8_t dwell) { - solenoid_dwell = dwell; -} +void solenoid_set_dwell(uint8_t dwell) { solenoid_dwell = dwell; } void solenoid_stop(void) { - writePinLow(SOLENOID_PIN); - solenoid_on = false; - solenoid_buzzing = false; + writePinLow(SOLENOID_PIN); + solenoid_on = false; + solenoid_buzzing = false; } void solenoid_fire(void) { - if (!haptic_config.buzz && solenoid_on) return; - if (haptic_config.buzz && solenoid_buzzing) return; + if (!haptic_config.buzz && solenoid_on) return; + if (haptic_config.buzz && solenoid_buzzing) return; - solenoid_on = true; - solenoid_buzzing = true; - solenoid_start = timer_read(); - writePinHigh(SOLENOID_PIN); + solenoid_on = true; + solenoid_buzzing = true; + solenoid_start = timer_read(); + writePinHigh(SOLENOID_PIN); } void solenoid_check(void) { - uint16_t elapsed = 0; + uint16_t elapsed = 0; - if (!solenoid_on) return; + if (!solenoid_on) return; - elapsed = timer_elapsed(solenoid_start); + elapsed = timer_elapsed(solenoid_start); - //Check if it's time to finish this solenoid click cycle - if (elapsed > solenoid_dwell) { - solenoid_stop(); - return; - } - - //Check whether to buzz the solenoid on and off - if (haptic_config.buzz) { - if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){ - if (!solenoid_buzzing) { - solenoid_buzzing = true; - writePinHigh(SOLENOID_PIN); - } + // Check if it's time to finish this solenoid click cycle + if (elapsed > solenoid_dwell) { + solenoid_stop(); + return; } - else { - if (solenoid_buzzing) { - solenoid_buzzing = false; - writePinLow(SOLENOID_PIN); - } + + // Check whether to buzz the solenoid on and off + if (haptic_config.buzz) { + if (elapsed / SOLENOID_MIN_DWELL % 2 == 0) { + if (!solenoid_buzzing) { + solenoid_buzzing = true; + writePinHigh(SOLENOID_PIN); + } + } else { + if (solenoid_buzzing) { + solenoid_buzzing = false; + writePinLow(SOLENOID_PIN); + } + } } - } } void solenoid_setup(void) { - setPinOutput(SOLENOID_PIN); - solenoid_fire(); + setPinOutput(SOLENOID_PIN); + solenoid_fire(); } -void solenoid_shutdown(void) { - writePinLow(SOLENOID_PIN); - -} +void solenoid_shutdown(void) { writePinLow(SOLENOID_PIN); } diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h index a08f62a11e..dd6ececa68 100644 --- a/drivers/haptic/solenoid.h +++ b/drivers/haptic/solenoid.h @@ -18,23 +18,19 @@ #pragma once #ifndef SOLENOID_DEFAULT_DWELL -#define SOLENOID_DEFAULT_DWELL 12 +# define SOLENOID_DEFAULT_DWELL 12 #endif #ifndef SOLENOID_MAX_DWELL -#define SOLENOID_MAX_DWELL 100 +# define SOLENOID_MAX_DWELL 100 #endif #ifndef SOLENOID_MIN_DWELL -#define SOLENOID_MIN_DWELL 4 -#endif - -#ifndef SOLENOID_ACTIVE -#define SOLENOID_ACTIVE false +# define SOLENOID_MIN_DWELL 4 #endif #ifndef SOLENOID_PIN -#define SOLENOID_PIN F6 +# error SOLENOID_PIN not defined #endif void solenoid_buzz_on(void); diff --git a/drivers/issi/is31fl3218.c b/drivers/issi/is31fl3218.c index db44f72564..d43863ac4b 100644 --- a/drivers/issi/is31fl3218.c +++ b/drivers/issi/is31fl3218.c @@ -35,68 +35,62 @@ uint8_t g_twi_transfer_buffer[20]; // IS31FL3218 has 18 PWM outputs and a fixed I2C address, so no chaining. // If used as RGB LED driver, LEDs are assigned RGB,RGB,RGB,RGB,RGB,RGB uint8_t g_pwm_buffer[18]; -bool g_pwm_buffer_update_required = false; +bool g_pwm_buffer_update_required = false; -void IS31FL3218_write_register( uint8_t reg, uint8_t data ) -{ - g_twi_transfer_buffer[0] = reg; - g_twi_transfer_buffer[1] = data; - i2c_transmit( ISSI_ADDRESS, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); +void IS31FL3218_write_register(uint8_t reg, uint8_t data) { + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; + i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); } -void IS31FL3218_write_pwm_buffer( uint8_t *pwm_buffer ) -{ - g_twi_transfer_buffer[0] = ISSI_REG_PWM; - for ( int i=0; i<18; i++ ) { - g_twi_transfer_buffer[1+i] = pwm_buffer[i]; - } - - i2c_transmit( ISSI_ADDRESS, g_twi_transfer_buffer, 19, ISSI_TIMEOUT); +void IS31FL3218_write_pwm_buffer(uint8_t *pwm_buffer) { + g_twi_transfer_buffer[0] = ISSI_REG_PWM; + for (int i = 0; i < 18; i++) { + g_twi_transfer_buffer[1 + i] = pwm_buffer[i]; + } + + i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 19, ISSI_TIMEOUT); } -void IS31FL3218_init(void) -{ - // In case we ever want to reinitialize (?) - IS31FL3218_write_register( ISSI_REG_RESET, 0x00 ); - - // Turn off software shutdown - IS31FL3218_write_register( ISSI_REG_SHUTDOWN, 0x01 ); +void IS31FL3218_init(void) { + // In case we ever want to reinitialize (?) + IS31FL3218_write_register(ISSI_REG_RESET, 0x00); - // Set all PWM values to zero - for ( uint8_t i = 0; i < 18; i++ ) { - IS31FL3218_write_register( ISSI_REG_PWM+i, 0x00 ); - } - - // Enable all channels - for ( uint8_t i = 0; i < 3; i++ ) { - IS31FL3218_write_register( ISSI_REG_CONTROL+i, 0b00111111 ); - } - - // Load PWM registers and LED Control register data - IS31FL3218_write_register( ISSI_REG_UPDATE, 0x01 ); + // Turn off software shutdown + IS31FL3218_write_register(ISSI_REG_SHUTDOWN, 0x01); + + // Set all PWM values to zero + for (uint8_t i = 0; i < 18; i++) { + IS31FL3218_write_register(ISSI_REG_PWM + i, 0x00); + } + + // Enable all channels + for (uint8_t i = 0; i < 3; i++) { + IS31FL3218_write_register(ISSI_REG_CONTROL + i, 0b00111111); + } + + // Load PWM registers and LED Control register data + IS31FL3218_write_register(ISSI_REG_UPDATE, 0x01); } -void IS31FL3218_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) -{ - g_pwm_buffer[index * 3 + 0] = red; - g_pwm_buffer[index * 3 + 1] = green; - g_pwm_buffer[index * 3 + 2] = blue; - g_pwm_buffer_update_required = true; +void IS31FL3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + g_pwm_buffer[index * 3 + 0] = red; + g_pwm_buffer[index * 3 + 1] = green; + g_pwm_buffer[index * 3 + 2] = blue; + g_pwm_buffer_update_required = true; } -void IS31FL3218_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) -{ - for ( int i = 0; i < 6; i++ ) { - IS31FL3218_set_color( i, red, green, blue ); - } +void IS31FL3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < 6; i++) { + IS31FL3218_set_color(i, red, green, blue); + } } -void IS31FL3218_update_pwm_buffers(void) -{ - if ( g_pwm_buffer_update_required ) { - IS31FL3218_write_pwm_buffer( g_pwm_buffer ); - // Load PWM registers and LED Control register data - IS31FL3218_write_register( ISSI_REG_UPDATE, 0x01 ); - } - g_pwm_buffer_update_required = false; +void IS31FL3218_update_pwm_buffers(void) { + if (g_pwm_buffer_update_required) { + IS31FL3218_write_pwm_buffer(g_pwm_buffer); + // Load PWM registers and LED Control register data + IS31FL3218_write_register(ISSI_REG_UPDATE, 0x01); + } + g_pwm_buffer_update_required = false; } diff --git a/drivers/issi/is31fl3218.h b/drivers/issi/is31fl3218.h index 2d24e51463..a70cc1e793 100644 --- a/drivers/issi/is31fl3218.h +++ b/drivers/issi/is31fl3218.h @@ -19,6 +19,6 @@ #include void IS31FL3218_init(void); -void IS31FL3218_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); -void IS31FL3218_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); +void IS31FL3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue); void IS31FL3218_update_pwm_buffers(void); diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c index a7faa9c38c..fad4676def 100644 --- a/drivers/issi/is31fl3731-simple.c +++ b/drivers/issi/is31fl3731-simple.c @@ -17,11 +17,11 @@ */ #ifdef __AVR__ -#include -#include -#include +# include +# include +# include #else -#include "wait.h" +# include "wait.h" #endif #include @@ -41,7 +41,7 @@ // 0b1110110 AD <-> SDA #define ISSI_ADDR_DEFAULT 0x74 -#define ISSI_REG_CONFIG 0x00 +#define ISSI_REG_CONFIG 0x00 #define ISSI_REG_CONFIG_PICTUREMODE 0x00 #define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 #define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 @@ -50,20 +50,20 @@ #define ISSI_CONF_AUTOFRAMEMODE 0x04 #define ISSI_CONF_AUDIOMODE 0x08 -#define ISSI_REG_PICTUREFRAME 0x01 +#define ISSI_REG_PICTUREFRAME 0x01 #define ISSI_REG_SHUTDOWN 0x0A #define ISSI_REG_AUDIOSYNC 0x06 #define ISSI_COMMANDREGISTER 0xFD -#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' +#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' #ifndef ISSI_TIMEOUT - #define ISSI_TIMEOUT 100 +# define ISSI_TIMEOUT 100 #endif #ifndef ISSI_PERSISTENCE - #define ISSI_PERSISTENCE 0 +# define ISSI_PERSISTENCE 0 #endif // Transfer buffer for TWITransmitData() @@ -75,17 +75,17 @@ uint8_t g_twi_transfer_buffer[20]; // buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's // probably not worth the extra complexity. uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144]; -bool g_pwm_buffer_update_required = false; +bool g_pwm_buffer_update_required = false; /* There's probably a better way to init this... */ #if LED_DRIVER_COUNT == 1 - uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}}; +uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}}; #elif LED_DRIVER_COUNT == 2 - uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}}; +uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}}; #elif LED_DRIVER_COUNT == 3 - uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}}; +uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}}; #elif LED_DRIVER_COUNT == 4 - uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}}; +uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}}; #endif bool g_led_control_registers_update_required = false; @@ -103,20 +103,19 @@ bool g_led_control_registers_update_required = false; // 0x0E - R17,G15,G14,G13,G12,G11,G10,G09 // 0x10 - R16,R15,R14,R13,R12,R11,R10,R09 - void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; - #if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) { - break; - } +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) { + break; } - #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); - #endif + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); +#endif } void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { @@ -136,14 +135,13 @@ void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; } - #if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) - break; - } - #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); - #endif +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); +#endif } } @@ -196,7 +194,6 @@ void IS31FL3731_init(uint8_t addr) { // most usage after initialization is just writing PWM buffers in bank 0 // as there's not much point in double-buffering IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0); - } void IS31FL3731_set_value(int index, uint8_t value) { @@ -205,7 +202,7 @@ void IS31FL3731_set_value(int index, uint8_t value) { // Subtract 0x24 to get the second index of g_pwm_buffer g_pwm_buffer[led.driver][led.v - 0x24] = value; - g_pwm_buffer_update_required = true; + g_pwm_buffer_update_required = true; } } @@ -216,10 +213,10 @@ void IS31FL3731_set_value_all(uint8_t value) { } void IS31FL3731_set_led_control_register(uint8_t index, bool value) { - is31_led led = g_is31_leds[index]; + is31_led led = g_is31_leds[index]; - uint8_t control_register = (led.v - 0x24) / 8; - uint8_t bit_value = (led.v - 0x24) % 8; + uint8_t control_register = (led.v - 0x24) / 8; + uint8_t bit_value = (led.v - 0x24) % 8; if (value) { g_led_control_registers[led.driver][control_register] |= (1 << bit_value); @@ -239,7 +236,7 @@ void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) { void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) { if (g_led_control_registers_update_required) { - for (int i=0; i<18; i++) { + for (int i = 0; i < 18; i++) { IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]); } } diff --git a/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h index dbe4982817..a223c351e8 100644 --- a/drivers/issi/is31fl3731-simple.h +++ b/drivers/issi/is31fl3731-simple.h @@ -16,14 +16,12 @@ * along with this program. If not, see . */ - #ifndef IS31FL3731_DRIVER_H #define IS31FL3731_DRIVER_H - typedef struct is31_led { - uint8_t driver:2; - uint8_t v; + uint8_t driver : 2; + uint8_t v; } __attribute__((packed)) is31_led; extern const is31_led g_is31_leds[LED_DRIVER_LED_COUNT]; @@ -44,16 +42,16 @@ void IS31FL3731_set_led_control_register(uint8_t index, bool value); void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index); void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); -#define C1_1 0x24 -#define C1_2 0x25 -#define C1_3 0x26 -#define C1_4 0x27 -#define C1_5 0x28 -#define C1_6 0x29 -#define C1_7 0x2A -#define C1_8 0x2B +#define C1_1 0x24 +#define C1_2 0x25 +#define C1_3 0x26 +#define C1_4 0x27 +#define C1_5 0x28 +#define C1_6 0x29 +#define C1_7 0x2A +#define C1_8 0x2B -#define C1_9 0x2C +#define C1_9 0x2C #define C1_10 0x2D #define C1_11 0x2E #define C1_12 0x2F @@ -62,16 +60,16 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C1_15 0x32 #define C1_16 0x33 -#define C2_1 0x34 -#define C2_2 0x35 -#define C2_3 0x36 -#define C2_4 0x37 -#define C2_5 0x38 -#define C2_6 0x39 -#define C2_7 0x3A -#define C2_8 0x3B +#define C2_1 0x34 +#define C2_2 0x35 +#define C2_3 0x36 +#define C2_4 0x37 +#define C2_5 0x38 +#define C2_6 0x39 +#define C2_7 0x3A +#define C2_8 0x3B -#define C2_9 0x3C +#define C2_9 0x3C #define C2_10 0x3D #define C2_11 0x3E #define C2_12 0x3F @@ -80,16 +78,16 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C2_15 0x42 #define C2_16 0x43 -#define C3_1 0x44 -#define C3_2 0x45 -#define C3_3 0x46 -#define C3_4 0x47 -#define C3_5 0x48 -#define C3_6 0x49 -#define C3_7 0x4A -#define C3_8 0x4B +#define C3_1 0x44 +#define C3_2 0x45 +#define C3_3 0x46 +#define C3_4 0x47 +#define C3_5 0x48 +#define C3_6 0x49 +#define C3_7 0x4A +#define C3_8 0x4B -#define C3_9 0x4C +#define C3_9 0x4C #define C3_10 0x4D #define C3_11 0x4E #define C3_12 0x4F @@ -98,16 +96,16 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C3_15 0x52 #define C3_16 0x53 -#define C4_1 0x54 -#define C4_2 0x55 -#define C4_3 0x56 -#define C4_4 0x57 -#define C4_5 0x58 -#define C4_6 0x59 -#define C4_7 0x5A -#define C4_8 0x5B +#define C4_1 0x54 +#define C4_2 0x55 +#define C4_3 0x56 +#define C4_4 0x57 +#define C4_5 0x58 +#define C4_6 0x59 +#define C4_7 0x5A +#define C4_8 0x5B -#define C4_9 0x5C +#define C4_9 0x5C #define C4_10 0x5D #define C4_11 0x5E #define C4_12 0x5F @@ -116,16 +114,16 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C4_15 0x62 #define C4_16 0x63 -#define C5_1 0x64 -#define C5_2 0x65 -#define C5_3 0x66 -#define C5_4 0x67 -#define C5_5 0x68 -#define C5_6 0x69 -#define C5_7 0x6A -#define C5_8 0x6B +#define C5_1 0x64 +#define C5_2 0x65 +#define C5_3 0x66 +#define C5_4 0x67 +#define C5_5 0x68 +#define C5_6 0x69 +#define C5_7 0x6A +#define C5_8 0x6B -#define C5_9 0x6C +#define C5_9 0x6C #define C5_10 0x6D #define C5_11 0x6E #define C5_12 0x6F @@ -134,16 +132,16 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C5_15 0x72 #define C5_16 0x73 -#define C6_1 0x74 -#define C6_2 0x75 -#define C6_3 0x76 -#define C6_4 0x77 -#define C6_5 0x78 -#define C6_6 0x79 -#define C6_7 0x7A -#define C6_8 0x7B +#define C6_1 0x74 +#define C6_2 0x75 +#define C6_3 0x76 +#define C6_4 0x77 +#define C6_5 0x78 +#define C6_6 0x79 +#define C6_7 0x7A +#define C6_8 0x7B -#define C6_9 0x7C +#define C6_9 0x7C #define C6_10 0x7D #define C6_11 0x7E #define C6_12 0x7F @@ -152,16 +150,16 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C6_15 0x82 #define C6_16 0x83 -#define C7_1 0x84 -#define C7_2 0x85 -#define C7_3 0x86 -#define C7_4 0x87 -#define C7_5 0x88 -#define C7_6 0x89 -#define C7_7 0x8A -#define C7_8 0x8B +#define C7_1 0x84 +#define C7_2 0x85 +#define C7_3 0x86 +#define C7_4 0x87 +#define C7_5 0x88 +#define C7_6 0x89 +#define C7_7 0x8A +#define C7_8 0x8B -#define C7_9 0x8C +#define C7_9 0x8C #define C7_10 0x8D #define C7_11 0x8E #define C7_12 0x8F @@ -170,16 +168,16 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C7_15 0x92 #define C7_16 0x93 -#define C8_1 0x94 -#define C8_2 0x95 -#define C8_3 0x96 -#define C8_4 0x97 -#define C8_5 0x98 -#define C8_6 0x99 -#define C8_7 0x9A -#define C8_8 0x9B +#define C8_1 0x94 +#define C8_2 0x95 +#define C8_3 0x96 +#define C8_4 0x97 +#define C8_5 0x98 +#define C8_6 0x99 +#define C8_7 0x9A +#define C8_8 0x9B -#define C8_9 0x9C +#define C8_9 0x9C #define C8_10 0x9D #define C8_11 0x9E #define C8_12 0x9F @@ -188,16 +186,16 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C8_15 0xA2 #define C8_16 0xA3 -#define C9_1 0xA4 -#define C9_2 0xA5 -#define C9_3 0xA6 -#define C9_4 0xA7 -#define C9_5 0xA8 -#define C9_6 0xA9 -#define C9_7 0xAA -#define C9_8 0xAB +#define C9_1 0xA4 +#define C9_2 0xA5 +#define C9_3 0xA6 +#define C9_4 0xA7 +#define C9_5 0xA8 +#define C9_6 0xA9 +#define C9_7 0xAA +#define C9_8 0xAB -#define C9_9 0xAC +#define C9_9 0xAC #define C9_10 0xAD #define C9_11 0xAE #define C9_12 0xAF @@ -206,5 +204,4 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C9_15 0xB2 #define C9_16 0xB3 - -#endif // IS31FL3731_DRIVER_H +#endif // IS31FL3731_DRIVER_H diff --git a/drivers/issi/is31fl3731.c b/drivers/issi/is31fl3731.c index c9155f5a37..0b6f3e985d 100644 --- a/drivers/issi/is31fl3731.c +++ b/drivers/issi/is31fl3731.c @@ -16,11 +16,11 @@ */ #ifdef __AVR__ -#include -#include -#include +# include +# include +# include #else -#include "wait.h" +# include "wait.h" #endif #include "is31fl3731.h" @@ -37,7 +37,7 @@ // 0b1110110 AD <-> SDA #define ISSI_ADDR_DEFAULT 0x74 -#define ISSI_REG_CONFIG 0x00 +#define ISSI_REG_CONFIG 0x00 #define ISSI_REG_CONFIG_PICTUREMODE 0x00 #define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 #define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 @@ -46,20 +46,20 @@ #define ISSI_CONF_AUTOFRAMEMODE 0x04 #define ISSI_CONF_AUDIOMODE 0x08 -#define ISSI_REG_PICTUREFRAME 0x01 +#define ISSI_REG_PICTUREFRAME 0x01 #define ISSI_REG_SHUTDOWN 0x0A #define ISSI_REG_AUDIOSYNC 0x06 #define ISSI_COMMANDREGISTER 0xFD -#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' +#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' #ifndef ISSI_TIMEOUT - #define ISSI_TIMEOUT 100 +# define ISSI_TIMEOUT 100 #endif #ifndef ISSI_PERSISTENCE - #define ISSI_PERSISTENCE 0 +# define ISSI_PERSISTENCE 0 #endif // Transfer buffer for TWITransmitData() @@ -71,10 +71,10 @@ uint8_t g_twi_transfer_buffer[20]; // buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's // probably not worth the extra complexity. uint8_t g_pwm_buffer[DRIVER_COUNT][144]; -bool g_pwm_buffer_update_required = false; +bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; -uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } }; -bool g_led_control_registers_update_required = false; +uint8_t g_led_control_registers[DRIVER_COUNT][18] = {{0}, {0}}; +bool g_led_control_registers_update_required[DRIVER_COUNT] = {false}; // This is the bit pattern in the LED control registers // (for matrix A, add one to register for matrix B) @@ -90,181 +90,159 @@ bool g_led_control_registers_update_required = false; // 0x0E - R17,G15,G14,G13,G12,G11,G10,G09 // 0x10 - R16,R15,R14,R13,R12,R11,R10,R09 - -void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data ) -{ +void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; - #if ISSI_PERSISTENCE > 0 +#if ISSI_PERSISTENCE > 0 for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) - break; + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; } - #else +#else i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); - #endif +#endif } -void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) -{ +void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { // assumes bank is already selected // transmit PWM registers in 9 transfers of 16 bytes // g_twi_transfer_buffer[] is 20 bytes // iterate over the pwm_buffer contents at 16 byte intervals - for ( int i = 0; i < 144; i += 16 ) { + for (int i = 0; i < 144; i += 16) { // set the first register, e.g. 0x24, 0x34, 0x44, etc. g_twi_transfer_buffer[0] = 0x24 + i; // copy the data from i to i+15 // device will auto-increment register for data after the first byte // thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer - for ( int j = 0; j < 16; j++ ) { + for (int j = 0; j < 16; j++) { g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; } - #if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) - break; - } - #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); - #endif +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); +#endif } } -void IS31FL3731_init( uint8_t addr ) -{ +void IS31FL3731_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, first enable software shutdown, // then set up the mode and other settings, clear the PWM registers, // then disable software shutdown. // select "function register" bank - IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG ); + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); // enable software shutdown - IS31FL3731_write_register( addr, ISSI_REG_SHUTDOWN, 0x00 ); - // this delay was copied from other drivers, might not be needed - #ifdef __AVR__ - _delay_ms( 10 ); - #else + IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); +// this delay was copied from other drivers, might not be needed +#ifdef __AVR__ + _delay_ms(10); +#else wait_ms(10); - #endif +#endif // picture mode - IS31FL3731_write_register( addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE ); + IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); // display frame 0 - IS31FL3731_write_register( addr, ISSI_REG_PICTUREFRAME, 0x00 ); + IS31FL3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00); // audio sync off - IS31FL3731_write_register( addr, ISSI_REG_AUDIOSYNC, 0x00 ); + IS31FL3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00); // select bank 0 - IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 ); + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0); // turn off all LEDs in the LED control register - for ( int i = 0x00; i <= 0x11; i++ ) - { - IS31FL3731_write_register( addr, i, 0x00 ); + for (int i = 0x00; i <= 0x11; i++) { + IS31FL3731_write_register(addr, i, 0x00); } // turn off all LEDs in the blink control register (not really needed) - for ( int i = 0x12; i <= 0x23; i++ ) - { - IS31FL3731_write_register( addr, i, 0x00 ); + for (int i = 0x12; i <= 0x23; i++) { + IS31FL3731_write_register(addr, i, 0x00); } // set PWM on all LEDs to 0 - for ( int i = 0x24; i <= 0xB3; i++ ) - { - IS31FL3731_write_register( addr, i, 0x00 ); + for (int i = 0x24; i <= 0xB3; i++) { + IS31FL3731_write_register(addr, i, 0x00); } // select "function register" bank - IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG ); + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); // disable software shutdown - IS31FL3731_write_register( addr, ISSI_REG_SHUTDOWN, 0x01 ); + IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01); // select bank 0 and leave it selected. // most usage after initialization is just writing PWM buffers in bank 0 // as there's not much point in double-buffering - IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 ); - + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0); } -void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) -{ - if ( index >= 0 && index < DRIVER_LED_TOTAL ) { +void IS31FL3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + if (index >= 0 && index < DRIVER_LED_TOTAL) { is31_led led = g_is31_leds[index]; // Subtract 0x24 to get the second index of g_pwm_buffer - g_pwm_buffer[led.driver][led.r - 0x24] = red; - g_pwm_buffer[led.driver][led.g - 0x24] = green; - g_pwm_buffer[led.driver][led.b - 0x24] = blue; - g_pwm_buffer_update_required = true; + g_pwm_buffer[led.driver][led.r - 0x24] = red; + g_pwm_buffer[led.driver][led.g - 0x24] = green; + g_pwm_buffer[led.driver][led.b - 0x24] = blue; + g_pwm_buffer_update_required[led.driver] = true; } } -void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) -{ - for ( int i = 0; i < DRIVER_LED_TOTAL; i++ ) - { - IS31FL3731_set_color( i, red, green, blue ); +void IS31FL3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + IS31FL3731_set_color(i, red, green, blue); } } -void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue ) -{ +void IS31FL3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { is31_led led = g_is31_leds[index]; - uint8_t control_register_r = (led.r - 0x24) / 8; - uint8_t control_register_g = (led.g - 0x24) / 8; - uint8_t control_register_b = (led.b - 0x24) / 8; - uint8_t bit_r = (led.r - 0x24) % 8; - uint8_t bit_g = (led.g - 0x24) % 8; - uint8_t bit_b = (led.b - 0x24) % 8; + uint8_t control_register_r = (led.r - 0x24) / 8; + uint8_t control_register_g = (led.g - 0x24) / 8; + uint8_t control_register_b = (led.b - 0x24) / 8; + uint8_t bit_r = (led.r - 0x24) % 8; + uint8_t bit_g = (led.g - 0x24) % 8; + uint8_t bit_b = (led.b - 0x24) % 8; - if ( red ) { + if (red) { g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); } else { g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); } - if ( green ) { + if (green) { g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); } else { g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); } - if ( blue ) { + if (blue) { g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); } else { g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); } - g_led_control_registers_update_required = true; - + g_led_control_registers_update_required[led.driver] = true; } -void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) -{ - if ( g_pwm_buffer_update_required ) - { - IS31FL3731_write_pwm_buffer( addr1, g_pwm_buffer[0] ); - IS31FL3731_write_pwm_buffer( addr2, g_pwm_buffer[1] ); +void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) { + if (g_pwm_buffer_update_required[index]) { + IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]); } - g_pwm_buffer_update_required = false; + g_pwm_buffer_update_required[index] = false; } -void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) -{ - if ( g_led_control_registers_update_required ) - { - for ( int i=0; i<18; i++ ) - { - IS31FL3731_write_register(addr1, i, g_led_control_registers[0][i] ); - IS31FL3731_write_register(addr2, i, g_led_control_registers[1][i] ); +void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) { + if (g_led_control_registers_update_required[index]) { + for (int i = 0; i < 18; i++) { + IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]); } } } diff --git a/drivers/issi/is31fl3731.h b/drivers/issi/is31fl3731.h index f354a12db2..6a7a45d8ff 100644 --- a/drivers/issi/is31fl3731.h +++ b/drivers/issi/is31fl3731.h @@ -15,7 +15,6 @@ * along with this program. If not, see . */ - #ifndef IS31FL3731_DRIVER_H #define IS31FL3731_DRIVER_H @@ -23,40 +22,40 @@ #include typedef struct is31_led { - uint8_t driver:2; - uint8_t r; - uint8_t g; - uint8_t b; + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; } __attribute__((packed)) is31_led; extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; -void IS31FL3731_init( uint8_t addr ); -void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data ); -void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); +void IS31FL3731_init(uint8_t addr); +void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); -void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); -void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); +void IS31FL3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue ); +void IS31FL3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue); // This should not be called from an interrupt // (eg. from a timer interrupt). // Call this while idle (in between matrix scans). // If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); -void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); +void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index); +void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); -#define C1_1 0x24 -#define C1_2 0x25 -#define C1_3 0x26 -#define C1_4 0x27 -#define C1_5 0x28 -#define C1_6 0x29 -#define C1_7 0x2A -#define C1_8 0x2B +#define C1_1 0x24 +#define C1_2 0x25 +#define C1_3 0x26 +#define C1_4 0x27 +#define C1_5 0x28 +#define C1_6 0x29 +#define C1_7 0x2A +#define C1_8 0x2B -#define C1_9 0x2C +#define C1_9 0x2C #define C1_10 0x2D #define C1_11 0x2E #define C1_12 0x2F @@ -65,16 +64,16 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C1_15 0x32 #define C1_16 0x33 -#define C2_1 0x34 -#define C2_2 0x35 -#define C2_3 0x36 -#define C2_4 0x37 -#define C2_5 0x38 -#define C2_6 0x39 -#define C2_7 0x3A -#define C2_8 0x3B +#define C2_1 0x34 +#define C2_2 0x35 +#define C2_3 0x36 +#define C2_4 0x37 +#define C2_5 0x38 +#define C2_6 0x39 +#define C2_7 0x3A +#define C2_8 0x3B -#define C2_9 0x3C +#define C2_9 0x3C #define C2_10 0x3D #define C2_11 0x3E #define C2_12 0x3F @@ -83,16 +82,16 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C2_15 0x42 #define C2_16 0x43 -#define C3_1 0x44 -#define C3_2 0x45 -#define C3_3 0x46 -#define C3_4 0x47 -#define C3_5 0x48 -#define C3_6 0x49 -#define C3_7 0x4A -#define C3_8 0x4B +#define C3_1 0x44 +#define C3_2 0x45 +#define C3_3 0x46 +#define C3_4 0x47 +#define C3_5 0x48 +#define C3_6 0x49 +#define C3_7 0x4A +#define C3_8 0x4B -#define C3_9 0x4C +#define C3_9 0x4C #define C3_10 0x4D #define C3_11 0x4E #define C3_12 0x4F @@ -101,16 +100,16 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C3_15 0x52 #define C3_16 0x53 -#define C4_1 0x54 -#define C4_2 0x55 -#define C4_3 0x56 -#define C4_4 0x57 -#define C4_5 0x58 -#define C4_6 0x59 -#define C4_7 0x5A -#define C4_8 0x5B +#define C4_1 0x54 +#define C4_2 0x55 +#define C4_3 0x56 +#define C4_4 0x57 +#define C4_5 0x58 +#define C4_6 0x59 +#define C4_7 0x5A +#define C4_8 0x5B -#define C4_9 0x5C +#define C4_9 0x5C #define C4_10 0x5D #define C4_11 0x5E #define C4_12 0x5F @@ -119,16 +118,16 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C4_15 0x62 #define C4_16 0x63 -#define C5_1 0x64 -#define C5_2 0x65 -#define C5_3 0x66 -#define C5_4 0x67 -#define C5_5 0x68 -#define C5_6 0x69 -#define C5_7 0x6A -#define C5_8 0x6B +#define C5_1 0x64 +#define C5_2 0x65 +#define C5_3 0x66 +#define C5_4 0x67 +#define C5_5 0x68 +#define C5_6 0x69 +#define C5_7 0x6A +#define C5_8 0x6B -#define C5_9 0x6C +#define C5_9 0x6C #define C5_10 0x6D #define C5_11 0x6E #define C5_12 0x6F @@ -137,16 +136,16 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C5_15 0x72 #define C5_16 0x73 -#define C6_1 0x74 -#define C6_2 0x75 -#define C6_3 0x76 -#define C6_4 0x77 -#define C6_5 0x78 -#define C6_6 0x79 -#define C6_7 0x7A -#define C6_8 0x7B +#define C6_1 0x74 +#define C6_2 0x75 +#define C6_3 0x76 +#define C6_4 0x77 +#define C6_5 0x78 +#define C6_6 0x79 +#define C6_7 0x7A +#define C6_8 0x7B -#define C6_9 0x7C +#define C6_9 0x7C #define C6_10 0x7D #define C6_11 0x7E #define C6_12 0x7F @@ -155,16 +154,16 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C6_15 0x82 #define C6_16 0x83 -#define C7_1 0x84 -#define C7_2 0x85 -#define C7_3 0x86 -#define C7_4 0x87 -#define C7_5 0x88 -#define C7_6 0x89 -#define C7_7 0x8A -#define C7_8 0x8B +#define C7_1 0x84 +#define C7_2 0x85 +#define C7_3 0x86 +#define C7_4 0x87 +#define C7_5 0x88 +#define C7_6 0x89 +#define C7_7 0x8A +#define C7_8 0x8B -#define C7_9 0x8C +#define C7_9 0x8C #define C7_10 0x8D #define C7_11 0x8E #define C7_12 0x8F @@ -173,16 +172,16 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C7_15 0x92 #define C7_16 0x93 -#define C8_1 0x94 -#define C8_2 0x95 -#define C8_3 0x96 -#define C8_4 0x97 -#define C8_5 0x98 -#define C8_6 0x99 -#define C8_7 0x9A -#define C8_8 0x9B +#define C8_1 0x94 +#define C8_2 0x95 +#define C8_3 0x96 +#define C8_4 0x97 +#define C8_5 0x98 +#define C8_6 0x99 +#define C8_7 0x9A +#define C8_8 0x9B -#define C8_9 0x9C +#define C8_9 0x9C #define C8_10 0x9D #define C8_11 0x9E #define C8_12 0x9F @@ -191,16 +190,16 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C8_15 0xA2 #define C8_16 0xA3 -#define C9_1 0xA4 -#define C9_2 0xA5 -#define C9_3 0xA6 -#define C9_4 0xA7 -#define C9_5 0xA8 -#define C9_6 0xA9 -#define C9_7 0xAA -#define C9_8 0xAB +#define C9_1 0xA4 +#define C9_2 0xA5 +#define C9_3 0xA6 +#define C9_4 0xA7 +#define C9_5 0xA8 +#define C9_6 0xA9 +#define C9_7 0xAA +#define C9_8 0xAB -#define C9_9 0xAC +#define C9_9 0xAC #define C9_10 0xAD #define C9_11 0xAE #define C9_12 0xAF @@ -209,6 +208,4 @@ void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); #define C9_15 0xB2 #define C9_16 0xB3 - - -#endif // IS31FL3731_DRIVER_H +#endif // IS31FL3731_DRIVER_H diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c index aa247f4e8a..cc2d895efd 100644 --- a/drivers/issi/is31fl3733.c +++ b/drivers/issi/is31fl3733.c @@ -17,11 +17,11 @@ */ #ifdef __AVR__ -#include -#include -#include +# include +# include +# include #else -#include "wait.h" +# include "wait.h" #endif #include "is31fl3733.h" @@ -46,23 +46,23 @@ #define ISSI_INTERRUPTMASKREGISTER 0xF0 #define ISSI_INTERRUPTSTATUSREGISTER 0xF1 -#define ISSI_PAGE_LEDCONTROL 0x00 //PG0 -#define ISSI_PAGE_PWM 0x01 //PG1 -#define ISSI_PAGE_AUTOBREATH 0x02 //PG2 -#define ISSI_PAGE_FUNCTION 0x03 //PG3 +#define ISSI_PAGE_LEDCONTROL 0x00 // PG0 +#define ISSI_PAGE_PWM 0x01 // PG1 +#define ISSI_PAGE_AUTOBREATH 0x02 // PG2 +#define ISSI_PAGE_FUNCTION 0x03 // PG3 -#define ISSI_REG_CONFIGURATION 0x00 //PG3 -#define ISSI_REG_GLOBALCURRENT 0x01 //PG3 -#define ISSI_REG_RESET 0x11// PG3 -#define ISSI_REG_SWPULLUP 0x0F //PG3 -#define ISSI_REG_CSPULLUP 0x10 //PG3 +#define ISSI_REG_CONFIGURATION 0x00 // PG3 +#define ISSI_REG_GLOBALCURRENT 0x01 // PG3 +#define ISSI_REG_RESET 0x11 // PG3 +#define ISSI_REG_SWPULLUP 0x0F // PG3 +#define ISSI_REG_CSPULLUP 0x10 // PG3 #ifndef ISSI_TIMEOUT - #define ISSI_TIMEOUT 100 +# define ISSI_TIMEOUT 100 #endif #ifndef ISSI_PERSISTENCE - #define ISSI_PERSISTENCE 0 +# define ISSI_PERSISTENCE 0 #endif // Transfer buffer for TWITransmitData() @@ -75,56 +75,51 @@ uint8_t g_twi_transfer_buffer[20]; // buffers and the transfers in IS31FL3733_write_pwm_buffer() but it's // probably not worth the extra complexity. uint8_t g_pwm_buffer[DRIVER_COUNT][192]; -bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false }; +bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; -uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 }, { 0 } }; -bool g_led_control_registers_update_required[DRIVER_COUNT] = { false }; +uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}}; +bool g_led_control_registers_update_required[DRIVER_COUNT] = {false}; -void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data ) -{ +void IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; - #if ISSI_PERSISTENCE > 0 +#if ISSI_PERSISTENCE > 0 for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) - break; + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; } - #else +#else i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); - #endif +#endif } -void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) -{ +void IS31FL3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { // assumes PG1 is already selected // transmit PWM registers in 12 transfers of 16 bytes // g_twi_transfer_buffer[] is 20 bytes // iterate over the pwm_buffer contents at 16 byte intervals - for ( int i = 0; i < 192; i += 16 ) { + for (int i = 0; i < 192; i += 16) { g_twi_transfer_buffer[0] = i; // copy the data from i to i+15 // device will auto-increment register for data after the first byte // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer - for ( int j = 0; j < 16; j++ ) { + for (int j = 0; j < 16; j++) { g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; } - #if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) - break; - } - #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); - #endif +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); +#endif } } -void IS31FL3733_init( uint8_t addr, uint8_t sync) -{ +void IS31FL3733_init(uint8_t addr, uint8_t sync) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. // Set up the mode and other settings, clear the PWM registers, @@ -132,121 +127,110 @@ void IS31FL3733_init( uint8_t addr, uint8_t sync) // Sync is passed so set it according to the datasheet. // Unlock the command register. - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG0 - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); // Turn off all LEDs. - for ( int i = 0x00; i <= 0x17; i++ ) - { - IS31FL3733_write_register( addr, i, 0x00 ); + for (int i = 0x00; i <= 0x17; i++) { + IS31FL3733_write_register(addr, i, 0x00); } // Unlock the command register. - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG1 - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); // Set PWM on all LEDs to 0 // No need to setup Breath registers to PWM as that is the default. - for ( int i = 0x00; i <= 0xBF; i++ ) - { - IS31FL3733_write_register( addr, i, 0x00 ); + for (int i = 0x00; i <= 0xBF; i++) { + IS31FL3733_write_register(addr, i, 0x00); } // Unlock the command register. - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG3 - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION ); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); // Set global current to maximum. - IS31FL3733_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF ); + IS31FL3733_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); // Disable software shutdown. - IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01 ); + IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01); - // Wait 10ms to ensure the device has woken up. - #ifdef __AVR__ - _delay_ms( 10 ); - #else +// Wait 10ms to ensure the device has woken up. +#ifdef __AVR__ + _delay_ms(10); +#else wait_ms(10); - #endif +#endif } -void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) -{ - if ( index >= 0 && index < DRIVER_LED_TOTAL ) { +void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + if (index >= 0 && index < DRIVER_LED_TOTAL) { is31_led led = g_is31_leds[index]; - g_pwm_buffer[led.driver][led.r] = red; - g_pwm_buffer[led.driver][led.g] = green; - g_pwm_buffer[led.driver][led.b] = blue; + g_pwm_buffer[led.driver][led.r] = red; + g_pwm_buffer[led.driver][led.g] = green; + g_pwm_buffer[led.driver][led.b] = blue; g_pwm_buffer_update_required[led.driver] = true; } } -void IS31FL3733_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) -{ - for ( int i = 0; i < DRIVER_LED_TOTAL; i++ ) - { - IS31FL3733_set_color( i, red, green, blue ); +void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + IS31FL3733_set_color(i, red, green, blue); } } -void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, bool blue ) -{ +void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { is31_led led = g_is31_leds[index]; - uint8_t control_register_r = led.r / 8; - uint8_t control_register_g = led.g / 8; - uint8_t control_register_b = led.b / 8; - uint8_t bit_r = led.r % 8; - uint8_t bit_g = led.g % 8; - uint8_t bit_b = led.b % 8; + uint8_t control_register_r = led.r / 8; + uint8_t control_register_g = led.g / 8; + uint8_t control_register_b = led.b / 8; + uint8_t bit_r = led.r % 8; + uint8_t bit_g = led.g % 8; + uint8_t bit_b = led.b % 8; - if ( red ) { + if (red) { g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); } else { g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); } - if ( green ) { + if (green) { g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); } else { g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); } - if ( blue ) { + if (blue) { g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); } else { g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); } g_led_control_registers_update_required[led.driver] = true; - } -void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index ) -{ - if ( g_pwm_buffer_update_required[index] ) - { +void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index) { + if (g_pwm_buffer_update_required[index]) { // Firstly we need to unlock the command register and select PG1 - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); - IS31FL3733_write_pwm_buffer( addr, g_pwm_buffer[index] ); + IS31FL3733_write_pwm_buffer(addr, g_pwm_buffer[index]); } g_pwm_buffer_update_required[index] = false; } -void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index ) -{ - if ( g_led_control_registers_update_required[index] ) - { +void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index) { + if (g_led_control_registers_update_required[index]) { // Firstly we need to unlock the command register and select PG0 - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); - for ( int i=0; i<24; i++ ) - { - IS31FL3733_write_register(addr, i, g_led_control_registers[index][i] ); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); + for (int i = 0; i < 24; i++) { + IS31FL3733_write_register(addr, i, g_led_control_registers[index][i]); } } - g_led_control_registers_update_required[index] = false; + // This seems counter intuitive but sometimes this page can get corrupted. So update it every time. + // g_led_control_registers_update_required[index] = false; } diff --git a/drivers/issi/is31fl3733.h b/drivers/issi/is31fl3733.h index e117b25460..5b3283e035 100644 --- a/drivers/issi/is31fl3733.h +++ b/drivers/issi/is31fl3733.h @@ -16,7 +16,6 @@ * along with this program. If not, see . */ - #ifndef IS31FL3733_DRIVER_H #define IS31FL3733_DRIVER_H @@ -24,232 +23,232 @@ #include typedef struct is31_led { - uint8_t driver:2; - uint8_t r; - uint8_t g; - uint8_t b; + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; } __attribute__((packed)) is31_led; extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; -void IS31FL3733_init( uint8_t addr, uint8_t sync ); -void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data ); -void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); +void IS31FL3733_init(uint8_t addr, uint8_t sync); +void IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); -void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); -void IS31FL3733_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); +void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, bool blue ); +void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue); // This should not be called from an interrupt // (eg. from a timer interrupt). // Call this while idle (in between matrix scans). // If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index ); -void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index ); +void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index); +void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index); -#define A_1 0x00 -#define A_2 0x01 -#define A_3 0x02 -#define A_4 0x03 -#define A_5 0x04 -#define A_6 0x05 -#define A_7 0x06 -#define A_8 0x07 -#define A_9 0x08 -#define A_10 0x09 -#define A_11 0x0A -#define A_12 0x0B -#define A_13 0x0C -#define A_14 0x0D -#define A_15 0x0E -#define A_16 0x0F +#define A_1 0x00 +#define A_2 0x01 +#define A_3 0x02 +#define A_4 0x03 +#define A_5 0x04 +#define A_6 0x05 +#define A_7 0x06 +#define A_8 0x07 +#define A_9 0x08 +#define A_10 0x09 +#define A_11 0x0A +#define A_12 0x0B +#define A_13 0x0C +#define A_14 0x0D +#define A_15 0x0E +#define A_16 0x0F -#define B_1 0x10 -#define B_2 0x11 -#define B_3 0x12 -#define B_4 0x13 -#define B_5 0x14 -#define B_6 0x15 -#define B_7 0x16 -#define B_8 0x17 -#define B_9 0x18 -#define B_10 0x19 -#define B_11 0x1A -#define B_12 0x1B -#define B_13 0x1C -#define B_14 0x1D -#define B_15 0x1E -#define B_16 0x1F +#define B_1 0x10 +#define B_2 0x11 +#define B_3 0x12 +#define B_4 0x13 +#define B_5 0x14 +#define B_6 0x15 +#define B_7 0x16 +#define B_8 0x17 +#define B_9 0x18 +#define B_10 0x19 +#define B_11 0x1A +#define B_12 0x1B +#define B_13 0x1C +#define B_14 0x1D +#define B_15 0x1E +#define B_16 0x1F -#define C_1 0x20 -#define C_2 0x21 -#define C_3 0x22 -#define C_4 0x23 -#define C_5 0x24 -#define C_6 0x25 -#define C_7 0x26 -#define C_8 0x27 -#define C_9 0x28 -#define C_10 0x29 -#define C_11 0x2A -#define C_12 0x2B -#define C_13 0x2C -#define C_14 0x2D -#define C_15 0x2E -#define C_16 0x2F +#define C_1 0x20 +#define C_2 0x21 +#define C_3 0x22 +#define C_4 0x23 +#define C_5 0x24 +#define C_6 0x25 +#define C_7 0x26 +#define C_8 0x27 +#define C_9 0x28 +#define C_10 0x29 +#define C_11 0x2A +#define C_12 0x2B +#define C_13 0x2C +#define C_14 0x2D +#define C_15 0x2E +#define C_16 0x2F -#define D_1 0x30 -#define D_2 0x31 -#define D_3 0x32 -#define D_4 0x33 -#define D_5 0x34 -#define D_6 0x35 -#define D_7 0x36 -#define D_8 0x37 -#define D_9 0x38 -#define D_10 0x39 -#define D_11 0x3A -#define D_12 0x3B -#define D_13 0x3C -#define D_14 0x3D -#define D_15 0x3E -#define D_16 0x3F +#define D_1 0x30 +#define D_2 0x31 +#define D_3 0x32 +#define D_4 0x33 +#define D_5 0x34 +#define D_6 0x35 +#define D_7 0x36 +#define D_8 0x37 +#define D_9 0x38 +#define D_10 0x39 +#define D_11 0x3A +#define D_12 0x3B +#define D_13 0x3C +#define D_14 0x3D +#define D_15 0x3E +#define D_16 0x3F -#define E_1 0x40 -#define E_2 0x41 -#define E_3 0x42 -#define E_4 0x43 -#define E_5 0x44 -#define E_6 0x45 -#define E_7 0x46 -#define E_8 0x47 -#define E_9 0x48 -#define E_10 0x49 -#define E_11 0x4A -#define E_12 0x4B -#define E_13 0x4C -#define E_14 0x4D -#define E_15 0x4E -#define E_16 0x4F +#define E_1 0x40 +#define E_2 0x41 +#define E_3 0x42 +#define E_4 0x43 +#define E_5 0x44 +#define E_6 0x45 +#define E_7 0x46 +#define E_8 0x47 +#define E_9 0x48 +#define E_10 0x49 +#define E_11 0x4A +#define E_12 0x4B +#define E_13 0x4C +#define E_14 0x4D +#define E_15 0x4E +#define E_16 0x4F -#define F_1 0x50 -#define F_2 0x51 -#define F_3 0x52 -#define F_4 0x53 -#define F_5 0x54 -#define F_6 0x55 -#define F_7 0x56 -#define F_8 0x57 -#define F_9 0x58 -#define F_10 0x59 -#define F_11 0x5A -#define F_12 0x5B -#define F_13 0x5C -#define F_14 0x5D -#define F_15 0x5E -#define F_16 0x5F +#define F_1 0x50 +#define F_2 0x51 +#define F_3 0x52 +#define F_4 0x53 +#define F_5 0x54 +#define F_6 0x55 +#define F_7 0x56 +#define F_8 0x57 +#define F_9 0x58 +#define F_10 0x59 +#define F_11 0x5A +#define F_12 0x5B +#define F_13 0x5C +#define F_14 0x5D +#define F_15 0x5E +#define F_16 0x5F -#define G_1 0x60 -#define G_2 0x61 -#define G_3 0x62 -#define G_4 0x63 -#define G_5 0x64 -#define G_6 0x65 -#define G_7 0x66 -#define G_8 0x67 -#define G_9 0x68 -#define G_10 0x69 -#define G_11 0x6A -#define G_12 0x6B -#define G_13 0x6C -#define G_14 0x6D -#define G_15 0x6E -#define G_16 0x6F +#define G_1 0x60 +#define G_2 0x61 +#define G_3 0x62 +#define G_4 0x63 +#define G_5 0x64 +#define G_6 0x65 +#define G_7 0x66 +#define G_8 0x67 +#define G_9 0x68 +#define G_10 0x69 +#define G_11 0x6A +#define G_12 0x6B +#define G_13 0x6C +#define G_14 0x6D +#define G_15 0x6E +#define G_16 0x6F -#define H_1 0x70 -#define H_2 0x71 -#define H_3 0x72 -#define H_4 0x73 -#define H_5 0x74 -#define H_6 0x75 -#define H_7 0x76 -#define H_8 0x77 -#define H_9 0x78 -#define H_10 0x79 -#define H_11 0x7A -#define H_12 0x7B -#define H_13 0x7C -#define H_14 0x7D -#define H_15 0x7E -#define H_16 0x7F +#define H_1 0x70 +#define H_2 0x71 +#define H_3 0x72 +#define H_4 0x73 +#define H_5 0x74 +#define H_6 0x75 +#define H_7 0x76 +#define H_8 0x77 +#define H_9 0x78 +#define H_10 0x79 +#define H_11 0x7A +#define H_12 0x7B +#define H_13 0x7C +#define H_14 0x7D +#define H_15 0x7E +#define H_16 0x7F -#define I_1 0x80 -#define I_2 0x81 -#define I_3 0x82 -#define I_4 0x83 -#define I_5 0x84 -#define I_6 0x85 -#define I_7 0x86 -#define I_8 0x87 -#define I_9 0x88 -#define I_10 0x89 -#define I_11 0x8A -#define I_12 0x8B -#define I_13 0x8C -#define I_14 0x8D -#define I_15 0x8E -#define I_16 0x8F +#define I_1 0x80 +#define I_2 0x81 +#define I_3 0x82 +#define I_4 0x83 +#define I_5 0x84 +#define I_6 0x85 +#define I_7 0x86 +#define I_8 0x87 +#define I_9 0x88 +#define I_10 0x89 +#define I_11 0x8A +#define I_12 0x8B +#define I_13 0x8C +#define I_14 0x8D +#define I_15 0x8E +#define I_16 0x8F -#define J_1 0x90 -#define J_2 0x91 -#define J_3 0x92 -#define J_4 0x93 -#define J_5 0x94 -#define J_6 0x95 -#define J_7 0x96 -#define J_8 0x97 -#define J_9 0x98 -#define J_10 0x99 -#define J_11 0x9A -#define J_12 0x9B -#define J_13 0x9C -#define J_14 0x9D -#define J_15 0x9E -#define J_16 0x9F +#define J_1 0x90 +#define J_2 0x91 +#define J_3 0x92 +#define J_4 0x93 +#define J_5 0x94 +#define J_6 0x95 +#define J_7 0x96 +#define J_8 0x97 +#define J_9 0x98 +#define J_10 0x99 +#define J_11 0x9A +#define J_12 0x9B +#define J_13 0x9C +#define J_14 0x9D +#define J_15 0x9E +#define J_16 0x9F -#define K_1 0xA0 -#define K_2 0xA1 -#define K_3 0xA2 -#define K_4 0xA3 -#define K_5 0xA4 -#define K_6 0xA5 -#define K_7 0xA6 -#define K_8 0xA7 -#define K_9 0xA8 -#define K_10 0xA9 -#define K_11 0xAA -#define K_12 0xAB -#define K_13 0xAC -#define K_14 0xAD -#define K_15 0xAE -#define K_16 0xAF +#define K_1 0xA0 +#define K_2 0xA1 +#define K_3 0xA2 +#define K_4 0xA3 +#define K_5 0xA4 +#define K_6 0xA5 +#define K_7 0xA6 +#define K_8 0xA7 +#define K_9 0xA8 +#define K_10 0xA9 +#define K_11 0xAA +#define K_12 0xAB +#define K_13 0xAC +#define K_14 0xAD +#define K_15 0xAE +#define K_16 0xAF -#define L_1 0xB0 -#define L_2 0xB1 -#define L_3 0xB2 -#define L_4 0xB3 -#define L_5 0xB4 -#define L_6 0xB5 -#define L_7 0xB6 -#define L_8 0xB7 -#define L_9 0xB8 -#define L_10 0xB9 -#define L_11 0xBA -#define L_12 0xBB -#define L_13 0xBC -#define L_14 0xBD -#define L_15 0xBE -#define L_16 0xBF +#define L_1 0xB0 +#define L_2 0xB1 +#define L_3 0xB2 +#define L_4 0xB3 +#define L_5 0xB4 +#define L_6 0xB5 +#define L_7 0xB6 +#define L_8 0xB7 +#define L_9 0xB8 +#define L_10 0xB9 +#define L_11 0xBA +#define L_12 0xBB +#define L_13 0xBC +#define L_14 0xBD +#define L_15 0xBE +#define L_16 0xBF -#endif // IS31FL3733_DRIVER_H +#endif // IS31FL3733_DRIVER_H diff --git a/drivers/issi/is31fl3736.c b/drivers/issi/is31fl3736.c index c5d4310971..754292425e 100644 --- a/drivers/issi/is31fl3736.c +++ b/drivers/issi/is31fl3736.c @@ -14,13 +14,12 @@ * along with this program. If not, see . */ - #ifdef __AVR__ -#include -#include -#include +# include +# include +# include #else -#include "wait.h" +# include "wait.h" #endif #include "is31fl3736.h" @@ -28,8 +27,6 @@ #include "i2c_master.h" #include "progmem.h" - - // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) // The address will vary depending on your wiring: @@ -47,23 +44,23 @@ #define ISSI_INTERRUPTMASKREGISTER 0xF0 #define ISSI_INTERRUPTSTATUSREGISTER 0xF1 -#define ISSI_PAGE_LEDCONTROL 0x00 //PG0 -#define ISSI_PAGE_PWM 0x01 //PG1 -#define ISSI_PAGE_AUTOBREATH 0x02 //PG2 -#define ISSI_PAGE_FUNCTION 0x03 //PG3 +#define ISSI_PAGE_LEDCONTROL 0x00 // PG0 +#define ISSI_PAGE_PWM 0x01 // PG1 +#define ISSI_PAGE_AUTOBREATH 0x02 // PG2 +#define ISSI_PAGE_FUNCTION 0x03 // PG3 -#define ISSI_REG_CONFIGURATION 0x00 //PG3 -#define ISSI_REG_GLOBALCURRENT 0x01 //PG3 -#define ISSI_REG_RESET 0x11// PG3 -#define ISSI_REG_SWPULLUP 0x0F //PG3 -#define ISSI_REG_CSPULLUP 0x10 //PG3 +#define ISSI_REG_CONFIGURATION 0x00 // PG3 +#define ISSI_REG_GLOBALCURRENT 0x01 // PG3 +#define ISSI_REG_RESET 0x11 // PG3 +#define ISSI_REG_SWPULLUP 0x0F // PG3 +#define ISSI_REG_CSPULLUP 0x10 // PG3 #ifndef ISSI_TIMEOUT - #define ISSI_TIMEOUT 100 +# define ISSI_TIMEOUT 100 #endif #ifndef ISSI_PERSISTENCE - #define ISSI_PERSISTENCE 0 +# define ISSI_PERSISTENCE 0 #endif // Transfer buffer for TWITransmitData() @@ -76,124 +73,113 @@ uint8_t g_twi_transfer_buffer[20]; // buffers and the transfers in IS31FL3736_write_pwm_buffer() but it's // probably not worth the extra complexity. uint8_t g_pwm_buffer[DRIVER_COUNT][192]; -bool g_pwm_buffer_update_required = false; +bool g_pwm_buffer_update_required = false; -uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 }, { 0 } }; -bool g_led_control_registers_update_required = false; +uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}}; +bool g_led_control_registers_update_required = false; -void IS31FL3736_write_register( uint8_t addr, uint8_t reg, uint8_t data ) -{ +void IS31FL3736_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; - #if ISSI_PERSISTENCE > 0 +#if ISSI_PERSISTENCE > 0 for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) - break; + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; } - #else +#else i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); - #endif +#endif } -void IS31FL3736_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) -{ +void IS31FL3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { // assumes PG1 is already selected // transmit PWM registers in 12 transfers of 16 bytes // g_twi_transfer_buffer[] is 20 bytes // iterate over the pwm_buffer contents at 16 byte intervals - for ( int i = 0; i < 192; i += 16 ) { + for (int i = 0; i < 192; i += 16) { g_twi_transfer_buffer[0] = i; // copy the data from i to i+15 // device will auto-increment register for data after the first byte // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer - for ( int j = 0; j < 16; j++ ) { + for (int j = 0; j < 16; j++) { g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; } - #if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) - break; - } - #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); - #endif +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); +#endif } } -void IS31FL3736_init( uint8_t addr ) -{ +void IS31FL3736_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. // Set up the mode and other settings, clear the PWM registers, // then disable software shutdown. // Unlock the command register. - IS31FL3736_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG0 - IS31FL3736_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); + IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); // Turn off all LEDs. - for ( int i = 0x00; i <= 0x17; i++ ) - { - IS31FL3736_write_register( addr, i, 0x00 ); + for (int i = 0x00; i <= 0x17; i++) { + IS31FL3736_write_register(addr, i, 0x00); } // Unlock the command register. - IS31FL3736_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG1 - IS31FL3736_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); // Set PWM on all LEDs to 0 // No need to setup Breath registers to PWM as that is the default. - for ( int i = 0x00; i <= 0xBF; i++ ) - { - IS31FL3736_write_register( addr, i, 0x00 ); + for (int i = 0x00; i <= 0xBF; i++) { + IS31FL3736_write_register(addr, i, 0x00); } // Unlock the command register. - IS31FL3736_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG3 - IS31FL3736_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION ); + IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); // Set global current to maximum. - IS31FL3736_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF ); + IS31FL3736_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); // Disable software shutdown. - IS31FL3736_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 ); + IS31FL3736_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); - // Wait 10ms to ensure the device has woken up. - #ifdef __AVR__ - _delay_ms( 10 ); - #else +// Wait 10ms to ensure the device has woken up. +#ifdef __AVR__ + _delay_ms(10); +#else wait_ms(10); - #endif +#endif } -void IS31FL3736_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) -{ - if ( index >= 0 && index < DRIVER_LED_TOTAL ) { +void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + if (index >= 0 && index < DRIVER_LED_TOTAL) { is31_led led = g_is31_leds[index]; g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; g_pwm_buffer[led.driver][led.b] = blue; - g_pwm_buffer_update_required = true; + g_pwm_buffer_update_required = true; } } -void IS31FL3736_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) -{ - for ( int i = 0; i < DRIVER_LED_TOTAL; i++ ) - { - IS31FL3736_set_color( i, red, green, blue ); +void IS31FL3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + IS31FL3736_set_color(i, red, green, blue); } } -void IS31FL3736_set_led_control_register( uint8_t index, bool red, bool green, bool blue ) -{ +void IS31FL3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { is31_led led = g_is31_leds[index]; // IS31FL3733 @@ -209,64 +195,59 @@ void IS31FL3736_set_led_control_register( uint8_t index, bool red, bool green, b // A1-A4=0x00 A5-A8=0x01 // So, the same math applies. - uint8_t control_register_r = led.r / 8; - uint8_t control_register_g = led.g / 8; - uint8_t control_register_b = led.b / 8; + uint8_t control_register_r = led.r / 8; + uint8_t control_register_g = led.g / 8; + uint8_t control_register_b = led.b / 8; - uint8_t bit_r = led.r % 8; - uint8_t bit_g = led.g % 8; - uint8_t bit_b = led.b % 8; + uint8_t bit_r = led.r % 8; + uint8_t bit_g = led.g % 8; + uint8_t bit_b = led.b % 8; - if ( red ) { + if (red) { g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); } else { g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); } - if ( green ) { + if (green) { g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); } else { g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); } - if ( blue ) { + if (blue) { g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); } else { g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); } g_led_control_registers_update_required = true; - } -void IS31FL3736_mono_set_brightness( int index, uint8_t value ) -{ - if ( index >= 0 && index < 96 ) { - // Index in range 0..95 -> A1..A8, B1..B8, etc. - // Map index 0..95 to registers 0x00..0xBE (interleaved) - uint8_t pwm_register = index * 2; +void IS31FL3736_mono_set_brightness(int index, uint8_t value) { + if (index >= 0 && index < 96) { + // Index in range 0..95 -> A1..A8, B1..B8, etc. + // Map index 0..95 to registers 0x00..0xBE (interleaved) + uint8_t pwm_register = index * 2; g_pwm_buffer[0][pwm_register] = value; - g_pwm_buffer_update_required = true; + g_pwm_buffer_update_required = true; } } -void IS31FL3736_mono_set_brightness_all( uint8_t value ) -{ - for ( int i = 0; i < 96; i++ ) - { - IS31FL3736_mono_set_brightness( i, value ); +void IS31FL3736_mono_set_brightness_all(uint8_t value) { + for (int i = 0; i < 96; i++) { + IS31FL3736_mono_set_brightness(i, value); } } -void IS31FL3736_mono_set_led_control_register( uint8_t index, bool enabled ) -{ - // Index in range 0..95 -> A1..A8, B1..B8, etc. +void IS31FL3736_mono_set_led_control_register(uint8_t index, bool enabled) { + // Index in range 0..95 -> A1..A8, B1..B8, etc. - // Map index 0..95 to registers 0x00..0xBE (interleaved) - uint8_t pwm_register = index * 2; - // Map register 0x00..0xBE (interleaved) into control register and bit - uint8_t control_register = pwm_register / 8; - uint8_t bit = pwm_register % 8; + // Map index 0..95 to registers 0x00..0xBE (interleaved) + uint8_t pwm_register = index * 2; + // Map register 0x00..0xBE (interleaved) into control register and bit + uint8_t control_register = pwm_register / 8; + uint8_t bit = pwm_register % 8; - if ( enabled ) { + if (enabled) { g_led_control_registers[0][control_register] |= (1 << bit); } else { g_led_control_registers[0][control_register] &= ~(1 << bit); @@ -275,32 +256,26 @@ void IS31FL3736_mono_set_led_control_register( uint8_t index, bool enabled ) g_led_control_registers_update_required = true; } -void IS31FL3736_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) -{ - if ( g_pwm_buffer_update_required ) - { +void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { + if (g_pwm_buffer_update_required) { // Firstly we need to unlock the command register and select PG1 - IS31FL3736_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3736_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); - IS31FL3736_write_pwm_buffer( addr1, g_pwm_buffer[0] ); - //IS31FL3736_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + IS31FL3736_write_pwm_buffer(addr1, g_pwm_buffer[0]); + // IS31FL3736_write_pwm_buffer( addr2, g_pwm_buffer[1] ); } g_pwm_buffer_update_required = false; } -void IS31FL3736_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) -{ - if ( g_led_control_registers_update_required ) - { +void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) { + if (g_led_control_registers_update_required) { // Firstly we need to unlock the command register and select PG0 - IS31FL3736_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3736_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); - for ( int i=0; i<24; i++ ) - { - IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i] ); - //IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i] ); + IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); + for (int i = 0; i < 24; i++) { + IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]); + // IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i] ); } } } - diff --git a/drivers/issi/is31fl3736.h b/drivers/issi/is31fl3736.h index cff50fd0d8..e48e31c279 100644 --- a/drivers/issi/is31fl3736.h +++ b/drivers/issi/is31fl3736.h @@ -19,154 +19,150 @@ #include #include - // Simple interface option. // If these aren't defined, just define them to make it compile - #ifndef DRIVER_COUNT -#define DRIVER_COUNT 2 +# define DRIVER_COUNT 2 #endif #ifndef DRIVER_LED_TOTAL -#define DRIVER_LED_TOTAL 96 +# define DRIVER_LED_TOTAL 96 #endif - typedef struct is31_led { - uint8_t driver:2; - uint8_t r; - uint8_t g; - uint8_t b; + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; } __attribute__((packed)) is31_led; extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; -void IS31FL3736_init( uint8_t addr ); -void IS31FL3736_write_register( uint8_t addr, uint8_t reg, uint8_t data ); -void IS31FL3736_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); +void IS31FL3736_init(uint8_t addr); +void IS31FL3736_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); -void IS31FL3736_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); -void IS31FL3736_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); +void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3736_set_led_control_register( uint8_t index, bool red, bool green, bool blue ); +void IS31FL3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue); -void IS31FL3736_mono_set_brightness( int index, uint8_t value ); -void IS31FL3736_mono_set_brightness_all( uint8_t value ); -void IS31FL3736_mono_set_led_control_register( uint8_t index, bool enabled ); +void IS31FL3736_mono_set_brightness(int index, uint8_t value); +void IS31FL3736_mono_set_brightness_all(uint8_t value); +void IS31FL3736_mono_set_led_control_register(uint8_t index, bool enabled); // This should not be called from an interrupt // (eg. from a timer interrupt). // Call this while idle (in between matrix scans). // If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3736_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); -void IS31FL3736_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); +void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2); +void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2); -#define A_1 0x00 -#define A_2 0x02 -#define A_3 0x04 -#define A_4 0x06 -#define A_5 0x08 -#define A_6 0x0A -#define A_7 0x0C -#define A_8 0x0E +#define A_1 0x00 +#define A_2 0x02 +#define A_3 0x04 +#define A_4 0x06 +#define A_5 0x08 +#define A_6 0x0A +#define A_7 0x0C +#define A_8 0x0E -#define B_1 0x10 -#define B_2 0x12 -#define B_3 0x14 -#define B_4 0x16 -#define B_5 0x18 -#define B_6 0x1A -#define B_7 0x1C -#define B_8 0x1E +#define B_1 0x10 +#define B_2 0x12 +#define B_3 0x14 +#define B_4 0x16 +#define B_5 0x18 +#define B_6 0x1A +#define B_7 0x1C +#define B_8 0x1E -#define C_1 0x20 -#define C_2 0x22 -#define C_3 0x24 -#define C_4 0x26 -#define C_5 0x28 -#define C_6 0x2A -#define C_7 0x2C -#define C_8 0x2E +#define C_1 0x20 +#define C_2 0x22 +#define C_3 0x24 +#define C_4 0x26 +#define C_5 0x28 +#define C_6 0x2A +#define C_7 0x2C +#define C_8 0x2E -#define D_1 0x30 -#define D_2 0x32 -#define D_3 0x34 -#define D_4 0x36 -#define D_5 0x38 -#define D_6 0x3A -#define D_7 0x3C -#define D_8 0x3E +#define D_1 0x30 +#define D_2 0x32 +#define D_3 0x34 +#define D_4 0x36 +#define D_5 0x38 +#define D_6 0x3A +#define D_7 0x3C +#define D_8 0x3E -#define E_1 0x40 -#define E_2 0x42 -#define E_3 0x44 -#define E_4 0x46 -#define E_5 0x48 -#define E_6 0x4A -#define E_7 0x4C -#define E_8 0x4E +#define E_1 0x40 +#define E_2 0x42 +#define E_3 0x44 +#define E_4 0x46 +#define E_5 0x48 +#define E_6 0x4A +#define E_7 0x4C +#define E_8 0x4E -#define F_1 0x50 -#define F_2 0x52 -#define F_3 0x54 -#define F_4 0x56 -#define F_5 0x58 -#define F_6 0x5A -#define F_7 0x5C -#define F_8 0x5E +#define F_1 0x50 +#define F_2 0x52 +#define F_3 0x54 +#define F_4 0x56 +#define F_5 0x58 +#define F_6 0x5A +#define F_7 0x5C +#define F_8 0x5E -#define G_1 0x60 -#define G_2 0x62 -#define G_3 0x64 -#define G_4 0x66 -#define G_5 0x68 -#define G_6 0x6A -#define G_7 0x6C -#define G_8 0x6E +#define G_1 0x60 +#define G_2 0x62 +#define G_3 0x64 +#define G_4 0x66 +#define G_5 0x68 +#define G_6 0x6A +#define G_7 0x6C +#define G_8 0x6E -#define H_1 0x70 -#define H_2 0x72 -#define H_3 0x74 -#define H_4 0x76 -#define H_5 0x78 -#define H_6 0x7A -#define H_7 0x7C -#define H_8 0x7E +#define H_1 0x70 +#define H_2 0x72 +#define H_3 0x74 +#define H_4 0x76 +#define H_5 0x78 +#define H_6 0x7A +#define H_7 0x7C +#define H_8 0x7E -#define I_1 0x80 -#define I_2 0x82 -#define I_3 0x84 -#define I_4 0x86 -#define I_5 0x88 -#define I_6 0x8A -#define I_7 0x8C -#define I_8 0x8E +#define I_1 0x80 +#define I_2 0x82 +#define I_3 0x84 +#define I_4 0x86 +#define I_5 0x88 +#define I_6 0x8A +#define I_7 0x8C +#define I_8 0x8E -#define J_1 0x90 -#define J_2 0x92 -#define J_3 0x94 -#define J_4 0x96 -#define J_5 0x98 -#define J_6 0x9A -#define J_7 0x9C -#define J_8 0x9E +#define J_1 0x90 +#define J_2 0x92 +#define J_3 0x94 +#define J_4 0x96 +#define J_5 0x98 +#define J_6 0x9A +#define J_7 0x9C +#define J_8 0x9E -#define K_1 0xA0 -#define K_2 0xA2 -#define K_3 0xA4 -#define K_4 0xA6 -#define K_5 0xA8 -#define K_6 0xAA -#define K_7 0xAC -#define K_8 0xAE - -#define L_1 0xB0 -#define L_2 0xB2 -#define L_3 0xB4 -#define L_4 0xB6 -#define L_5 0xB8 -#define L_6 0xBA -#define L_7 0xBC -#define L_8 0xBE +#define K_1 0xA0 +#define K_2 0xA2 +#define K_3 0xA4 +#define K_4 0xA6 +#define K_5 0xA8 +#define K_6 0xAA +#define K_7 0xAC +#define K_8 0xAE +#define L_1 0xB0 +#define L_2 0xB2 +#define L_3 0xB4 +#define L_4 0xB6 +#define L_5 0xB8 +#define L_6 0xBA +#define L_7 0xBC +#define L_8 0xBE diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c index 6491049274..4cc46272e2 100644 --- a/drivers/issi/is31fl3737.c +++ b/drivers/issi/is31fl3737.c @@ -17,11 +17,11 @@ */ #ifdef __AVR__ -#include -#include -#include +# include +# include +# include #else -#include "wait.h" +# include "wait.h" #endif #include @@ -46,23 +46,23 @@ #define ISSI_INTERRUPTMASKREGISTER 0xF0 #define ISSI_INTERRUPTSTATUSREGISTER 0xF1 -#define ISSI_PAGE_LEDCONTROL 0x00 //PG0 -#define ISSI_PAGE_PWM 0x01 //PG1 -#define ISSI_PAGE_AUTOBREATH 0x02 //PG2 -#define ISSI_PAGE_FUNCTION 0x03 //PG3 +#define ISSI_PAGE_LEDCONTROL 0x00 // PG0 +#define ISSI_PAGE_PWM 0x01 // PG1 +#define ISSI_PAGE_AUTOBREATH 0x02 // PG2 +#define ISSI_PAGE_FUNCTION 0x03 // PG3 -#define ISSI_REG_CONFIGURATION 0x00 //PG3 -#define ISSI_REG_GLOBALCURRENT 0x01 //PG3 -#define ISSI_REG_RESET 0x11// PG3 -#define ISSI_REG_SWPULLUP 0x0F //PG3 -#define ISSI_REG_CSPULLUP 0x10 //PG3 +#define ISSI_REG_CONFIGURATION 0x00 // PG3 +#define ISSI_REG_GLOBALCURRENT 0x01 // PG3 +#define ISSI_REG_RESET 0x11 // PG3 +#define ISSI_REG_SWPULLUP 0x0F // PG3 +#define ISSI_REG_CSPULLUP 0x10 // PG3 #ifndef ISSI_TIMEOUT - #define ISSI_TIMEOUT 100 +# define ISSI_TIMEOUT 100 #endif #ifndef ISSI_PERSISTENCE - #define ISSI_PERSISTENCE 0 +# define ISSI_PERSISTENCE 0 #endif // Transfer buffer for TWITransmitData() @@ -75,178 +75,161 @@ uint8_t g_twi_transfer_buffer[20]; // buffers and the transfers in IS31FL3737_write_pwm_buffer() but it's // probably not worth the extra complexity. uint8_t g_pwm_buffer[DRIVER_COUNT][192]; -bool g_pwm_buffer_update_required = false; +bool g_pwm_buffer_update_required = false; -uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 } }; -bool g_led_control_registers_update_required = false; +uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}}; +bool g_led_control_registers_update_required = false; -void IS31FL3737_write_register( uint8_t addr, uint8_t reg, uint8_t data ) -{ +void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; - #if ISSI_PERSISTENCE > 0 +#if ISSI_PERSISTENCE > 0 for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) - break; + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; } - #else +#else i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); - #endif +#endif } -void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) -{ +void IS31FL3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { // assumes PG1 is already selected // transmit PWM registers in 12 transfers of 16 bytes // g_twi_transfer_buffer[] is 20 bytes // iterate over the pwm_buffer contents at 16 byte intervals - for ( int i = 0; i < 192; i += 16 ) { + for (int i = 0; i < 192; i += 16) { g_twi_transfer_buffer[0] = i; // copy the data from i to i+15 // device will auto-increment register for data after the first byte // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer - for ( int j = 0; j < 16; j++ ) { + for (int j = 0; j < 16; j++) { g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; } - #if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) - break; - } - #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); - #endif +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); +#endif } } -void IS31FL3737_init( uint8_t addr ) -{ +void IS31FL3737_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. // Set up the mode and other settings, clear the PWM registers, // then disable software shutdown. // Unlock the command register. - IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG0 - IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); // Turn off all LEDs. - for ( int i = 0x00; i <= 0x17; i++ ) - { - IS31FL3737_write_register( addr, i, 0x00 ); + for (int i = 0x00; i <= 0x17; i++) { + IS31FL3737_write_register(addr, i, 0x00); } // Unlock the command register. - IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG1 - IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); // Set PWM on all LEDs to 0 // No need to setup Breath registers to PWM as that is the default. - for ( int i = 0x00; i <= 0xBF; i++ ) - { - IS31FL3737_write_register( addr, i, 0x00 ); + for (int i = 0x00; i <= 0xBF; i++) { + IS31FL3737_write_register(addr, i, 0x00); } // Unlock the command register. - IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG3 - IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION ); + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); // Set global current to maximum. - IS31FL3737_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF ); + IS31FL3737_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); // Disable software shutdown. - IS31FL3737_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 ); + IS31FL3737_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); - // Wait 10ms to ensure the device has woken up. - #ifdef __AVR__ - _delay_ms( 10 ); - #else +// Wait 10ms to ensure the device has woken up. +#ifdef __AVR__ + _delay_ms(10); +#else wait_ms(10); - #endif +#endif } -void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) -{ - if ( index >= 0 && index < DRIVER_LED_TOTAL ) { +void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + if (index >= 0 && index < DRIVER_LED_TOTAL) { is31_led led = g_is31_leds[index]; g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; g_pwm_buffer[led.driver][led.b] = blue; - g_pwm_buffer_update_required = true; + g_pwm_buffer_update_required = true; } } -void IS31FL3737_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) -{ - for ( int i = 0; i < DRIVER_LED_TOTAL; i++ ) - { - IS31FL3737_set_color( i, red, green, blue ); +void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + IS31FL3737_set_color(i, red, green, blue); } } -void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, bool blue ) -{ +void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { is31_led led = g_is31_leds[index]; - uint8_t control_register_r = led.r / 8; - uint8_t control_register_g = led.g / 8; - uint8_t control_register_b = led.b / 8; - uint8_t bit_r = led.r % 8; - uint8_t bit_g = led.g % 8; - uint8_t bit_b = led.b % 8; + uint8_t control_register_r = led.r / 8; + uint8_t control_register_g = led.g / 8; + uint8_t control_register_b = led.b / 8; + uint8_t bit_r = led.r % 8; + uint8_t bit_g = led.g % 8; + uint8_t bit_b = led.b % 8; - if ( red ) { + if (red) { g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); } else { g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); } - if ( green ) { + if (green) { g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); } else { g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); } - if ( blue ) { + if (blue) { g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); } else { g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); } g_led_control_registers_update_required = true; - } -void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) -{ - if ( g_pwm_buffer_update_required ) - { +void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { + if (g_pwm_buffer_update_required) { // Firstly we need to unlock the command register and select PG1 - IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); - IS31FL3737_write_pwm_buffer( addr1, g_pwm_buffer[0] ); - //IS31FL3737_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + IS31FL3737_write_pwm_buffer(addr1, g_pwm_buffer[0]); + // IS31FL3737_write_pwm_buffer( addr2, g_pwm_buffer[1] ); } g_pwm_buffer_update_required = false; } -void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) -{ - if ( g_led_control_registers_update_required ) - { +void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) { + if (g_led_control_registers_update_required) { // Firstly we need to unlock the command register and select PG0 - IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); - for ( int i=0; i<24; i++ ) - { - IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i] ); - //IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] ); + IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); + for (int i = 0; i < 24; i++) { + IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]); + // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] ); } } } diff --git a/drivers/issi/is31fl3737.h b/drivers/issi/is31fl3737.h index 69c4b9b538..2c2fb19641 100644 --- a/drivers/issi/is31fl3737.h +++ b/drivers/issi/is31fl3737.h @@ -16,7 +16,6 @@ * along with this program. If not, see . */ - #ifndef IS31FL3737_DRIVER_H #define IS31FL3737_DRIVER_H @@ -24,184 +23,184 @@ #include typedef struct is31_led { - uint8_t driver:2; - uint8_t r; - uint8_t g; - uint8_t b; + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; } __attribute__((packed)) is31_led; extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; -void IS31FL3737_init( uint8_t addr ); -void IS31FL3737_write_register( uint8_t addr, uint8_t reg, uint8_t data ); -void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); +void IS31FL3737_init(uint8_t addr); +void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); -void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); -void IS31FL3737_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); +void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, bool blue ); +void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue); // This should not be called from an interrupt // (eg. from a timer interrupt). // Call this while idle (in between matrix scans). // If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); -void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); +void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2); +void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2); -#define A_1 0x00 -#define A_2 0x01 -#define A_3 0x02 -#define A_4 0x03 -#define A_5 0x04 -#define A_6 0x05 -#define A_7 0x08 -#define A_8 0x09 -#define A_9 0x0A -#define A_10 0x0B -#define A_11 0x0C -#define A_12 0x0D +#define A_1 0x00 +#define A_2 0x01 +#define A_3 0x02 +#define A_4 0x03 +#define A_5 0x04 +#define A_6 0x05 +#define A_7 0x08 +#define A_8 0x09 +#define A_9 0x0A +#define A_10 0x0B +#define A_11 0x0C +#define A_12 0x0D -#define B_1 0x10 -#define B_2 0x11 -#define B_3 0x12 -#define B_4 0x13 -#define B_5 0x14 -#define B_6 0x15 -#define B_7 0x18 -#define B_8 0x19 -#define B_9 0x1A -#define B_10 0x1B -#define B_11 0x1C -#define B_12 0x1D +#define B_1 0x10 +#define B_2 0x11 +#define B_3 0x12 +#define B_4 0x13 +#define B_5 0x14 +#define B_6 0x15 +#define B_7 0x18 +#define B_8 0x19 +#define B_9 0x1A +#define B_10 0x1B +#define B_11 0x1C +#define B_12 0x1D -#define C_1 0x20 -#define C_2 0x21 -#define C_3 0x22 -#define C_4 0x23 -#define C_5 0x24 -#define C_6 0x25 -#define C_7 0x28 -#define C_8 0x29 -#define C_9 0x2A -#define C_10 0x2B -#define C_11 0x2C -#define C_12 0x2D +#define C_1 0x20 +#define C_2 0x21 +#define C_3 0x22 +#define C_4 0x23 +#define C_5 0x24 +#define C_6 0x25 +#define C_7 0x28 +#define C_8 0x29 +#define C_9 0x2A +#define C_10 0x2B +#define C_11 0x2C +#define C_12 0x2D -#define D_1 0x30 -#define D_2 0x31 -#define D_3 0x32 -#define D_4 0x33 -#define D_5 0x34 -#define D_6 0x35 -#define D_7 0x38 -#define D_8 0x39 -#define D_9 0x3A -#define D_10 0x3B -#define D_11 0x3C -#define D_12 0x3D +#define D_1 0x30 +#define D_2 0x31 +#define D_3 0x32 +#define D_4 0x33 +#define D_5 0x34 +#define D_6 0x35 +#define D_7 0x38 +#define D_8 0x39 +#define D_9 0x3A +#define D_10 0x3B +#define D_11 0x3C +#define D_12 0x3D -#define E_1 0x40 -#define E_2 0x41 -#define E_3 0x42 -#define E_4 0x43 -#define E_5 0x44 -#define E_6 0x45 -#define E_7 0x48 -#define E_8 0x49 -#define E_9 0x4A -#define E_10 0x4B -#define E_11 0x4C -#define E_12 0x4D +#define E_1 0x40 +#define E_2 0x41 +#define E_3 0x42 +#define E_4 0x43 +#define E_5 0x44 +#define E_6 0x45 +#define E_7 0x48 +#define E_8 0x49 +#define E_9 0x4A +#define E_10 0x4B +#define E_11 0x4C +#define E_12 0x4D -#define F_1 0x50 -#define F_2 0x51 -#define F_3 0x52 -#define F_4 0x53 -#define F_5 0x54 -#define F_6 0x55 -#define F_7 0x58 -#define F_8 0x59 -#define F_9 0x5A -#define F_10 0x5B -#define F_11 0x5C -#define F_12 0x5D +#define F_1 0x50 +#define F_2 0x51 +#define F_3 0x52 +#define F_4 0x53 +#define F_5 0x54 +#define F_6 0x55 +#define F_7 0x58 +#define F_8 0x59 +#define F_9 0x5A +#define F_10 0x5B +#define F_11 0x5C +#define F_12 0x5D -#define G_1 0x60 -#define G_2 0x61 -#define G_3 0x62 -#define G_4 0x63 -#define G_5 0x64 -#define G_6 0x65 -#define G_7 0x68 -#define G_8 0x69 -#define G_9 0x6A -#define G_10 0x6B -#define G_11 0x6C -#define G_12 0x6D +#define G_1 0x60 +#define G_2 0x61 +#define G_3 0x62 +#define G_4 0x63 +#define G_5 0x64 +#define G_6 0x65 +#define G_7 0x68 +#define G_8 0x69 +#define G_9 0x6A +#define G_10 0x6B +#define G_11 0x6C +#define G_12 0x6D -#define H_1 0x70 -#define H_2 0x71 -#define H_3 0x72 -#define H_4 0x73 -#define H_5 0x74 -#define H_6 0x75 -#define H_7 0x78 -#define H_8 0x79 -#define H_9 0x7A -#define H_10 0x7B -#define H_11 0x7C -#define H_12 0x7D +#define H_1 0x70 +#define H_2 0x71 +#define H_3 0x72 +#define H_4 0x73 +#define H_5 0x74 +#define H_6 0x75 +#define H_7 0x78 +#define H_8 0x79 +#define H_9 0x7A +#define H_10 0x7B +#define H_11 0x7C +#define H_12 0x7D -#define I_1 0x80 -#define I_2 0x81 -#define I_3 0x82 -#define I_4 0x83 -#define I_5 0x84 -#define I_6 0x85 -#define I_7 0x88 -#define I_8 0x89 -#define I_9 0x8A -#define I_10 0x8B -#define I_11 0x8C -#define I_12 0x8D +#define I_1 0x80 +#define I_2 0x81 +#define I_3 0x82 +#define I_4 0x83 +#define I_5 0x84 +#define I_6 0x85 +#define I_7 0x88 +#define I_8 0x89 +#define I_9 0x8A +#define I_10 0x8B +#define I_11 0x8C +#define I_12 0x8D -#define J_1 0x90 -#define J_2 0x91 -#define J_3 0x92 -#define J_4 0x93 -#define J_5 0x94 -#define J_6 0x95 -#define J_7 0x98 -#define J_8 0x99 -#define J_9 0x9A -#define J_10 0x9B -#define J_11 0x9C -#define J_12 0x9D +#define J_1 0x90 +#define J_2 0x91 +#define J_3 0x92 +#define J_4 0x93 +#define J_5 0x94 +#define J_6 0x95 +#define J_7 0x98 +#define J_8 0x99 +#define J_9 0x9A +#define J_10 0x9B +#define J_11 0x9C +#define J_12 0x9D -#define K_1 0xA0 -#define K_2 0xA1 -#define K_3 0xA2 -#define K_4 0xA3 -#define K_5 0xA4 -#define K_6 0xA5 -#define K_7 0xA8 -#define K_8 0xA9 -#define K_9 0xAA -#define K_10 0xAB -#define K_11 0xAC -#define K_12 0xAD +#define K_1 0xA0 +#define K_2 0xA1 +#define K_3 0xA2 +#define K_4 0xA3 +#define K_5 0xA4 +#define K_6 0xA5 +#define K_7 0xA8 +#define K_8 0xA9 +#define K_9 0xAA +#define K_10 0xAB +#define K_11 0xAC +#define K_12 0xAD -#define L_1 0xB0 -#define L_2 0xB1 -#define L_3 0xB2 -#define L_4 0xB3 -#define L_5 0xB4 -#define L_6 0xB5 -#define L_7 0xB8 -#define L_8 0xB9 -#define L_9 0xBA -#define L_10 0xBB -#define L_11 0xBC -#define L_12 0xBD +#define L_1 0xB0 +#define L_2 0xB1 +#define L_3 0xB2 +#define L_4 0xB3 +#define L_5 0xB4 +#define L_6 0xB5 +#define L_7 0xB8 +#define L_8 0xB9 +#define L_9 0xBA +#define L_10 0xBB +#define L_11 0xBC +#define L_12 0xBD -#endif // IS31FL3737_DRIVER_H +#endif // IS31FL3737_DRIVER_H diff --git a/drivers/oled/glcdfont.c b/drivers/oled/glcdfont.c index 8b969057e5..95c5d2ebf4 100644 --- a/drivers/oled/glcdfont.c +++ b/drivers/oled/glcdfont.c @@ -1,240 +1,25 @@ #pragma once #ifdef __AVR__ - #include - #include +# include +# include #elif defined(ESP8266) - #include +# include #else - #define PROGMEM +# define PROGMEM #endif // Helidox 8x6 font with QMK Firmware Logo // Online editor: http://teripom.x0.com/ static const unsigned char font[] PROGMEM = { - 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, 0xA4, 0xA4, 0x9C, 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, - 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0xFC, 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, - 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, - 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, - 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, - 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, - 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, - 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, - 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, - 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 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, 0xF0, 0xF8, 0xFC, 0x3E, - 0x1E, 0x06, 0x01, 0x00, 0x00, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, - 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, - 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, - 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, - 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, - 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, - 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, - 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, - 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, - 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, - 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, - 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, - 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, - 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, - 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F, - 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, - 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, - 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, - 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, - 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C, - 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, - 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, - 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, - 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, - 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 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, 0xA4, 0xA4, 0x9C, 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, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC, 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, 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xF0, 0xF8, 0xFC, 0x3E, + 0x1E, 0x06, 0x01, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F, + 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C, 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index a54f5fadc3..f20f4629aa 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -23,67 +23,66 @@ along with this program. If not, see . #include #if defined(__AVR__) - #include - #include +# include +# include #elif defined(ESP8266) - #include -#else // defined(ESP8266) - #define PROGMEM - #define memcpy_P(des, src, len) memcpy(des, src, len) -#endif // defined(__AVR__) +# include +#else // defined(ESP8266) +# define PROGMEM +# define memcpy_P(des, src, len) memcpy(des, src, len) +#endif // defined(__AVR__) // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf // for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf // Fundamental Commands -#define CONTRAST 0x81 -#define DISPLAY_ALL_ON 0xA5 -#define DISPLAY_ALL_ON_RESUME 0xA4 -#define NORMAL_DISPLAY 0xA6 -#define DISPLAY_ON 0xAF -#define DISPLAY_OFF 0xAE -#define NOP 0xE3 +#define CONTRAST 0x81 +#define DISPLAY_ALL_ON 0xA5 +#define DISPLAY_ALL_ON_RESUME 0xA4 +#define NORMAL_DISPLAY 0xA6 +#define DISPLAY_ON 0xAF +#define DISPLAY_OFF 0xAE +#define NOP 0xE3 // Scrolling Commands -#define ACTIVATE_SCROLL 0x2F -#define DEACTIVATE_SCROLL 0x2E -#define SCROLL_RIGHT 0x26 -#define SCROLL_LEFT 0x27 -#define SCROLL_RIGHT_UP 0x29 -#define SCROLL_LEFT_UP 0x2A +#define ACTIVATE_SCROLL 0x2F +#define DEACTIVATE_SCROLL 0x2E +#define SCROLL_RIGHT 0x26 +#define SCROLL_LEFT 0x27 +#define SCROLL_RIGHT_UP 0x29 +#define SCROLL_LEFT_UP 0x2A // Addressing Setting Commands -#define MEMORY_MODE 0x20 -#define COLUMN_ADDR 0x21 -#define PAGE_ADDR 0x22 -#define PAM_SETCOLUMN_LSB 0x00 -#define PAM_SETCOLUMN_MSB 0x10 -#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7 +#define MEMORY_MODE 0x20 +#define COLUMN_ADDR 0x21 +#define PAGE_ADDR 0x22 +#define PAM_SETCOLUMN_LSB 0x00 +#define PAM_SETCOLUMN_MSB 0x10 +#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7 // Hardware Configuration Commands -#define DISPLAY_START_LINE 0x40 -#define SEGMENT_REMAP 0xA0 -#define SEGMENT_REMAP_INV 0xA1 -#define MULTIPLEX_RATIO 0xA8 -#define COM_SCAN_INC 0xC0 -#define COM_SCAN_DEC 0xC8 -#define DISPLAY_OFFSET 0xD3 -#define COM_PINS 0xDA -#define COM_PINS_SEQ 0x02 -#define COM_PINS_ALT 0x12 -#define COM_PINS_SEQ_LR 0x22 -#define COM_PINS_ALT_LR 0x32 +#define DISPLAY_START_LINE 0x40 +#define SEGMENT_REMAP 0xA0 +#define SEGMENT_REMAP_INV 0xA1 +#define MULTIPLEX_RATIO 0xA8 +#define COM_SCAN_INC 0xC0 +#define COM_SCAN_DEC 0xC8 +#define DISPLAY_OFFSET 0xD3 +#define COM_PINS 0xDA +#define COM_PINS_SEQ 0x02 +#define COM_PINS_ALT 0x12 +#define COM_PINS_SEQ_LR 0x22 +#define COM_PINS_ALT_LR 0x32 // Timing & Driving Commands -#define DISPLAY_CLOCK 0xD5 -#define PRE_CHARGE_PERIOD 0xD9 -#define VCOM_DETECT 0xDB +#define DISPLAY_CLOCK 0xD5 +#define PRE_CHARGE_PERIOD 0xD9 +#define VCOM_DETECT 0xDB // Charge Pump Commands -#define CHARGE_PUMP 0x8D +#define CHARGE_PUMP 0x8D // Misc defines -#define OLED_TIMEOUT 60000 #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) @@ -91,12 +90,12 @@ along with this program. If not, see . #define I2C_CMD 0x00 #define I2C_DATA 0x40 #if defined(__AVR__) - // already defined on ARM - #define I2C_TIMEOUT 100 - #define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) -#else // defined(__AVR__) - #define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) -#endif // defined(__AVR__) +// already defined on ARM +# define I2C_TIMEOUT 100 +# define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) +#else // defined(__AVR__) +# define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) +#endif // defined(__AVR__) #define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) #define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, I2C_TIMEOUT) @@ -106,16 +105,19 @@ along with this program. If not, see . // this is so we don't end up with rounding errors with // parts of the display unusable or don't get cleared correctly // and also allows for drawing & inverting -uint8_t oled_buffer[OLED_MATRIX_SIZE]; -uint8_t* oled_cursor; -OLED_BLOCK_TYPE oled_dirty = 0; -bool oled_initialized = false; -bool oled_active = false; -bool oled_scrolling = false; -uint8_t oled_rotation = 0; -uint8_t oled_rotation_width = 0; -#if !defined(OLED_DISABLE_TIMEOUT) - uint16_t oled_last_activity; +uint8_t oled_buffer[OLED_MATRIX_SIZE]; +uint8_t * oled_cursor; +OLED_BLOCK_TYPE oled_dirty = 0; +bool oled_initialized = false; +bool oled_active = false; +bool oled_scrolling = false; +uint8_t oled_rotation = 0; +uint8_t oled_rotation_width = 0; +#if OLED_TIMEOUT > 0 +uint32_t oled_timeout; +#endif +#if OLED_SCROLL_TIMEOUT > 0 +uint32_t oled_scroll_timeout; #endif // Internal variables to reduce math instructions @@ -123,438 +125,464 @@ uint8_t oled_rotation_width = 0; #if defined(__AVR__) // identical to i2c_transmit, but for PROGMEM since all initialization is in PROGMEM arrays currently // probably should move this into i2c_master... -static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); +static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t *data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); - for (uint16_t i = 0; i < length && status >= 0; i++) { - status = i2c_write(pgm_read_byte((const char*)data++), timeout); - if (status) break; - } + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(pgm_read_byte((const char *)data++), timeout); + if (status) break; + } - i2c_stop(); + i2c_stop(); - return status; + return status; } #endif // Flips the rendering bits for a character at the current cursor position -static void InvertCharacter(uint8_t *cursor) -{ - const uint8_t *end = cursor + OLED_FONT_WIDTH; - while (cursor < end) { - *cursor = ~(*cursor); - cursor++; - } +static void InvertCharacter(uint8_t *cursor) { + const uint8_t *end = cursor + OLED_FONT_WIDTH; + while (cursor < end) { + *cursor = ~(*cursor); + cursor++; + } } bool oled_init(uint8_t rotation) { - oled_rotation = oled_init_user(rotation); - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - oled_rotation_width = OLED_DISPLAY_WIDTH; - } else { - oled_rotation_width = OLED_DISPLAY_HEIGHT; - } - i2c_init(); + oled_rotation = oled_init_user(rotation); + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + oled_rotation_width = OLED_DISPLAY_WIDTH; + } else { + oled_rotation_width = OLED_DISPLAY_HEIGHT; + } + i2c_init(); - static const uint8_t PROGMEM display_setup1[] = { - I2C_CMD, - DISPLAY_OFF, - DISPLAY_CLOCK, 0x80, - MULTIPLEX_RATIO, OLED_DISPLAY_HEIGHT - 1, - DISPLAY_OFFSET, 0x00, - DISPLAY_START_LINE | 0x00, - CHARGE_PUMP, 0x14, + static const uint8_t PROGMEM display_setup1[] = { + I2C_CMD, + DISPLAY_OFF, + DISPLAY_CLOCK, + 0x80, + MULTIPLEX_RATIO, + OLED_DISPLAY_HEIGHT - 1, + DISPLAY_OFFSET, + 0x00, + DISPLAY_START_LINE | 0x00, + CHARGE_PUMP, + 0x14, #if (OLED_IC != OLED_IC_SH1106) - // MEMORY_MODE is unsupported on SH1106 (Page Addressing only) - MEMORY_MODE, 0x00, // Horizontal addressing mode + // MEMORY_MODE is unsupported on SH1106 (Page Addressing only) + MEMORY_MODE, + 0x00, // Horizontal addressing mode #endif - }; - if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) { - print("oled_init cmd set 1 failed\n"); - return false; - } - - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) { - static const uint8_t PROGMEM display_normal[] = { - I2C_CMD, - SEGMENT_REMAP_INV, - COM_SCAN_DEC }; - if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) { - print("oled_init cmd normal rotation failed\n"); - return false; + }; + if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) { + print("oled_init cmd set 1 failed\n"); + return false; } - } else { - static const uint8_t PROGMEM display_flipped[] = { - I2C_CMD, - SEGMENT_REMAP, - COM_SCAN_INC }; - if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) { - print("display_flipped failed\n"); - return false; + + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) { + static const uint8_t PROGMEM display_normal[] = {I2C_CMD, SEGMENT_REMAP_INV, COM_SCAN_DEC}; + if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) { + print("oled_init cmd normal rotation failed\n"); + return false; + } + } else { + static const uint8_t PROGMEM display_flipped[] = {I2C_CMD, SEGMENT_REMAP, COM_SCAN_INC}; + if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) { + print("display_flipped failed\n"); + return false; + } } - } - static const uint8_t PROGMEM display_setup2[] = { - I2C_CMD, - COM_PINS, OLED_COM_PINS, - CONTRAST, 0x8F, - PRE_CHARGE_PERIOD, 0xF1, - VCOM_DETECT, 0x40, - DISPLAY_ALL_ON_RESUME, - NORMAL_DISPLAY, - DEACTIVATE_SCROLL, - DISPLAY_ON }; - if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) { - print("display_setup2 failed\n"); - return false; - } + static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, 0x8F, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x40, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON}; + if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) { + print("display_setup2 failed\n"); + return false; + } - oled_clear(); - oled_initialized = true; - oled_active = true; - oled_scrolling = false; - return true; +#if OLED_TIMEOUT > 0 + oled_timeout = timer_read32() + OLED_TIMEOUT; +#endif +#if OLED_SCROLL_TIMEOUT > 0 + oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; +#endif + + oled_clear(); + oled_initialized = true; + oled_active = true; + oled_scrolling = false; + return true; } -__attribute__((weak)) -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return rotation; -} +__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } void oled_clear(void) { - memset(oled_buffer, 0, sizeof(oled_buffer)); - oled_cursor = &oled_buffer[0]; - oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type + memset(oled_buffer, 0, sizeof(oled_buffer)); + oled_cursor = &oled_buffer[0]; + oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type } -static void calc_bounds(uint8_t update_start, uint8_t* cmd_array) -{ - // Calculate commands to set memory addressing bounds. - uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; - uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; +static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) { + // Calculate commands to set memory addressing bounds. + uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; + uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; #if (OLED_IC == OLED_IC_SH1106) - // Commands for Page Addressing Mode. Sets starting page and column; has no end bound. - // Column value must be split into high and low nybble and sent as two commands. - cmd_array[0] = PAM_PAGE_ADDR | start_page; - cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f); - cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f); - cmd_array[3] = NOP; - cmd_array[4] = NOP; - cmd_array[5] = NOP; + // Commands for Page Addressing Mode. Sets starting page and column; has no end bound. + // Column value must be split into high and low nybble and sent as two commands. + cmd_array[0] = PAM_PAGE_ADDR | start_page; + cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f); + cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f); + cmd_array[3] = NOP; + cmd_array[4] = NOP; + cmd_array[5] = NOP; #else - // Commands for use in Horizontal Addressing mode. - cmd_array[1] = start_column; - cmd_array[4] = start_page; - cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1]; - cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1; + // Commands for use in Horizontal Addressing mode. + cmd_array[1] = start_column; + cmd_array[4] = start_page; + cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1]; + cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1; #endif } -static void calc_bounds_90(uint8_t update_start, uint8_t* cmd_array) -{ - cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8; - cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT; - cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1];; - cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8; +static void calc_bounds_90(uint8_t update_start, uint8_t *cmd_array) { + cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8; + cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT; + cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1]; + ; + cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8; } -uint8_t crot(uint8_t a, int8_t n) -{ - const uint8_t mask = 0x7; - n &= mask; - return a << n | a >> (-n & mask); +uint8_t crot(uint8_t a, int8_t n) { + const uint8_t mask = 0x7; + n &= mask; + return a << n | a >> (-n & mask); } -static void rotate_90(const uint8_t* src, uint8_t* dest) -{ - for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) { - uint8_t selector = (1 << i); - for (uint8_t j = 0; j < 8; ++j) { - dest[i] |= crot(src[j] & selector, shift - (int8_t)j); +static void rotate_90(const uint8_t *src, uint8_t *dest) { + for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) { + uint8_t selector = (1 << i); + for (uint8_t j = 0; j < 8; ++j) { + dest[i] |= crot(src[j] & selector, shift - (int8_t)j); + } } - } } void oled_render(void) { - // Do we have work to do? - if (!oled_dirty || oled_scrolling) { - return; - } - - // Find first dirty block - uint8_t update_start = 0; - while (!(oled_dirty & (1 << update_start))) { ++update_start; } - - // Set column & page position - static uint8_t display_start[] = { - I2C_CMD, - COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1, - PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1 }; - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start - } else { - calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start - } - - // Send column & page position - if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) { - print("oled_render offset command failed\n"); - return; - } - - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - // Send render data chunk as is - if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { - print("oled_render data failed\n"); - return; - } - } else { - // Rotate the render chunks - const static uint8_t source_map[] = OLED_SOURCE_MAP; - const static uint8_t target_map[] = OLED_TARGET_MAP; - - static uint8_t temp_buffer[OLED_BLOCK_SIZE]; - memset(temp_buffer, 0, sizeof(temp_buffer)); - for(uint8_t i = 0; i < sizeof(source_map); ++i) { - rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]); + // Do we have work to do? + if (!oled_dirty || oled_scrolling) { + return; } - // Send render data chunk after rotating - if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { - print("oled_render data failed\n"); - return; + // Find first dirty block + uint8_t update_start = 0; + while (!(oled_dirty & (1 << update_start))) { + ++update_start; } - } - // Turn on display if it is off - oled_on(); + // Set column & page position + static uint8_t display_start[] = {I2C_CMD, COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1, PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1}; + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start + } else { + calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start + } - // Clear dirty flag - oled_dirty &= ~(1 << update_start); + // Send column & page position + if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) { + print("oled_render offset command failed\n"); + return; + } + + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + // Send render data chunk as is + if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { + print("oled_render data failed\n"); + return; + } + } else { + // Rotate the render chunks + const static uint8_t source_map[] = OLED_SOURCE_MAP; + const static uint8_t target_map[] = OLED_TARGET_MAP; + + static uint8_t temp_buffer[OLED_BLOCK_SIZE]; + memset(temp_buffer, 0, sizeof(temp_buffer)); + for (uint8_t i = 0; i < sizeof(source_map); ++i) { + rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]); + } + + // Send render data chunk after rotating + if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { + print("oled_render90 data failed\n"); + return; + } + } + + // Turn on display if it is off + oled_on(); + + // Clear dirty flag + oled_dirty &= ~(1 << update_start); } void oled_set_cursor(uint8_t col, uint8_t line) { - uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH; + uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH; - // Out of bounds? - if (index >= OLED_MATRIX_SIZE) { - index = 0; - } + // Out of bounds? + if (index >= OLED_MATRIX_SIZE) { + index = 0; + } - oled_cursor = &oled_buffer[index]; + oled_cursor = &oled_buffer[index]; } void oled_advance_page(bool clearPageRemainder) { - uint16_t index = oled_cursor - &oled_buffer[0]; - uint8_t remaining = oled_rotation_width - (index % oled_rotation_width); + uint16_t index = oled_cursor - &oled_buffer[0]; + uint8_t remaining = oled_rotation_width - (index % oled_rotation_width); - if (clearPageRemainder) { - // Remaining Char count - remaining = remaining / OLED_FONT_WIDTH; + if (clearPageRemainder) { + // Remaining Char count + remaining = remaining / OLED_FONT_WIDTH; - // Write empty character until next line - while (remaining--) - oled_write_char(' ', false); - } else { - // Next page index out of bounds? - if (index + remaining >= OLED_MATRIX_SIZE) { - index = 0; - remaining = 0; + // Write empty character until next line + while (remaining--) oled_write_char(' ', false); + } else { + // Next page index out of bounds? + if (index + remaining >= OLED_MATRIX_SIZE) { + index = 0; + remaining = 0; + } + + oled_cursor = &oled_buffer[index + remaining]; } - - oled_cursor = &oled_buffer[index + remaining]; - } } void oled_advance_char(void) { - uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH; - uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width); + uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH; + uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width); - // Do we have enough space on the current line for the next character - if (remainingSpace < OLED_FONT_WIDTH) { - nextIndex += remainingSpace; - } + // Do we have enough space on the current line for the next character + if (remainingSpace < OLED_FONT_WIDTH) { + nextIndex += remainingSpace; + } - // Did we go out of bounds - if (nextIndex >= OLED_MATRIX_SIZE) { - nextIndex = 0; - } + // Did we go out of bounds + if (nextIndex >= OLED_MATRIX_SIZE) { + nextIndex = 0; + } - // Update cursor position - oled_cursor = &oled_buffer[nextIndex]; + // Update cursor position + oled_cursor = &oled_buffer[nextIndex]; } // Main handler that writes character data to the display buffer void oled_write_char(const char data, bool invert) { - // Advance to the next line if newline - if (data == '\n') { - // Old source wrote ' ' until end of line... - oled_advance_page(true); - return; - } + // Advance to the next line if newline + if (data == '\n') { + // Old source wrote ' ' until end of line... + oled_advance_page(true); + return; + } - // copy the current render buffer to check for dirty after - static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; - memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); + if (data == '\r') { + oled_advance_page(false); + return; + } - // set the reder buffer data - uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index - if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) { - memset(oled_cursor, 0x00, OLED_FONT_WIDTH); - } else { - const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH]; - memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH); - } + // copy the current render buffer to check for dirty after + static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; + memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); - // Invert if needed - if (invert) { - InvertCharacter(oled_cursor); - } + // set the reder buffer data + uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index + if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) { + memset(oled_cursor, 0x00, OLED_FONT_WIDTH); + } else { + const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH]; + memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH); + } - // Dirty check - if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { - uint16_t index = oled_cursor - &oled_buffer[0]; - oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); - // Edgecase check if the written data spans the 2 chunks - oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE)); - } + // Invert if needed + if (invert) { + InvertCharacter(oled_cursor); + } - // Finally move to the next char - oled_advance_char(); + // Dirty check + if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { + uint16_t index = oled_cursor - &oled_buffer[0]; + oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); + // Edgecase check if the written data spans the 2 chunks + oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE)); + } + + // Finally move to the next char + oled_advance_char(); } void oled_write(const char *data, bool invert) { - const char *end = data + strlen(data); - while (data < end) { - oled_write_char(*data, invert); - data++; - } + const char *end = data + strlen(data); + while (data < end) { + oled_write_char(*data, invert); + data++; + } } void oled_write_ln(const char *data, bool invert) { - oled_write(data, invert); - oled_advance_page(true); + oled_write(data, invert); + oled_advance_page(true); +} + +void oled_write_raw(const char *data, uint16_t size) { + if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE; + for (uint16_t i = 0; i < size; i++) { + if (oled_buffer[i] == data[i]) continue; + oled_buffer[i] = data[i]; + oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); + } } #if defined(__AVR__) void oled_write_P(const char *data, bool invert) { - uint8_t c = pgm_read_byte(data); - while (c != 0) { - oled_write_char(c, invert); - c = pgm_read_byte(++data); - } + uint8_t c = pgm_read_byte(data); + while (c != 0) { + oled_write_char(c, invert); + c = pgm_read_byte(++data); + } } void oled_write_ln_P(const char *data, bool invert) { - oled_write_P(data, invert); - oled_advance_page(true); + oled_write_P(data, invert); + oled_advance_page(true); } -#endif // defined(__AVR__) + +void oled_write_raw_P(const char *data, uint16_t size) { + if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE; + for (uint16_t i = 0; i < size; i++) { + uint8_t c = pgm_read_byte(++data); + if (oled_buffer[i] == c) continue; + oled_buffer[i] = c; + oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); + } +} +#endif // defined(__AVR__) bool oled_on(void) { -#if !defined(OLED_DISABLE_TIMEOUT) - oled_last_activity = timer_read(); +#if OLED_TIMEOUT > 0 + oled_timeout = timer_read32() + OLED_TIMEOUT; #endif - static const uint8_t PROGMEM display_on[] = { I2C_CMD, DISPLAY_ON }; - if (!oled_active) { - if (I2C_TRANSMIT_P(display_on) != I2C_STATUS_SUCCESS) { - print("oled_on cmd failed\n"); - return oled_active; + static const uint8_t PROGMEM display_on[] = {I2C_CMD, DISPLAY_ON}; + if (!oled_active) { + if (I2C_TRANSMIT_P(display_on) != I2C_STATUS_SUCCESS) { + print("oled_on cmd failed\n"); + return oled_active; + } + oled_active = true; } - oled_active = true; - } - return oled_active; + return oled_active; } bool oled_off(void) { - static const uint8_t PROGMEM display_off[] = { I2C_CMD, DISPLAY_OFF }; - if (oled_active) { - if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) { - print("oled_off cmd failed\n"); - return oled_active; + static const uint8_t PROGMEM display_off[] = {I2C_CMD, DISPLAY_OFF}; + if (oled_active) { + if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) { + print("oled_off cmd failed\n"); + return oled_active; + } + oled_active = false; } - oled_active = false; - } - return !oled_active; + return !oled_active; } bool oled_scroll_right(void) { - // Dont enable scrolling if we need to update the display - // This prevents scrolling of bad data from starting the scroll too early after init - if (!oled_dirty && !oled_scrolling) { - static const uint8_t PROGMEM display_scroll_right[] = { - I2C_CMD, SCROLL_RIGHT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL }; - if (I2C_TRANSMIT_P(display_scroll_right) != I2C_STATUS_SUCCESS) { - print("oled_scroll_right cmd failed\n"); - return oled_scrolling; + // Dont enable scrolling if we need to update the display + // This prevents scrolling of bad data from starting the scroll too early after init + if (!oled_dirty && !oled_scrolling) { + static const uint8_t PROGMEM display_scroll_right[] = {I2C_CMD, SCROLL_RIGHT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL}; + if (I2C_TRANSMIT_P(display_scroll_right) != I2C_STATUS_SUCCESS) { + print("oled_scroll_right cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = true; } - oled_scrolling = true; - } - return oled_scrolling; + return oled_scrolling; } bool oled_scroll_left(void) { - // Dont enable scrolling if we need to update the display - // This prevents scrolling of bad data from starting the scroll too early after init - if (!oled_dirty && !oled_scrolling) { - static const uint8_t PROGMEM display_scroll_left[] = { - I2C_CMD, SCROLL_LEFT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL }; - if (I2C_TRANSMIT_P(display_scroll_left) != I2C_STATUS_SUCCESS) { - print("oled_scroll_left cmd failed\n"); - return oled_scrolling; + // Dont enable scrolling if we need to update the display + // This prevents scrolling of bad data from starting the scroll too early after init + if (!oled_dirty && !oled_scrolling) { + static const uint8_t PROGMEM display_scroll_left[] = {I2C_CMD, SCROLL_LEFT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL}; + if (I2C_TRANSMIT_P(display_scroll_left) != I2C_STATUS_SUCCESS) { + print("oled_scroll_left cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = true; } - oled_scrolling = true; - } - return oled_scrolling; + return oled_scrolling; } bool oled_scroll_off(void) { - if (oled_scrolling) { - static const uint8_t PROGMEM display_scroll_off[] = { I2C_CMD, DEACTIVATE_SCROLL }; - if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) { - print("oled_scroll_off cmd failed\n"); - return oled_scrolling; + if (oled_scrolling) { + static const uint8_t PROGMEM display_scroll_off[] = {I2C_CMD, DEACTIVATE_SCROLL}; + if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) { + print("oled_scroll_off cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = false; + oled_dirty = -1; } - oled_scrolling = false; - } - return !oled_scrolling; + return !oled_scrolling; } uint8_t oled_max_chars(void) { - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH; - } - return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH; + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH; + } + return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH; } uint8_t oled_max_lines(void) { - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT; - } - return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT; + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT; + } + return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT; } void oled_task(void) { - if (!oled_initialized) { - return; - } + if (!oled_initialized) { + return; + } - oled_set_cursor(0, 0); + oled_set_cursor(0, 0); - oled_task_user(); + oled_task_user(); - // Smart render system, no need to check for dirty - oled_render(); +#if OLED_SCROLL_TIMEOUT > 0 + if (oled_dirty && oled_scrolling) { + oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; + oled_scroll_off(); + } +#endif - // Display timeout check -#if !defined(OLED_DISABLE_TIMEOUT) - if (oled_active && timer_elapsed(oled_last_activity) > OLED_TIMEOUT) { - oled_off(); - } + // Smart render system, no need to check for dirty + oled_render(); + + // Display timeout check +#if OLED_TIMEOUT > 0 + if (oled_active && timer_expired32(timer_read32(), oled_timeout)) { + oled_off(); + } +#endif + +#if OLED_SCROLL_TIMEOUT > 0 + if (!oled_scrolling && timer_expired32(timer_read32(), oled_scroll_timeout)) { +# ifdef OLED_SCROLL_TIMEOUT_RIGHT + oled_scroll_right(); +# else + oled_scroll_left(); +# endif + } #endif } -__attribute__((weak)) -void oled_task_user(void) { -} +__attribute__((weak)) void oled_task_user(void) {} \ No newline at end of file diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 03dda2e64a..bba6a7a129 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -21,121 +21,133 @@ along with this program. If not, see . // an enumeration of the chips this driver supports #define OLED_IC_SSD1306 0 -#define OLED_IC_SH1106 1 +#define OLED_IC_SH1106 1 #if defined(OLED_DISPLAY_CUSTOM) - // Expected user to implement the necessary defines +// Expected user to implement the necessary defines #elif defined(OLED_DISPLAY_128X64) - // Double height 128x64 -#ifndef OLED_DISPLAY_WIDTH - #define OLED_DISPLAY_WIDTH 128 -#endif -#ifndef OLED_DISPLAY_HEIGHT - #define OLED_DISPLAY_HEIGHT 64 -#endif -#ifndef OLED_MATRIX_SIZE - #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 1024 (compile time mathed) -#endif -#ifndef OLED_BLOCK_TYPE - #define OLED_BLOCK_TYPE uint16_t -#endif -#ifndef OLED_BLOCK_COUNT - #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 32 (compile time mathed) -#endif -#ifndef OLED_BLOCK_SIZE - #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) -#endif -#ifndef OLED_COM_PINS - #define OLED_COM_PINS COM_PINS_ALT -#endif +// Double height 128x64 +# ifndef OLED_DISPLAY_WIDTH +# define OLED_DISPLAY_WIDTH 128 +# endif +# ifndef OLED_DISPLAY_HEIGHT +# define OLED_DISPLAY_HEIGHT 64 +# endif +# ifndef OLED_MATRIX_SIZE +# define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 1024 (compile time mathed) +# endif +# ifndef OLED_BLOCK_TYPE +# define OLED_BLOCK_TYPE uint16_t +# endif +# ifndef OLED_BLOCK_COUNT +# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 32 (compile time mathed) +# endif +# ifndef OLED_BLOCK_SIZE +# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) +# endif +# ifndef OLED_COM_PINS +# define OLED_COM_PINS COM_PINS_ALT +# endif - // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays - // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode -#ifndef OLED_SOURCE_MAP - #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } -#endif -#ifndef OLED_TARGET_MAP - #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 } -#endif - // If OLED_BLOCK_TYPE is uint32_t, these tables would look like: - // #define OLED_SOURCE_MAP { 32, 40, 48, 56 } - // #define OLED_TARGET_MAP { 24, 16, 8, 0 } - // If OLED_BLOCK_TYPE is uint16_t, these tables would look like: - // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } - // #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 } - // If OLED_BLOCK_TYPE is uint8_t, these tables would look like: - // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 } - // #define OLED_TARGET_MAP { 56, 120, 48, 112, 40, 104, 32, 96, 24, 88, 16, 80, 8, 72, 0, 64 } -#else // defined(OLED_DISPLAY_128X64) - // Default 128x32 -#ifndef OLED_DISPLAY_WIDTH - #define OLED_DISPLAY_WIDTH 128 -#endif -#ifndef OLED_DISPLAY_HEIGHT - #define OLED_DISPLAY_HEIGHT 32 -#endif -#ifndef OLED_MATRIX_SIZE - #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 512 (compile time mathed) -#endif -#ifndef OLED_BLOCK_TYPE - #define OLED_BLOCK_TYPE uint16_t // Type to use for segmenting the oled display for smart rendering, use unsigned types only -#endif -#ifndef OLED_BLOCK_COUNT - #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 16 (compile time mathed) -#endif -#ifndef OLED_BLOCK_SIZE - #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) -#endif -#ifndef OLED_COM_PINS - #define OLED_COM_PINS COM_PINS_SEQ -#endif +// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays +// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode +# ifndef OLED_SOURCE_MAP +# define OLED_SOURCE_MAP \ + { 0, 8, 16, 24, 32, 40, 48, 56 } +# endif +# ifndef OLED_TARGET_MAP +# define OLED_TARGET_MAP \ + { 56, 48, 40, 32, 24, 16, 8, 0 } +# endif +// If OLED_BLOCK_TYPE is uint32_t, these tables would look like: +// #define OLED_SOURCE_MAP { 32, 40, 48, 56 } +// #define OLED_TARGET_MAP { 24, 16, 8, 0 } +// If OLED_BLOCK_TYPE is uint16_t, these tables would look like: +// #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } +// #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 } +// If OLED_BLOCK_TYPE is uint8_t, these tables would look like: +// #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 } +// #define OLED_TARGET_MAP { 56, 120, 48, 112, 40, 104, 32, 96, 24, 88, 16, 80, 8, 72, 0, 64 } +#else // defined(OLED_DISPLAY_128X64) +// Default 128x32 +# ifndef OLED_DISPLAY_WIDTH +# define OLED_DISPLAY_WIDTH 128 +# endif +# ifndef OLED_DISPLAY_HEIGHT +# define OLED_DISPLAY_HEIGHT 32 +# endif +# ifndef OLED_MATRIX_SIZE +# define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 512 (compile time mathed) +# endif +# ifndef OLED_BLOCK_TYPE +# define OLED_BLOCK_TYPE uint16_t // Type to use for segmenting the oled display for smart rendering, use unsigned types only +# endif +# ifndef OLED_BLOCK_COUNT +# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 16 (compile time mathed) +# endif +# ifndef OLED_BLOCK_SIZE +# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) +# endif +# ifndef OLED_COM_PINS +# define OLED_COM_PINS COM_PINS_SEQ +# endif - // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays - // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode -#ifndef OLED_SOURCE_MAP - #define OLED_SOURCE_MAP { 0, 8, 16, 24 } -#endif -#ifndef OLED_TARGET_MAP - #define OLED_TARGET_MAP { 24, 16, 8, 0 } -#endif - // If OLED_BLOCK_TYPE is uint8_t, these tables would look like: - // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } - // #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 } -#endif // defined(OLED_DISPLAY_CUSTOM) +// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays +// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode +# ifndef OLED_SOURCE_MAP +# define OLED_SOURCE_MAP \ + { 0, 8, 16, 24 } +# endif +# ifndef OLED_TARGET_MAP +# define OLED_TARGET_MAP \ + { 24, 16, 8, 0 } +# endif +// If OLED_BLOCK_TYPE is uint8_t, these tables would look like: +// #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } +// #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 } +#endif // defined(OLED_DISPLAY_CUSTOM) #if !defined(OLED_IC) - #define OLED_IC OLED_IC_SSD1306 +# define OLED_IC OLED_IC_SSD1306 #endif // the column address corresponding to the first column in the display hardware #if !defined(OLED_COLUMN_OFFSET) - #define OLED_COLUMN_OFFSET 0 +# define OLED_COLUMN_OFFSET 0 #endif // Address to use for the i2c oled communication #if !defined(OLED_DISPLAY_ADDRESS) - #define OLED_DISPLAY_ADDRESS 0x3C +# define OLED_DISPLAY_ADDRESS 0x3C #endif // Custom font file to use #if !defined(OLED_FONT_H) - #define OLED_FONT_H "glcdfont.c" +# define OLED_FONT_H "glcdfont.c" #endif // unsigned char value of the first character in the font file #if !defined(OLED_FONT_START) - #define OLED_FONT_START 0 +# define OLED_FONT_START 0 #endif // unsigned char value of the last character in the font file #if !defined(OLED_FONT_END) - #define OLED_FONT_END 224 +# define OLED_FONT_END 224 #endif // Font render width #if !defined(OLED_FONT_WIDTH) - #define OLED_FONT_WIDTH 6 +# define OLED_FONT_WIDTH 6 #endif // Font render height #if !defined(OLED_FONT_HEIGHT) - #define OLED_FONT_HEIGHT 8 +# define OLED_FONT_HEIGHT 8 +#endif + +#if !defined(OLED_TIMEOUT) +# if defined(OLED_DISABLE_TIMEOUT) +# define OLED_TIMEOUT 0 +# else +# define OLED_TIMEOUT 60000 +# endif #endif // OLED Rotation enum values are flags @@ -143,7 +155,7 @@ typedef enum { OLED_ROTATION_0 = 0, OLED_ROTATION_90 = 1, OLED_ROTATION_180 = 2, - OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 + OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 } oled_rotation_t; // Initialize the oled display, rotating the rendered output based on the define passed in. @@ -188,6 +200,8 @@ void oled_write(const char *data, bool invert); // Advances the cursor to the next page, wiring ' ' to the remainder of the current page void oled_write_ln(const char *data, bool invert); +void oled_write_raw(const char *data, uint16_t size); + #if defined(__AVR__) // Writes a PROGMEM string to the buffer at current cursor position // Advances the cursor while writing, inverts the pixels if true @@ -199,16 +213,18 @@ void oled_write_P(const char *data, bool invert); // Advances the cursor to the next page, wiring ' ' to the remainder of the current page // Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM void oled_write_ln_P(const char *data, bool invert); -#else - // Writes a string to the buffer at current cursor position - // Advances the cursor while writing, inverts the pixels if true - #define oled_write_P(data, invert) oled_write(data, invert) - // Writes a string to the buffer at current cursor position - // Advances the cursor while writing, inverts the pixels if true - // Advances the cursor to the next page, wiring ' ' to the remainder of the current page - #define oled_write_ln_P(data, invert) oled_write(data, invert) -#endif // defined(__AVR__) +void oled_write_raw_P(const char *data, uint16_t size); +#else +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +# define oled_write_P(data, invert) oled_write(data, invert) + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +# define oled_write_ln_P(data, invert) oled_write(data, invert) +#endif // defined(__AVR__) // Can be used to manually turn on the screen if it is off // Returns true if the screen was on or turns on @@ -242,4 +258,4 @@ bool oled_scroll_off(void); uint8_t oled_max_chars(void); // Returns the maximum number of lines that will fit on the oled -uint8_t oled_max_lines(void); +uint8_t oled_max_lines(void); \ No newline at end of file diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c index 092dd551e3..597810f339 100644 --- a/drivers/qwiic/micro_oled.c +++ b/drivers/qwiic/micro_oled.c @@ -35,16 +35,21 @@ #include "string.h" #define TOTALFONTS 2 -const unsigned char * fonts_pointer[]= { font5x7, font8x16 }; +const unsigned char* fonts_pointer[] = {font5x7, font8x16}; -uint8_t foreColor,drawMode,fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY; +uint8_t foreColor, drawMode, fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY; uint16_t fontMapWidth; #define _BV(x) (1 << (x)) -#define swap(a, b) { uint8_t t = a; a = b; b = t; } +#define swap(a, b) \ + { \ + uint8_t t = a; \ + a = b; \ + b = t; \ + } -uint8_t micro_oled_transfer_buffer[20]; -static uint8_t micro_oled_screen_current[LCDWIDTH*LCDWIDTH/8] = { 0 }; +uint8_t micro_oled_transfer_buffer[20]; +static uint8_t micro_oled_screen_current[LCDWIDTH * LCDWIDTH / 8] = {0}; /* LCD Memory organised in 64 horizontal pixel and 6 rows of byte B B .............B ----- @@ -64,628 +69,399 @@ static uint8_t micro_oled_screen_current[LCDWIDTH*LCDWIDTH/8] = { 0 }; */ #if LCDWIDTH == 64 - #if LCDWIDTH == 48 +# if LCDWIDTH == 48 static uint8_t micro_oled_screen_buffer[] = { -// QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php -//64x48 image -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, -0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, -0x00, 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, 0x60, 0x60, 0x60, 0x60, -0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE, -0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, -0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, -0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF, -0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7, -0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -0x31, 0x31, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, -0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, -0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, -0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00 -}; - #endif + // QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php + // 64x48 image + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 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, 0x60, 0x60, 0x60, 0x60, 0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF, 0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7, 0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x31, 0x31, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +# endif #elif LCDWIDTH == 128 - #if LCDHEIGHT == 32 - static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = { -//128x32 qmk image -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, -0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, -0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, -0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, -0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, -0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, -0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, -0x80, 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, 0x12, 0xB2, 0xB2, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, -0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, -0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, -0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, -0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, -0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, -0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, -0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, -0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, -0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, -0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, -0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, -0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, -0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, -0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, -0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, -0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, -0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, -0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00 - }; - #elif LCDHEIGHT == 64 - static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 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, 0xC0, -0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, -0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, -0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, -0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, -0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, -0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, -0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, -0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, -0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, -0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, -0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, -0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, -0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, -0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, -0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, -0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, -0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, -0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, -0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, -0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, -0x38, 0x66, 0xC3, 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, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, -0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, -0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, -0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, -0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, -0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, -0x00, 0x00, 0x00, 0x00, 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, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; -//TODO: generate bitmap of QMK logo here - #endif +# if LCDHEIGHT == 32 +static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = { + // 128x32 qmk image + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, 0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 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, 0x12, 0xB2, 0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, 0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, 0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, 0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, 0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +# elif LCDHEIGHT == 64 +static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, 0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, 0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, 0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, 0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, 0x38, 0x66, 0xC3, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +// TODO: generate bitmap of QMK logo here +# endif #else -//catchall for custom screen szies - static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {0}; +// catchall for custom screen szies +static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0}; #endif - - void micro_oled_init(void) { - i2c_init(); - i2c_start(I2C_ADDRESS_SA0_1); + i2c_init(); + i2c_start(I2C_ADDRESS_SA0_1); - // Display Init sequence for 64x48 OLED module - send_command(DISPLAYOFF); // 0xAE + // Display Init sequence for 64x48 OLED module + send_command(DISPLAYOFF); // 0xAE - send_command(SETDISPLAYCLOCKDIV); // 0xD5 - send_command(0x80); // the suggested ratio 0x80 + send_command(SETDISPLAYCLOCKDIV); // 0xD5 + send_command(0x80); // the suggested ratio 0x80 - send_command(SETMULTIPLEX); // 0xA8 - send_command(LCDHEIGHT - 1); + send_command(SETMULTIPLEX); // 0xA8 + send_command(LCDHEIGHT - 1); - send_command(SETDISPLAYOFFSET); // 0xD3 - send_command(0x00); // no offset + send_command(SETDISPLAYOFFSET); // 0xD3 + send_command(0x00); // no offset - send_command(SETSTARTLINE | 0x00); // line #0 + send_command(SETSTARTLINE | 0x00); // line #0 - send_command(CHARGEPUMP); // enable charge pump - send_command(0x14); + send_command(CHARGEPUMP); // enable charge pump + send_command(0x14); - send_command(NORMALDISPLAY); // 0xA6 - send_command(DISPLAYALLONRESUME); // 0xA4 + send_command(NORMALDISPLAY); // 0xA6 + send_command(DISPLAYALLONRESUME); // 0xA4 -//display at regular orientation - send_command(SEGREMAP | 0x1); - send_command(COMSCANDEC); + // display at regular orientation + send_command(SEGREMAP | 0x1); + send_command(COMSCANDEC); -//rotate display 180 +// rotate display 180 #ifdef micro_oled_rotate_180 - send_command(SEGREMAP); - send_command(COMSCANINC); + send_command(SEGREMAP); + send_command(COMSCANINC); #endif - send_command(MEMORYMODE); - send_command(0x10); + send_command(MEMORYMODE); + send_command(0x10); - send_command(SETCOMPINS); // 0xDA -if (LCDHEIGHT > 32) { - send_command(0x12); -} else { - send_command(0x02); -} - send_command(SETCONTRAST); // 0x81 - send_command(0x8F); + send_command(SETCOMPINS); // 0xDA + if (LCDHEIGHT > 32) { + send_command(0x12); + } else { + send_command(0x02); + } + send_command(SETCONTRAST); // 0x81 + send_command(0x8F); - send_command(SETPRECHARGE); // 0xd9 - send_command(0xF1); + send_command(SETPRECHARGE); // 0xd9 + send_command(0xF1); - send_command(SETVCOMDESELECT); // 0xDB - send_command(0x40); + send_command(SETVCOMDESELECT); // 0xDB + send_command(0x40); - send_command(DISPLAYON); //--turn on oled panel - clear_screen(); // Erase hardware memory inside the OLED controller to avoid random data in memory. - send_buffer(); + send_command(DISPLAYON); //--turn on oled panel + clear_screen(); // Erase hardware memory inside the OLED controller to avoid random data in memory. + send_buffer(); } void send_command(uint8_t command) { - micro_oled_transfer_buffer[0] = I2C_COMMAND; - micro_oled_transfer_buffer[1] = command; - i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100); + micro_oled_transfer_buffer[0] = I2C_COMMAND; + micro_oled_transfer_buffer[1] = command; + i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100); } void send_data(uint8_t data) { - micro_oled_transfer_buffer[0] = I2C_DATA; - micro_oled_transfer_buffer[1] = data; - i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100); + micro_oled_transfer_buffer[0] = I2C_DATA; + micro_oled_transfer_buffer[1] = data; + i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100); } /** \brief Set SSD1306 page address. Send page address command and address to the SSD1306 OLED controller. */ void set_page_address(uint8_t address) { - address = (0xB0 | address); - send_command(address); + address = (0xB0 | address); + send_command(address); } /** \brief Set SSD1306 column address. Send column address command and address to the SSD1306 OLED controller. */ void set_column_address(uint8_t address) { - send_command( ( 0x10 | (address >> 4) ) + ((128 - LCDWIDTH) >> 8) ); - send_command( 0x0F & address ); + send_command((0x10 | (address >> 4)) + ((128 - LCDWIDTH) >> 8)); + send_command(0x0F & address); } /** \brief Clear SSD1306's memory. To clear GDRAM inside the LCD controller. */ void clear_screen(void) { - for (int i=0;i<8; i++) { - set_page_address(i); - set_column_address(0); - for (int j=0; j<0x80; j++) { - send_data(0); + for (int i = 0; i < 8; i++) { + set_page_address(i); + set_column_address(0); + for (int j = 0; j < 0x80; j++) { + send_data(0); + } } - } } /** \brief Clear SSD1306's memory. To clear GDRAM inside the LCD controller. */ void clear_buffer(void) { -//384 - memset(micro_oled_screen_buffer, 0, LCDWIDTH*LCDWIDTH/8); + // 384 + memset(micro_oled_screen_buffer, 0, LCDWIDTH * LCDWIDTH / 8); } /** \brief Invert display. The PIXEL_ON color of the display will turn to PIXEL_OFF and the PIXEL_OFF will turn to PIXEL_ON. */ void invert_screen(bool invert) { - if (invert) { - send_command(INVERTDISPLAY); - } else { - send_command(NORMALDISPLAY); - } + if (invert) { + send_command(INVERTDISPLAY); + } else { + send_command(NORMALDISPLAY); + } } /** \brief Set contrast. OLED contract value from 0 to 255. Note: Contrast level is not very obvious. */ void set_contrast(uint8_t contrast) { - send_command(SETCONTRAST); // 0x81 - send_command(contrast); + send_command(SETCONTRAST); // 0x81 + send_command(contrast); } /** \brief Transfer display buffer. Sends the updated buffer to the controller - the current status is checked before to save i2c exectution time */ void send_buffer(void) { - uint8_t i, j; + uint8_t i, j; - uint8_t page_addr = 0xFF; - for (i = 0; i < LCDHEIGHT/8; i++) { - uint8_t col_addr = 0xFF; - for (j = 0; j < LCDWIDTH; j++) { - if (micro_oled_screen_buffer[i*LCDWIDTH+j] != micro_oled_screen_current[i*LCDWIDTH+j]) { - if (page_addr != i) { - set_page_address(i); + uint8_t page_addr = 0xFF; + for (i = 0; i < LCDHEIGHT / 8; i++) { + uint8_t col_addr = 0xFF; + for (j = 0; j < LCDWIDTH; j++) { + if (micro_oled_screen_buffer[i * LCDWIDTH + j] != micro_oled_screen_current[i * LCDWIDTH + j]) { + if (page_addr != i) { + set_page_address(i); + } + if (col_addr != j) { + set_column_address(j); + } + send_data(micro_oled_screen_buffer[i * LCDWIDTH + j]); + micro_oled_screen_current[i * LCDWIDTH + j] = micro_oled_screen_buffer[i * LCDWIDTH + j]; + col_addr = j + 1; + } } - if (col_addr != j) { - set_column_address(j); - } - send_data(micro_oled_screen_buffer[i*LCDWIDTH+j]); - micro_oled_screen_current[i*LCDWIDTH+j] = micro_oled_screen_buffer[i*LCDWIDTH+j]; - col_addr = j + 1; - } } - } } /** \brief Draw pixel with color and mode. Draw color pixel in the screen buffer's x,y position with NORM or XOR draw mode. */ void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode) { - if ((x<0) || (x>=LCDWIDTH) || (y<0) || (y>=LCDHEIGHT)) - return; + if ((x < 0) || (x >= LCDWIDTH) || (y < 0) || (y >= LCDHEIGHT)) return; - if (mode == XOR) { - if (color == PIXEL_ON) - micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] ^= _BV((y%8)); - } else { - if (color == PIXEL_ON) - micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] |= _BV((y%8)); - else - micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] &= ~_BV((y%8)); - } + if (mode == XOR) { + if (color == PIXEL_ON) micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] ^= _BV((y % 8)); + } else { + if (color == PIXEL_ON) + micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] |= _BV((y % 8)); + else + micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] &= ~_BV((y % 8)); + } } /** \brief Draw line with color and mode. Draw line using color and mode from x0,y0 to x1,y1 of the screen buffer. */ void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode) { - uint8_t steep = abs(y1 - y0) > abs(x1 - x0); - if (steep) { - swap(x0, y0); - swap(x1, y1); - } - - if (x0 > x1) { - swap(x0, x1); - swap(y0, y1); - } - - uint8_t dx, dy; - dx = x1 - x0; - dy = abs(y1 - y0); - - int8_t err = dx / 2; - int8_t ystep; - - if (y0 < y1) { - ystep = 1; - } else { - ystep = -1;} - - for (; x0 abs(x1 - x0); if (steep) { - draw_pixel(y0, x0, color, mode); + swap(x0, y0); + swap(x1, y1); + } + + if (x0 > x1) { + swap(x0, x1); + swap(y0, y1); + } + + uint8_t dx, dy; + dx = x1 - x0; + dy = abs(y1 - y0); + + int8_t err = dx / 2; + int8_t ystep; + + if (y0 < y1) { + ystep = 1; } else { - draw_pixel(x0, y0, color, mode); + ystep = -1; } - err -= dy; - if (err < 0) { - y0 += ystep; - err += dx; + + for (; x0 < x1; x0++) { + if (steep) { + draw_pixel(y0, x0, color, mode); + } else { + draw_pixel(x0, y0, color, mode); + } + err -= dy; + if (err < 0) { + y0 += ystep; + err += dx; + } } - } } /** \brief Draw horizontal line with color and mode. Draw horizontal line using color and mode from x,y to x+width,y of the screen buffer. */ -void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) { - draw_line(x,y,x+width,y,color,mode); -} +void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) { draw_line(x, y, x + width, y, color, mode); } /** \brief Draw vertical line. Draw vertical line using current fore color and current draw mode from x,y to x,y+height of the screen buffer. */ -void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode) { - draw_line(x,y,x,y+height,color,mode); -} +void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode) { draw_line(x, y, x, y + height, color, mode); } /** \brief Draw rectangle with color and mode. Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer. */ void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { - uint8_t tempHeight; + uint8_t tempHeight; - draw_line_hori(x,y, width, color, mode); - draw_line_hori(x,y+height-1, width, color, mode); + draw_line_hori(x, y, width, color, mode); + draw_line_hori(x, y + height - 1, width, color, mode); - tempHeight=height-2; + tempHeight = height - 2; - // skip drawing vertical lines to avoid overlapping of pixel that will - // affect XOR plot if no pixel in between horizontal lines - if (tempHeight<1) return; + // skip drawing vertical lines to avoid overlapping of pixel that will + // affect XOR plot if no pixel in between horizontal lines + if (tempHeight < 1) return; - draw_line_vert(x,y+1, tempHeight, color, mode); - draw_line_vert(x+width-1, y+1, tempHeight, color, mode); + draw_line_vert(x, y + 1, tempHeight, color, mode); + draw_line_vert(x + width - 1, y + 1, tempHeight, color, mode); } /** \brief Draw rectangle with color and mode. Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer. */ void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { - uint8_t tempHeight; + uint8_t tempHeight; - draw_line_hori(x+1,y, width-2, color, mode); - draw_line_hori(x+1,y+height-1, width-2, color, mode); + draw_line_hori(x + 1, y, width - 2, color, mode); + draw_line_hori(x + 1, y + height - 1, width - 2, color, mode); - tempHeight=height-2; + tempHeight = height - 2; - // skip drawing vertical lines to avoid overlapping of pixel that will - // affect XOR plot if no pixel in between horizontal lines - if (tempHeight<1) return; + // skip drawing vertical lines to avoid overlapping of pixel that will + // affect XOR plot if no pixel in between horizontal lines + if (tempHeight < 1) return; - draw_line_vert(x,y+1, tempHeight, color, mode); - draw_line_vert(x+width-1, y+1, tempHeight, color, mode); + draw_line_vert(x, y + 1, tempHeight, color, mode); + draw_line_vert(x + width - 1, y + 1, tempHeight, color, mode); } /** \brief Draw filled rectangle with color and mode. Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer. */ void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { - // TODO - need to optimise the memory map draw so that this function will not call pixel one by one - for (int i=x; i=TOTALFONTS) || (font<0)) - return; + if ((font >= TOTALFONTS) || (font < 0)) return; - uint8_t fontType = font; - uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType]+0); - uint8_t fontHeight = pgm_read_byte(fonts_pointer[fontType]+1); - uint8_t fontStartChar = pgm_read_byte(fonts_pointer[fontType]+2); - uint8_t fontTotalChar = pgm_read_byte(fonts_pointer[fontType]+3); - uint16_t fontMapWidth = (pgm_read_byte(fonts_pointer[fontType]+4)*100)+pgm_read_byte(fonts_pointer[fontType]+5); // two bytes values into integer 16 + uint8_t fontType = font; + uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType] + 0); + uint8_t fontHeight = pgm_read_byte(fonts_pointer[fontType] + 1); + uint8_t fontStartChar = pgm_read_byte(fonts_pointer[fontType] + 2); + uint8_t fontTotalChar = pgm_read_byte(fonts_pointer[fontType] + 3); + uint16_t fontMapWidth = (pgm_read_byte(fonts_pointer[fontType] + 4) * 100) + pgm_read_byte(fonts_pointer[fontType] + 5); // two bytes values into integer 16 - if ((c(fontStartChar+fontTotalChar-1))) // no bitmap for the required c - return; + if ((c < fontStartChar) || (c > (fontStartChar + fontTotalChar - 1))) // no bitmap for the required c + return; - tempC=c-fontStartChar; + tempC = c - fontStartChar; - // each row (in datasheet is call page) is 8 bits high, 16 bit high character will have 2 rows to be drawn - rowsToDraw=fontHeight/8; // 8 is LCD's page size, see SSD1306 datasheet - if (rowsToDraw<=1) rowsToDraw=1; + // each row (in datasheet is call page) is 8 bits high, 16 bit high character will have 2 rows to be drawn + rowsToDraw = fontHeight / 8; // 8 is LCD's page size, see SSD1306 datasheet + if (rowsToDraw <= 1) rowsToDraw = 1; - // the following draw function can draw anywhere on the screen, but SLOW pixel by pixel draw - if (rowsToDraw==1) { - for (i=0;i>= 1; + } } - else { - draw_pixel(x+i, y+j, !color,mode); - } - - temp >>=1; - } + return; } - return; - } - // font height over 8 bit - // take character "0" ASCII 48 as example - charPerBitmapRow = fontMapWidth/fontWidth; // 256/8 =32 char per row - charColPositionOnBitmap = tempC % charPerBitmapRow; // =16 - charRowPositionOnBitmap = (int)(tempC/charPerBitmapRow); // =1 - charBitmapStartPosition = (charRowPositionOnBitmap * fontMapWidth * (fontHeight/8)) + (charColPositionOnBitmap * fontWidth) ; + // font height over 8 bit + // take character "0" ASCII 48 as example + charPerBitmapRow = fontMapWidth / fontWidth; // 256/8 =32 char per row + charColPositionOnBitmap = tempC % charPerBitmapRow; // =16 + charRowPositionOnBitmap = (int)(tempC / charPerBitmapRow); // =1 + charBitmapStartPosition = (charRowPositionOnBitmap * fontMapWidth * (fontHeight / 8)) + (charColPositionOnBitmap * fontWidth); - // each row on LCD is 8 bit height (see datasheet for explanation) - for(row=0;row>= 1; + } } - else { - draw_pixel(x+i,y+j+(row*8), !color, mode); - } - temp >>=1; - } } - } - } -void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mode, uint8_t font) { +void draw_string(uint8_t x, uint8_t y, char* string, uint8_t color, uint8_t mode, uint8_t font) { + if ((font >= TOTALFONTS) || (font < 0)) return; - if ((font>=TOTALFONTS) || (font<0)) - return; - - uint8_t fontType = font; - uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType]+0); - - uint8_t cur_x = x; - for (int i = 0; i < strlen(string); i++) { - draw_char(cur_x, y, string[i], color, mode, font); - cur_x += fontWidth + 1; - } + uint8_t fontType = font; + uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType] + 0); + uint8_t cur_x = x; + for (int i = 0; i < strlen(string); i++) { + draw_char(cur_x, y, string[i], color, mode, font); + cur_x += fontWidth + 1; + } } diff --git a/drivers/qwiic/micro_oled.h b/drivers/qwiic/micro_oled.h index 5d6a1029ed..814143df11 100644 --- a/drivers/qwiic/micro_oled.h +++ b/drivers/qwiic/micro_oled.h @@ -49,86 +49,86 @@ void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font); -void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mode, uint8_t font); +void draw_string(uint8_t x, uint8_t y, char* string, uint8_t color, uint8_t mode, uint8_t font); #define I2C_ADDRESS_SA0_0 0b0111100 #ifndef I2C_ADDRESS_SA0_1 -#define I2C_ADDRESS_SA0_1 0b0111101 +# define I2C_ADDRESS_SA0_1 0b0111101 #endif #define I2C_COMMAND 0x00 #define I2C_DATA 0x40 #define PIXEL_OFF 0 -#define PIXEL_ON 1 +#define PIXEL_ON 1 #ifndef LCDWIDTH -#define LCDWIDTH 64 +# define LCDWIDTH 64 #endif #ifndef LCDWIDTH -#define LCDHEIGHT 48 +# define LCDHEIGHT 48 #endif -#define FONTHEADERSIZE 6 +#define FONTHEADERSIZE 6 -#define NORM 0 -#define XOR 1 +#define NORM 0 +#define XOR 1 -#define PAGE 0 -#define ALL 1 +#define PAGE 0 +#define ALL 1 -#define WIDGETSTYLE0 0 -#define WIDGETSTYLE1 1 -#define WIDGETSTYLE2 2 +#define WIDGETSTYLE0 0 +#define WIDGETSTYLE1 1 +#define WIDGETSTYLE2 2 -#define SETCONTRAST 0x81 -#define DISPLAYALLONRESUME 0xA4 -#define DISPLAYALLON 0xA5 -#define NORMALDISPLAY 0xA6 -#define INVERTDISPLAY 0xA7 -#define DISPLAYOFF 0xAE -#define DISPLAYON 0xAF -#define SETDISPLAYOFFSET 0xD3 -#define SETCOMPINS 0xDA -#define SETVCOMDESELECT 0xDB -#define SETDISPLAYCLOCKDIV 0xD5 -#define SETPRECHARGE 0xD9 -#define SETMULTIPLEX 0xA8 -#define SETLOWCOLUMN 0x00 -#define SETHIGHCOLUMN 0x10 -#define SETSTARTLINE 0x40 -#define MEMORYMODE 0x20 -#define COMSCANINC 0xC0 -#define COMSCANDEC 0xC8 -#define SEGREMAP 0xA0 -#define CHARGEPUMP 0x8D -#define EXTERNALVCC 0x01 -#define SWITCHCAPVCC 0x02 +#define SETCONTRAST 0x81 +#define DISPLAYALLONRESUME 0xA4 +#define DISPLAYALLON 0xA5 +#define NORMALDISPLAY 0xA6 +#define INVERTDISPLAY 0xA7 +#define DISPLAYOFF 0xAE +#define DISPLAYON 0xAF +#define SETDISPLAYOFFSET 0xD3 +#define SETCOMPINS 0xDA +#define SETVCOMDESELECT 0xDB +#define SETDISPLAYCLOCKDIV 0xD5 +#define SETPRECHARGE 0xD9 +#define SETMULTIPLEX 0xA8 +#define SETLOWCOLUMN 0x00 +#define SETHIGHCOLUMN 0x10 +#define SETSTARTLINE 0x40 +#define MEMORYMODE 0x20 +#define COMSCANINC 0xC0 +#define COMSCANDEC 0xC8 +#define SEGREMAP 0xA0 +#define CHARGEPUMP 0x8D +#define EXTERNALVCC 0x01 +#define SWITCHCAPVCC 0x02 // Scroll -#define ACTIVATESCROLL 0x2F -#define DEACTIVATESCROLL 0x2E -#define SETVERTICALSCROLLAREA 0xA3 -#define RIGHTHORIZONTALSCROLL 0x26 -#define LEFT_HORIZONTALSCROLL 0x27 +#define ACTIVATESCROLL 0x2F +#define DEACTIVATESCROLL 0x2E +#define SETVERTICALSCROLLAREA 0xA3 +#define RIGHTHORIZONTALSCROLL 0x26 +#define LEFT_HORIZONTALSCROLL 0x27 #define VERTICALRIGHTHORIZONTALSCROLL 0x29 -#define VERTICALLEFTHORIZONTALSCROLL 0x2A +#define VERTICALLEFTHORIZONTALSCROLL 0x2A typedef enum CMD { - CMD_CLEAR, //0 - CMD_INVERT, //1 - CMD_CONTRAST, //2 - CMD_DISPLAY, //3 - CMD_SETCURSOR, //4 - CMD_PIXEL, //5 - CMD_LINE, //6 - CMD_LINEH, //7 - CMD_LINEV, //8 - CMD_RECT, //9 - CMD_RECTFILL, //10 - CMD_CIRCLE, //11 - CMD_CIRCLEFILL, //12 - CMD_DRAWCHAR, //13 - CMD_DRAWBITMAP, //14 - CMD_GETLCDWIDTH, //15 - CMD_GETLCDHEIGHT, //16 - CMD_SETCOLOR, //17 - CMD_SETDRAWMODE //18 + CMD_CLEAR, // 0 + CMD_INVERT, // 1 + CMD_CONTRAST, // 2 + CMD_DISPLAY, // 3 + CMD_SETCURSOR, // 4 + CMD_PIXEL, // 5 + CMD_LINE, // 6 + CMD_LINEH, // 7 + CMD_LINEV, // 8 + CMD_RECT, // 9 + CMD_RECTFILL, // 10 + CMD_CIRCLE, // 11 + CMD_CIRCLEFILL, // 12 + CMD_DRAWCHAR, // 13 + CMD_DRAWBITMAP, // 14 + CMD_GETLCDWIDTH, // 15 + CMD_GETLCDHEIGHT, // 16 + CMD_SETCOLOR, // 17 + CMD_SETDRAWMODE // 18 } commCommand_t; \ No newline at end of file diff --git a/drivers/qwiic/qwiic.c b/drivers/qwiic/qwiic.c index 9047919927..316d6539cb 100644 --- a/drivers/qwiic/qwiic.c +++ b/drivers/qwiic/qwiic.c @@ -16,16 +16,16 @@ #include "qwiic.h" void qwiic_init(void) { - #ifdef QWIIC_JOYSTIIC_ENABLE +#ifdef QWIIC_JOYSTIIC_ENABLE joystiic_init(); - #endif - #ifdef QWIIC_MICRO_OLED_ENABLE +#endif +#ifdef QWIIC_MICRO_OLED_ENABLE micro_oled_init(); - #endif +#endif } void qwiic_task(void) { - #ifdef QWIIC_JOYSTIIC_ENABLE +#ifdef QWIIC_JOYSTIIC_ENABLE joystiic_task(); - #endif +#endif } diff --git a/drivers/qwiic/qwiic.h b/drivers/qwiic/qwiic.h index 160fb28dfd..8c3d1c8d63 100644 --- a/drivers/qwiic/qwiic.h +++ b/drivers/qwiic/qwiic.h @@ -18,10 +18,10 @@ #include "i2c_master.h" #ifdef QWIIC_JOYSTIIC_ENABLE - #include "joystiic.h" +# include "joystiic.h" #endif #ifdef QWIIC_MICRO_OLED_ENABLE - #include "micro_oled.h" +# include "micro_oled.h" #endif void qwiic_init(void); diff --git a/drivers/qwiic/util/font5x7.h b/drivers/qwiic/util/font5x7.h index 0bad206b7c..a641945aae 100644 --- a/drivers/qwiic/util/font5x7.h +++ b/drivers/qwiic/util/font5x7.h @@ -29,260 +29,11 @@ https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ // Standard ASCII 5x7 font static const unsigned char font5x7[] PROGMEM = { // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) - 5,8,0,255,12,75, - 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, - 0x00, 0x18, 0x3C, 0x18, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, - 0x00, 0x18, 0x24, 0x18, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, - 0x30, 0x48, 0x3A, 0x06, 0x0E, - 0x26, 0x29, 0x79, 0x29, 0x26, - 0x40, 0x7F, 0x05, 0x05, 0x07, - 0x40, 0x7F, 0x05, 0x25, 0x3F, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, - 0x14, 0x22, 0x7F, 0x22, 0x14, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, - 0x06, 0x09, 0x7F, 0x01, 0x7F, - 0x00, 0x66, 0x89, 0x95, 0x6A, - 0x60, 0x60, 0x60, 0x60, 0x60, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, - 0x08, 0x04, 0x7E, 0x04, 0x08, - 0x10, 0x20, 0x7E, 0x20, 0x10, - 0x08, 0x08, 0x2A, 0x1C, 0x08, - 0x08, 0x1C, 0x2A, 0x08, 0x08, - 0x1E, 0x10, 0x10, 0x10, 0x10, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, - 0x30, 0x38, 0x3E, 0x38, 0x30, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, - 0x23, 0x13, 0x08, 0x64, 0x62, - 0x36, 0x49, 0x56, 0x20, 0x50, - 0x00, 0x08, 0x07, 0x03, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, - 0x08, 0x08, 0x3E, 0x08, 0x08, - 0x00, 0x80, 0x70, 0x30, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, - 0x00, 0x00, 0x60, 0x60, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, - 0x3E, 0x51, 0x49, 0x45, 0x3E, - 0x00, 0x42, 0x7F, 0x40, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, - 0x21, 0x41, 0x49, 0x4D, 0x33, - 0x18, 0x14, 0x12, 0x7F, 0x10, - 0x27, 0x45, 0x45, 0x45, 0x39, - 0x3C, 0x4A, 0x49, 0x49, 0x31, - 0x41, 0x21, 0x11, 0x09, 0x07, - 0x36, 0x49, 0x49, 0x49, 0x36, - 0x46, 0x49, 0x49, 0x29, 0x1E, - 0x00, 0x00, 0x14, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, - 0x14, 0x14, 0x14, 0x14, 0x14, - 0x00, 0x41, 0x22, 0x14, 0x08, - 0x02, 0x01, 0x59, 0x09, 0x06, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, - 0x7C, 0x12, 0x11, 0x12, 0x7C, - 0x7F, 0x49, 0x49, 0x49, 0x36, - 0x3E, 0x41, 0x41, 0x41, 0x22, - 0x7F, 0x41, 0x41, 0x41, 0x3E, - 0x7F, 0x49, 0x49, 0x49, 0x41, - 0x7F, 0x09, 0x09, 0x09, 0x01, - 0x3E, 0x41, 0x41, 0x51, 0x73, - 0x7F, 0x08, 0x08, 0x08, 0x7F, - 0x00, 0x41, 0x7F, 0x41, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, - 0x7F, 0x08, 0x14, 0x22, 0x41, - 0x7F, 0x40, 0x40, 0x40, 0x40, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, - 0x7F, 0x04, 0x08, 0x10, 0x7F, - 0x3E, 0x41, 0x41, 0x41, 0x3E, - 0x7F, 0x09, 0x09, 0x09, 0x06, - 0x3E, 0x41, 0x51, 0x21, 0x5E, - 0x7F, 0x09, 0x19, 0x29, 0x46, - 0x26, 0x49, 0x49, 0x49, 0x32, - 0x03, 0x01, 0x7F, 0x01, 0x03, - 0x3F, 0x40, 0x40, 0x40, 0x3F, - 0x1F, 0x20, 0x40, 0x20, 0x1F, - 0x3F, 0x40, 0x38, 0x40, 0x3F, - 0x63, 0x14, 0x08, 0x14, 0x63, - 0x03, 0x04, 0x78, 0x04, 0x03, - 0x61, 0x59, 0x49, 0x4D, 0x43, - 0x00, 0x7F, 0x41, 0x41, 0x41, - 0x02, 0x04, 0x08, 0x10, 0x20, - 0x00, 0x41, 0x41, 0x41, 0x7F, - 0x04, 0x02, 0x01, 0x02, 0x04, - 0x40, 0x40, 0x40, 0x40, 0x40, - 0x00, 0x03, 0x07, 0x08, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, - 0x7F, 0x28, 0x44, 0x44, 0x38, - 0x38, 0x44, 0x44, 0x44, 0x28, - 0x38, 0x44, 0x44, 0x28, 0x7F, - 0x38, 0x54, 0x54, 0x54, 0x18, - 0x00, 0x08, 0x7E, 0x09, 0x02, - 0x18, 0xA4, 0xA4, 0x9C, 0x78, - 0x7F, 0x08, 0x04, 0x04, 0x78, - 0x00, 0x44, 0x7D, 0x40, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, - 0x7C, 0x08, 0x04, 0x04, 0x78, - 0x38, 0x44, 0x44, 0x44, 0x38, - 0xFC, 0x18, 0x24, 0x24, 0x18, - 0x18, 0x24, 0x24, 0x18, 0xFC, - 0x7C, 0x08, 0x04, 0x04, 0x08, - 0x48, 0x54, 0x54, 0x54, 0x24, - 0x04, 0x04, 0x3F, 0x44, 0x24, - 0x3C, 0x40, 0x40, 0x20, 0x7C, - 0x1C, 0x20, 0x40, 0x20, 0x1C, - 0x3C, 0x40, 0x30, 0x40, 0x3C, - 0x44, 0x28, 0x10, 0x28, 0x44, - 0x4C, 0x90, 0x90, 0x90, 0x7C, - 0x44, 0x64, 0x54, 0x4C, 0x44, - 0x00, 0x08, 0x36, 0x41, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, - 0x3C, 0x26, 0x23, 0x26, 0x3C, - 0x1E, 0xA1, 0xA1, 0x61, 0x12, - 0x3A, 0x40, 0x40, 0x20, 0x7A, - 0x38, 0x54, 0x54, 0x55, 0x59, - 0x21, 0x55, 0x55, 0x79, 0x41, - 0x21, 0x54, 0x54, 0x78, 0x41, - 0x21, 0x55, 0x54, 0x78, 0x40, - 0x20, 0x54, 0x55, 0x79, 0x40, - 0x0C, 0x1E, 0x52, 0x72, 0x12, - 0x39, 0x55, 0x55, 0x55, 0x59, - 0x39, 0x54, 0x54, 0x54, 0x59, - 0x39, 0x55, 0x54, 0x54, 0x58, - 0x00, 0x00, 0x45, 0x7C, 0x41, - 0x00, 0x02, 0x45, 0x7D, 0x42, - 0x00, 0x01, 0x45, 0x7C, 0x40, - 0xF0, 0x29, 0x24, 0x29, 0xF0, - 0xF0, 0x28, 0x25, 0x28, 0xF0, - 0x7C, 0x54, 0x55, 0x45, 0x00, - 0x20, 0x54, 0x54, 0x7C, 0x54, - 0x7C, 0x0A, 0x09, 0x7F, 0x49, - 0x32, 0x49, 0x49, 0x49, 0x32, - 0x32, 0x48, 0x48, 0x48, 0x32, - 0x32, 0x4A, 0x48, 0x48, 0x30, - 0x3A, 0x41, 0x41, 0x21, 0x7A, - 0x3A, 0x42, 0x40, 0x20, 0x78, - 0x00, 0x9D, 0xA0, 0xA0, 0x7D, - 0x39, 0x44, 0x44, 0x44, 0x39, - 0x3D, 0x40, 0x40, 0x40, 0x3D, - 0x3C, 0x24, 0xFF, 0x24, 0x24, - 0x48, 0x7E, 0x49, 0x43, 0x66, - 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, - 0xFF, 0x09, 0x29, 0xF6, 0x20, - 0xC0, 0x88, 0x7E, 0x09, 0x03, - 0x20, 0x54, 0x54, 0x79, 0x41, - 0x00, 0x00, 0x44, 0x7D, 0x41, - 0x30, 0x48, 0x48, 0x4A, 0x32, - 0x38, 0x40, 0x40, 0x22, 0x7A, - 0x00, 0x7A, 0x0A, 0x0A, 0x72, - 0x7D, 0x0D, 0x19, 0x31, 0x7D, - 0x26, 0x29, 0x29, 0x2F, 0x28, - 0x26, 0x29, 0x29, 0x29, 0x26, - 0x30, 0x48, 0x4D, 0x40, 0x20, - 0x38, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x38, - 0x2F, 0x10, 0xC8, 0xAC, 0xBA, - 0x2F, 0x10, 0x28, 0x34, 0xFA, - 0x00, 0x00, 0x7B, 0x00, 0x00, - 0x08, 0x14, 0x2A, 0x14, 0x22, - 0x22, 0x14, 0x2A, 0x14, 0x08, - 0xAA, 0x00, 0x55, 0x00, 0xAA, - 0xAA, 0x55, 0xAA, 0x55, 0xAA, - 0x00, 0x00, 0x00, 0xFF, 0x00, - 0x10, 0x10, 0x10, 0xFF, 0x00, - 0x14, 0x14, 0x14, 0xFF, 0x00, - 0x10, 0x10, 0xFF, 0x00, 0xFF, - 0x10, 0x10, 0xF0, 0x10, 0xF0, - 0x14, 0x14, 0x14, 0xFC, 0x00, - 0x14, 0x14, 0xF7, 0x00, 0xFF, - 0x00, 0x00, 0xFF, 0x00, 0xFF, - 0x14, 0x14, 0xF4, 0x04, 0xFC, - 0x14, 0x14, 0x17, 0x10, 0x1F, - 0x10, 0x10, 0x1F, 0x10, 0x1F, - 0x14, 0x14, 0x14, 0x1F, 0x00, - 0x10, 0x10, 0x10, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x1F, 0x10, - 0x10, 0x10, 0x10, 0x1F, 0x10, - 0x10, 0x10, 0x10, 0xF0, 0x10, - 0x00, 0x00, 0x00, 0xFF, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xFF, 0x10, - 0x00, 0x00, 0x00, 0xFF, 0x14, - 0x00, 0x00, 0xFF, 0x00, 0xFF, - 0x00, 0x00, 0x1F, 0x10, 0x17, - 0x00, 0x00, 0xFC, 0x04, 0xF4, - 0x14, 0x14, 0x17, 0x10, 0x17, - 0x14, 0x14, 0xF4, 0x04, 0xF4, - 0x00, 0x00, 0xFF, 0x00, 0xF7, - 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0xF7, 0x00, 0xF7, - 0x14, 0x14, 0x14, 0x17, 0x14, - 0x10, 0x10, 0x1F, 0x10, 0x1F, - 0x14, 0x14, 0x14, 0xF4, 0x14, - 0x10, 0x10, 0xF0, 0x10, 0xF0, - 0x00, 0x00, 0x1F, 0x10, 0x1F, - 0x00, 0x00, 0x00, 0x1F, 0x14, - 0x00, 0x00, 0x00, 0xFC, 0x14, - 0x00, 0x00, 0xF0, 0x10, 0xF0, - 0x10, 0x10, 0xFF, 0x10, 0xFF, - 0x14, 0x14, 0x14, 0xFF, 0x14, - 0x10, 0x10, 0x10, 0x1F, 0x00, - 0x00, 0x00, 0x00, 0xF0, 0x10, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, - 0xFF, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, - 0x38, 0x44, 0x44, 0x38, 0x44, - 0x7C, 0x2A, 0x2A, 0x3E, 0x14, - 0x7E, 0x02, 0x02, 0x06, 0x06, - 0x02, 0x7E, 0x02, 0x7E, 0x02, - 0x63, 0x55, 0x49, 0x41, 0x63, - 0x38, 0x44, 0x44, 0x3C, 0x04, - 0x40, 0x7E, 0x20, 0x1E, 0x20, - 0x06, 0x02, 0x7E, 0x02, 0x02, - 0x99, 0xA5, 0xE7, 0xA5, 0x99, - 0x1C, 0x2A, 0x49, 0x2A, 0x1C, - 0x4C, 0x72, 0x01, 0x72, 0x4C, - 0x30, 0x4A, 0x4D, 0x4D, 0x30, - 0x30, 0x48, 0x78, 0x48, 0x30, - 0xBC, 0x62, 0x5A, 0x46, 0x3D, - 0x3E, 0x49, 0x49, 0x49, 0x00, - 0x7E, 0x01, 0x01, 0x01, 0x7E, - 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, - 0x44, 0x44, 0x5F, 0x44, 0x44, - 0x40, 0x51, 0x4A, 0x44, 0x40, - 0x40, 0x44, 0x4A, 0x51, 0x40, - 0x00, 0x00, 0xFF, 0x01, 0x03, - 0xE0, 0x80, 0xFF, 0x00, 0x00, - 0x08, 0x08, 0x6B, 0x6B, 0x08, - 0x36, 0x12, 0x36, 0x24, 0x36, - 0x06, 0x0F, 0x09, 0x0F, 0x06, - 0x00, 0x00, 0x18, 0x18, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x00, - 0x30, 0x40, 0xFF, 0x01, 0x01, - 0x00, 0x1F, 0x01, 0x01, 0x1E, - 0x00, 0x19, 0x1D, 0x17, 0x12, - 0x00, 0x3C, 0x3C, 0x3C, 0x3C, - 0x00, 0x00, 0x00, 0x00, 0x00 -}; + 5, 8, 0, 255, 12, 75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24, 0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x30, 0x38, 0x3E, 0x38, 0x30, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49, 0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41, 0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41, 0x22, 0x14, 0x08, 0x02, + 0x01, 0x59, 0x09, 0x06, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C, 0x26, 0x23, + 0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40, 0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41, 0x21, 0x54, 0x54, 0x78, 0x41, 0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54, 0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55, 0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00, 0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45, 0x7C, 0x40, 0xF0, 0x29, 0x24, 0x29, 0xF0, 0xF0, 0x28, 0x25, 0x28, 0xF0, 0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A, 0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x32, 0x48, 0x48, 0x48, 0x32, 0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A, 0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x39, 0x44, 0x44, 0x44, 0x39, 0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24, 0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09, 0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09, + 0x03, 0x20, 0x54, 0x54, 0x79, 0x41, 0x00, 0x00, 0x44, 0x7D, 0x41, 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38, 0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19, 0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26, 0x30, 0x48, 0x4D, 0x40, 0x20, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 0x2F, 0x10, 0x28, 0x34, 0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x08, 0x14, 0x2A, 0x14, 0x22, 0x22, 0x14, 0x2A, 0x14, 0x08, 0xAA, 0x00, 0x55, 0x00, 0xAA, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x14, 0x14, 0x17, 0x10, 0x1F, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, + 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0x7C, + 0x2A, 0x2A, 0x3E, 0x14, 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/drivers/qwiic/util/font8x16.h b/drivers/qwiic/util/font8x16.h index c070e4ec8c..4d3c237866 100644 --- a/drivers/qwiic/util/font8x16.h +++ b/drivers/qwiic/util/font8x16.h @@ -27,101 +27,13 @@ https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ static const unsigned char font8x16[] PROGMEM = { // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) - 8,16,32,96,2,56, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00, - 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00, - 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, - 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, - 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, - 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00, - 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, - 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00, - 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00, - 0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, - 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, - 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, - 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00, - 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, - 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00, - 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00, - 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00, - 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, - 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, - 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00, - 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, - 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00, - 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00, - 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00, - 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, - 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, - 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, - 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, - 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, - 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00, - 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, - 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, - 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00, - 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, - 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, - 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00, - 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00, - 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, - 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00, - 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, - 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00, - 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, - 0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00, - 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, - 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, - 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, - 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, - 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00, - 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; + 8, 16, 32, 96, 2, 56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00, 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00, 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, + 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00, 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00, + 0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, + 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00, 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00, 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00, 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00, 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, + 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, + 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00, 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00, 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x10, + 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h b/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h index f248cc25ba..0755ddf6c4 100644 --- a/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h +++ b/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h @@ -19,54 +19,53 @@ along with this program. If not, see . #define _GDISP_LLD_BOARD_H static const I2CConfig i2ccfg = { - 400000 // clock speed (Hz); 400kHz max for IS31 + 400000 // clock speed (Hz); 400kHz max for IS31 }; static const uint8_t led_mask[] = { - 0xFF, 0x00, /* C1-1 -> C1-16 */ - 0xFF, 0x00, /* C2-1 -> C2-16 */ - 0xFF, 0x00, /* C3-1 -> C3-16 */ - 0xFF, 0x00, /* C4-1 -> C4-16 */ - 0x3F, 0x00, /* C5-1 -> C5-16 */ - 0x00, 0x00, /* C6-1 -> C6-16 */ - 0x00, 0x00, /* C7-1 -> C7-16 */ - 0x00, 0x00, /* C8-1 -> C8-16 */ - 0x00, 0x00, /* C9-1 -> C9-16 */ + 0xFF, 0x00, /* C1-1 -> C1-16 */ + 0xFF, 0x00, /* C2-1 -> C2-16 */ + 0xFF, 0x00, /* C3-1 -> C3-16 */ + 0xFF, 0x00, /* C4-1 -> C4-16 */ + 0x3F, 0x00, /* C5-1 -> C5-16 */ + 0x00, 0x00, /* C6-1 -> C6-16 */ + 0x00, 0x00, /* C7-1 -> C7-16 */ + 0x00, 0x00, /* C8-1 -> C8-16 */ + 0x00, 0x00, /* C9-1 -> C9-16 */ }; // The address of the LED -#define LA(c, r) (c + r * 16 ) +#define LA(c, r) (c + r * 16) // Need to be an address that is not mapped, but inside the range of the controller matrix #define NA LA(8, 8) // The numbers in the comments are the led numbers DXX on the PCB // The mapping is taken from the schematic of left hand side static const uint8_t led_mapping[GDISP_SCREEN_HEIGHT][GDISP_SCREEN_WIDTH] = { -// 45 44 43 42 41 40 39 - { LA(1, 1), LA(1, 0), LA(0, 4), LA(0, 3), LA(0, 2), LA(0, 1), LA(0, 0)}, -// 52 51 50 49 48 47 46 - { LA(2, 3), LA(2, 2), LA(2, 1), LA(2, 0), LA(1, 4), LA(1, 3), LA(1, 2) }, -// 58 57 56 55 54 53 N/A - { LA(3, 4), LA(3, 3), LA(3, 2), LA(3, 1), LA(3, 0), LA(2, 4), NA }, -// 67 66 65 64 63 62 61 - { LA(5, 3), LA(5, 2), LA(5, 1), LA(5, 0), LA(4, 4), LA(4, 3), LA(4, 2) }, -// 76 75 74 73 72 60 59 - { LA(7, 3), LA(7, 2), LA(7, 1), LA(7, 0), LA(6, 3), LA(4, 1), LA(4, 0) }, -// N/A N/A N/A N/A N/A N/A 68 - { NA, NA, NA, NA, NA, NA, LA(5, 4) }, -// N/A N/A N/A N/A 71 70 69 - { NA, NA, NA, NA, LA(6, 2), LA(6, 1), LA(6, 0) }, + // 45 44 43 42 41 40 39 + {LA(1, 1), LA(1, 0), LA(0, 4), LA(0, 3), LA(0, 2), LA(0, 1), LA(0, 0)}, + // 52 51 50 49 48 47 46 + {LA(2, 3), LA(2, 2), LA(2, 1), LA(2, 0), LA(1, 4), LA(1, 3), LA(1, 2)}, + // 58 57 56 55 54 53 N/A + {LA(3, 4), LA(3, 3), LA(3, 2), LA(3, 1), LA(3, 0), LA(2, 4), NA}, + // 67 66 65 64 63 62 61 + {LA(5, 3), LA(5, 2), LA(5, 1), LA(5, 0), LA(4, 4), LA(4, 3), LA(4, 2)}, + // 76 75 74 73 72 60 59 + {LA(7, 3), LA(7, 2), LA(7, 1), LA(7, 0), LA(6, 3), LA(4, 1), LA(4, 0)}, + // N/A N/A N/A N/A N/A N/A 68 + {NA, NA, NA, NA, NA, NA, LA(5, 4)}, + // N/A N/A N/A N/A 71 70 69 + {NA, NA, NA, NA, LA(6, 2), LA(6, 1), LA(6, 0)}, }; - -#define IS31_ADDR_DEFAULT 0x74 // AD connected to GND +#define IS31_ADDR_DEFAULT 0x74 // AD connected to GND #define IS31_TIMEOUT 5000 -static GFXINLINE void init_board(GDisplay *g) { - (void) g; +static GFXINLINE void init_board(GDisplay* g) { + (void)g; /* I2C pins */ - palSetPadMode(GPIOB, 0, PAL_MODE_ALTERNATIVE_2); // PTB0/I2C0/SCL - palSetPadMode(GPIOB, 1, PAL_MODE_ALTERNATIVE_2); // PTB1/I2C0/SDA + palSetPadMode(GPIOB, 0, PAL_MODE_ALTERNATIVE_2); // PTB0/I2C0/SCL + palSetPadMode(GPIOB, 1, PAL_MODE_ALTERNATIVE_2); // PTB1/I2C0/SDA palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOB, 16); /* start I2C */ @@ -77,34 +76,30 @@ static GFXINLINE void init_board(GDisplay *g) { I2CD1.i2c->FLT = 4; } -static GFXINLINE void post_init_board(GDisplay *g) { - (void) g; -} +static GFXINLINE void post_init_board(GDisplay* g) { (void)g; } static GFXINLINE const uint8_t* get_led_mask(GDisplay* g) { - (void) g; + (void)g; return led_mask; } -static GFXINLINE uint8_t get_led_address(GDisplay* g, uint16_t x, uint16_t y) -{ - (void) g; +static GFXINLINE uint8_t get_led_address(GDisplay* g, uint16_t x, uint16_t y) { + (void)g; return led_mapping[y][x]; } static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) { - (void) g; - if(!shutdown) { + (void)g; + if (!shutdown) { palSetPad(GPIOB, 16); - } - else { + } else { palClearPad(GPIOB, 16); } } -static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { - (void) g; - i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, US2ST(IS31_TIMEOUT)); +static GFXINLINE void write_data(GDisplay* g, uint8_t* data, uint16_t length) { + (void)g; + i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, US2ST(IS31_TIMEOUT)); } #endif /* _GDISP_LLD_BOARD_H */ diff --git a/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c b/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c index 917adadb84..7188244022 100644 --- a/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c +++ b/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c @@ -19,15 +19,14 @@ along with this program. If not, see . #if GFX_USE_GDISP -#define GDISP_DRIVER_VMT GDISPVMT_IS31FL3731C_QMK -#define GDISP_SCREEN_HEIGHT LED_HEIGHT -#define GDISP_SCREEN_WIDTH LED_WIDTH +# define GDISP_DRIVER_VMT GDISPVMT_IS31FL3731C_QMK +# define GDISP_SCREEN_HEIGHT LED_HEIGHT +# define GDISP_SCREEN_WIDTH LED_WIDTH -#include "gdisp_lld_config.h" -#include "src/gdisp/gdisp_driver.h" - -#include "board_is31fl3731c.h" +# include "gdisp_lld_config.h" +# include "src/gdisp/gdisp_driver.h" +# include "board_is31fl3731c.h" // Can't include led_tables from here extern const uint8_t CIE1931_CURVE[]; @@ -36,96 +35,96 @@ extern const uint8_t CIE1931_CURVE[]; /* Driver local definitions. */ /*===========================================================================*/ -#ifndef GDISP_INITIAL_CONTRAST - #define GDISP_INITIAL_CONTRAST 0 -#endif -#ifndef GDISP_INITIAL_BACKLIGHT - #define GDISP_INITIAL_BACKLIGHT 0 -#endif +# ifndef GDISP_INITIAL_CONTRAST +# define GDISP_INITIAL_CONTRAST 0 +# endif +# ifndef GDISP_INITIAL_BACKLIGHT +# define GDISP_INITIAL_BACKLIGHT 0 +# endif -#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0) +# define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0) -#define IS31_ADDR_DEFAULT 0x74 +# define IS31_ADDR_DEFAULT 0x74 -#define IS31_REG_CONFIG 0x00 +# define IS31_REG_CONFIG 0x00 // bits in reg -#define IS31_REG_CONFIG_PICTUREMODE 0x00 -#define IS31_REG_CONFIG_AUTOPLAYMODE 0x08 -#define IS31_REG_CONFIG_AUDIOPLAYMODE 0x18 +# define IS31_REG_CONFIG_PICTUREMODE 0x00 +# define IS31_REG_CONFIG_AUTOPLAYMODE 0x08 +# define IS31_REG_CONFIG_AUDIOPLAYMODE 0x18 // D2:D0 bits are starting frame for autoplay mode -#define IS31_REG_PICTDISP 0x01 // D2:D0 frame select for picture mode +# define IS31_REG_PICTDISP 0x01 // D2:D0 frame select for picture mode -#define IS31_REG_AUTOPLAYCTRL1 0x02 +# define IS31_REG_AUTOPLAYCTRL1 0x02 // D6:D4 number of loops (000=infty) // D2:D0 number of frames to be used -#define IS31_REG_AUTOPLAYCTRL2 0x03 // D5:D0 delay time (*11ms) +# define IS31_REG_AUTOPLAYCTRL2 0x03 // D5:D0 delay time (*11ms) -#define IS31_REG_DISPLAYOPT 0x05 -#define IS31_REG_DISPLAYOPT_INTENSITY_SAME 0x20 // same intensity for all frames -#define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x8 +# define IS31_REG_DISPLAYOPT 0x05 +# define IS31_REG_DISPLAYOPT_INTENSITY_SAME 0x20 // same intensity for all frames +# define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x8 // D2:D0 bits blink period time (*0.27s) -#define IS31_REG_AUDIOSYNC 0x06 -#define IS31_REG_AUDIOSYNC_ENABLE 0x1 +# define IS31_REG_AUDIOSYNC 0x06 +# define IS31_REG_AUDIOSYNC_ENABLE 0x1 -#define IS31_REG_FRAMESTATE 0x07 +# define IS31_REG_FRAMESTATE 0x07 -#define IS31_REG_BREATHCTRL1 0x08 +# define IS31_REG_BREATHCTRL1 0x08 // D6:D4 fade out time (26ms*2^i) // D2:D0 fade in time (26ms*2^i) -#define IS31_REG_BREATHCTRL2 0x09 -#define IS31_REG_BREATHCTRL2_ENABLE 0x10 +# define IS31_REG_BREATHCTRL2 0x09 +# define IS31_REG_BREATHCTRL2_ENABLE 0x10 // D2:D0 extinguish time (3.5ms*2^i) -#define IS31_REG_SHUTDOWN 0x0A -#define IS31_REG_SHUTDOWN_OFF 0x0 -#define IS31_REG_SHUTDOWN_ON 0x1 +# define IS31_REG_SHUTDOWN 0x0A +# define IS31_REG_SHUTDOWN_OFF 0x0 +# define IS31_REG_SHUTDOWN_ON 0x1 -#define IS31_REG_AGCCTRL 0x0B -#define IS31_REG_ADCRATE 0x0C +# define IS31_REG_AGCCTRL 0x0B +# define IS31_REG_ADCRATE 0x0C -#define IS31_COMMANDREGISTER 0xFD -#define IS31_FUNCTIONREG 0x0B // helpfully called 'page nine' -#define IS31_FUNCTIONREG_SIZE 0xD +# define IS31_COMMANDREGISTER 0xFD +# define IS31_FUNCTIONREG 0x0B // helpfully called 'page nine' +# define IS31_FUNCTIONREG_SIZE 0xD -#define IS31_FRAME_SIZE 0xB4 +# define IS31_FRAME_SIZE 0xB4 -#define IS31_PWM_REG 0x24 -#define IS31_PWM_SIZE 0x90 +# define IS31_PWM_REG 0x24 +# define IS31_PWM_SIZE 0x90 -#define IS31_LED_MASK_SIZE 0x12 +# define IS31_LED_MASK_SIZE 0x12 -#define IS31 +# define IS31 /*===========================================================================*/ /* Driver local functions. */ /*===========================================================================*/ -typedef struct{ +typedef struct { uint8_t write_buffer_offset; uint8_t write_buffer[IS31_FRAME_SIZE]; uint8_t frame_buffer[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH]; uint8_t page; -}__attribute__((__packed__)) PrivData; +} __attribute__((__packed__)) PrivData; // Some common routines and macros -#define PRIV(g) ((PrivData*)g->priv) +# define PRIV(g) ((PrivData *)g->priv) /*===========================================================================*/ /* Driver exported functions. */ /*===========================================================================*/ -static GFXINLINE void write_page(GDisplay* g, uint8_t page) { +static GFXINLINE void write_page(GDisplay *g, uint8_t page) { uint8_t tx[2] __attribute__((aligned(2))); tx[0] = IS31_COMMANDREGISTER; tx[1] = page; write_data(g, tx, 2); } -static GFXINLINE void write_register(GDisplay* g, uint8_t page, uint8_t reg, uint8_t data) { +static GFXINLINE void write_register(GDisplay *g, uint8_t page, uint8_t reg, uint8_t data) { uint8_t tx[2] __attribute__((aligned(2))); tx[0] = reg; tx[1] = data; @@ -136,7 +135,7 @@ static GFXINLINE void write_register(GDisplay* g, uint8_t page, uint8_t reg, uin static GFXINLINE void write_ram(GDisplay *g, uint8_t page, uint16_t offset, uint16_t length) { PRIV(g)->write_buffer_offset = offset; write_page(g, page); - write_data(g, (uint8_t*)PRIV(g), length + 1); + write_data(g, (uint8_t *)PRIV(g), length + 1); } LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { @@ -160,10 +159,9 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { write_ram(g, IS31_FUNCTIONREG, 0, IS31_FUNCTIONREG_SIZE); gfxSleepMilliseconds(10); - // zero all LED registers on all 8 pages, and enable the mask __builtin_memcpy(PRIV(g)->write_buffer, get_led_mask(g), IS31_LED_MASK_SIZE); - for(uint8_t i=0; i<8; i++) { + for (uint8_t i = 0; i < 8; i++) { write_ram(g, i, 0, IS31_FRAME_SIZE); gfxSleepMilliseconds(1); } @@ -176,133 +174,129 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { post_init_board(g); /* Initialise the GDISP structure */ - g->g.Width = GDISP_SCREEN_WIDTH; - g->g.Height = GDISP_SCREEN_HEIGHT; + g->g.Width = GDISP_SCREEN_WIDTH; + g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Orientation = GDISP_ROTATE_0; - g->g.Powermode = powerOff; - g->g.Backlight = GDISP_INITIAL_BACKLIGHT; - g->g.Contrast = GDISP_INITIAL_CONTRAST; + g->g.Powermode = powerOff; + g->g.Backlight = GDISP_INITIAL_BACKLIGHT; + g->g.Contrast = GDISP_INITIAL_CONTRAST; return TRUE; } -#if GDISP_HARDWARE_FLUSH - LLDSPEC void gdisp_lld_flush(GDisplay *g) { - // Don't flush if we don't need it. - if (!(g->flags & GDISP_FLG_NEEDFLUSH)) - return; +# if GDISP_HARDWARE_FLUSH +LLDSPEC void gdisp_lld_flush(GDisplay *g) { + // Don't flush if we don't need it. + if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return; - PRIV(g)->page++; - PRIV(g)->page %= 2; - // TODO: some smarter algorithm for this - // We should run only one physical page at a time - // This way we don't need to send so much data, and - // we could use slightly less memory - uint8_t* src = PRIV(g)->frame_buffer; - for (int y=0;yg.Backlight / 100; - PRIV(g)->write_buffer[get_led_address(g, x, y)]=CIE1931_CURVE[val]; - ++src; - } + PRIV(g)->page++; + PRIV(g)->page %= 2; + // TODO: some smarter algorithm for this + // We should run only one physical page at a time + // This way we don't need to send so much data, and + // we could use slightly less memory + uint8_t *src = PRIV(g)->frame_buffer; + for (int y = 0; y < GDISP_SCREEN_HEIGHT; y++) { + for (int x = 0; x < GDISP_SCREEN_WIDTH; x++) { + uint8_t val = (uint16_t)*src * g->g.Backlight / 100; + PRIV(g)->write_buffer[get_led_address(g, x, y)] = CIE1931_CURVE[val]; + ++src; } - write_ram(g, PRIV(g)->page, IS31_PWM_REG, IS31_PWM_SIZE); - gfxSleepMilliseconds(1); - write_register(g, IS31_FUNCTIONREG, IS31_REG_PICTDISP, PRIV(g)->page); - - g->flags &= ~GDISP_FLG_NEEDFLUSH; } -#endif + write_ram(g, PRIV(g)->page, IS31_PWM_REG, IS31_PWM_SIZE); + gfxSleepMilliseconds(1); + write_register(g, IS31_FUNCTIONREG, IS31_REG_PICTDISP, PRIV(g)->page); -#if GDISP_HARDWARE_DRAWPIXEL - LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { - coord_t x, y; + g->flags &= ~GDISP_FLG_NEEDFLUSH; +} +# endif - switch(g->g.Orientation) { +# if GDISP_HARDWARE_DRAWPIXEL +LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { + coord_t x, y; + + switch (g->g.Orientation) { default: case GDISP_ROTATE_0: x = g->p.x; y = g->p.y; break; case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH-1 - g->p.x; + x = GDISP_SCREEN_WIDTH - 1 - g->p.x; y = g->p.y; break; - } - PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x] = gdispColor2Native(g->p.color); - g->flags |= GDISP_FLG_NEEDFLUSH; } -#endif + PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x] = gdispColor2Native(g->p.color); + g->flags |= GDISP_FLG_NEEDFLUSH; +} +# endif -#if GDISP_HARDWARE_PIXELREAD - LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { - coord_t x, y; +# if GDISP_HARDWARE_PIXELREAD +LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { + coord_t x, y; - switch(g->g.Orientation) { + switch (g->g.Orientation) { default: case GDISP_ROTATE_0: x = g->p.x; y = g->p.y; break; case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH-1 - g->p.x; + x = GDISP_SCREEN_WIDTH - 1 - g->p.x; y = g->p.y; break; - } - return gdispNative2Color(PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x]); } -#endif + return gdispNative2Color(PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x]); +} +# endif -#if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL - LLDSPEC void gdisp_lld_control(GDisplay *g) { - switch(g->p.x) { +# if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL +LLDSPEC void gdisp_lld_control(GDisplay *g) { + switch (g->p.x) { case GDISP_CONTROL_POWER: - if (g->g.Powermode == (powermode_t)g->p.ptr) - return; - switch((powermode_t)g->p.ptr) { - case powerOff: - case powerSleep: - case powerDeepSleep: - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); - break; - case powerOn: - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON); - break; - default: - return; + if (g->g.Powermode == (powermode_t)g->p.ptr) return; + switch ((powermode_t)g->p.ptr) { + case powerOff: + case powerSleep: + case powerDeepSleep: + write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); + break; + case powerOn: + write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON); + break; + default: + return; } g->g.Powermode = (powermode_t)g->p.ptr; return; case GDISP_CONTROL_ORIENTATION: - if (g->g.Orientation == (orientation_t)g->p.ptr) - return; - switch((orientation_t)g->p.ptr) { - /* Rotation is handled by the drawing routines */ - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Width = GDISP_SCREEN_WIDTH; - break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: - g->g.Height = GDISP_SCREEN_WIDTH; - g->g.Width = GDISP_SCREEN_HEIGHT; - break; - default: - return; + if (g->g.Orientation == (orientation_t)g->p.ptr) return; + switch ((orientation_t)g->p.ptr) { + /* Rotation is handled by the drawing routines */ + case GDISP_ROTATE_0: + case GDISP_ROTATE_180: + g->g.Height = GDISP_SCREEN_HEIGHT; + g->g.Width = GDISP_SCREEN_WIDTH; + break; + case GDISP_ROTATE_90: + case GDISP_ROTATE_270: + g->g.Height = GDISP_SCREEN_WIDTH; + g->g.Width = GDISP_SCREEN_HEIGHT; + break; + default: + return; } g->g.Orientation = (orientation_t)g->p.ptr; return; case GDISP_CONTROL_BACKLIGHT: - if (g->g.Backlight == (unsigned)g->p.ptr) - return; - unsigned val = (unsigned)g->p.ptr; + if (g->g.Backlight == (unsigned)g->p.ptr) return; + unsigned val = (unsigned)g->p.ptr; g->g.Backlight = val > 100 ? 100 : val; g->flags |= GDISP_FLG_NEEDFLUSH; return; - } } -#endif // GDISP_NEED_CONTROL +} +# endif // GDISP_NEED_CONTROL -#endif // GFX_USE_GDISP +#endif // GFX_USE_GDISP diff --git a/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h b/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h index 588d688cf6..1b9fadba16 100644 --- a/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h +++ b/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h @@ -24,13 +24,13 @@ along with this program. If not, see . /* Driver hardware support. */ /*===========================================================================*/ -#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing -#define GDISP_HARDWARE_DRAWPIXEL TRUE -#define GDISP_HARDWARE_PIXELREAD TRUE -#define GDISP_HARDWARE_CONTROL TRUE +# define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing +# define GDISP_HARDWARE_DRAWPIXEL TRUE +# define GDISP_HARDWARE_PIXELREAD TRUE +# define GDISP_HARDWARE_CONTROL TRUE -#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_GRAY256 +# define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_GRAY256 -#endif /* GFX_USE_GDISP */ +#endif /* GFX_USE_GDISP */ -#endif /* _GDISP_LLD_CONFIG_H */ +#endif /* _GDISP_LLD_CONFIG_H */ diff --git a/drivers/ugfx/gdisp/st7565/board_st7565_template.h b/drivers/ugfx/gdisp/st7565/board_st7565_template.h index 9ab636c95d..194f8ea24d 100644 --- a/drivers/ugfx/gdisp/st7565/board_st7565_template.h +++ b/drivers/ugfx/gdisp/st7565/board_st7565_template.h @@ -8,10 +8,10 @@ #ifndef _GDISP_LLD_BOARD_H #define _GDISP_LLD_BOARD_H -#define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6 -#define ST7565_ADC ST7565_ADC_NORMAL -#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC -#define ST7565_PAGE_ORDER 0,1,2,3 +#define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6 +#define ST7565_ADC ST7565_ADC_NORMAL +#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC +#define ST7565_PAGE_ORDER 0, 1, 2, 3 /* * Custom page order for several LCD boards, e.g. HEM12864-99 * #define ST7565_PAGE_ORDER 4,5,6,7,0,1,2,3 @@ -25,11 +25,9 @@ #define ST7565_SLCK_PIN 5 #define ST7565_SS_PIN 4 -#define palSetPadModeRaw(portname, bits) \ - ST7565_PORT->PCR[ST7565_##portname##_PIN] = bits +#define palSetPadModeRaw(portname, bits) ST7565_PORT->PCR[ST7565_##portname##_PIN] = bits -#define palSetPadModeNamed(portname, portmode) \ - palSetPadMode(ST7565_GPIOPORT, ST7565_##portname##_PIN, portmode) +#define palSetPadModeNamed(portname, portmode) palSetPadMode(ST7565_GPIOPORT, ST7565_##portname##_PIN, portmode) #define ST7565_SPI_MODE PORTx_PCRn_DSE | PORTx_PCRn_MUX(2) // DSPI Clock and Transfer Attributes @@ -37,38 +35,37 @@ // MSB First // CLK Low by default static const SPIConfig spi1config = { - // Operation complete callback or @p NULL. - .end_cb = NULL, - //The chip select line port - when not using pcs. - .ssport = ST7565_GPIOPORT, - // brief The chip select line pad number - when not using pcs. - .sspad=ST7565_SS_PIN, - // SPI initialization data. - .tar0 = - SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes - | SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns - | SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns - | SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns - | SPIx_CTARn_PBR(0) // Baud Rate Prescaler = 2 - | SPIx_CTARn_BR(0) // Baud rate (min 50ns) = 55.56ns + // Operation complete callback or @p NULL. + .end_cb = NULL, + // The chip select line port - when not using pcs. + .ssport = ST7565_GPIOPORT, + // brief The chip select line pad number - when not using pcs. + .sspad = ST7565_SS_PIN, + // SPI initialization data. + .tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes + | SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns + | SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns + | SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns + | SPIx_CTARn_PBR(0) // Baud Rate Prescaler = 2 + | SPIx_CTARn_BR(0) // Baud rate (min 50ns) = 55.56ns }; static GFXINLINE void acquire_bus(GDisplay *g) { - (void) g; + (void)g; // Only the LCD is using the SPI bus, so no need to acquire // spiAcquireBus(&SPID1); spiSelect(&SPID1); } static GFXINLINE void release_bus(GDisplay *g) { - (void) g; + (void)g; // Only the LCD is using the SPI bus, so no need to release - //spiReleaseBus(&SPID1); + // spiReleaseBus(&SPID1); spiUnselect(&SPID1); } static GFXINLINE void init_board(GDisplay *g) { - (void) g; + (void)g; palSetPadModeNamed(A0, PAL_MODE_OUTPUT_PUSHPULL); palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); palSetPadModeNamed(RST, PAL_MODE_OUTPUT_PUSHPULL); @@ -82,31 +79,23 @@ static GFXINLINE void init_board(GDisplay *g) { release_bus(g); } -static GFXINLINE void post_init_board(GDisplay *g) { - (void) g; -} +static GFXINLINE void post_init_board(GDisplay *g) { (void)g; } static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) { - (void) g; + (void)g; if (state) { palClearPad(ST7565_GPIOPORT, ST7565_RST_PIN); - } - else { + } else { palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN); } } -static GFXINLINE void enter_data_mode(GDisplay *g) { - palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); -} +static GFXINLINE void enter_data_mode(GDisplay *g) { palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); } -static GFXINLINE void enter_cmd_mode(GDisplay *g) { - palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN); -} +static GFXINLINE void enter_cmd_mode(GDisplay *g) { palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN); } - -static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { - (void) g; +static GFXINLINE void write_data(GDisplay *g, uint8_t *data, uint16_t length) { + (void)g; spiSend(&SPID1, length, data); } diff --git a/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c b/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c index c38194b069..fde320981b 100644 --- a/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c +++ b/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c @@ -9,82 +9,89 @@ #if GFX_USE_GDISP -#define GDISP_DRIVER_VMT GDISPVMT_ST7565_QMK -#include "gdisp_lld_config.h" -#include "src/gdisp/gdisp_driver.h" +# define GDISP_DRIVER_VMT GDISPVMT_ST7565_QMK +# include "gdisp_lld_config.h" +# include "src/gdisp/gdisp_driver.h" -#include "board_st7565.h" +# include "board_st7565.h" /*===========================================================================*/ /* Driver local definitions. */ /*===========================================================================*/ -#ifndef GDISP_SCREEN_HEIGHT -#define GDISP_SCREEN_HEIGHT LCD_HEIGHT -#endif -#ifndef GDISP_SCREEN_WIDTH -#define GDISP_SCREEN_WIDTH LCD_WIDTH -#endif -#ifndef GDISP_INITIAL_CONTRAST -#define GDISP_INITIAL_CONTRAST 35 -#endif -#ifndef GDISP_INITIAL_BACKLIGHT -#define GDISP_INITIAL_BACKLIGHT 100 -#endif +# ifndef GDISP_SCREEN_HEIGHT +# define GDISP_SCREEN_HEIGHT LCD_HEIGHT +# endif +# ifndef GDISP_SCREEN_WIDTH +# define GDISP_SCREEN_WIDTH LCD_WIDTH +# endif +# ifndef GDISP_INITIAL_CONTRAST +# define GDISP_INITIAL_CONTRAST 35 +# endif +# ifndef GDISP_INITIAL_BACKLIGHT +# define GDISP_INITIAL_BACKLIGHT 100 +# endif -#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0) +# define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0) -#include "st7565.h" +# include "st7565.h" /*===========================================================================*/ /* Driver config defaults for backward compatibility. */ /*===========================================================================*/ -#ifndef ST7565_LCD_BIAS -#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 -#endif -#ifndef ST7565_ADC -#define ST7565_ADC ST7565_ADC_NORMAL -#endif -#ifndef ST7565_COM_SCAN -#define ST7565_COM_SCAN ST7565_COM_SCAN_INC -#endif -#ifndef ST7565_PAGE_ORDER -#define ST7565_PAGE_ORDER 0,1,2,3 -#endif +# ifndef ST7565_LCD_BIAS +# define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 +# endif +# ifndef ST7565_ADC +# define ST7565_ADC ST7565_ADC_NORMAL +# endif +# ifndef ST7565_COM_SCAN +# define ST7565_COM_SCAN ST7565_COM_SCAN_INC +# endif +# ifndef ST7565_PAGE_ORDER +# define ST7565_PAGE_ORDER 0, 1, 2, 3 +# endif /*===========================================================================*/ /* Driver local functions. */ /*===========================================================================*/ -typedef struct{ - bool_t buffer2; +typedef struct { + bool_t buffer2; uint8_t data_pos; uint8_t data[16]; uint8_t ram[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8]; -}PrivData; +} PrivData; // Some common routines and macros -#define PRIV(g) ((PrivData*)g->priv) -#define RAM(g) (PRIV(g)->ram) +# define PRIV(g) ((PrivData *)g->priv) +# define RAM(g) (PRIV(g)->ram) -static GFXINLINE void write_cmd(GDisplay* g, uint8_t cmd) { - PRIV(g)->data[PRIV(g)->data_pos++] = cmd; -} +static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) { PRIV(g)->data[PRIV(g)->data_pos++] = cmd; } -static GFXINLINE void flush_cmd(GDisplay* g) { +static GFXINLINE void flush_cmd(GDisplay *g) { write_data(g, PRIV(g)->data, PRIV(g)->data_pos); PRIV(g)->data_pos = 0; } -#define write_cmd2(g, cmd1, cmd2) { write_cmd(g, cmd1); write_cmd(g, cmd2); } -#define write_cmd3(g, cmd1, cmd2, cmd3) { write_cmd(g, cmd1); write_cmd(g, cmd2); write_cmd(g, cmd3); } +# define write_cmd2(g, cmd1, cmd2) \ + { \ + write_cmd(g, cmd1); \ + write_cmd(g, cmd2); \ + } +# define write_cmd3(g, cmd1, cmd2, cmd3) \ + { \ + write_cmd(g, cmd1); \ + write_cmd(g, cmd2); \ + write_cmd(g, cmd3); \ + } // Some common routines and macros -#define delay(us) gfxSleepMicroseconds(us) -#define delay_ms(ms) gfxSleepMilliseconds(ms) +# define delay(us) gfxSleepMicroseconds(us) +# define delay_ms(ms) gfxSleepMilliseconds(ms) -#define xyaddr(x, y) ((x) + ((y)>>3)*GDISP_SCREEN_WIDTH) -#define xybit(y) (1<<((y)&7)) +# define xyaddr(x, y) ((x) + ((y) >> 3) * GDISP_SCREEN_WIDTH) +# define xybit(y) (1 << ((y)&7)) /*===========================================================================*/ /* Driver exported functions. */ @@ -99,8 +106,8 @@ static GFXINLINE void flush_cmd(GDisplay* g) { LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { // The private area is the display surface. - g->priv = gfxAlloc(sizeof(PrivData)); - PRIV(g)->buffer2 = false; + g->priv = gfxAlloc(sizeof(PrivData)); + PRIV(g)->buffer2 = false; PRIV(g)->data_pos = 0; // Initialise the board interface @@ -139,22 +146,21 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { release_bus(g); /* Initialise the GDISP structure */ - g->g.Width = GDISP_SCREEN_WIDTH; - g->g.Height = GDISP_SCREEN_HEIGHT; + g->g.Width = GDISP_SCREEN_WIDTH; + g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Orientation = GDISP_ROTATE_0; - g->g.Powermode = powerOff; - g->g.Backlight = GDISP_INITIAL_BACKLIGHT; - g->g.Contrast = GDISP_INITIAL_CONTRAST; + g->g.Powermode = powerOff; + g->g.Backlight = GDISP_INITIAL_BACKLIGHT; + g->g.Contrast = GDISP_INITIAL_CONTRAST; return TRUE; } -#if GDISP_HARDWARE_FLUSH +# if GDISP_HARDWARE_FLUSH LLDSPEC void gdisp_lld_flush(GDisplay *g) { - unsigned p; + unsigned p; // Don't flush if we don't need it. - if (!(g->flags & GDISP_FLG_NEEDFLUSH)) - return; + if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return; acquire_bus(g); enter_cmd_mode(g); @@ -166,7 +172,7 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) { write_cmd(g, ST7565_RMW); flush_cmd(g); enter_data_mode(g); - write_data(g, RAM(g) + (p*GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH); + write_data(g, RAM(g) + (p * GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH); enter_cmd_mode(g); } unsigned line = (PRIV(g)->buffer2 ? 32 : 0); @@ -177,30 +183,30 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) { g->flags &= ~GDISP_FLG_NEEDFLUSH; } -#endif +# endif -#if GDISP_HARDWARE_DRAWPIXEL +# if GDISP_HARDWARE_DRAWPIXEL LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { - coord_t x, y; + coord_t x, y; - switch(g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_90: - x = g->p.y; - y = GDISP_SCREEN_HEIGHT-1 - g->p.x; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH-1 - g->p.x; - y = GDISP_SCREEN_HEIGHT-1 - g->p.y; - break; - case GDISP_ROTATE_270: - x = GDISP_SCREEN_HEIGHT-1 - g->p.y; - y = g->p.x; - break; + switch (g->g.Orientation) { + default: + case GDISP_ROTATE_0: + x = g->p.x; + y = g->p.y; + break; + case GDISP_ROTATE_90: + x = g->p.y; + y = GDISP_SCREEN_HEIGHT - 1 - g->p.x; + break; + case GDISP_ROTATE_180: + x = GDISP_SCREEN_WIDTH - 1 - g->p.x; + y = GDISP_SCREEN_HEIGHT - 1 - g->p.y; + break; + case GDISP_ROTATE_270: + x = GDISP_SCREEN_HEIGHT - 1 - g->p.y; + y = g->p.x; + break; } if (gdispColor2Native(g->p.color) != Black) RAM(g)[xyaddr(x, y)] |= xybit(y); @@ -208,53 +214,52 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { RAM(g)[xyaddr(x, y)] &= ~xybit(y); g->flags |= GDISP_FLG_NEEDFLUSH; } -#endif +# endif -#if GDISP_HARDWARE_PIXELREAD +# if GDISP_HARDWARE_PIXELREAD LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { - coord_t x, y; + coord_t x, y; - switch(g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_90: - x = g->p.y; - y = GDISP_SCREEN_HEIGHT-1 - g->p.x; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH-1 - g->p.x; - y = GDISP_SCREEN_HEIGHT-1 - g->p.y; - break; - case GDISP_ROTATE_270: - x = GDISP_SCREEN_HEIGHT-1 - g->p.y; - y = g->p.x; - break; + switch (g->g.Orientation) { + default: + case GDISP_ROTATE_0: + x = g->p.x; + y = g->p.y; + break; + case GDISP_ROTATE_90: + x = g->p.y; + y = GDISP_SCREEN_HEIGHT - 1 - g->p.x; + break; + case GDISP_ROTATE_180: + x = GDISP_SCREEN_WIDTH - 1 - g->p.x; + y = GDISP_SCREEN_HEIGHT - 1 - g->p.y; + break; + case GDISP_ROTATE_270: + x = GDISP_SCREEN_HEIGHT - 1 - g->p.y; + y = g->p.x; + break; } return (RAM(g)[xyaddr(x, y)] & xybit(y)) ? White : Black; } -#endif +# endif LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { - uint8_t* buffer = (uint8_t*)g->p.ptr; - int linelength = g->p.cx; + uint8_t *buffer = (uint8_t *)g->p.ptr; + int linelength = g->p.cx; for (int i = 0; i < g->p.cy; i++) { - unsigned dstx = g->p.x; - unsigned dsty = g->p.y + i; - unsigned srcx = g->p.x1; - unsigned srcy = g->p.y1 + i; + unsigned dstx = g->p.x; + unsigned dsty = g->p.y + i; + unsigned srcx = g->p.x1; + unsigned srcy = g->p.y1 + i; unsigned srcbit = srcy * g->p.x2 + srcx; - for(int j=0; j < linelength; j++) { - uint8_t src = buffer[srcbit / 8]; - uint8_t bit = 7-(srcbit % 8); - uint8_t bitset = (src >> bit) & 1; - uint8_t* dst = &(RAM(g)[xyaddr(dstx, dsty)]); + for (int j = 0; j < linelength; j++) { + uint8_t src = buffer[srcbit / 8]; + uint8_t bit = 7 - (srcbit % 8); + uint8_t bitset = (src >> bit) & 1; + uint8_t *dst = &(RAM(g)[xyaddr(dstx, dsty)]); if (bitset) { *dst |= xybit(dsty); - } - else { + } else { *dst &= ~xybit(dsty); } dstx++; @@ -264,66 +269,64 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { g->flags |= GDISP_FLG_NEEDFLUSH; } -#if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL +# if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL LLDSPEC void gdisp_lld_control(GDisplay *g) { - switch(g->p.x) { - case GDISP_CONTROL_POWER: - if (g->g.Powermode == (powermode_t)g->p.ptr) + switch (g->p.x) { + case GDISP_CONTROL_POWER: + if (g->g.Powermode == (powermode_t)g->p.ptr) return; + switch ((powermode_t)g->p.ptr) { + case powerOff: + case powerSleep: + case powerDeepSleep: + acquire_bus(g); + enter_cmd_mode(g); + write_cmd(g, ST7565_DISPLAY_OFF); + flush_cmd(g); + release_bus(g); + break; + case powerOn: + acquire_bus(g); + enter_cmd_mode(g); + write_cmd(g, ST7565_DISPLAY_ON); + flush_cmd(g); + release_bus(g); + break; + default: + return; + } + g->g.Powermode = (powermode_t)g->p.ptr; return; - switch((powermode_t)g->p.ptr) { - case powerOff: - case powerSleep: - case powerDeepSleep: - acquire_bus(g); - enter_cmd_mode(g); - write_cmd(g, ST7565_DISPLAY_OFF); - flush_cmd(g); - release_bus(g); - break; - case powerOn: - acquire_bus(g); - enter_cmd_mode(g); - write_cmd(g, ST7565_DISPLAY_ON); - flush_cmd(g); - release_bus(g); - break; - default: - return; - } - g->g.Powermode = (powermode_t)g->p.ptr; - return; case GDISP_CONTROL_ORIENTATION: - if (g->g.Orientation == (orientation_t)g->p.ptr) - return; - switch((orientation_t)g->p.ptr) { - /* Rotation is handled by the drawing routines */ - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Width = GDISP_SCREEN_WIDTH; - break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: - g->g.Height = GDISP_SCREEN_WIDTH; - g->g.Width = GDISP_SCREEN_HEIGHT; - break; - default: - return; + if (g->g.Orientation == (orientation_t)g->p.ptr) return; + switch ((orientation_t)g->p.ptr) { + /* Rotation is handled by the drawing routines */ + case GDISP_ROTATE_0: + case GDISP_ROTATE_180: + g->g.Height = GDISP_SCREEN_HEIGHT; + g->g.Width = GDISP_SCREEN_WIDTH; + break; + case GDISP_ROTATE_90: + case GDISP_ROTATE_270: + g->g.Height = GDISP_SCREEN_WIDTH; + g->g.Width = GDISP_SCREEN_HEIGHT; + break; + default: + return; } g->g.Orientation = (orientation_t)g->p.ptr; return; - case GDISP_CONTROL_CONTRAST: - g->g.Contrast = (unsigned)g->p.ptr & 63; - acquire_bus(g); - enter_cmd_mode(g); - write_cmd2(g, ST7565_CONTRAST, g->g.Contrast); - flush_cmd(g); - release_bus(g); - return; + case GDISP_CONTROL_CONTRAST: + g->g.Contrast = (unsigned)g->p.ptr & 63; + acquire_bus(g); + enter_cmd_mode(g); + write_cmd2(g, ST7565_CONTRAST, g->g.Contrast); + flush_cmd(g); + release_bus(g); + return; } } -#endif // GDISP_NEED_CONTROL +# endif // GDISP_NEED_CONTROL -#endif // GFX_USE_GDISP +#endif // GFX_USE_GDISP diff --git a/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h b/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h index 4446bd38bc..9ab5daac1c 100644 --- a/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h +++ b/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h @@ -14,14 +14,14 @@ /* Driver hardware support. */ /*===========================================================================*/ -#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing -#define GDISP_HARDWARE_DRAWPIXEL TRUE -#define GDISP_HARDWARE_PIXELREAD TRUE -#define GDISP_HARDWARE_CONTROL TRUE -#define GDISP_HARDWARE_BITFILLS TRUE +# define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing +# define GDISP_HARDWARE_DRAWPIXEL TRUE +# define GDISP_HARDWARE_PIXELREAD TRUE +# define GDISP_HARDWARE_CONTROL TRUE +# define GDISP_HARDWARE_BITFILLS TRUE -#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO +# define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO -#endif /* GFX_USE_GDISP */ +#endif /* GFX_USE_GDISP */ -#endif /* _GDISP_LLD_CONFIG_H */ +#endif /* _GDISP_LLD_CONFIG_H */ diff --git a/drivers/ugfx/gdisp/st7565/st7565.h b/drivers/ugfx/gdisp/st7565/st7565.h index 24924ff050..3c77a88569 100644 --- a/drivers/ugfx/gdisp/st7565/st7565.h +++ b/drivers/ugfx/gdisp/st7565/st7565.h @@ -8,32 +8,32 @@ #ifndef _ST7565_H #define _ST7565_H -#define ST7565_CONTRAST 0x81 -#define ST7565_ALLON_NORMAL 0xA4 -#define ST7565_ALLON 0xA5 -#define ST7565_POSITIVE_DISPLAY 0xA6 -#define ST7565_INVERT_DISPLAY 0xA7 -#define ST7565_DISPLAY_OFF 0xAE -#define ST7565_DISPLAY_ON 0xAF +#define ST7565_CONTRAST 0x81 +#define ST7565_ALLON_NORMAL 0xA4 +#define ST7565_ALLON 0xA5 +#define ST7565_POSITIVE_DISPLAY 0xA6 +#define ST7565_INVERT_DISPLAY 0xA7 +#define ST7565_DISPLAY_OFF 0xAE +#define ST7565_DISPLAY_ON 0xAF -#define ST7565_LCD_BIAS_7 0xA3 -#define ST7565_LCD_BIAS_9 0xA2 +#define ST7565_LCD_BIAS_7 0xA3 +#define ST7565_LCD_BIAS_9 0xA2 -#define ST7565_ADC_NORMAL 0xA0 -#define ST7565_ADC_REVERSE 0xA1 +#define ST7565_ADC_NORMAL 0xA0 +#define ST7565_ADC_REVERSE 0xA1 -#define ST7565_COM_SCAN_INC 0xC0 -#define ST7565_COM_SCAN_DEC 0xC8 +#define ST7565_COM_SCAN_INC 0xC0 +#define ST7565_COM_SCAN_DEC 0xC8 -#define ST7565_START_LINE 0x40 -#define ST7565_PAGE 0xB0 -#define ST7565_COLUMN_MSB 0x10 -#define ST7565_COLUMN_LSB 0x00 -#define ST7565_RMW 0xE0 +#define ST7565_START_LINE 0x40 +#define ST7565_PAGE 0xB0 +#define ST7565_COLUMN_MSB 0x10 +#define ST7565_COLUMN_LSB 0x00 +#define ST7565_RMW 0xE0 -#define ST7565_RESISTOR_RATIO 0x20 -#define ST7565_POWER_CONTROL 0x28 +#define ST7565_RESISTOR_RATIO 0x20 +#define ST7565_POWER_CONTROL 0x28 -#define ST7565_RESET 0xE2 +#define ST7565_RESET 0xE2 #endif /* _ST7565_H */ diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c index 39473f6067..97bece94b3 100644 --- a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c @@ -17,6 +17,19 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | GUI | Alt | Space | Alt | GUI | L1 | Ctrl | + * `-----------------------------------------------------------------------------------------' + */ [0] = LAYOUT_60_ansi( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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, @@ -25,6 +38,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL ), + /* Function + * ,-----------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | + * |-----------------------------------------------------------------------------------------+ + * | | | Up | | | | | | | |PrtSc|ScrLk|Pause| | + * |-----------------------------------------------------------------------------------------+ + * | |Left |Down |Right| | | | | | Ins |Home |PgUp | | + * |-----------------------------------------------------------------------------------------+ + * | |VolUp|VolDn|VolMu| | | | | | End |PgDn | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | L2 | | | + * `-----------------------------------------------------------------------------------------' + */ [1] = LAYOUT_60_ansi( 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_DEL, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, @@ -33,6 +59,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS ), + /* RGB + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | Reset | + * |-----------------------------------------------------------------------------------------+ + * | BL Tog |BLInc|BLDec|BLStp| | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | RGB Tog |Mode |Hue I|Sat I|Val I|Spd I|Plain|Breat|Rnbow|Swirl| | | | + * |-----------------------------------------------------------------------------------------+ + * | |RMode|Hue D|Sat D|Val D|Spd D|Snake|Knigh|Xmas |Gradi| | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ [2] = LAYOUT_60_ansi( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/config.h b/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/config.h new file mode 100644 index 0000000000..65293382cf --- /dev/null +++ b/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Chuck "@vosechu" Lauer Vose + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/keymap.c b/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/keymap.c new file mode 100644 index 0000000000..d5b9f901a4 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2018 Chuck "@vosechu" Lauer Vose + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define SPACEFN LT(1, KC_SPC) +#define CTL_GRV CTL_T(KC_GRV) +#define ALT_TAB ALT_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS , KC_EQL , KC_BSPC , + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC , KC_RBRC , KC_BSLS , + KC_CAPS , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , KC_ENT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , + CTL_GRV , ALT_TAB , KC_LGUI , SPACEFN , KC_RALT , KC_RGUI , MO(1) , KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + 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_DEL , + KC_TRNS , KC_TRNS , KC_UP , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_PSCR , KC_SLCK , KC_PAUS , KC_TRNS , + KC_TRNS , KC_LEFT , KC_DOWN , KC_RGHT , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_INS , KC_HOME , KC_PGUP , KC_TRNS , + KC_TRNS , KC_VOLU , KC_VOLD , KC_MUTE , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_END , KC_PGDN , KC_TRNS , + KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , MO(2) , KC_TRNS , KC_TRNS + ), + + [2] = LAYOUT_60_ansi( + KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , RESET , + BL_TOGG , BL_INC , BL_DEC , BL_STEP , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , + RGB_TOG , RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , RGB_SPI , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , KC_TRNS , KC_TRNS , KC_TRNS , + KC_TRNS , RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , RGB_SPD , RGB_M_SN , RGB_M_K , RGB_M_X , RGB_M_G , KC_TRNS , KC_TRNS , + KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS + ) +}; diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/readme.md b/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/readme.md new file mode 100644 index 0000000000..97e9453b7c --- /dev/null +++ b/keyboards/1upkeyboards/1up60hse/keymaps/vosechu/readme.md @@ -0,0 +1,6 @@ +# 1up60hse keymap made by vosechu + +Tweaks from default + +* Add in SpaceFN so arrows are reachable with just left hand (leaving right free for mousing). +* Also add tab/grv under the alt/ctrl keys to make those easier to reach. diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index 72e6849e04..09caf0045a 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.c b/keyboards/1upkeyboards/1up60hte/1up60hte.c index 460e42a0e5..3af0e9d400 100644 --- a/keyboards/1upkeyboards/1up60hte/1up60hte.c +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.c @@ -16,3 +16,19 @@ along with this program. If not, see . */ #include "1up60hte.h" + +void keyboard_pre_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(B6); + keyboard_pre_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B6); + } else { + writePinHigh(B6); + } + led_set_user(usb_led); +} \ No newline at end of file diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c index 359ac75406..2f91e1c76e 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c @@ -31,22 +31,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; - -void matrix_init_user(void) { - setPinOutput(B6); -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B6); - } else { - writePinHigh(B6); - } -} diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c index 5312e3b675..81e29ec191 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c @@ -31,22 +31,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; - -void matrix_init_user(void) { - setPinOutput(B6); -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B6); - } else { - writePinHigh(B6); - } -} diff --git a/keyboards/1upkeyboards/1up60hte/readme.md b/keyboards/1upkeyboards/1up60hte/readme.md index 93767c541f..b49773fd77 100644 --- a/keyboards/1upkeyboards/1up60hte/readme.md +++ b/keyboards/1upkeyboards/1up60hte/readme.md @@ -8,7 +8,6 @@ A 60% PCB with USB C, RGB underglow, backlighting, hotswappable switches, and a Keyboard Maintainer: [Bubnick](https://github.com/bubnick) Hardware Supported: 1up60hte 60% PCB - Hardware Availability: [1upkeyboards.com](https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index 860a754a64..d2bedea1b6 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -1,50 +1,20 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -54,6 +24,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes -EXTRAFLAGS += -flto LAYOUTS = 60_hhkb diff --git a/keyboards/1upkeyboards/1up60rgb/info.json b/keyboards/1upkeyboards/1up60rgb/info.json index 67f94b7fe1..2185f0bb19 100644 --- a/keyboards/1upkeyboards/1up60rgb/info.json +++ b/keyboards/1upkeyboards/1up60rgb/info.json @@ -14,7 +14,7 @@ }, "LAYOUT_60_iso": { - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"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":1, "w":1.25, "h":2}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, "LAYOUT_60_ansi_split_bs_rshift": { diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c index 8567b780a7..435a631815 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c @@ -18,15 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - ; - - switch (id) { - - } - return MACRO_NONE; -} - void matrix_init_user(void) { } diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c index 42fcb6cf9b..39edd00ff5 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c @@ -18,15 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - ; - - switch (id) { - - } - return MACRO_NONE; -} - void matrix_init_user(void) { } diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c index 485010eef1..0b0b51d595 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c @@ -18,15 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - ; - - switch (id) { - - } - return MACRO_NONE; -} - void matrix_init_user(void) { } diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk index 8b1cf6667f..98a1e93a1b 100644 --- a/keyboards/1upkeyboards/1up60rgb/rules.mk +++ b/keyboards/1upkeyboards/1up60rgb/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk index 31042dfb81..07a403cc11 100644 --- a/keyboards/1upkeyboards/super16/rules.mk +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -#EXTRAFLAGS += -flto - # Build Options # change yes to no to disable # diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h index 23b590c2c1..803d9f1151 100644 --- a/keyboards/1upkeyboards/sweet16/config.h +++ b/keyboards/1upkeyboards/sweet16/config.h @@ -4,8 +4,6 @@ /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x2010 -#define DEVICE_VER 0x0001 #define MANUFACTURER 1up Keyboards #define PRODUCT Sweet16 #define DESCRIPTION 4x4 grid @@ -14,34 +12,11 @@ #define MATRIX_ROWS 4 #define MATRIX_COLS 4 -/* key matrix pins */ -#define MATRIX_ROW_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { D1, D0, D4, C6 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - /* number of backlight levels */ - -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 3 -#endif - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +#define BACKLIGHT_LEVELS 10 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define RGB_DI_PIN B1 -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 1 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif diff --git a/keyboards/1upkeyboards/sweet16/info.json b/keyboards/1upkeyboards/sweet16/info.json index 445a5909ec..c292f0364e 100644 --- a/keyboards/1upkeyboards/sweet16/info.json +++ b/keyboards/1upkeyboards/sweet16/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "Sweet 16", "url": "", - "maintainer": "qmk", + "maintainer": "skullydazed", "width": 4, "height": 4, "layouts": { diff --git a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c index 4cc754dc16..4778d2108c 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c @@ -25,21 +25,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - - #ifndef CONVERT_TO_PROTON_C - /* Map RXLED to USB_LED_NUM_LOCK */ - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRB |= (1 << 0); PORTB &= ~(1 << 0); - } else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); - } - - /* Map TXLED to USB_LED_CAPS_LOCK */ - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= (1 << 5); PORTD &= ~(1 << 5); - } else { - DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); - } - #endif +#ifdef ENCODER_ENABLE +#include "encoder.h" +void encoder_update_user(int8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } } +#endif diff --git a/keyboards/1upkeyboards/sweet16/readme.md b/keyboards/1upkeyboards/sweet16/readme.md index f096a5fc99..0e3cbcaa66 100644 --- a/keyboards/1upkeyboards/sweet16/readme.md +++ b/keyboards/1upkeyboards/sweet16/readme.md @@ -1,13 +1,12 @@ # Sweet 16 Macropad -A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards +A 4x4 numpad/macro pad sold by 1up Keyboards. -Keyboard Maintainer: QMK Community -Hardware Supported: Sweet16 Keyboard PCB -Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) +* Keyboard Maintainer: skullydazed +* Hardware Supported: Sweet16 Keyboard PCB +* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) -Make example for this keyboard (after setting up your build environment): - - make 1upkeyboards/sweet16: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). +Revisions: +* [v1](./v1/)- The original macropad, designed by Bishop Keyboards +* [v2/promicro](./v2/promicro)- The second macropad built with a Pro Micro, designed by Clueboard +* [v2/proton_c](./v2/proton_c)- The second macropad built with a Proton C, designed by Clueboard diff --git a/keyboards/1upkeyboards/sweet16/rules.mk b/keyboards/1upkeyboards/sweet16/rules.mk index e3436dc338..d7e57eb33e 100644 --- a/keyboards/1upkeyboards/sweet16/rules.mk +++ b/keyboards/1upkeyboards/sweet16/rules.mk @@ -1,57 +1,12 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options -# comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +DEFAULT_FOLDER = 1upkeyboards/sweet16/v1 +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes -EXTRAFLAGS += -flto +RGBLIGHT_ENABLE = no diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h new file mode 100644 index 0000000000..56fd16650c --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/config.h @@ -0,0 +1,28 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x2010 +#define DEVICE_VER 0x0001 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D1, D0, D4, C6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Underglow options */ +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/1upkeyboards/sweet16/v1/readme.md b/keyboards/1upkeyboards/sweet16/v1/readme.md new file mode 100644 index 0000000000..a36197006c --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/readme.md @@ -0,0 +1,13 @@ +# Sweet16 V1 + +A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Sweet16 V1 PCB +* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/sweet16/v1: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). diff --git a/keyboards/1upkeyboards/sweet16/v1/rules.mk b/keyboards/1upkeyboards/sweet16/v1/rules.mk new file mode 100644 index 0000000000..09bd9e9e25 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/rules.mk @@ -0,0 +1,17 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality + +LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.c b/keyboards/1upkeyboards/sweet16/v1/v1.c new file mode 100644 index 0000000000..053620d333 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/v1.c @@ -0,0 +1,21 @@ +#include "v1.h" + +void led_set_kb(uint8_t usb_led) { +#ifndef CONVERT_TO_PROTON_C + /* Map RXLED to USB_LED_NUM_LOCK */ + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + setPinOutput(B0); + writePinLow(B0); + } else { + setPinInput(B0); + } + + /* Map TXLED to USB_LED_CAPS_LOCK */ + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(D5); + writePinLow(D5); + } else { + setPinInput(D5); + } +#endif +} diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.h b/keyboards/1upkeyboards/sweet16/v1/v1.h new file mode 100644 index 0000000000..7320ccd9e0 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/v1.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +// Any changes to the layout names and/or definitions must also be made to info.json + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_numpad_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K31, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { KC_NO, K31, K32, KC_NO } \ +} + diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/config.h b/keyboards/1upkeyboards/sweet16/v2/promicro/config.h new file mode 100644 index 0000000000..bd50b69608 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/config.h @@ -0,0 +1,31 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x2011 +#define DEVICE_VER 0x0001 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, D1, E6, B5 } +#define MATRIX_COL_PINS { F7, F6, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Encoder pins */ +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +#define ENCODER_RESOLUTION 4 + +/* Underglow options */ +#define RGB_DI_PIN F4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c new file mode 100644 index 0000000000..0176dc1a3c --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c @@ -0,0 +1,8 @@ +#include "promicro.h" +#include "encoder.h" + +#ifdef ENCODER_ENABLED +void encoder_update_kb(int8_t index, bool clockwise) { + encoder_update_user(index, clockwise); +} +#endif diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.h b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.h new file mode 100644 index 0000000000..7320ccd9e0 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +// Any changes to the layout names and/or definitions must also be made to info.json + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_numpad_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K31, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { KC_NO, K31, K32, KC_NO } \ +} + diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/readme.md b/keyboards/1upkeyboards/sweet16/v2/promicro/readme.md new file mode 100644 index 0000000000..584b446511 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/readme.md @@ -0,0 +1,13 @@ +# Sweet16 V2 (Pro Micro) + +A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Clueboard + +* Keyboard Maintainer: skullydazed +* Hardware Supported: Sweet16 V2 PCB, Pro Micro +* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/sweet16/v2/promicro: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). diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk b/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk new file mode 100644 index 0000000000..9f38504a8c --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +## Features +CONSOLE_ENABLE = yes + +## On a Pro Micro you have to choose between underglow and the rotary encoder. +RGBLIGHT_ENABLE = no +ENCODER_ENABLE = yes + +LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h b/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h new file mode 100644 index 0000000000..6f27f0b623 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h @@ -0,0 +1,20 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x2011 +#define DEVICE_VER 0x0001 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5, B7, B2, B0 } +#define MATRIX_COL_PINS { B8, A0, A10, A9 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Encoder pins */ +#define ENCODERS_PAD_A { A2 } +#define ENCODERS_PAD_B { A1 } +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.c b/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.c new file mode 100644 index 0000000000..b08e33e81b --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.c @@ -0,0 +1 @@ +#include "proton_c.h" diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.h b/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.h new file mode 100644 index 0000000000..7320ccd9e0 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +// Any changes to the layout names and/or definitions must also be made to info.json + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_numpad_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K31, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { KC_NO, K31, K32, KC_NO } \ +} + diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/readme.md b/keyboards/1upkeyboards/sweet16/v2/proton_c/readme.md new file mode 100644 index 0000000000..6806cc5739 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/readme.md @@ -0,0 +1,13 @@ +# Sweet16 V2 (Proton C) + +A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Clueboard + +* Keyboard Maintainer: skullydazed +* Hardware Supported: Sweet16 V2 PCB, Proton C +* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/sweet16/v2/proton_c: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). diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk b/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk new file mode 100644 index 0000000000..dedcf043af --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk @@ -0,0 +1,7 @@ +# MCU name +MCU = STM32F303 + +## Features +CONSOLE_ENABLE = yes +ENCODER_ENABLE = yes +AUDIO_ENABLE = yes diff --git a/keyboards/2_milk/2_milk.c b/keyboards/2_milk/2_milk.c new file mode 100644 index 0000000000..36d50e9c7c --- /dev/null +++ b/keyboards/2_milk/2_milk.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#include "2_milk.h" diff --git a/keyboards/2_milk/2_milk.h b/keyboards/2_milk/2_milk.h new file mode 100644 index 0000000000..8f294817f9 --- /dev/null +++ b/keyboards/2_milk/2_milk.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, \ + K01 \ +) { \ + { K00 }, \ + { K01 } \ +} diff --git a/keyboards/2_milk/config.h b/keyboards/2_milk/config.h new file mode 100644 index 0000000000..9e7228b17e --- /dev/null +++ b/keyboards/2_milk/config.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rionlion100 +#define PRODUCT 2% Milk +#define DESCRIPTION A milk themed 2% Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 1 + +/* Milk default pinout */ +#define DIRECT_PINS { \ + {D4}, \ + {C6} \ +} +#define UNUSED_PINS + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN B6 +#define RGBLED_NUM 1 +#endif diff --git a/keyboards/2_milk/info.json b/keyboards/2_milk/info.json new file mode 100644 index 0000000000..0acf002f96 --- /dev/null +++ b/keyboards/2_milk/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "2% Milk", + "keyboard_folder": "2_milk", + "url": "", + "maintainer": "rionlion100", + "width": 1, + "height": 2, + "layouts": { + "LAYOUT": { + "key_count": 2, + "layout": [ {"x": 0, "y": 0 }, {"x": 0, "y": 1 }] + } + } +} + diff --git a/keyboards/2_milk/keymaps/binary/keymap.c b/keyboards/2_milk/keymaps/binary/keymap.c new file mode 100644 index 0000000000..c8df8e9ff0 --- /dev/null +++ b/keyboards/2_milk/keymaps/binary/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_P0, + KC_P1 + ) +}; diff --git a/keyboards/2_milk/keymaps/binary/readme.md b/keyboards/2_milk/keymaps/binary/readme.md new file mode 100644 index 0000000000..5ebcbd3e58 --- /dev/null +++ b/keyboards/2_milk/keymaps/binary/readme.md @@ -0,0 +1,2 @@ +# Binary keymap +0 and 1 that's it diff --git a/keyboards/2_milk/keymaps/copypasta/keymap.c b/keyboards/2_milk/keymaps/copypasta/keymap.c new file mode 100644 index 0000000000..b9b8005a0f --- /dev/null +++ b/keyboards/2_milk/keymaps/copypasta/keymap.c @@ -0,0 +1,9 @@ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + RCTL(KC_C), + RCTL(KC_V) + ) +}; diff --git a/keyboards/2_milk/keymaps/copypasta/readme.md b/keyboards/2_milk/keymaps/copypasta/readme.md new file mode 100644 index 0000000000..6c2f4e8fbf --- /dev/null +++ b/keyboards/2_milk/keymaps/copypasta/readme.md @@ -0,0 +1,2 @@ +# Copy/Paste Keymap +![Picture](https://i.imgur.com/7LMZZrL.png) diff --git a/keyboards/2_milk/keymaps/default/keymap.c b/keyboards/2_milk/keymaps/default/keymap.c new file mode 100644 index 0000000000..1f327eee9a --- /dev/null +++ b/keyboards/2_milk/keymaps/default/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_Z, + KC_X + ) +}; diff --git a/keyboards/2_milk/keymaps/default/readme.md b/keyboards/2_milk/keymaps/default/readme.md new file mode 100644 index 0000000000..4482bce34a --- /dev/null +++ b/keyboards/2_milk/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# Default keymap for 2% Milk +![Picture](https://i.imgur.com/9PsZ6wa.png) diff --git a/keyboards/2_milk/keymaps/emoji/config.h b/keyboards/2_milk/keymaps/emoji/config.h new file mode 100644 index 0000000000..90e4d63102 --- /dev/null +++ b/keyboards/2_milk/keymaps/emoji/config.h @@ -0,0 +1,2 @@ +#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC +#define TAPPING_TERM 300 \ No newline at end of file diff --git a/keyboards/2_milk/keymaps/emoji/keymap.c b/keyboards/2_milk/keymaps/emoji/keymap.c new file mode 100644 index 0000000000..024a6a054b --- /dev/null +++ b/keyboards/2_milk/keymaps/emoji/keymap.c @@ -0,0 +1,53 @@ +#include QMK_KEYBOARD_H + +enum tapdance_keycodes { + TD_KEY_1, + TD_KEY_2, +}; + +void dance_key_one (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); // ¯\_(ツ)_/¯ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 2) { + cycle_unicode_input_mode(+1); + reset_tap_dance (state); + } +} + +void dance_key_two (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("0CA0 005F 0CA0"); // ಠ_ಠ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 2) { + send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); // (ノಠ痊ಠ)ノ彡┻━┻ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 3) { + send_unicode_hex_string("256D 2229 256E 0028 002D 005F 002D 0029 256D 2229 256E"); // ╭∩╮(-_-)╭∩╮ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 4) { + send_unicode_hex_string("0028 3065 FFE3 0020 00B3 FFE3 0029 3065"); // (づ ̄ ³ ̄)づ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 5) { + send_unicode_hex_string("0028 FE3A FE39 FE3A 0029"); // (︺︹︺) + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_KEY_1] = ACTION_TAP_DANCE_FN(dance_key_one), + [TD_KEY_2] = ACTION_TAP_DANCE_FN(dance_key_two), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + TD(TD_KEY_1), + TD(TD_KEY_2) + ), +}; diff --git a/keyboards/2_milk/keymaps/emoji/readme.md b/keyboards/2_milk/keymaps/emoji/readme.md new file mode 100644 index 0000000000..1d5a08730d --- /dev/null +++ b/keyboards/2_milk/keymaps/emoji/readme.md @@ -0,0 +1,39 @@ +# Emoji Keymap +![Picture](https://i.imgur.com/1zEZ9Lq.png) + +# Unicode Setup + +Unicode input in QMK works by inputting a sequence of characters to the +OS, sort of like a macro. Unfortunately, the way this is done differs +for each platform. Specifically, each platform requires a different +combination of keys to trigger Unicode input. Therefore, a +corresponding input mode has to be set in QMK. + +Documentation: [Feature Unicode](https://beta.docs.qmk.fm/features/feature_unicode#input-modes) + +On this keymap the default unicode mode it's `UC_LNX`. +You can change it permanently tapping 2 times the KeyOne to select the next mode. + +## Unicode Mode List +- UC_LNX +- UC_OSX +- UC_WIN +- UC_WINC + +# Keymap +To add more functionality to this Minimal Keyboard, +it's implemented the tap dance feature, so pressing the same key +multiples times will produce different emojis. + +## Key One + +- 1 Tap: `¯\_(ツ)_/¯` +- 2 Taps: Switch Unicode Input Type + +## Key Two + +- 1 Tap: `ಠ_ಠ` +- 2 Taps: `(ノಠ痊ಠ)ノ彡┻━┻` +- 3 Taps: `╭∩╮(-_-)╭∩╮` +- 4 Taps: `(づ ̄ ³ ̄)づ` +- 5 Taps: `(︺︹︺)` \ No newline at end of file diff --git a/keyboards/2_milk/keymaps/emoji/rules.mk b/keyboards/2_milk/keymaps/emoji/rules.mk new file mode 100644 index 0000000000..7a64eb9023 --- /dev/null +++ b/keyboards/2_milk/keymaps/emoji/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes # Unicode +TAP_DANCE_ENABLE = yes # Tap Dance \ No newline at end of file diff --git a/keyboards/2_milk/keymaps/excessbread/keymap.c b/keyboards/2_milk/keymaps/excessbread/keymap.c new file mode 100644 index 0000000000..a01b47f271 --- /dev/null +++ b/keyboards/2_milk/keymaps/excessbread/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_LGUI, + KC_F11 + ) +}; diff --git a/keyboards/2_milk/keymaps/excessbread/readme.md b/keyboards/2_milk/keymaps/excessbread/readme.md new file mode 100644 index 0000000000..a6535e62cf --- /dev/null +++ b/keyboards/2_milk/keymaps/excessbread/readme.md @@ -0,0 +1,2 @@ +# ExcessBread's keymap +requested by excessbread diff --git a/keyboards/2_milk/keymaps/mikethetiger/keymap.c b/keyboards/2_milk/keymaps/mikethetiger/keymap.c new file mode 100644 index 0000000000..20e2292f08 --- /dev/null +++ b/keyboards/2_milk/keymaps/mikethetiger/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_VOLU, + KC_VOLD + ) +}; diff --git a/keyboards/2_milk/keymaps/mikethetiger/readme.md b/keyboards/2_milk/keymaps/mikethetiger/readme.md new file mode 100644 index 0000000000..677732b057 --- /dev/null +++ b/keyboards/2_milk/keymaps/mikethetiger/readme.md @@ -0,0 +1 @@ +# mikethetiger's keymap for 2% Milk diff --git a/keyboards/2_milk/keymaps/mikethetiger/rules.mk b/keyboards/2_milk/keymaps/mikethetiger/rules.mk new file mode 100644 index 0000000000..b5f038ef23 --- /dev/null +++ b/keyboards/2_milk/keymaps/mikethetiger/rules.mk @@ -0,0 +1,13 @@ +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. diff --git a/keyboards/2_milk/keymaps/mouse/keymap.c b/keyboards/2_milk/keymaps/mouse/keymap.c new file mode 100644 index 0000000000..a8ba44fb46 --- /dev/null +++ b/keyboards/2_milk/keymaps/mouse/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_BTN1, + KC_BTN2 + ) +}; diff --git a/keyboards/2_milk/keymaps/mouse/readme.md b/keyboards/2_milk/keymaps/mouse/readme.md new file mode 100644 index 0000000000..8ecb99eddb --- /dev/null +++ b/keyboards/2_milk/keymaps/mouse/readme.md @@ -0,0 +1,2 @@ +# left and right mouse buttons +requested by WanderingVagrant diff --git a/keyboards/2_milk/readme.md b/keyboards/2_milk/readme.md new file mode 100644 index 0000000000..ce0f216bba --- /dev/null +++ b/keyboards/2_milk/readme.md @@ -0,0 +1,19 @@ +# 2% Milk + +![2%Milk](https://i.imgur.com/Ud96uXn.png) + +A 2% Meme board themed around a milk carton + +Keyboard Maintainer: [Rionlion100](https://github.com/rionlion100) +Hardware Availability: [Open Source](https://github.com/Rionlion100/Spaceboards/tree/master/Keyboards/2%25%20Milk) + +Make example for this keyboard (after setting up your build environment): + + make 2_milk: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). + +### Credits ++ Case design by Soft ++ PCB by PyroL ++ Name by jetpacktuxedo diff --git a/keyboards/2_milk/rules.mk b/keyboards/2_milk/rules.mk new file mode 100644 index 0000000000..57c6d32c81 --- /dev/null +++ b/keyboards/2_milk/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. diff --git a/keyboards/2key2crawl/2key2crawl.c b/keyboards/2key2crawl/2key2crawl.c new file mode 100644 index 0000000000..fe2161bef4 --- /dev/null +++ b/keyboards/2key2crawl/2key2crawl.c @@ -0,0 +1 @@ +#include "2key2crawl.h" diff --git a/keyboards/2key2crawl/2key2crawl.h b/keyboards/2key2crawl/2key2crawl.h new file mode 100644 index 0000000000..6e8ee64208 --- /dev/null +++ b/keyboards/2key2crawl/2key2crawl.h @@ -0,0 +1,12 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K15, \ + K10, K11, K12, K13, K14, K16 \ +) { \ + { K00, K01, K02, K03, KC_NO, KC_NO, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ +} + diff --git a/keyboards/2key2crawl/config.h b/keyboards/2key2crawl/config.h new file mode 100644 index 0000000000..b93dcc7fa7 --- /dev/null +++ b/keyboards/2key2crawl/config.h @@ -0,0 +1,44 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6090 +#define DEVICE_VER 0x0002 +#define MANUFACTURER WoodKeys.click +#define PRODUCT 2Key2Crawl +#define DESCRIPTION ATX Keycrawl 2018 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 7 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C4, C5 } +#define MATRIX_COL_PINS { B3, B4, B5, B6, B7, C7, B2 } +#define UNUSED_PINS + + +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D1 } +#define ENCODER_RESOLUTION 1 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN C6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 3 +#endif diff --git a/keyboards/2key2crawl/keymaps/default/keymap.c b/keyboards/2key2crawl/keymaps/default/keymap.c new file mode 100644 index 0000000000..71222d40f8 --- /dev/null +++ b/keyboards/2key2crawl/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + + + +void encoder_update_user(int8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } + } +} + diff --git a/keyboards/2key2crawl/keymaps/tabs/keymap.c b/keyboards/2key2crawl/keymaps/tabs/keymap.c new file mode 100644 index 0000000000..fcf4a2af87 --- /dev/null +++ b/keyboards/2key2crawl/keymaps/tabs/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code16(C(KC_T)); + } else { + tap_code16(C(KC_W)); + } + } +} + diff --git a/keyboards/2key2crawl/keymaps/vol/keymap.c b/keyboards/2key2crawl/keymaps/vol/keymap.c new file mode 100644 index 0000000000..8ffd3f58c8 --- /dev/null +++ b/keyboards/2key2crawl/keymaps/vol/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/2key2crawl/readme.md b/keyboards/2key2crawl/readme.md new file mode 100644 index 0000000000..7651f40254 --- /dev/null +++ b/keyboards/2key2crawl/readme.md @@ -0,0 +1,16 @@ +# 2Key2CrawlPad + +![2Key2CrawlPad](https://i.imgur.com/ON7m7RI.jpg) + +A 2x5 macropad/numpad with a rotary encoder, exclusively available at Austin Keycrawl 2018 (12-01-2018). + +Keyboard Maintainer: QMK Community +Keyboard Designer: [Cole Markham](https://github.com/colemarkham) +Hardware Supported: Crawlpad +Hardware Availability: Exclusive to Keycrawl events, contact [awwwwwwyeaahhhhhh](https://www.reddit.com/user/awwwwwwyeaahhhhhh) for more details. + +Make example for this keyboard (after setting up your build environment): + + make 2key2crawl: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). diff --git a/keyboards/2key2crawl/rules.mk b/keyboards/2key2crawl/rules.mk new file mode 100644 index 0000000000..c7bacab796 --- /dev/null +++ b/keyboards/2key2crawl/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # [Crawlpad] Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = no # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port. +ENCODER_ENABLE = yes # [2Key2crawl] Make the knobs turn diff --git a/keyboards/30wer/rules.mk b/keyboards/30wer/rules.mk index 9d77ec5461..1aeca9a545 100644 --- a/keyboards/30wer/rules.mk +++ b/keyboards/30wer/rules.mk @@ -1,45 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/40percentclub/25/rules.mk b/keyboards/40percentclub/25/rules.mk index bfcdce7c99..3321a84025 100644 --- a/keyboards/40percentclub/25/rules.mk +++ b/keyboards/40percentclub/25/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/4pack/4pack.c b/keyboards/40percentclub/4pack/4pack.c new file mode 100644 index 0000000000..98f22a65a5 --- /dev/null +++ b/keyboards/40percentclub/4pack/4pack.c @@ -0,0 +1,54 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include "4pack.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(F4); // cathodes + setPinOutput(F5); // cathodes + + // Do the rest + matrix_init_user(); +} + +/* +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/40percentclub/4pack/4pack.h b/keyboards/40percentclub/4pack/4pack.h new file mode 100644 index 0000000000..1340300ace --- /dev/null +++ b/keyboards/40percentclub/4pack/4pack.h @@ -0,0 +1,33 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ +} diff --git a/keyboards/40percentclub/4pack/config.h b/keyboards/40percentclub/4pack/config.h new file mode 100644 index 0000000000..33b5df6d58 --- /dev/null +++ b/keyboards/40percentclub/4pack/config.h @@ -0,0 +1,257 @@ +/* +Copyright 2019 Arda Kilicdagi + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 40percentclub +#define PRODUCT 4pack +#define DESCRIPTION A 1x4 custom macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +// #define MATRIX_ROW_PINS { B0 } // B0 equivalents the ground pin +// #define MATRIX_COL_PINS { E6, D7, C6, D4 } +#define DIRECT_PINS { \ + { E6, D7, C6, D4 } \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_LED_COUNT 2 +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { F6, F7 } + + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/4pack/info.json b/keyboards/40percentclub/4pack/info.json new file mode 100644 index 0000000000..8dd164e4b2 --- /dev/null +++ b/keyboards/40percentclub/4pack/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "4pack", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}] + } + } +} \ No newline at end of file diff --git a/keyboards/40percentclub/4pack/keymaps/default/config.h b/keyboards/40percentclub/4pack/keymaps/default/config.h new file mode 100644 index 0000000000..c76819ce5e --- /dev/null +++ b/keyboards/40percentclub/4pack/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/4pack/keymaps/default/keymap.c b/keyboards/40percentclub/4pack/keymaps/default/keymap.c new file mode 100644 index 0000000000..19264651b6 --- /dev/null +++ b/keyboards/40percentclub/4pack/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_A, KC_S, KC_D, KC_F + ), +}; + + +void matrix_init_user(void) { } diff --git a/keyboards/40percentclub/4pack/keymaps/default/readme.md b/keyboards/40percentclub/4pack/keymaps/default/readme.md new file mode 100644 index 0000000000..00bf43cb99 --- /dev/null +++ b/keyboards/40percentclub/4pack/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for 4pack diff --git a/keyboards/40percentclub/4pack/readme.md b/keyboards/40percentclub/4pack/readme.md new file mode 100644 index 0000000000..5fcfbf892d --- /dev/null +++ b/keyboards/40percentclub/4pack/readme.md @@ -0,0 +1,17 @@ +# 4 Pack + +![4pack](https://i.imgur.com/rioXXq5l.jpg) + +A 4-key macropad PCB with its switch and LED pins wired directly to microcontroller IO pins. + +You can find the main blog post about this macropad [here](http://www.40percent.club/2017/07/4-pack.html), also the Gerber files and other documentation is located [here](https://git.40percent.club/di0ib/Misc/src/branch/master/4pack). + +Keyboard Maintainer: [Arda Kilicdagi](http://github.com/ardakilic), [The QMK Community](https://github.com/qmk) +Hardware Supported: 4 Pack PCB, Pro Micro +Hardware Availability: [40percent.club](https://git.40percent.club/di0ib/Misc/src/branch/master/4pack) + +Make example for this macropad (after setting up your build environment): + + make 40percentclub/4pack: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). diff --git a/keyboards/40percentclub/4pack/rules.mk b/keyboards/40percentclub/4pack/rules.mk new file mode 100644 index 0000000000..a0c9d34f54 --- /dev/null +++ b/keyboards/40percentclub/4pack/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk index 4ab5e7431c..c653c6753d 100644 --- a/keyboards/40percentclub/4x4/rules.mk +++ b/keyboards/40percentclub/4x4/rules.mk @@ -1,61 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk index 237de64977..d8b82248c6 100644 --- a/keyboards/40percentclub/5x5/rules.mk +++ b/keyboards/40percentclub/5x5/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/6lit/rules.mk b/keyboards/40percentclub/6lit/rules.mk index 3275651650..db09b6c5f6 100644 --- a/keyboards/40percentclub/6lit/rules.mk +++ b/keyboards/40percentclub/6lit/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/foobar/rules.mk b/keyboards/40percentclub/foobar/rules.mk index 155a7daacb..4b77d4cdba 100644 --- a/keyboards/40percentclub/foobar/rules.mk +++ b/keyboards/40percentclub/foobar/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c index ae6f158627..9d1a67bd38 100644 --- a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c @@ -18,46 +18,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void matrix_init_user(void) { -} +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + // Set our LED pins as output + setPinOutput(D5); + setPinOutput(B0); } void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRD |= (1 << 5); PORTD &= ~(1 << 5); + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(D5); } else { - DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); + writePinHigh(D5); } - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 0); PORTB &= ~(1 << 0); + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B0); } else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); + writePinHigh(B0); } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - } diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c index ca3da579a1..2c3e872265 100644 --- a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_RAISE] = LAYOUT_ortho_3x10( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_7, KC_9, KC_0, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC, _______, KC_QUOT, KC_SCLN, _______, OS_LCTL, OS_LGUI, OS_LALT, KC_GRV, _______, KC_TAB, KC_BSLS, KC_COMM, KC_DOT, KC_SLSH ), diff --git a/keyboards/40percentclub/gherkin/rules.mk b/keyboards/40percentclub/gherkin/rules.mk index 1e0b346417..190aea355a 100644 --- a/keyboards/40percentclub/gherkin/rules.mk +++ b/keyboards/40percentclub/gherkin/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk index cc5fccee98..62d9e37ada 100644 --- a/keyboards/40percentclub/half_n_half/rules.mk +++ b/keyboards/40percentclub/half_n_half/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/i75/promicro/rules.mk b/keyboards/40percentclub/i75/promicro/rules.mk index dc6f196237..e6fef51727 100644 --- a/keyboards/40percentclub/i75/promicro/rules.mk +++ b/keyboards/40percentclub/i75/promicro/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/40percentclub/i75/teensy2/rules.mk b/keyboards/40percentclub/i75/teensy2/rules.mk index 3fb7c7e5a7..ae398e2588 100644 --- a/keyboards/40percentclub/i75/teensy2/rules.mk +++ b/keyboards/40percentclub/i75/teensy2/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/40percentclub/luddite/keymaps/default/keymap.c b/keyboards/40percentclub/luddite/keymaps/default/keymap.c index 4d6ae0d524..fa3a83ba87 100644 --- a/keyboards/40percentclub/luddite/keymaps/default/keymap.c +++ b/keyboards/40percentclub/luddite/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -15,18 +13,18 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_60_ansi( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , KC_RGUI , MO(_FN1) , KC_RCTL + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT , KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL ), [_FN1] = LAYOUT_60_ansi( - KC_GESC, 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_BSPC, \ - RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_GRV, _______, _______, _______, _______, _______, _______, _______ + KC_GESC, 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_BSPC, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_GRV, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/40percentclub/luddite/keymaps/tzarc/config.h b/keyboards/40percentclub/luddite/keymaps/tzarc/config.h new file mode 100644 index 0000000000..f8feb798d4 --- /dev/null +++ b/keyboards/40percentclub/luddite/keymaps/tzarc/config.h @@ -0,0 +1,6 @@ +#undef RGBLED_NUM +#define RGBLED_NUM 16 + +#define QMK_ESC_OUTPUT F4 +#define QMK_ESC_INPUT D3 +#define QMK_LED B0 diff --git a/keyboards/40percentclub/luddite/keymaps/tzarc/keymap.c b/keyboards/40percentclub/luddite/keymaps/tzarc/keymap.c new file mode 100644 index 0000000000..dfa1c499c2 --- /dev/null +++ b/keyboards/40percentclub/luddite/keymaps/tzarc/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT , KC_SPC, KC_RALT, KC_APP, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_60_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_GRV, _______, _______, _______, _______, KC_RGUI, _______, _______ + ) +}; diff --git a/keyboards/40percentclub/luddite/keymaps/tzarc/rules.mk b/keyboards/40percentclub/luddite/keymaps/tzarc/rules.mk new file mode 100644 index 0000000000..0613ea8667 --- /dev/null +++ b/keyboards/40percentclub/luddite/keymaps/tzarc/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = qmk-dfu diff --git a/keyboards/40percentclub/luddite/luddite.h b/keyboards/40percentclub/luddite/luddite.h index 1ba743e9e7..5b8b95fea4 100644 --- a/keyboards/40percentclub/luddite/luddite.h +++ b/keyboards/40percentclub/luddite/luddite.h @@ -3,7 +3,7 @@ #include "quantum.h" #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K10, K11, K12, K13, K14, K15, \ + K00, K01, K02, K03, K04, K05, K06, K07, K10, K11, K12, K13, K14, K15, \ K16, K17, K20, K21, K22, K23, K24, K25, K26, K27, K30, K31, K32, K33, \ K34, K35, K36, K37, K40, K41, K42, K43, K44, K45, K46, K47, K50, \ K51, K52, K53, K54, K55, K56, K57, K60, K61, K62, K63, K64, \ @@ -18,4 +18,3 @@ { K60, K61, K62, K63, K64, K65, K66, K67 }, \ { K70, K71, K72, K73, K74 }, \ } - diff --git a/keyboards/40percentclub/luddite/rules.mk b/keyboards/40percentclub/luddite/rules.mk index 8dff21f9ab..02e0abe9a6 100644 --- a/keyboards/40percentclub/luddite/rules.mk +++ b/keyboards/40percentclub/luddite/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/config.h b/keyboards/40percentclub/mf68/keymaps/emdarcher/config.h new file mode 100644 index 0000000000..e1a6eb1a2b --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define GRAVE_ESC_ALT_OVERRIDE diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c new file mode 100644 index 0000000000..546f862a6e --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _FN1 1 +#define _FN2 2 +#define X0 LT(_FN2, KC_CAPS) +#define X1 MO(_FN1) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer */ + [_QWERTY] = LAYOUT_68_ansi( + KC_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINS, KC_EQL, KC_BSPC, KC_INS ,KC_PGUP, + 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_DEL ,KC_PGDN, + X0 , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, KC_ENTER, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH, KC_RSFT, KC_UP , + KC_LCTL ,KC_LALT ,KC_LGUI , KC_SPACE , X1 ,KC_RALT ,KC_RCTL , KC_LEFT,KC_DOWN,KC_RGHT + ), + /* FN Layer */ + [_FN1] = LAYOUT_68_ansi( + 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_BSPC, KC_VOLU,KC_HOME, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______, KC_VOLD,KC_END, + X0 ,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MFFD, _______, + _______ ,_______,_______,KC_MSTP,KC_MPRV,KC_MNXT,KC_MPLY,KC_VOLD,KC_VOLU,KC_MUTE,_______, _______, _______, + _______ ,_______ ,_______ , _______, _______,_______,_______, _______,_______,_______ + ), + + /* CAPS LOCK layer */ + [_FN2] = LAYOUT_68_ansi( + 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_BSPC, KC_VOLU,KC_HOME, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_VOLD,KC_END, + _______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT,_______,_______, _______, + _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______ ,_______ ,_______ , _______, _______,_______,_______, _______,_______,_______ + ) +}; + + + +void led_set_user(uint8_t usb_led){ + //turn on the Pro Micro's on board LEDs for CAPS LOCK + if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){ + //set led pins to low + setPinOutput(B0); + writePinLow(B0); + setPinOutput(D5); + writePinLow(D5); + } else { + //set to Hi-Z + setPinInput(B0); + writePinLow(B0); + setPinInput(D5); + writePinLow(D5); + } +} diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/readme.md b/keyboards/40percentclub/mf68/keymaps/emdarcher/readme.md new file mode 100644 index 0000000000..75d6d0317c --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/readme.md @@ -0,0 +1,13 @@ +# emdarcher's MF68 Layout + +A layout mostly based off the factory layout, but with some modifications. Designed for use in a MAC or Unix environment, and has some VIM inspiration. + +- Utilizes the Pro Micro's on board LED's to show the CAPS LOCK status. +- Added Caps Lock for an extra FN layer with VIM like control on hjlk keys. +- Made the ESC key use GESC for functionality for Grave and Tilde with shift or GUI modifiers. +- Added Print Screen, Scroll Lock, and Pause keys on P,[,] keys to add Mac screen brightness control. + * On Mac, Scroll Lock is Brightness Down and Pause is Brightness Up, so with this FN+[ = brighness down, FN+] = brightness up +- Has Mac Fast-forward and Rewind keys mapped for changing media tracks. FN+; = Rewind, FN+' = Fast-forward +- Moved LGUI to the default MAC Command key position. + +Note: By default, this keymap doesn't utilize the backlighting. diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/rules.mk b/keyboards/40percentclub/mf68/keymaps/emdarcher/rules.mk new file mode 100644 index 0000000000..79cbc11ef9 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/rules.mk @@ -0,0 +1,3 @@ + +BACKLIGHT_ENABLE = no + diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk index 2509d0bf4e..2a4ff658cf 100644 --- a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk @@ -1,64 +1,6 @@ -# Overrides for Feather 32u4 Bluefruit -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = caterina - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk index 27642d8604..1113d34a23 100644 --- a/keyboards/40percentclub/mf68/rules.mk +++ b/keyboards/40percentclub/mf68/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c new file mode 100644 index 0000000000..668178967b --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c @@ -0,0 +1,111 @@ +#include "drashna.h" +#include "analog.c" +#include "pointing_device.h" +#include "pincontrol.h" + +#define KC_X0 LT(_FN, KC_ESC) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_VOLU, KC_MPLY, KC_MPRV, RESET, + KC_VOLD, KC_MUTE, KC_MNXT, RESET + ), + +}; +// clang-format on + +// Joystick +// Set Pins +uint8_t xPin = 8; // VRx / /B4 +uint8_t yPin = 7; // VRy // B5 +uint8_t swPin = E6; // SW + +// Set Parameters +uint16_t minAxisValue = 0; +uint16_t maxAxisValue = 1023; + +uint8_t maxCursorSpeed = 2; +uint8_t precisionSpeed = 1; +uint8_t speedRegulator = 20; // Lower Values Create Faster Movement + +int8_t xPolarity = 1; +int8_t yPolarity = 1; + +uint8_t cursorTimeout = 10; + +int16_t xOrigin, yOrigin; + +uint16_t lastCursor = 0; + +int16_t axisCoordinate(uint8_t pin, uint16_t origin) { + int8_t direction; + int16_t distanceFromOrigin; + int16_t range; + + int16_t position = analogRead(pin); + + if (origin == position) { + return 0; + } else if (origin > position) { + distanceFromOrigin = origin - position; + range = origin - minAxisValue; + direction = -1; + } else { + distanceFromOrigin = position - origin; + range = maxAxisValue - origin; + direction = 1; + } + + float percent = (float)distanceFromOrigin / range; + int16_t coordinate = (int16_t)(percent * 100); + if (coordinate < 0) { + return 0; + } else if (coordinate > 100) { + return 100 * direction; + } else { + return coordinate * direction; + } +} + +int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) { + int coordinate = axisCoordinate(pin, origin); + if (coordinate == 0) { + return 0; + } else { + float percent = (float)coordinate / 100; + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator); + } else { + return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator); + } + } +} + +void pointing_device_task(void) { + report_mouse_t report = pointing_device_get_report(); + + // todo read as one vector + if (timer_elapsed(lastCursor) > cursorTimeout) { + lastCursor = timer_read(); + report.x = axisToMouseComponent(xPin, xOrigin, maxCursorSpeed, xPolarity); + report.y = axisToMouseComponent(yPin, yOrigin, maxCursorSpeed, yPolarity); + } + // + if (!readPin(swPin)) { + report.buttons |= MOUSE_BTN1; + } else { + report.buttons &= ~MOUSE_BTN1; + } + + pointing_device_set_report(report); + pointing_device_send(); +} + +void matrix_init_keymap(void) { + // init pin? Is needed? + setPinInputHigh(swPin); + // Account for drift + xOrigin = analogRead(xPin); + yOrigin = analogRead(yPin); +} diff --git a/keyboards/40percentclub/nano/keymaps/drashna/rules.mk b/keyboards/40percentclub/nano/keymaps/drashna/rules.mk new file mode 100644 index 0000000000..06110a0a2e --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/drashna/rules.mk @@ -0,0 +1,5 @@ +POINTING_DEVICE_ENABLE = yes +RGBLIGHT_ENABLE = no +CONSOLE_ENABLE = no + +BOOTLOADER = qmk-dfu diff --git a/keyboards/40percentclub/nano/rules.mk b/keyboards/40percentclub/nano/rules.mk index e3c97e0d44..d55a40889b 100644 --- a/keyboards/40percentclub/nano/rules.mk +++ b/keyboards/40percentclub/nano/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/40percentclub/nein/rules.mk b/keyboards/40percentclub/nein/rules.mk index 1e3748287c..7805bac176 100644 --- a/keyboards/40percentclub/nein/rules.mk +++ b/keyboards/40percentclub/nein/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/nori/rules.mk b/keyboards/40percentclub/nori/rules.mk index f52135379a..75aa26e496 100644 --- a/keyboards/40percentclub/nori/rules.mk +++ b/keyboards/40percentclub/nori/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/40percentclub/tomato/rules.mk b/keyboards/40percentclub/tomato/rules.mk index 844ff99827..a3e442e09e 100644 --- a/keyboards/40percentclub/tomato/rules.mk +++ b/keyboards/40percentclub/tomato/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk index 7495f5edda..043a62906a 100644 --- a/keyboards/40percentclub/ut47/rules.mk +++ b/keyboards/40percentclub/ut47/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/4by3/4by3.c b/keyboards/4by3/4by3.c new file mode 100644 index 0000000000..3ae27260d4 --- /dev/null +++ b/keyboards/4by3/4by3.c @@ -0,0 +1 @@ +#include "4by3.h" \ No newline at end of file diff --git a/keyboards/4by3/4by3.h b/keyboards/4by3/4by3.h new file mode 100644 index 0000000000..b41628137a --- /dev/null +++ b/keyboards/4by3/4by3.h @@ -0,0 +1,70 @@ +#pragma once + +#include "quantum.h" + +/* LAYOUT_horizontal + * ┌───┐ + * │USB│ + * ├───┼───┬───┬───┐ + * │K00│K01│K02│K03│ + * ├───┼───┼───┼───┤ + * │K10│K11│K12│K13│ + * ├───┼───┼───┼───┤ + * │K20│K21│K22│K23│ + * └───┴───┴───┴───┘ + */ +#define LAYOUT_horizontal( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 } \ +} + +/* LAYOUT_vertical_right + * ┌───┬───┬───┬───┐ + * │K00│K01│K03│USB│ + * ├───┼───┼───┬───┘ + * │K04│K05│K06│ + * ├───┼───┼───┤ + * │K07│K08│K09│ + * ├───┼───┼───┤ + * │K10│K11│K12│ + * └───┴───┴───┘ + */ +#define LAYOUT_vertical_right( \ + K20, K10, K00, \ + K21, K11, K01, \ + K22, K12, K02, \ + K23, K13, K03 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 } \ +} + +/* LAYOUT_vertical_left + * ┌───┬───┬───┐ + * │K00│K01│K03│ + * ├───┼───┼───┤ + * │K04│K05│K06│ + * ├───┼───┼───┤ + * │K07│K08│K09│ + * ┌───┼───┼───┼───┤ + * │USB│K10│K11│K12│ + * └───┴───┴───┴───┘ + */ +#define LAYOUT_vertical_left( \ + K03, K13, K23, \ + K02, K12, K22, \ + K01, K11, K21, \ + K00, K10, K20 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 } \ +} + +#define LAYOUT LAYOUT_horizontal diff --git a/keyboards/4by3/config.h b/keyboards/4by3/config.h new file mode 100644 index 0000000000..2095ee42c2 --- /dev/null +++ b/keyboards/4by3/config.h @@ -0,0 +1,26 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xEEEE +#define PRODUCT_ID 0x2019 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Elias Sjögreen +#define PRODUCT 4by3 +#define DESCRIPTION A small 12 key keypad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 diff --git a/keyboards/4by3/info.json b/keyboards/4by3/info.json new file mode 100644 index 0000000000..9cc07a9240 --- /dev/null +++ b/keyboards/4by3/info.json @@ -0,0 +1,41 @@ +{ + "keyboard_name": "4by3", + "url": "https://github.com/eliassjogreen/4by3", + "maintainer": "eliassjogreen", + "width": 4, + "height": 3, + "layouts": { + "LAYOUT_horizontal": { + "key_count": 12, + "width": 4, + "height": 3, + "layout": [ + { "x": 0, "y": 0 }, { "x": 1, "y": 0 }, { "x": 2, "y": 0 }, { "x": 3, "y": 0 }, + { "x": 0, "y": 1 }, { "x": 1, "y": 1 }, { "x": 2, "y": 1 }, { "x": 3, "y": 1 }, + { "x": 0, "y": 2 }, { "x": 1, "y": 2 }, { "x": 2, "y": 2 }, { "x": 3, "y": 2 } + ] + }, + "LAYOUT_vertical_right": { + "key_count": 12, + "width": 3, + "height": 4, + "layout": [ + { "x": 0, "y": 0 }, { "x": 1, "y": 0 }, { "x": 2, "y": 0 }, + { "x": 0, "y": 1 }, { "x": 1, "y": 1 }, { "x": 2, "y": 1 }, + { "x": 0, "y": 2 }, { "x": 1, "y": 2 }, { "x": 2, "y": 2 }, + { "x": 0, "y": 3 }, { "x": 1, "y": 3 }, { "x": 2, "y": 3 } + ] + }, + "LAYOUT_vertical_left": { + "key_count": 12, + "width": 3, + "height": 4, + "layout": [ + { "x": 0, "y": 0 }, { "x": 1, "y": 0 }, { "x": 2, "y": 0 }, + { "x": 0, "y": 1 }, { "x": 1, "y": 1 }, { "x": 2, "y": 1 }, + { "x": 0, "y": 2 }, { "x": 1, "y": 2 }, { "x": 2, "y": 2 }, + { "x": 0, "y": 3 }, { "x": 1, "y": 3 }, { "x": 2, "y": 3 } + ] + } + } +} diff --git a/keyboards/4by3/keymaps/arrowpad/keymap.c b/keyboards/4by3/keymaps/arrowpad/keymap.c new file mode 100644 index 0000000000..df803a35e6 --- /dev/null +++ b/keyboards/4by3/keymaps/arrowpad/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Change 'LAYOUT_vertical_right' to 'LAYOUT_vertical_left' + to change the side where the pro micro usb port is. */ + [0] = LAYOUT_vertical_right( + KC_INS , KC_HOME , KC_PGUP , + KC_DEL , KC_END , KC_PGDN , + KC_PSCR , KC_UP , KC_PAUS , + KC_LEFT , KC_DOWN , KC_RGHT + ) +}; diff --git a/keyboards/4by3/keymaps/default/keymap.c b/keyboards/4by3/keymaps/default/keymap.c new file mode 100644 index 0000000000..f348dc84fb --- /dev/null +++ b/keyboards/4by3/keymaps/default/keymap.c @@ -0,0 +1,9 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_horizontal( + KC_VOLU , _______ , _______ , _______ , + KC_MUTE , KC_MPRV , KC_MPLY , KC_MNXT , + KC_VOLD , _______ , _______ , _______ + ) +}; diff --git a/keyboards/4by3/keymaps/default/readme.md b/keyboards/4by3/keymaps/default/readme.md new file mode 100644 index 0000000000..281dfd5463 --- /dev/null +++ b/keyboards/4by3/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default 4by3 keymap + +![The default 4by3 keymap](https://i.imgur.com/E4OlQAs.png) diff --git a/keyboards/4by3/keymaps/funcpad_horizontal/keymap.c b/keyboards/4by3/keymaps/funcpad_horizontal/keymap.c new file mode 100644 index 0000000000..287d125ef1 --- /dev/null +++ b/keyboards/4by3/keymaps/funcpad_horizontal/keymap.c @@ -0,0 +1,9 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_horizontal( + KC_F1 , KC_F2 , KC_F3 , KC_F4 , + KC_F5 , KC_F6 , KC_F7 , KC_F8 , + KC_F9 , KC_F10 , KC_F11 , KC_F12 + ) +}; diff --git a/keyboards/4by3/keymaps/funcpad_vertical/keymap.c b/keyboards/4by3/keymaps/funcpad_vertical/keymap.c new file mode 100644 index 0000000000..c345f28240 --- /dev/null +++ b/keyboards/4by3/keymaps/funcpad_vertical/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Change 'LAYOUT_vertical_right' to 'LAYOUT_vertical_left' + to change the side where the pro micro usb port is. */ + [0] = LAYOUT_vertical_right( + KC_F1 , KC_F2 , KC_F3 , + KC_F4 , KC_F5 , KC_F6 , + KC_F7 , KC_F8 , KC_F9 , + KC_F10 , KC_F11 , KC_F12 + ) +}; diff --git a/keyboards/4by3/keymaps/numpad_horizontal/keymap.c b/keyboards/4by3/keymaps/numpad_horizontal/keymap.c new file mode 100644 index 0000000000..c1195b0bc9 --- /dev/null +++ b/keyboards/4by3/keymaps/numpad_horizontal/keymap.c @@ -0,0 +1,9 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_horizontal( + KC_P1 , KC_P2 , KC_P3 , KC_P4 , + KC_P5 , KC_P6 , KC_P7 , KC_P8 , + KC_P9 , KC_P0 , KC_BSPC , KC_ENT + ), +}; diff --git a/keyboards/4by3/keymaps/numpad_vertical/keymap.c b/keyboards/4by3/keymaps/numpad_vertical/keymap.c new file mode 100644 index 0000000000..7705ea9b83 --- /dev/null +++ b/keyboards/4by3/keymaps/numpad_vertical/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Change 'LAYOUT_vertical_right' to 'LAYOUT_vertical_left' + to change the side where the pro micro usb port is. */ + [0] = LAYOUT_vertical_right( + KC_P1 , KC_P2 , KC_P3 , + KC_P4 , KC_P5 , KC_P6 , + KC_P7 , KC_P8 , KC_P9 , + KC_BSPC , KC_P0 , KC_ENT + ), +}; diff --git a/keyboards/4by3/readme.md b/keyboards/4by3/readme.md new file mode 100644 index 0000000000..0197c4ff80 --- /dev/null +++ b/keyboards/4by3/readme.md @@ -0,0 +1,15 @@ +# 4by3 + +![4by3](https://i.imgur.com/Ykb7evL.jpg) + +A 12 key mechanical keypad. + +Keyboard Maintainer: [eliassjogreen](https://github.com/eliassjogreen) +Hardware Supported: 4by3 +Hardware Availability: [eliassjogreen/4by3](https://github.com/eliassjogreen/4by3) + +Make example for this keyboard (after setting up your build environment): + + make 4by3: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). diff --git a/keyboards/4by3/rules.mk b/keyboards/4by3/rules.mk new file mode 100644 index 0000000000..912449366a --- /dev/null +++ b/keyboards/4by3/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +EXTRAKEY_ENABLE = yes +NKRO_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes + diff --git a/keyboards/6ball/rules.mk b/keyboards/6ball/rules.mk index 46f733b873..05a642e6e9 100644 --- a/keyboards/6ball/rules.mk +++ b/keyboards/6ball/rules.mk @@ -1,50 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/8pack/rules.mk b/keyboards/8pack/rules.mk index 97496c8f22..625f8b201f 100644 --- a/keyboards/8pack/rules.mk +++ b/keyboards/8pack/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/9key/keymaps/bcat/keymap.c b/keyboards/9key/keymaps/bcat/keymap.c new file mode 100644 index 0000000000..5c30d6308d --- /dev/null +++ b/keyboards/9key/keymaps/bcat/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_FUNCTION, +}; + +#define LY_FUNC MO(LAYER_FUNCTION) +#define KY_LOCK LCA(KC_L) /* Cinnamon lock screen */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_DEFAULT] = LAYOUT( + KC_MPLY, KC_VOLU, KC_MSTP, + KC_MPRV, KC_VOLD, KC_MNXT, + KY_LOCK, KC_MUTE, LY_FUNC + ), + + [LAYER_FUNCTION] = LAYOUT( + EEP_RST, _______, RESET, + _______, _______, _______, + _______, _______, _______ + ), +}; diff --git a/keyboards/9key/keymaps/bcat/readme.md b/keyboards/9key/keymaps/bcat/readme.md new file mode 100644 index 0000000000..2dee51de8b --- /dev/null +++ b/keyboards/9key/keymaps/bcat/readme.md @@ -0,0 +1,5 @@ +# bcat's 9-Key layout + +This is a super simple PCB-mount macropad with nine keys, used at work for +media keys and quick access to screen lock on Linux (Cinnamon desktop +environment). diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk index 9fae54fa91..5e6e882e9c 100644 --- a/keyboards/9key/rules.mk +++ b/keyboards/9key/rules.mk @@ -1,50 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h index a56bfba2fa..36a4fc40f2 100644 --- a/keyboards/abstract/ellipse/rev1/config.h +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -125,11 +125,6 @@ along with this program. If not, see . * */ -/* key combination for magic key command */ -/*#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -)*/ - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -239,7 +234,6 @@ along with this program. If not, see . // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 -#define NUMBER_OF_ENCODERS 3 #define ENCODERS_PAD_A { B2, B3, D5 } #define ENCODERS_PAD_B { B1, B7, B4 } #define ENCODER_RESOLUTION 2 diff --git a/keyboards/abstract/ellipse/rev1/rules.mk b/keyboards/abstract/ellipse/rev1/rules.mk index 880d40e49b..6c7f5fea32 100644 --- a/keyboards/abstract/ellipse/rev1/rules.mk +++ b/keyboards/abstract/ellipse/rev1/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/acheron/shark/README.md b/keyboards/acheron/shark/README.md new file mode 100644 index 0000000000..962a73c6d1 --- /dev/null +++ b/keyboards/acheron/shark/README.md @@ -0,0 +1,17 @@ +# Acheron Aχξρων 40-SM-O-MX-TH-WI (Codename "SharkPCB") QMK firmware + +

+ +

+ +This is the QMK firmware repository for the Shark, updated until [revision Alpha](https://github.com/Gondolindrim/SharkPCB/releases/tag/Alpha). + +The SharkPCB is an Open-Hardware guidelines compliant PCB which files can be found at [this link](https://github.com/Gondolindrim/SharkPCB). Its designer and maintainer is [Gondolindrim](https://github.com/Gondolindrim). + +See the [AcheronDocs](https://gondolindrim.github.io/AcheronDocs/shark/intro.html) page for the SharkPCB full documentation. + +Make example for this keyboard (after setting up your build environment): + + make acheron/shark: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). diff --git a/keyboards/acheron/shark/config.h b/keyboards/acheron/shark/config.h new file mode 100644 index 0000000000..5a46ac5b79 --- /dev/null +++ b/keyboards/acheron/shark/config.h @@ -0,0 +1,261 @@ +/* +Copyright 2019 Alvaro Volpato and Steve + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xAC11 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AcheronProject +#define PRODUCT SharkPCB +#define DESCRIPTION Ortho 40 PCB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS {B4, A15, B10, B2} +#define MATRIX_COL_PINS {B1, B12, A1, A7, A5, A4, A3, A2, A0, C15, C14, C13} +//{C13, C14, C15, A0,A2,A3,A4,A5,A6, A1,B12,B1} +/* Unused pins, in the default layout, are: +EncA (B6) because it is not used in the default PCB +All Extra pins (A8, B15, B14, B13, B3, B5, B8, B9) , for the same reason; +B0, which is unconnected on the PCB +*/ +//#define UNUSED_PINS { B0, B6, B13, B14, B15, B8, B9, B5, B3 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B0 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/acheron/shark/info.json b/keyboards/acheron/shark/info.json new file mode 100644 index 0000000000..a2ea784d96 --- /dev/null +++ b/keyboards/acheron/shark/info.json @@ -0,0 +1,63 @@ +{ + "keyboard_name": "SharkPCB", + "keyboard_folder": "acheron/shark", + "url": "https://gondolindrim.github.io/AcheronDocs/shark/intro.html", + "maintainer": "Gondolindrim", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 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": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/acheron/shark/keymaps/default/keymap.c b/keyboards/acheron/shark/keymaps/default/keymap.c new file mode 100644 index 0000000000..a661b835b1 --- /dev/null +++ b/keyboards/acheron/shark/keymaps/default/keymap.c @@ -0,0 +1,105 @@ +/* Copyright 2019 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | |Lower | Space| Space|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + 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 , \ + KC_LCTL, KC_LALT, KC_LGUI, _______, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + 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_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, BL_TOGG, BL_INC , BL_DEC , _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( \ + 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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, BL_TOGG, BL_INC, BL_DEC , _______, _______, _______, _______, _______, _______, _______, _______ \ +) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/acheron/shark/rules.mk b/keyboards/acheron/shark/rules.mk new file mode 100644 index 0000000000..30c4593db2 --- /dev/null +++ b/keyboards/acheron/shark/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = ortho_4x12 diff --git a/keyboards/acheron/shark/shark.c b/keyboards/acheron/shark/shark.c new file mode 100644 index 0000000000..b15c8a270e --- /dev/null +++ b/keyboards/acheron/shark/shark.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Álvaro "Gondolindrim" Volpato + * + * 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 . + */ +#include "shark.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/acheron/shark/shark.h b/keyboards/acheron/shark/shark.h new file mode 100644 index 0000000000..d58b72548a --- /dev/null +++ b/keyboards/acheron/shark/shark.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Álvaro "Gondolindrim" Volpato + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \ +} diff --git a/keyboards/acr60/rules.mk b/keyboards/acr60/rules.mk index 9c4082da29..1e6d4bb7cd 100644 --- a/keyboards/acr60/rules.mk +++ b/keyboards/acr60/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/adkb96/keymaps/default/keymap.c b/keyboards/adkb96/keymaps/default/keymap.c index c8198ab335..dc1e9d7b53 100644 --- a/keyboards/adkb96/keymaps/default/keymap.c +++ b/keyboards/adkb96/keymaps/default/keymap.c @@ -1,15 +1,14 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, XXXXXXX,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_INS, KC_DELT, + [0] = LAYOUT( + KC_ESC, XXXXXXX,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_INS, KC_DEL, KC_ZKHK,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_JYEN,KC_BSPC,KC_BSPC, KC_TAB, 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_ENT, KC_ENT, KC_CAPS,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_BSLS,KC_ENT, KC_ENT, - KC_LSFT,KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_UP, KC_RSFT,KC_RSFT, + KC_LSFT,KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_UP, KC_RSFT,KC_RSFT, KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN,KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_HENK,KC_KANA,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX ) }; diff --git a/keyboards/adkb96/rev1/rev1.h b/keyboards/adkb96/rev1/rev1.h index 0ec70c5d5c..4c4c7bae3c 100644 --- a/keyboards/adkb96/rev1/rev1.h +++ b/keyboards/adkb96/rev1/rev1.h @@ -2,8 +2,6 @@ #include "adkb96.h" -//void promicro_bootloader_jmp(bool program); - #ifdef USE_I2C #include #ifdef __AVR__ @@ -12,9 +10,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - - // Keymap with right side flipped // (TRRS jack on both halves are to the right) #define LAYOUT_ortho_6x16( \ diff --git a/keyboards/6ball/keymaps/default/rules.mk b/keyboards/adkb96/rev1/rules.mk similarity index 100% rename from keyboards/6ball/keymaps/default/rules.mk rename to keyboards/adkb96/rev1/rules.mk diff --git a/keyboards/adkb96/rules.mk b/keyboards/adkb96/rules.mk index 04986eb678..cb4ce2dd7b 100644 --- a/keyboards/adkb96/rules.mk +++ b/keyboards/adkb96/rules.mk @@ -1,59 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection - # Teensy halfkay - # Pro Micro caterina - # Atmel DFU atmel-dfu - # LUFA DFU lufa-dfu - # QMK DFU qmk-dfu - # atmega32a bootloadHID +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h index 01e20454c3..2a35897300 100644 --- a/keyboards/aeboards/aegis/config.h +++ b/keyboards/aeboards/aegis/config.h @@ -47,24 +47,22 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -//#define WT_MONO_BACKLIGHT - #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*12*9*2)) = (35+864) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*12*9*2)) = (37+864) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 901 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 123 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/aeboards/aegis/keymaps/via/rules.mk b/keyboards/aeboards/aegis/keymaps/via/rules.mk index f072c67198..70258b9ead 100644 --- a/keyboards/aeboards/aegis/keymaps/via/rules.mk +++ b/keyboards/aeboards/aegis/keymaps/via/rules.mk @@ -1,6 +1,6 @@ # project specific files SRC = keyboards/wilba_tech/wt_main.c - + # MCU name MCU = atmega32u4 @@ -65,4 +65,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk index f1c632289c..602da86786 100644 --- a/keyboards/aeboards/aegis/rules.mk +++ b/keyboards/aeboards/aegis/rules.mk @@ -1,50 +1,16 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -63,3 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/aeboards/ext65/config.h b/keyboards/aeboards/ext65/config.h index 2f66f3f926..7255b463fc 100644 --- a/keyboards/aeboards/ext65/config.h +++ b/keyboards/aeboards/ext65/config.h @@ -47,25 +47,23 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -//#define WT_MONO_BACKLIGHT - #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*10*2)) = (35+800) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 835 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 189 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*10*2)) = (37+800) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 837 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 187 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/aeboards/ext65/keymaps/default/keymap.c b/keyboards/aeboards/ext65/keymaps/default/keymap.c index 79d5ecf505..efa11cd0fd 100644 --- a/keyboards/aeboards/ext65/keymaps/default/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/default/keymap.c @@ -62,7 +62,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - void keyboard_pre_init_user(void) { // Call the keyboard pre init code. @@ -75,19 +74,19 @@ void keyboard_pre_init_user(void) { void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(D5); - } else { writePinHigh(D5); + } else { + writePinLow(D5); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(D3); - } else { writePinHigh(D3); + } else { + writePinLow(D3); } if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(D2); - } else { writePinHigh(D2); + } else { + writePinLow(D2); } } @@ -101,4 +100,4 @@ uint32_t layer_state_set_user(uint32_t state) { break; } return state; -} \ No newline at end of file +} diff --git a/keyboards/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/keymaps/via/keymap.c index 3079c528eb..efa11cd0fd 100644 --- a/keyboards/aeboards/ext65/keymaps/via/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/via/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ext65( KC_PMNS, KC_PAST, KC_PSLS, KC_NLCK, 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_BSLS, KC_GRV , KC_PSCR, KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_BSPC, KC_DEL , - KC_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGUP, + KC_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_PGUP, KC_PENT, KC_P3 , KC_P2 , KC_P1 , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_PGDN, KC_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), @@ -74,19 +74,19 @@ void keyboard_pre_init_user(void) { void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(D5); - } else { writePinHigh(D5); + } else { + writePinLow(D5); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(D3); - } else { writePinHigh(D3); + } else { + writePinLow(D3); } if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(D2); - } else { writePinHigh(D2); + } else { + writePinLow(D2); } } diff --git a/keyboards/aeboards/ext65/keymaps/via/rules.mk b/keyboards/aeboards/ext65/keymaps/via/rules.mk index f072c67198..70258b9ead 100644 --- a/keyboards/aeboards/ext65/keymaps/via/rules.mk +++ b/keyboards/aeboards/ext65/keymaps/via/rules.mk @@ -1,6 +1,6 @@ # project specific files SRC = keyboards/wilba_tech/wt_main.c - + # MCU name MCU = atmega32u4 @@ -65,4 +65,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/aeboards/ext65/rules.mk b/keyboards/aeboards/ext65/rules.mk index f1c632289c..bac979ad0c 100644 --- a/keyboards/aeboards/ext65/rules.mk +++ b/keyboards/aeboards/ext65/rules.mk @@ -1,50 +1,16 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -63,3 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC += keyboards/wilba_tech/wt_main.c diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index a9d1925546..f7f3262ac7 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h @@ -250,17 +250,17 @@ along with this program. If not, see . // EEPROM usage #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 // DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 // DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/ai03/lunar/keymaps/muzfuz/keymap.c b/keyboards/ai03/lunar/keymaps/muzfuz/keymap.c new file mode 100644 index 0000000000..4bbea42af0 --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/muzfuz/keymap.c @@ -0,0 +1,52 @@ +#include QMK_KEYBOARD_H + +// Helpful defines +#define ESC_CTL CTL_T(KC_ESCAPE) // Tap for Esc, hold for Ctrl +#define FL_KCF LT(1,KC_F) +#define FL_KCJ LT(1,KC_J) +#define CMD_ENT LGUI(LSFT(KC_ENT)) + +enum custom_keycodes { + HASHRKT = SAFE_RANGE, + CLNEQLS, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSLS, LGUI(KC_C), + 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_BSPC, LGUI(KC_V), + ESC_CTL, KC_A, KC_S, KC_D, FL_KCF, KC_G, KC_H, FL_KCJ, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + CMD_ENT, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, MO(2), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( /* FL */ + KC_ESC, 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_DEL, KC_DEL, KC_VOLU, + _______, HASHRKT, _______, KC_LCBR, KC_RCBR, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, _______, _______, _______, _______, KC_VOLD, + _______, CLNEQLS, _______, KC_LBRC, KC_RBRC, _______, _______, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_GRV, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, _______, + KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, + _______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case HASHRKT: + if (record->event.pressed) { + SEND_STRING("=>"); + } + break; + case CLNEQLS: + if (record->event.pressed) { + SEND_STRING(":="); + } + break; + } + return true; +} diff --git a/keyboards/ai03/lunar/keymaps/muzfuz/readme.md b/keyboards/ai03/lunar/keymaps/muzfuz/readme.md new file mode 100644 index 0000000000..f0fef09235 --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/muzfuz/readme.md @@ -0,0 +1,5 @@ +# muzfuz's keymap for Lunar + +```shell +make ai03/lunar:muzfuz:dfu +``` diff --git a/keyboards/ai03/lunar/keymaps/via/rules.mk b/keyboards/ai03/lunar/keymaps/via/rules.mk index 7c10c3fbbd..01fcd55e8d 100644 --- a/keyboards/ai03/lunar/keymaps/via/rules.mk +++ b/keyboards/ai03/lunar/keymaps/via/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 # Processor frequency. @@ -83,4 +82,4 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) SRC += keyboards/wilba_tech/wt_main.c RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/ai03/lunar/rules.mk b/keyboards/ai03/lunar/rules.mk index 8c2532574a..dd3d71baa9 100644 --- a/keyboards/ai03/lunar/rules.mk +++ b/keyboards/ai03/lunar/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk index 4b40e47cb7..758a73cd2a 100644 --- a/keyboards/ai03/orbit/rules.mk +++ b/keyboards/ai03/orbit/rules.mk @@ -1,70 +1,16 @@ -SRC += split_util.c \ - split_flags.c \ - serial.c \ - transport.c \ - matrix.c - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -89,4 +35,8 @@ USE_I2C = no # I2C for split communication CUSTOM_MATRIX = yes # For providing custom matrix.c (in this case, override regular matrix.c with split matrix.c) # SPLIT_KEYBOARD = yes # Split keyboard flag disabled as manual edits had to be done to the split common files - +SRC += split_util.c \ + split_flags.c \ + serial.c \ + transport.c \ + matrix.c diff --git a/keyboards/ai03/orbit/serial.c b/keyboards/ai03/orbit/serial.c index 1315377a34..636dfa0906 100644 --- a/keyboards/ai03/orbit/serial.c +++ b/keyboards/ai03/orbit/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/ai03/quasar/rules.mk b/keyboards/ai03/quasar/rules.mk index afbd1de147..6b67847791 100644 --- a/keyboards/ai03/quasar/rules.mk +++ b/keyboards/ai03/quasar/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ai03/soyuz/rules.mk b/keyboards/ai03/soyuz/rules.mk index 5df789e581..f092cb35be 100644 --- a/keyboards/ai03/soyuz/rules.mk +++ b/keyboards/ai03/soyuz/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/akb/eb46/rules.mk b/keyboards/akb/eb46/rules.mk index 195c9e5023..5360459cf7 100644 --- a/keyboards/akb/eb46/rules.mk +++ b/keyboards/akb/eb46/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/akb/raine/config.h b/keyboards/akb/raine/config.h index a28fceef2a..f5a8b84b6c 100644 --- a/keyboards/akb/raine/config.h +++ b/keyboards/akb/raine/config.h @@ -23,8 +23,8 @@ along with this program. If not, see . #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER AKB -#define PRODUCT Raine M3 -#define DESCRIPTION Raine M3 +#define PRODUCT Raine +#define DESCRIPTION Raine /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/akb/raine/info.json b/keyboards/akb/raine/info.json index 0992f86d06..fc699e4774 100644 --- a/keyboards/akb/raine/info.json +++ b/keyboards/akb/raine/info.json @@ -68,10 +68,12 @@ { "label": "2", "x": 14.25, "y": 3 }, { "label": "3", "x": 15.25, "y": 3 }, { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 4}, { "label": "Alt", "x": 2.25, "y": 4, "w": 1.25 }, { "label": "SPLEFT", "x": 3.5, "y": 4, "w": 2.25 }, { "label": "7U", "x": 5.75, "y": 4 }, { "label": "SPRIGHT", "x": 6.75, "y": 4, "w": 1.75 }, + { "label": "alt", "x": 8.5, "y": 4}, { "label": "Menu", "x": 9.5, "y": 4, "w": 1.25 }, { "x": 11, "y": 4.25 }, { "x": 12, "y": 4.25 }, diff --git a/keyboards/akb/raine/keymaps/default/keymap.c b/keyboards/akb/raine/keymaps/default/keymap.c index 80e52528b4..1eecbb041f 100644 --- a/keyboards/akb/raine/keymaps/default/keymap.c +++ b/keyboards/akb/raine/keymaps/default/keymap.c @@ -17,16 +17,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ - 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_BSPC, KC_NLCK, KC_SLCK, KC_INS, + 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_BSPC, KC_PSLS, KC_PAST, KC_PPLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P7, KC_P8, KC_P9, - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, - KC_LSFT, KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, - KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_DEL), + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_BSPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), [1] = LAYOUT( /* Second */ - 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_LBRC, KC_RBRC, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), + 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_DEL, KC_NLCK, KC_PSCR, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_HOME, KC_UP, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, KC_LEFT, KC_SLCK, KC_RGHT, + _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, _______, KC_END, KC_DOWN, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), }; diff --git a/keyboards/akb/raine/raine.h b/keyboards/akb/raine/raine.h index fb5cd48cbe..ec72a60582 100644 --- a/keyboards/akb/raine/raine.h +++ b/keyboards/akb/raine/raine.h @@ -23,11 +23,11 @@ along with this program. If not, see . K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, K312, K313, K314, K315, \ - K400, K402, K404, K405, K407, K409, K410, K412, K413, K414, K415 \ + K400, K401, K402, K404, K405, K407, K408, K409, K410, K412, K413, K414, K415 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113, K114, K115 }, \ { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, KC_NO, K312, K313, K314, K315 }, \ - { K400, KC_NO, K402, KC_NO, K404, K405, KC_NO, K407, KC_NO, K409, K410, KC_NO, K412, K413, K414, K415 } \ + { K400, K401, K402, KC_NO, K404, K405, KC_NO, K407, K408, K409, K410, KC_NO, K412, K413, K414, K415 } \ } diff --git a/keyboards/akb/raine/rules.mk b/keyboards/akb/raine/rules.mk index 195c9e5023..5360459cf7 100644 --- a/keyboards/akb/raine/rules.mk +++ b/keyboards/akb/raine/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/al1/keymaps/default/keymap.c b/keyboards/al1/keymaps/default/keymap.c index 5da3b5a7b2..d571c05abb 100644 --- a/keyboards/al1/keymaps/default/keymap.c +++ b/keyboards/al1/keymaps/default/keymap.c @@ -31,23 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_TRNS, KC_RGUI, KC_RCTRL, BL_TOGG, BL_DEC, BL_INC, KC_P0, KC_PDOT ), }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/al1/keymaps/splitbs/keymap.c b/keyboards/al1/keymaps/splitbs/keymap.c index 42bdfc7ec1..51f35d0cfb 100644 --- a/keyboards/al1/keymaps/splitbs/keymap.c +++ b/keyboards/al1/keymaps/splitbs/keymap.c @@ -15,22 +15,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_TRNS, KC_RGUI, KC_RCTRL, BL_TOGG, BL_DEC, BL_INC, KC_P0, KC_PDOT ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/al1/rules.mk b/keyboards/al1/rules.mk index 3930f9adeb..175adfd5d7 100644 --- a/keyboards/al1/rules.mk +++ b/keyboards/al1/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -69,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches CUSTOM_MATRIX = yes -SRC += matrix.c \ No newline at end of file +SRC += matrix.c diff --git a/keyboards/alf/dc60/keymaps/default/keymap.c b/keyboards/alf/dc60/keymaps/default/keymap.c index a4385bcc0b..acd9753ef0 100644 --- a/keyboards/alf/dc60/keymaps/default/keymap.c +++ b/keyboards/alf/dc60/keymaps/default/keymap.c @@ -33,22 +33,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/alf/dc60/rules.mk b/keyboards/alf/dc60/rules.mk index 9ad6d7875e..8df6c4c7c5 100644 --- a/keyboards/alf/dc60/rules.mk +++ b/keyboards/alf/dc60/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/alf/x11/info.json b/keyboards/alf/x11/info.json index ca794f56ce..54f2da66d1 100644 --- a/keyboards/alf/x11/info.json +++ b/keyboards/alf/x11/info.json @@ -1,103 +1,112 @@ { - "keyboard_name": "QMK80", - "url": "", - "maintainer": "qmk", - "width": 18.25, - "height": 6.5, - "layouts": { - "LAYOUT": { - "key_count": 88, - "layout": [ - {"label":"K00", "x":0, "y":0}, - {"label":"K01", "x":2, "y":0}, - {"label":"K02", "x":3, "y":0}, - {"label":"K03", "x":4, "y":0}, - {"label":"K04", "x":5, "y":0}, - {"label":"K05", "x":6.5, "y":0}, - {"label":"K06", "x":7.5, "y":0}, - {"label":"K07", "x":8.5, "y":0}, - {"label":"K08", "x":9.5, "y":0}, - {"label":"K09", "x":11, "y":0}, - {"label":"K0A", "x":12, "y":0}, - {"label":"K0B", "x":13, "y":0}, - {"label":"K0C", "x":14, "y":0}, - {"label":"K60", "x":15.25, "y":0}, - {"label":"K61", "x":16.25, "y":0}, - {"label":"K62", "x":17.25, "y":0}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":7, "y":1.5}, - {"label":"K18", "x":8, "y":1.5}, - {"label":"K19", "x":9, "y":1.5}, - {"label":"K1A", "x":10, "y":1.5}, - {"label":"K1B", "x":11, "y":1.5}, - {"label":"K1C", "x":12, "y":1.5}, - {"label":"K5A", "x":13, "y":1.5, "w":2}, - {"label":"K63", "x":15.25, "y":1.5}, - {"label":"K65", "x":16.25, "y":1.5}, - {"label":"K67", "x":17.25, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":6.5, "y":2.5}, - {"label":"K27", "x":7.5, "y":2.5}, - {"label":"K28", "x":8.5, "y":2.5}, - {"label":"K29", "x":9.5, "y":2.5}, - {"label":"K2A", "x":10.5, "y":2.5}, - {"label":"K2B", "x":11.5, "y":2.5}, - {"label":"K2C", "x":12.5, "y":2.5}, - {"label":"K4C", "x":13.5, "y":2.5, "w":1.5}, - {"label":"K64", "x":15.25, "y":2.5}, - {"label":"K66", "x":16.25, "y":2.5}, - {"label":"K68", "x":17.25, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":6.75, "y":3.5}, - {"label":"K37", "x":7.75, "y":3.5}, - {"label":"K38", "x":8.75, "y":3.5}, - {"label":"K39", "x":9.75, "y":3.5}, - {"label":"K3A", "x":10.75, "y":3.5}, - {"label":"K3B", "x":11.75, "y":3.5}, - {"label":"K3C", "x":12.75, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.25, "y":4.5}, - {"label":"K47", "x":8.25, "y":4.5}, - {"label":"K48", "x":9.25, "y":4.5}, - {"label":"K49", "x":10.25, "y":4.5}, - {"label":"K4A", "x":11.25, "y":4.5}, - {"label":"K4B", "x":12.25, "y":4.5, "w":1.75}, - {"label":"K69", "x":14, "y":4.5}, - {"label":"K58", "x":16.25, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":6.25}, - {"label":"K54", "x":10, "y":5.5, "w":1.25}, - {"label":"K55", "x":11.25, "y":5.5, "w":1.25}, - {"label":"K56", "x":12.5, "y":5.5, "w":1.25}, - {"label":"K57", "x":13.75, "y":5.5, "w":1.25}, - {"label":"K6A", "x":15.25, "y":5.5}, - {"label":"K59", "x":16.25, "y":5.5}, - {"label":"K6B", "x":17.25, "y":5.5} - ] - } + "keyboard_name": "x11", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "key_count": 88, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":2, "y":0}, + {"label":"K02", "x":3, "y":0}, + {"label":"K03", "x":4, "y":0}, + {"label":"K04", "x":5, "y":0}, + {"label":"K05", "x":6.5, "y":0}, + {"label":"K06", "x":7.5, "y":0}, + {"label":"K07", "x":8.5, "y":0}, + {"label":"K08", "x":9.5, "y":0}, + {"label":"K09", "x":11, "y":0}, + {"label":"K0A", "x":12, "y":0}, + {"label":"K0B", "x":13, "y":0}, + {"label":"K0C", "x":14, "y":0}, + + {"label":"K62", "x":15.25, "y":0}, + {"label":"K61", "x":16.25, "y":0}, + {"label":"K60", "x":17.25, "y":0}, + + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":7, "y":1.5}, + {"label":"K18", "x":8, "y":1.5}, + {"label":"K19", "x":9, "y":1.5}, + {"label":"K1A", "x":10, "y":1.5}, + {"label":"K1B", "x":11, "y":1.5}, + {"label":"K1C", "x":12, "y":1.5}, + {"label":"K5A", "x":13, "y":1.5, "w":2}, + + {"label":"K63", "x":15.25, "y":1.5}, + {"label":"K65", "x":16.25, "y":1.5}, + {"label":"K67", "x":17.25, "y":1.5}, + + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":6.5, "y":2.5}, + {"label":"K27", "x":7.5, "y":2.5}, + {"label":"K28", "x":8.5, "y":2.5}, + {"label":"K29", "x":9.5, "y":2.5}, + {"label":"K2A", "x":10.5, "y":2.5}, + {"label":"K2B", "x":11.5, "y":2.5}, + {"label":"K2C", "x":12.5, "y":2.5}, + {"label":"K4C", "x":13.5, "y":2.5, "w":1.5}, + + {"label":"K64", "x":15.25, "y":2.5}, + {"label":"K66", "x":16.25, "y":2.5}, + {"label":"K68", "x":17.25, "y":2.5}, + + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":6.75, "y":3.5}, + {"label":"K37", "x":7.75, "y":3.5}, + {"label":"K38", "x":8.75, "y":3.5}, + {"label":"K39", "x":9.75, "y":3.5}, + {"label":"K3A", "x":10.75, "y":3.5}, + {"label":"K3B", "x":11.75, "y":3.5}, + {"label":"K3C", "x":12.75, "y":3.5, "w":2.25}, + + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.25, "y":4.5}, + {"label":"K47", "x":8.25, "y":4.5}, + {"label":"K48", "x":9.25, "y":4.5}, + {"label":"K49", "x":10.25, "y":4.5}, + {"label":"K4A", "x":11.25, "y":4.5}, + {"label":"K4B", "x":12.25, "y":4.5, "w":1.75}, + {"label":"K69", "x":14, "y":4.5}, + + {"label":"K58", "x":16.25, "y":4.5}, + + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K54", "x":10, "y":5.5, "w":1.25}, + {"label":"K55", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K56", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K57", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"K6A", "x":15.25, "y":5.5}, + {"label":"K59", "x":16.25, "y":5.5}, + {"label":"K6B", "x":17.25, "y":5.5} + ] } } - \ No newline at end of file +} diff --git a/keyboards/alf/x11/keymaps/default/keymap.c b/keyboards/alf/x11/keymaps/default/keymap.c index cd97dd0a2b..f0747d3450 100644 --- a/keyboards/alf/x11/keymaps/default/keymap.c +++ b/keyboards/alf/x11/keymaps/default/keymap.c @@ -15,64 +15,23 @@ */ #include QMK_KEYBOARD_H -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( \ - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, \ - KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, 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_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, \ - KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, \ - KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_LCTL, \ - KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - [1] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_MPLY, KC_MSTP, RGB_TOG, RGB_MOD, \ - RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_VAD, RGB_SAD \ - ), + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MPLY, KC_MSTP, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; -} - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk index 180c60a4a4..3439ac47f3 100644 --- a/keyboards/alf/x11/rules.mk +++ b/keyboards/alf/x11/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/alf/x11/x11.c b/keyboards/alf/x11/x11.c index b91de016e2..9699918d5b 100644 --- a/keyboards/alf/x11/x11.c +++ b/keyboards/alf/x11/x11.c @@ -16,48 +16,49 @@ #include "x11.h" void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - setPinOutput(C6); - setPinOutput(E6); - setPinOutput(C7); - matrix_init_user(); + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(C6); + setPinOutput(E6); + setPinOutput(C7); + matrix_init_user(); } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) - matrix_scan_user(); + matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); + return process_record_user(keycode, record); } void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(C6); - } else { - writePinHigh(C6); - } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(C7); - } else { - writePinHigh(C7); - } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } - led_set_user(usb_led); + led_set_user(usb_led); } diff --git a/keyboards/alf/x11/x11.h b/keyboards/alf/x11/x11.h index 53f3a3e34d..2a1d886fdd 100644 --- a/keyboards/alf/x11/x11.h +++ b/keyboards/alf/x11/x11.h @@ -26,18 +26,18 @@ * represents the switch matrix. */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K60, K61, K62, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K5A, K63, K65, K67, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4C, K64, K66, K68, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K69, K58, \ - K50, K51, K52, K53, K54, K55, K56, K57, K6A, K59, K6B \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K62, K61, K60, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K5A, K63, K65, K67, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4C, K64, K66, K68, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K69, K58, \ + K50, K51, K52, K53, K54, K55, K56, K57, K6A, K59, K6B \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ - { 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 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ - { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, KC_NO, KC_NO }, \ - { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, KC_NO }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { 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 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, KC_NO, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, KC_NO }, \ } diff --git a/keyboards/alf/x2/keymaps/default/keymap.c b/keyboards/alf/x2/keymaps/default/keymap.c index 9470e38b56..eb3d7bd468 100644 --- a/keyboards/alf/x2/keymaps/default/keymap.c +++ b/keyboards/alf/x2/keymaps/default/keymap.c @@ -19,10 +19,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -} - void matrix_init_user(void) { } diff --git a/keyboards/alf/x2/rules.mk b/keyboards/alf/x2/rules.mk index 9c4082da29..1e6d4bb7cd 100644 --- a/keyboards/alf/x2/rules.mk +++ b/keyboards/alf/x2/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/alice/alice.c b/keyboards/alice/alice.c deleted file mode 100644 index adb88fef0a..0000000000 --- a/keyboards/alice/alice.c +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include - -#include "rgblight.h" - -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} -#endif diff --git a/keyboards/alice/config.h b/keyboards/alice/config.h deleted file mode 100644 index 07b9599f58..0000000000 --- a/keyboards/alice/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#pragma once - -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422E -// TODO: share these strings with usbconfig.h -// Edit usbconfig.h to change these. -#define MANUFACTURER TGR -#define PRODUCT TGR Alice - -/* matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 15 - -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define DIODE_DIRECTION COL2ROW - -#define RGBLED_NUM 18 -#define RGBLIGHT_ANIMATIONS - -#define NO_UART 1 -#define BOOTLOADHID_BOOTLOADER 1 diff --git a/keyboards/alice/readme.md b/keyboards/alice/readme.md deleted file mode 100644 index 8e901ae7e4..0000000000 --- a/keyboards/alice/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# TGR Alice - -![TGR Alice](https://i.imgur.com/cJohEqS.jpg) - -An ergonomic 60% keyboard. - -Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) -Hardware Supported: TGR Alice -Hardware Availability: Group buy finished - -Make example for this keyboard (after setting up your build environment): - - make alice:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. - - -ps2avrGB keyboard firmware -========================== - -This keyboard uses the port of the QMK firmware for boards that are based on the -ps2avrGB firmware. - -Note that this is a complete replacement for the firmware, so you won't be -using Bootmapper Client to change any keyboard settings, since not all the -USB report options are supported. - -## Installing - -First, install the requirements. These commands are for OSX, but all you -need is the AVR toolchain and `bootloadHID` for flashing: - -``` -$ brew cask install crosspack-avr -$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb -$ pip install pyusb -``` - -Then, with the keyboard plugged in, simply run this command from the -`qmk_firmware` directory: - -``` -$ make alice -$ bootloadHID -r alice_default.hex -``` - -## Setting the board to bootloader mode - -Hold the ESC key (the one before the 1! key, in case you remaped it). - -## Troubleshooting - -From my experience, it's really hard to brick these boards. But these -tricks have been useful when it got stuck in a weird scenario. - -1. Try plugging the board in while holding the bootloader key. This will force - it to boot only the bootloader without loading the firmware. Once this is - done, just reflash the board with the original firmware. -2. Sometimes USB hubs can act weird, so try connecting the board directly - to your computer or plugging/unplugging the USB hub. diff --git a/keyboards/alice/rules.mk b/keyboards/alice/rules.mk deleted file mode 100644 index eecd38d7e7..0000000000 --- a/keyboards/alice/rules.mk +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - -# MCU name -MCU = atmega32a -PROTOCOL = VUSB - -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = bootloadHID - -# build options -BOOTMAGIC_ENABLE = full -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes - -OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/alice/usbconfig.h b/keyboards/alice/usbconfig.h deleted file mode 100644 index df7a88e3ab..0000000000 --- a/keyboards/alice/usbconfig.h +++ /dev/null @@ -1,396 +0,0 @@ -/* Name: usbconfig.h - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2005-04-01 - * Tabsize: 4 - * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ - */ - -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ - -#include "config.h" - -/* -General Description: -This file is an example configuration (with inline documentation) for the USB -driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is -also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may -wire the lines to any other port, as long as D+ is also wired to INT0 (or any -other hardware interrupt, as long as it is the highest level interrupt, see -section at the end of this file). -*/ - -/* ---------------------------- Hardware Config ---------------------------- */ - -#define USB_CFG_IOPORTNAME D -/* This is the port where the USB bus is connected. When you configure it to - * "B", the registers PORTB, PINB and DDRB will be used. - */ -#define USB_CFG_DMINUS_BIT 3 -/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. - * This may be any bit in the port. - */ -#define USB_CFG_DPLUS_BIT 2 -/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. - * This may be any bit in the port. Please note that D+ must also be connected - * to interrupt pin INT0! [You can also use other interrupts, see section - * "Optional MCU Description" below, or you can connect D- to the interrupt, as - * it is required if you use the USB_COUNT_SOF feature. If you use D- for the - * interrupt, the USB interrupt will also be triggered at Start-Of-Frame - * markers every millisecond.] - */ -#define USB_CFG_CLOCK_KHZ (F_CPU/1000) -/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, - * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code - * require no crystal, they tolerate +/- 1% deviation from the nominal - * frequency. All other rates require a precision of 2000 ppm and thus a - * crystal! - * Since F_CPU should be defined to your actual clock rate anyway, you should - * not need to modify this setting. - */ -#define USB_CFG_CHECK_CRC 0 -/* Define this to 1 if you want that the driver checks integrity of incoming - * data packets (CRC checks). CRC checks cost quite a bit of code size and are - * currently only available for 18 MHz crystal clock. You must choose - * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. - */ - -/* ----------------------- Optional Hardware Config ------------------------ */ - -/* #define USB_CFG_PULLUP_IOPORTNAME D */ -/* If you connect the 1.5k pullup resistor from D- to a port pin instead of - * V+, you can connect and disconnect the device from firmware by calling - * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). - * This constant defines the port on which the pullup resistor is connected. - */ -/* #define USB_CFG_PULLUP_BIT 4 */ -/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined - * above) where the 1.5k pullup resistor is connected. See description - * above for details. - */ - -/* --------------------------- Functional Range ---------------------------- */ - -#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 -/* Define this to 1 if you want to compile a version with two endpoints: The - * default control endpoint 0 and an interrupt-in endpoint (any other endpoint - * number). - */ -#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 -/* Define this to 1 if you want to compile a version with three endpoints: The - * default control endpoint 0, an interrupt-in endpoint 3 (or the number - * configured below) and a catch-all default interrupt-in endpoint as above. - * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. - */ -#define USB_CFG_EP3_NUMBER 3 -/* If the so-called endpoint 3 is used, it can now be configured to any other - * endpoint number (except 0) with this macro. Default if undefined is 3. - */ -/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ -/* The above macro defines the startup condition for data toggling on the - * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. - * Since the token is toggled BEFORE sending any data, the first packet is - * sent with the oposite value of this configuration! - */ -#define USB_CFG_IMPLEMENT_HALT 0 -/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature - * for endpoint 1 (interrupt endpoint). Although you may not need this feature, - * it is required by the standard. We have made it a config option because it - * bloats the code considerably. - */ -#define USB_CFG_SUPPRESS_INTR_CODE 0 -/* Define this to 1 if you want to declare interrupt-in endpoints, but don't - * want to send any data over them. If this macro is defined to 1, functions - * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if - * you need the interrupt-in endpoints in order to comply to an interface - * (e.g. HID), but never want to send any data. This option saves a couple - * of bytes in flash memory and the transmit buffers in RAM. - */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ -#define USB_CFG_IS_SELF_POWERED 0 -/* Define this to 1 if the device has its own power supply. Set it to 0 if the - * device is powered from the USB bus. - */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ -#define USB_CFG_IMPLEMENT_FN_WRITE 1 -/* Set this to 1 if you want usbFunctionWrite() to be called for control-out - * transfers. Set it to 0 if you don't need it and want to save a couple of - * bytes. - */ -#define USB_CFG_IMPLEMENT_FN_READ 0 -/* Set this to 1 if you need to send control replies which are generated - * "on the fly" when usbFunctionRead() is called. If you only want to send - * data from a static buffer, set it to 0 and return the data from - * usbFunctionSetup(). This saves a couple of bytes. - */ -#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 -/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. - * You must implement the function usbFunctionWriteOut() which receives all - * interrupt/bulk data sent to any endpoint other than 0. The endpoint number - * can be found in 'usbRxToken'. - */ -#define USB_CFG_HAVE_FLOWCONTROL 0 -/* Define this to 1 if you want flowcontrol over USB data. See the definition - * of the macros usbDisableAllRequests() and usbEnableAllRequests() in - * usbdrv.h. - */ -#define USB_CFG_DRIVER_FLASH_PAGE 0 -/* If the device has more than 64 kBytes of flash, define this to the 64 k page - * where the driver's constants (descriptors) are located. Or in other words: - * Define this to 1 for boot loaders on the ATMega128. - */ -#define USB_CFG_LONG_TRANSFERS 0 -/* Define this to 1 if you want to send/receive blocks of more than 254 bytes - * in a single control-in or control-out transfer. Note that the capability - * for long transfers increases the driver size. - */ -/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ -/* This macro is a hook if you want to do unconventional things. If it is - * defined, it's inserted at the beginning of received message processing. - * If you eat the received message and don't want default processing to - * proceed, do a return after doing your things. One possible application - * (besides debugging) is to flash a status LED on each packet. - */ -/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ -/* This macro is a hook if you need to know when an USB RESET occurs. It has - * one parameter which distinguishes between the start of RESET state and its - * end. - */ -/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ -/* This macro (if defined) is executed when a USB SET_ADDRESS request was - * received. - */ -#define USB_COUNT_SOF 1 -/* define this macro to 1 if you need the global variable "usbSofCount" which - * counts SOF packets. This feature requires that the hardware interrupt is - * connected to D- instead of D+. - */ -/* #ifdef __ASSEMBLER__ - * macro myAssemblerMacro - * in YL, TCNT0 - * sts timer0Snapshot, YL - * endm - * #endif - * #define USB_SOF_HOOK myAssemblerMacro - * This macro (if defined) is executed in the assembler module when a - * Start Of Frame condition is detected. It is recommended to define it to - * the name of an assembler macro which is defined here as well so that more - * than one assembler instruction can be used. The macro may use the register - * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages - * immediately after an SOF pulse may be lost and must be retried by the host. - * What can you do with this hook? Since the SOF signal occurs exactly every - * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in - * designs running on the internal RC oscillator. - * Please note that Start Of Frame detection works only if D- is wired to the - * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! - */ -#define USB_CFG_CHECK_DATA_TOGGLING 0 -/* define this macro to 1 if you want to filter out duplicate data packets - * sent by the host. Duplicates occur only as a consequence of communication - * errors, when the host does not receive an ACK. Please note that you need to - * implement the filtering yourself in usbFunctionWriteOut() and - * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable - * for each control- and out-endpoint to check for duplicate packets. - */ -#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 -/* define this macro to 1 if you want the function usbMeasureFrameLength() - * compiled in. This function can be used to calibrate the AVR's RC oscillator. - */ -#define USB_USE_FAST_CRC 0 -/* The assembler module has two implementations for the CRC algorithm. One is - * faster, the other is smaller. This CRC routine is only used for transmitted - * messages where timing is not critical. The faster routine needs 31 cycles - * per byte while the smaller one needs 61 to 69 cycles. The faster routine - * may be worth the 32 bytes bigger code size if you transmit lots of data and - * run the AVR close to its limit. - */ - -/* -------------------------- Device Description --------------------------- */ - -#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) -/* USB vendor ID for the device, low byte first. If you have registered your - * own Vendor ID, define it here. Otherwise you may use one of obdev's free - * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) -/* This is the ID of the product, low byte first. It is interpreted in the - * scope of the vendor ID. If you have registered your own VID with usb.org - * or if you have licensed a PID from somebody else, define it here. Otherwise - * you may use one of obdev's free shared VID/PID pairs. See the file - * USB-IDs-for-free.txt for details! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 -/* Version number of the device: Minor number first, then major number. - */ -#define USB_CFG_VENDOR_NAME 'T', 'G', 'R' -#define USB_CFG_VENDOR_NAME_LEN 3 -/* These two values define the vendor name returned by the USB device. The name - * must be given as a list of characters under single quotes. The characters - * are interpreted as Unicode (UTF-16) entities. - * If you don't want a vendor name string, undefine these macros. - * ALWAYS define a vendor name containing your Internet domain name if you use - * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for - * details. - */ -#define USB_CFG_DEVICE_NAME 'T', 'G', 'R', ' ', 'A', 'l', 'i', 'c', 'e' -#define USB_CFG_DEVICE_NAME_LEN 9 -/* Same as above for the device name. If you don't want a device name, undefine - * the macros. See the file USB-IDs-for-free.txt before you assign a name if - * you use a shared VID/PID. - */ -/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ -/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ -/* Same as above for the serial number. If you don't want a serial number, - * undefine the macros. - * It may be useful to provide the serial number through other means than at - * compile time. See the section about descriptor properties below for how - * to fine tune control over USB descriptors such as the string descriptor - * for the serial number. - */ -#define USB_CFG_DEVICE_CLASS 0 -#define USB_CFG_DEVICE_SUBCLASS 0 -/* See USB specification if you want to conform to an existing device class. - * Class 0xff is "vendor specific". - */ -#define USB_CFG_INTERFACE_CLASS 3 /* HID */ -#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ -#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ -/* See USB specification if you want to conform to an existing device class or - * protocol. The following classes must be set at interface level: - * HID class is 3, no subclass and protocol required (but may be useful!) - * CDC class is 2, use subclass 2 and protocol 1 for ACM - */ -#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 -/* Define this to the length of the HID report descriptor, if you implement - * an HID device. Otherwise don't define it or define it to 0. - * If you use this define, you must add a PROGMEM character array named - * "usbHidReportDescriptor" to your code which contains the report descriptor. - * Don't forget to keep the array and this define in sync! - */ - -/* #define USB_PUBLIC static */ -/* Use the define above if you #include usbdrv.c instead of linking against it. - * This technique saves a couple of bytes in flash memory. - */ - -/* ------------------- Fine Control over USB Descriptors ------------------- */ -/* If you don't want to use the driver's default USB descriptors, you can - * provide our own. These can be provided as (1) fixed length static data in - * flash memory, (2) fixed length static data in RAM or (3) dynamically at - * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more - * information about this function. - * Descriptor handling is configured through the descriptor's properties. If - * no properties are defined or if they are 0, the default descriptor is used. - * Possible properties are: - * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched - * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is - * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if - * you want RAM pointers. - * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found - * in static memory is in RAM, not in flash memory. - * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), - * the driver must know the descriptor's length. The descriptor itself is - * found at the address of a well known identifier (see below). - * List of static descriptor names (must be declared PROGMEM if in flash): - * char usbDescriptorDevice[]; - * char usbDescriptorConfiguration[]; - * char usbDescriptorHidReport[]; - * char usbDescriptorString0[]; - * int usbDescriptorStringVendor[]; - * int usbDescriptorStringDevice[]; - * int usbDescriptorStringSerialNumber[]; - * Other descriptors can't be provided statically, they must be provided - * dynamically at runtime. - * - * Descriptor properties are or-ed or added together, e.g.: - * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) - * - * The following descriptors are defined: - * USB_CFG_DESCR_PROPS_DEVICE - * USB_CFG_DESCR_PROPS_CONFIGURATION - * USB_CFG_DESCR_PROPS_STRINGS - * USB_CFG_DESCR_PROPS_STRING_0 - * USB_CFG_DESCR_PROPS_STRING_VENDOR - * USB_CFG_DESCR_PROPS_STRING_PRODUCT - * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER - * USB_CFG_DESCR_PROPS_HID - * USB_CFG_DESCR_PROPS_HID_REPORT - * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) - * - * Note about string descriptors: String descriptors are not just strings, they - * are Unicode strings prefixed with a 2 byte header. Example: - * int serialNumberDescriptor[] = { - * USB_STRING_DESCRIPTOR_HEADER(6), - * 'S', 'e', 'r', 'i', 'a', 'l' - * }; - */ - -#define USB_CFG_DESCR_PROPS_DEVICE 0 -#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 -#define USB_CFG_DESCR_PROPS_STRINGS 0 -#define USB_CFG_DESCR_PROPS_STRING_0 0 -#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 -#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 -#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 -#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID 0 -#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 -#define USB_CFG_DESCR_PROPS_UNKNOWN 0 - -#define usbMsgPtr_t unsigned short -/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to - * a scalar type here because gcc generates slightly shorter code for scalar - * arithmetics than for pointer arithmetics. Remove this define for backward - * type compatibility or define it to an 8 bit type if you use data in RAM only - * and all RAM is below 256 bytes (tiny memory model in IAR CC). - */ - -/* ----------------------- Optional MCU Description ------------------------ */ - -/* The following configurations have working defaults in usbdrv.h. You - * usually don't need to set them explicitly. Only if you want to run - * the driver on a device which is not yet supported or with a compiler - * which is not fully supported (such as IAR C) or if you use a differnt - * interrupt than INT0, you may have to define some of these. - */ -/* #define USB_INTR_CFG MCUCR */ -/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE GIMSK */ -/* #define USB_INTR_ENABLE_BIT INT0 */ -/* #define USB_INTR_PENDING GIFR */ -/* #define USB_INTR_PENDING_BIT INTF0 */ -/* #define USB_INTR_VECTOR INT0_vect */ - -/* Set INT1 for D- falling edge to count SOF */ -/* #define USB_INTR_CFG EICRA */ -#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE EIMSK */ -#define USB_INTR_ENABLE_BIT INT1 -/* #define USB_INTR_PENDING EIFR */ -#define USB_INTR_PENDING_BIT INTF1 -#define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/alpha/keymaps/hvp/keymap.c b/keyboards/alpha/keymaps/hvp/keymap.c new file mode 100755 index 0000000000..9e8f2d3b9c --- /dev/null +++ b/keyboards/alpha/keymaps/hvp/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + HOME, + MODS, + MODS2, + OTHER, +}; + +enum custom_keycodes { + MACRO1 = SAFE_RANGE +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case MACRO1: + SEND_STRING("I'm so sorry... -PyroL"); + return false; + } + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [HOME] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, MT(MOD_LCTL,KC_P), + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LSFT,KC_ENT), + KC_Z, KC_X, KC_C, LT(MODS2,KC_V), LT(MODS, KC_SPC), LT(OTHER,KC_B), KC_N, KC_M), + + [MODS] = LAYOUT( + KC_TAB, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_BSPC, + KC_LSFT, KC_ESC, _______, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, + KC_LCTL, KC_LGUI, KC_LALT, _______, _______, KC_COMM, KC_DOT, KC_SLSH), + + [MODS2] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_LSFT, KC_ESC, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, _______, + RGB_VAI, RGB_VAD, RGB_HUI, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU), + + [OTHER] = LAYOUT( + KC_ESC, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + 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_NO, KC_NO, KC_NO), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} \ No newline at end of file diff --git a/keyboards/alpha/keymaps/vderm/alpha_vderm.hex b/keyboards/alpha/keymaps/vderm/alpha_vderm.hex deleted file mode 100644 index 7515ad0305..0000000000 Binary files a/keyboards/alpha/keymaps/vderm/alpha_vderm.hex and /dev/null differ diff --git a/keyboards/alpha/rules.mk b/keyboards/alpha/rules.mk index 61ea958d7e..13a720d8c1 100755 --- a/keyboards/alpha/rules.mk +++ b/keyboards/alpha/rules.mk @@ -1,46 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # comment out to disable the options. # diff --git a/keyboards/alps64/alps64.c b/keyboards/alps64/alps64.c index 472d1d445c..0e4ef07bc0 100644 --- a/keyboards/alps64/alps64.c +++ b/keyboards/alps64/alps64.c @@ -14,17 +14,24 @@ 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 . */ -#include "quantum.h" +#include "alps64.h" -#define LED_ON() do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0) -#define LED_OFF() do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0) -#define LED_TGL() do { DDRC |= (1<<5); PINC |= (1<<5); } while (0) +void keyboard_pre_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(C5); + keyboard_pre_init_user(); +} +void led_set_kb(uint8_t usb_led) +{ + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // output high + writePinHigh(C5); + } else { + // Hi-Z + writePinLow(C5); + } -void matrix_init_kb(void) { - LED_ON(); - _delay_ms(500); - LED_OFF(); - - matrix_init_user(); -} \ No newline at end of file + led_set_user(usb_led); +} diff --git a/keyboards/alps64/alps64.h b/keyboards/alps64/alps64.h index 14ff552185..d816be9da7 100644 --- a/keyboards/alps64/alps64.h +++ b/keyboards/alps64/alps64.h @@ -14,8 +14,7 @@ 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 . */ -#ifndef ALPS64_H -#define ALPS64_H +#pragma once #include "quantum.h" @@ -105,22 +104,3 @@ along with this program. If not, see . { K60, K61, K62, K63, K64, K65, K66, K67 }, \ { KC_NO, K71, K72, K73, K74, K75, K76, K77 } \ } - -#define LAYOUT_kc( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ - K30, K40, K50, K60, K70, K00, K10, K20 \ -) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \ - { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \ - { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \ - { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 } \ -} - -#endif diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index 74f8017add..cc7eada11a 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -24,7 +23,7 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6464 #define DEVICE_VER 0x0001 -#define MANUFACTURER TMK +#define MANUFACTURER Hasu #define PRODUCT Alps64 #define DESCRIPTION TMK keyboard firmware for Alps64 @@ -64,5 +63,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/alps64/led.c b/keyboards/alps64/led.c deleted file mode 100644 index d20c51aabe..0000000000 --- a/keyboards/alps64/led.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#include -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1< - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // initialize row and col - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - //debug - debug_matrix = true; - LED_ON(); - _delay_ms(500); - LED_OFF(); -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<event.pressed ? - MACRO( D(RALT), T(SPC), U(RALT), END ) - :MACRO( END )); - break; - case 1: - return (record->event.pressed ? - MACRO( D(LALT), T(F2), U(LALT), END ) - :MACRO( END )); - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/amj60/rules.mk b/keyboards/amj60/rules.mk index 0df13d3062..bccdd66811 100644 --- a/keyboards/amj60/rules.mk +++ b/keyboards/amj60/rules.mk @@ -1,53 +1,15 @@ - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -65,4 +27,4 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -LAYOUTS = 60_ansi \ No newline at end of file +LAYOUTS = 60_ansi diff --git a/keyboards/amj96/keymaps/default/keymap.c b/keyboards/amj96/keymaps/default/keymap.c index 514c216681..a520fdeb31 100644 --- a/keyboards/amj96/keymaps/default/keymap.c +++ b/keyboards/amj96/keymaps/default/keymap.c @@ -36,22 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/amj96/matrix.c b/keyboards/amj96/matrix.c index e41bbec728..5d00ea98f5 100644 --- a/keyboards/amj96/matrix.c +++ b/keyboards/amj96/matrix.c @@ -63,9 +63,6 @@ void matrix_init(void) #ifdef UART_RGB_ENABLE uart_rgb_init(); #endif - // disable JTAG - MCUCR = _BV(JTD); - MCUCR = _BV(JTD); // 85 REST DDRD |= _BV(PD7); diff --git a/keyboards/amj96/rules.mk b/keyboards/amj96/rules.mk index 59451dee6b..52f610d7d5 100644 --- a/keyboards/amj96/rules.mk +++ b/keyboards/amj96/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/amjkeyboard/amj66/amj66.c b/keyboards/amjkeyboard/amj66/amj66.c new file mode 100644 index 0000000000..05e29975b6 --- /dev/null +++ b/keyboards/amjkeyboard/amj66/amj66.c @@ -0,0 +1,43 @@ +/* Copyright 2018 Alex Peters + * + * 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 . + */ +#include "amj66.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/amjkeyboard/amj66/amj66.h b/keyboards/amjkeyboard/amj66/amj66.h new file mode 100644 index 0000000000..e2315f5e9f --- /dev/null +++ b/keyboards/amjkeyboard/amj66/amj66.h @@ -0,0 +1,79 @@ +/* Copyright 2018 Alex Peters + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. + +/* LAYOUT_all + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ │0F │ ISO Enter + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ├───┤ ┌─────┐ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │ │1E │ │2C │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┘ ┌──┴┐ │ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │ │1D │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┬─┴─┐ └───┴────┘ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├────┴┬──┴─┬─┴──┬┴───┴───┴─┬─┴───┴───┴┬──┴─┬─┴──┬┴────┼───┼───┼───┐ + * │40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │4A │ + * └─────┴────┴────┴──────────┴──────────┴────┴────┴─────┴───┴───┴───┘ + * 2u Backspace = k0D + * ISO # = k1D + * 2.25u Right Shift = k3C + * 6.25u Space = k44 + */ +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_66_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E, KC_NO }, \ + { k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_66_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E, KC_NO }, \ + { k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/amjkeyboard/amj66/config.h b/keyboards/amjkeyboard/amj66/config.h new file mode 100644 index 0000000000..5569bcd919 --- /dev/null +++ b/keyboards/amjkeyboard/amj66/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2018 Alex Peters + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xBD66 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AMJKeyboard +#define PRODUCT AMJ66 +#define DESCRIPTION QMK keyboard firmware for AMJ66 + +/* Key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { F7, F6, F5, F4, F1 } +#define MATRIX_COL_PINS { F0, B3, B2, B1, B0, B7, D0, D1, D2, D3, D5, D6, D7, B4, B5, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 +#define BACKLIGHT_ON_STATE 1 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/amjkeyboard/amj66/info.json b/keyboards/amjkeyboard/amj66/info.json new file mode 100644 index 0000000000..93656c4452 --- /dev/null +++ b/keyboards/amjkeyboard/amj66/info.json @@ -0,0 +1,227 @@ +{ + "keyboard_name": "AMJ66", + "url": "", + "maintainer": "FSund, qmk", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "key_count": 70, + "layout": [ + {"label":"~", "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":"Insert", "x":15.5, "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":"Backspace", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15.5, "y":1}, + {"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":"ISO Backslash", "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.25}, + {"label":"HHKB Fn", "x":13.5, "y":3}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":2.75}, + {"label":"Space", "x":6.75, "y":4, "w":2.75}, + {"label":"Alt", "x":9.5, "y":4, "w":1.5}, + {"label":"GUI", "x":11, "y":4, "w":1.25}, + {"label":"Ctrl", "x":12.25, "y":4, "w":1.25}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4} + ] + }, + "LAYOUT_66_ansi": { + "key_count": 66, + "layout": [ + {"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15.5, "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":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15.5, "y":1}, + {"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":2.25}, + {"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":2.25}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "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":"Fn", "x":11.25, "y":4}, + {"label":"Ctrl", "x":12.25, "y":4, "w":1.25}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4} + ] + }, + "LAYOUT_66_iso": { + "key_count": 67, + "layout": [ + {"label":"\u00ac", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"\"", "x":2, "y":0}, + {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15.5, "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":"Delete", "x":15.5, "y":1}, + {"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":1, "w":1.25, "h":2}, + {"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":2.25}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "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":"AltGr", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4}, + {"label":"Ctrl", "x":12.25, "y":4, "w":1.25}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4} + ] + } + } +} diff --git a/keyboards/amjkeyboard/amj66/keymaps/default/config.h b/keyboards/amjkeyboard/amj66/keymaps/default/config.h new file mode 100644 index 0000000000..6d42fc568a --- /dev/null +++ b/keyboards/amjkeyboard/amj66/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Alex Peters + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/amjkeyboard/amj66/keymaps/default/keymap.c b/keyboards/amjkeyboard/amj66/keymaps/default/keymap.c new file mode 100644 index 0000000000..cce05a7fe4 --- /dev/null +++ b/keyboards/amjkeyboard/amj66/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2018 Alex Peters + * + * 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 . + */ +#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_GRV, KC_BSPC, KC_INS, + 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_DEL, + 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, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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_BSPC, KC_BSPC, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_DEL, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_BRTG, BL_STEP, KC_SLEP, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + +}; diff --git a/keyboards/amjkeyboard/amj66/keymaps/default/readme.md b/keyboards/amjkeyboard/amj66/keymaps/default/readme.md new file mode 100644 index 0000000000..c250695efd --- /dev/null +++ b/keyboards/amjkeyboard/amj66/keymaps/default/readme.md @@ -0,0 +1,12 @@ +# The default keymap for AMJ66 + +![AMJ66 Layout Image](https://i.imgur.com/QNpHnMe.jpg) + +This is a fairly universal layout that supports standard ANSI, split backspace, +split left shift, and split right shift. +Cycle backlight: Fn + . +Backlight breathing: Fn + , +Volume Up/Down: Fn + [ and Fn + ] +Mute: Fn + \ +Sleep: Fn + / +Bootloader Mode: Fn + CapsLock \ No newline at end of file diff --git a/keyboards/amjkeyboard/amj66/readme.md b/keyboards/amjkeyboard/amj66/readme.md new file mode 100644 index 0000000000..37a1f27ea6 --- /dev/null +++ b/keyboards/amjkeyboard/amj66/readme.md @@ -0,0 +1,15 @@ +# AMJ66 + +![AMJ66](https://i.imgur.com/qtLuL2o.jpg) + +A 66% keyboard formerly sold by Massdrop and KBDFans. + +Keyboard Maintainer: [FSund](https://github.com/fsund), [The QMK Community](https://github.com/qmk) +Hardware Supported: AMJ66, ATmega32U4 +Hardware Availability: [Drop.com](https://drop.com/buy/kbd66-mechanical-keyboard-kit?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make amjkeyboard/amj66: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). diff --git a/keyboards/amjkeyboard/amj66/rules.mk b/keyboards/amjkeyboard/amj66/rules.mk new file mode 100644 index 0000000000..4102c0eb28 --- /dev/null +++ b/keyboards/amjkeyboard/amj66/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +LAYOUTS = 66_ansi 66_iso diff --git a/keyboards/amjpad/rules.mk b/keyboards/amjpad/rules.mk index f378a4ede2..fe28924852 100644 --- a/keyboards/amjpad/rules.mk +++ b/keyboards/amjpad/rules.mk @@ -1,53 +1,15 @@ - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/angel17/alpha/alpha.c b/keyboards/angel17/alpha/alpha.c new file mode 100644 index 0000000000..3d2d1de779 --- /dev/null +++ b/keyboards/angel17/alpha/alpha.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "alpha.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/angel17/alpha/alpha.h b/keyboards/angel17/alpha/alpha.h new file mode 100644 index 0000000000..5b8600a206 --- /dev/null +++ b/keyboards/angel17/alpha/alpha.h @@ -0,0 +1,40 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k41, k33 \ +) \ +{ \ + { k00, k10, k20, k31, k41 }, \ + { k02, k12, k22, k33, KC_NO }, \ + { k01, k11, k21, k32, KC_NO }, \ + { k03, k13, k30, k40, KC_NO }, \ +} diff --git a/keyboards/angel17/alpha/config.h b/keyboards/angel17/alpha/config.h new file mode 100644 index 0000000000..2bb74acc89 --- /dev/null +++ b/keyboards/angel17/alpha/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel17 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/angel17/alpha/rules.mk b/keyboards/angel17/alpha/rules.mk new file mode 100644 index 0000000000..5a26a2e0be --- /dev/null +++ b/keyboards/angel17/alpha/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_5x4 diff --git a/keyboards/angel17/info.json b/keyboards/angel17/info.json new file mode 100644 index 0000000000..823235348a --- /dev/null +++ b/keyboards/angel17/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "angel17", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [ + {"label":"Num Lock", "x":0, "y":0}, + {"label":"/", "x":1, "y":0}, + {"label":"*", "x":2, "y":0}, + {"label":"-", "x":3, "y":0}, + + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"+", "x":3, "y":1, "h":2}, + + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3}, + + {"label":"0", "x":0, "y":4, "w":2}, + {"label":".", "x":2, "y":4}, + {"label":"Enter", "x":3, "y":3, "h":2} + ] + } + } +} diff --git a/keyboards/suihankey/keymaps/default/config.h b/keyboards/angel17/keymaps/default/config.h similarity index 100% rename from keyboards/suihankey/keymaps/default/config.h rename to keyboards/angel17/keymaps/default/config.h diff --git a/keyboards/angel17/keymaps/default/keymap.c b/keyboards/angel17/keymaps/default/keymap.c new file mode 100644 index 0000000000..8f54b72b42 --- /dev/null +++ b/keyboards/angel17/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE, + COMMAND, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_numpad_5x4( /* Base */ + LT(COMMAND,KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + [COMMAND] = LAYOUT_numpad_5x4( /* Base */ + _______, KC_NO, KC_NO, RGB_RMOD, + KC_NO, KC_NO, KC_NO, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, + RGB_HUD, RGB_SAD, RGB_VAD, + RGB_TOG, KC_NO, KC_NO + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/angel17/keymaps/default/readme.md b/keyboards/angel17/keymaps/default/readme.md new file mode 100644 index 0000000000..a509fef7a3 --- /dev/null +++ b/keyboards/angel17/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for angel17 \ No newline at end of file diff --git a/keyboards/angel17/readme.md b/keyboards/angel17/readme.md new file mode 100644 index 0000000000..8c9b806685 --- /dev/null +++ b/keyboards/angel17/readme.md @@ -0,0 +1,15 @@ +# angel17 + +![angel17](https://i.gyazo.com/30787446262c5818bc60e0ffb34c96ed.jpg) + +Keyboard for tablets. + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: angel17_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make angel17: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). diff --git a/keyboards/angel17/rev1/config.h b/keyboards/angel17/rev1/config.h new file mode 100644 index 0000000000..3e5af362ab --- /dev/null +++ b/keyboards/angel17/rev1/config.h @@ -0,0 +1,244 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel17 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 17 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/angel17/rev1/rev1.c b/keyboards/angel17/rev1/rev1.c new file mode 100644 index 0000000000..f97e6caed4 --- /dev/null +++ b/keyboards/angel17/rev1/rev1.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "rev1.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/angel17/rev1/rev1.h b/keyboards/angel17/rev1/rev1.h new file mode 100644 index 0000000000..5b8600a206 --- /dev/null +++ b/keyboards/angel17/rev1/rev1.h @@ -0,0 +1,40 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k41, k33 \ +) \ +{ \ + { k00, k10, k20, k31, k41 }, \ + { k02, k12, k22, k33, KC_NO }, \ + { k01, k11, k21, k32, KC_NO }, \ + { k03, k13, k30, k40, KC_NO }, \ +} diff --git a/keyboards/angel17/rev1/rules.mk b/keyboards/angel17/rev1/rules.mk new file mode 100644 index 0000000000..c76c0244a8 --- /dev/null +++ b/keyboards/angel17/rev1/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_5x4 diff --git a/keyboards/angel17/rules.mk b/keyboards/angel17/rules.mk new file mode 100644 index 0000000000..ca2563a6e2 --- /dev/null +++ b/keyboards/angel17/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_5x4 + +DEFAULT_FOLDER = angel17/rev1 diff --git a/keyboards/angel64/angel64.c b/keyboards/angel64/angel64.c new file mode 100644 index 0000000000..d26c3608bc --- /dev/null +++ b/keyboards/angel64/angel64.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "angel64.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/angel64/angel64.h b/keyboards/angel64/angel64.h new file mode 100644 index 0000000000..6c0898a56a --- /dev/null +++ b/keyboards/angel64/angel64.h @@ -0,0 +1,48 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, \ + k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, \ + k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64\ +) \ +{ \ + { k01, k13, k25, k37, k49, k61 }, \ + { k02, k14, k26, k38, k50, k62 }, \ + { k03, k15, k27, k39, k51, k63 }, \ + { k04, k16, k28, k40, k52, k64 }, \ + { k05, k17, k29, k41, k53, KC_NO }, \ + { k06, k18, k30, k42, k54, KC_NO }, \ + { k07, k19, k31, k43, k55, KC_NO }, \ + { k08, k20, k32, k44, k56, KC_NO }, \ + { k09, k21, k33, k45, k57, KC_NO }, \ + { k10, k22, k34, k46, k58, KC_NO }, \ + { k11, k23, k35, k47, k59, KC_NO }, \ + { k12, k24, k36, k48, k60, KC_NO } \ +} diff --git a/keyboards/angel64/config.h b/keyboards/angel64/config.h new file mode 100644 index 0000000000..fb683bc153 --- /dev/null +++ b/keyboards/angel64/config.h @@ -0,0 +1,242 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel64 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 64 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 25 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/angel64/info.json b/keyboards/angel64/info.json new file mode 100644 index 0000000000..2bcd0c9ea1 --- /dev/null +++ b/keyboards/angel64/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "angel64", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "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":"back", "x":13, "y":0}, {"label":"Q", "x":0, "y":1, "w":1.5}, {"label":"W", "x":1.5, "y":1}, {"label":"E", "x":2.5, "y":1}, {"label":"R", "x":3.5, "y":1}, {"label":"T", "x":4.5, "y":1}, {"label":"Y", "x":5.5, "y":1}, {"label":"U", "x":6.5, "y":1}, {"label":"I", "x":7.5, "y":1}, {"label":"O", "x":8.5, "y":1}, {"label":"P", "x":9.5, "y":1}, {"label":"[", "x":10.5, "y":1}, {"label":"]", "x":11.5, "y":1}, {"label":"|", "x":12.5, "y":1, "w":1.5}, {"label":"Ctrl", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"H", "x":6, "y":2}, {"label":"J", "x":7, "y":2}, {"label":"K", "x":8, "y":2}, {"label":"L", "x":9, "y":2}, {"label":";:", "x":10, "y":2}, {"label":"`", "x":11, "y":2}, {"label":"Enter", "x":12, "y":2, "w":2}, {"label":"Shift", "x":0, "y":3, "w":1.5}, {"label":"Z", "x":1.5, "y":3}, {"label":"X", "x":2.5, "y":3}, {"label":"C", "x":3.5, "y":3}, {"label":"V", "x":4.5, "y":3}, {"label":"B", "x":5.5, "y":3}, {"label":"N", "x":6.5, "y":3}, {"label":"M", "x":7.5, "y":3}, {"label":"<", "x":8.5, "y":3}, {"label":">", "x":9.5, "y":3}, {"label":"?", "x":10.5, "y":3}, {"label":"\u2191", "x":11.5, "y":3}, {"label":"Fn", "x":12.5, "y":3, "w":1.5}, {"label":"Caps", "x":0, "y":4}, {"label":"Alt", "x":1, "y":4}, {"label":"Start", "x":2, "y":4, "w":1.5}, {"label":"Ctrl", "x":3.5, "y":4, "w":1.5}, {"label":"Space", "x":5, "y":4, "w":2}, {"label":"Ctrl", "x":7, "y":4, "w":1.5}, {"label":"Alt", "x":8.5, "y":4, "w":1.5}, {"label":"\u2190", "x":10, "y":4}, {"label":"\u2193", "x":11, "y":4}, {"label":"\u2192", "x":12, "y":4}, {"label":"Alt", "x":13, "y":4}] + } + } +} diff --git a/keyboards/angel64/keymaps/default/config.h b/keyboards/angel64/keymaps/default/config.h new file mode 100644 index 0000000000..bf1149ebc6 --- /dev/null +++ b/keyboards/angel64/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/angel64/keymaps/default/keymap.c b/keyboards/angel64/keymaps/default/keymap.c new file mode 100644 index 0000000000..50ca64fdec --- /dev/null +++ b/keyboards/angel64/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE = 0, + COMMAND +}; + +#define KC_COMMAND LT(COMMAND,KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC , + KC_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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_COMMAND, KC_SPC, KC_COMMAND, KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL + ), + [COMMAND] = LAYOUT( + KC_ESC, 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_BSPC , + KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +void keyboard_post_init_user(void) { +} diff --git a/keyboards/angel64/keymaps/default/readme.md b/keyboards/angel64/keymaps/default/readme.md new file mode 100644 index 0000000000..f4cd48f2ef --- /dev/null +++ b/keyboards/angel64/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for angel64 \ No newline at end of file diff --git a/keyboards/angel64/matrix.c b/keyboards/angel64/matrix.c new file mode 100644 index 0000000000..e06fc15dc4 --- /dev/null +++ b/keyboards/angel64/matrix.c @@ -0,0 +1,287 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<. #include "ares.h" -#ifdef RGBLIGHT_ENABLE - -#include -#include "i2c_master.h" -#include "rgblight.h" - -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} - -#endif - #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); } void backlight_set(uint8_t level) { @@ -79,29 +41,3 @@ void backlight_set(uint8_t level) { } } #endif - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -/* -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); -} -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -} -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); -} -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -*/ \ No newline at end of file diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h index cca26aab3e..f0aa926ea5 100644 --- a/keyboards/ares/config.h +++ b/keyboards/ares/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 #define MANUFACTURER LSJ #define PRODUCT QMK Firmware for Ares @@ -36,7 +37,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ares/rules.mk b/keyboards/ares/rules.mk index cd8edc6112..58d36bc673 100644 --- a/keyboards/ares/rules.mk +++ b/keyboards/ares/rules.mk @@ -1,32 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -37,12 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = yes -NO_UART = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/ares/usbconfig.h b/keyboards/ares/usbconfig.h index 89b7ffbaab..7c85ff22c9 100644 --- a/keyboards/ares/usbconfig.h +++ b/keyboards/ares/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'L', 'S', 'J' diff --git a/keyboards/ash1800/ash1800.c b/keyboards/ash1800/ash1800.c new file mode 100644 index 0000000000..5b1d1c45f2 --- /dev/null +++ b/keyboards/ash1800/ash1800.c @@ -0,0 +1,25 @@ +/* Copyright 2019 angelbirth + * + * 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 . + */ +#include "ash1800.h" + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(NUM_LOCK_LED_PIN, !led_state.num_lock); + writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock); + } + return true; +} \ No newline at end of file diff --git a/keyboards/ash1800/ash1800.h b/keyboards/ash1800/ash1800.h new file mode 100644 index 0000000000..bcfb2ec5d0 --- /dev/null +++ b/keyboards/ash1800/ash1800.h @@ -0,0 +1,51 @@ +/* Copyright 2019 angelbirth + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k01, k02, k03, k60, k61, k62, k63, k04, k05, k06, k07, k08, k54, k55, k56, k57, \ + k64, k65, k66, k67, \ + k10, k11, k12, k13, k70, k71, k72, k73, k14, k15, k16, k17, k18, k19, k74, k75, k76, k77, \ + k20, k21, k22, k23, k80, k81, k82, k83, k24, k25, k26, k27, k28, k29, k84, k85, k86, k87, \ + k30, k31, k32, k33, k90, k91, k92, k93, k34, k35, k36, k37, k38, k94, k95, k96, k97, \ + k40, k41, k42, k43, ka0, ka1, ka2, ka3, k44, k45, k46, k47, k48, ka9, ka4, ka5, ka6, ka7, \ + k50, k51, k52, k53, kb4, kb7, ka8, kb8, kb9, kb5, kb6 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, KC_NO, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, KC_NO, KC_NO }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, KC_NO, KC_NO }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, KC_NO, KC_NO }, \ + { ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7, ka8, ka9 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, kb4, kb5, kb6, kb7, kb8, kb9 } \ +} + \ No newline at end of file diff --git a/keyboards/ash1800/config.h b/keyboards/ash1800/config.h new file mode 100644 index 0000000000..9f25a0f116 --- /dev/null +++ b/keyboards/ash1800/config.h @@ -0,0 +1,253 @@ +/* +Copyright 2019 angelbirth + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1800 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Hasyim Ashari +#define PRODUCT ASH-1800 +#define DESCRIPTION An attempt to make a cherry g80/g81 clone + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D0, D1, D2, D3, D5, D4, D6 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, B0, B2, B1, B3, B7, C7 } +#define UNUSED_PINS + +#define NUM_LOCK_LED_PIN E6 +#define CAPS_LOCK_LED_PIN F0 +#define SCROLL_LOCK_LED_PIN F7 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ash1800/info.json b/keyboards/ash1800/info.json new file mode 100644 index 0000000000..102b78b0ee --- /dev/null +++ b/keyboards/ash1800/info.json @@ -0,0 +1,539 @@ +{ + "keyboard_name": "ASH-1800", + "maintainer": "angelbirth", + "width": 19.5, + "height": 7.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + { + "label": "Esc", + "x": 0, + "y": 0 + }, + { + "label": "F1", + "x": 1.25, + "y": 0 + }, + { + "label": "F2", + "x": 2.25, + "y": 0 + }, + { + "label": "F3", + "x": 3.25, + "y": 0 + }, + { + "label": "F4", + "x": 4.25, + "y": 0 + }, + { + "label": "F5", + "x": 5.5, + "y": 0 + }, + { + "label": "F6", + "x": 6.5, + "y": 0 + }, + { + "label": "F7", + "x": 7.5, + "y": 0 + }, + { + "label": "F8", + "x": 8.5, + "y": 0 + }, + { + "label": "F9", + "x": 9.75, + "y": 0 + }, + { + "label": "F10", + "x": 10.75, + "y": 0 + }, + { + "label": "F11", + "x": 11.75, + "y": 0 + }, + { + "label": "F12", + "x": 12.75, + "y": 0 + }, + { + "label": "Insert", + "x": 15.5, + "y": 0 + }, + { + "label": "Home", + "x": 16.5, + "y": 0 + }, + { + "label": "PgUp", + "x": 17.5, + "y": 0 + }, + { + "label": "PrtSc", + "x": 18.5, + "y": 0 + }, + { + "label": "Del", + "x": 15.5, + "y": 1 + }, + { + "label": "End", + "x": 16.5, + "y": 1 + }, + { + "label": "PgDn", + "x": 17.5, + "y": 1 + }, + { + "label": "Scroll Lock", + "x": 18.5, + "y": 1 + }, + { + "label": "~", + "x": 0, + "y": 2 + }, + { + "label": "!", + "x": 1, + "y": 2 + }, + { + "label": "@", + "x": 2, + "y": 2 + }, + { + "label": "#", + "x": 3, + "y": 2 + }, + { + "label": "$", + "x": 4, + "y": 2 + }, + { + "label": "%", + "x": 5, + "y": 2 + }, + { + "label": "^", + "x": 6, + "y": 2 + }, + { + "label": "&", + "x": 7, + "y": 2 + }, + { + "label": "", + "x": 8, + "y": 2 + }, + { + "label": "(", + "x": 9, + "y": 2 + }, + { + "label": ")", + "x": 10, + "y": 2 + }, + { + "label": "_", + "x": 11, + "y": 2 + }, + { + "label": "+", + "x": 12, + "y": 2 + }, + { + "label": "Backspace", + "x": 13, + "y": 2, + "w": 2 + }, + { + "label": "Num Lock", + "x": 15.5, + "y": 2 + }, + { + "label": "/", + "x": 16.5, + "y": 2 + }, + { + "x": 17.5, + "y": 2 + }, + { + "label": "Pause", + "x": 18.5, + "y": 2 + }, + { + "label": "Tab", + "x": 0, + "y": 3, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 3 + }, + { + "label": "W", + "x": 2.5, + "y": 3 + }, + { + "label": "E", + "x": 3.5, + "y": 3 + }, + { + "label": "R", + "x": 4.5, + "y": 3 + }, + { + "label": "T", + "x": 5.5, + "y": 3 + }, + { + "label": "Y", + "x": 6.5, + "y": 3 + }, + { + "label": "U", + "x": 7.5, + "y": 3 + }, + { + "label": "I", + "x": 8.5, + "y": 3 + }, + { + "label": "O", + "x": 9.5, + "y": 3 + }, + { + "label": "P", + "x": 10.5, + "y": 3 + }, + { + "label": "{", + "x": 11.5, + "y": 3 + }, + { + "label": "}", + "x": 12.5, + "y": 3 + }, + { + "label": "|", + "x": 13.5, + "y": 3, + "w": 1.5 + }, + { + "label": "7", + "x": 15.5, + "y": 3 + }, + { + "label": "8", + "x": 16.5, + "y": 3 + }, + { + "label": "9", + "x": 17.5, + "y": 3 + }, + { + "label": "-", + "x": 18.5, + "y": 3 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 4, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 4 + }, + { + "label": "S", + "x": 2.75, + "y": 4 + }, + { + "label": "D", + "x": 3.75, + "y": 4 + }, + { + "label": "F", + "x": 4.75, + "y": 4 + }, + { + "label": "G", + "x": 5.75, + "y": 4 + }, + { + "label": "H", + "x": 6.75, + "y": 4 + }, + { + "label": "J", + "x": 7.75, + "y": 4 + }, + { + "label": "K", + "x": 8.75, + "y": 4 + }, + { + "label": "L", + "x": 9.75, + "y": 4 + }, + { + "label": ":", + "x": 10.75, + "y": 4 + }, + { + "label": "\"", + "x": 11.75, + "y": 4 + }, + { + "label": "Enter", + "x": 12.75, + "y": 4, + "w": 2.25 + }, + { + "label": "4", + "x": 15.5, + "y": 4 + }, + { + "label": "5", + "x": 16.5, + "y": 4 + }, + { + "label": "6", + "x": 17.5, + "y": 4 + }, + { + "label": "+", + "x": 18.5, + "y": 4 + }, + { + "label": "Shift", + "x": 0, + "y": 5, + "w": 1.25 + }, + { + "label": "ISO1", + "x": 1.25, + "y": 5 + }, + { + "label": "Z", + "x": 2.25, + "y": 5 + }, + { + "label": "X", + "x": 3.25, + "y": 5 + }, + { + "label": "C", + "x": 4.25, + "y": 5 + }, + { + "label": "V", + "x": 5.25, + "y": 5 + }, + { + "label": "B", + "x": 6.25, + "y": 5 + }, + { + "label": "N", + "x": 7.25, + "y": 5 + }, + { + "label": "M", + "x": 8.25, + "y": 5 + }, + { + "label": "<", + "x": 9.25, + "y": 5 + }, + { + "label": ">", + "x": 10.25, + "y": 5 + }, + { + "label": "?", + "x": 11.25, + "y": 5 + }, + { + "label": "Shift", + "x": 12.25, + "y": 5, + "w": 1.75 + }, + { + "label": "up", + "x": 14.25, + "y": 5.25 + }, + { + "label": "1", + "x": 15.5, + "y": 5 + }, + { + "label": "2", + "x": 16.5, + "y": 5 + }, + { + "label": "3", + "x": 17.5, + "y": 5 + }, + { + "label": "Enter", + "x": 18.5, + "y": 5, + "h": 2 + }, + { + "label": "Ctrl", + "x": 0, + "y": 6, + "w": 1.25 + }, + { + "label": "OS", + "x": 1.25, + "y": 6, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 6, + "w": 1.25 + }, + { + "x": 3.75, + "y": 6, + "w": 6.25 + }, + { + "label": "Alt", + "x": 10, + "y": 6, + "w": 1.5 + }, + { + "label": "Ctrl", + "x": 11.5, + "y": 6, + "w": 1.5 + }, + { + "label": "left", + "x": 13.25, + "y": 6.25 + }, + { + "label": "down", + "x": 14.25, + "y": 6.25 + }, + { + "label": "right", + "x": 15.25, + "y": 6.25 + }, + { + "label": "0", + "x": 16.5, + "y": 6 + }, + { + "label": ".", + "x": 17.5, + "y": 6 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/ash1800/keymaps/default/keymap.c b/keyboards/ash1800/keymaps/default/keymap.c new file mode 100644 index 0000000000..f1b52b14d6 --- /dev/null +++ b/keyboards/ash1800/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 angelbirth + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_ESC, 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_INS, KC_HOME, KC_PGUP, KC_PSCR, + KC_DEL, KC_END, KC_PGDN, KC_SLCK, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, MO(1), + 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_P7, KC_P8, KC_P9, KC_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______ + ), +}; diff --git a/keyboards/ash1800/keymaps/default/readme.md b/keyboards/ash1800/keymaps/default/readme.md new file mode 100644 index 0000000000..de61a69713 --- /dev/null +++ b/keyboards/ash1800/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for ash1800 diff --git a/keyboards/ash1800/readme.md b/keyboards/ash1800/readme.md new file mode 100644 index 0000000000..93257e755e --- /dev/null +++ b/keyboards/ash1800/readme.md @@ -0,0 +1,15 @@ +# ash1800 + +![ash1800](https://i.imgur.com/YP173rP.jpg) + +ASH-1800 is an attempt to make a cheap g80/g81 clone. + +* Keyboard Maintainer: [angelbirth](https://github.com/angelbirth) +* Hardware Supported: ASH-1800, ATMega32u4 +* Hardware Availability: private GB + +Make example for this keyboard (after setting up your build environment): + + make ash1800: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). diff --git a/keyboards/ash1800/rules.mk b/keyboards/ash1800/rules.mk new file mode 100644 index 0000000000..b4f1dacac8 --- /dev/null +++ b/keyboards/ash1800/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ashpil/modelm_usbc/README.md b/keyboards/ashpil/modelm_usbc/README.md new file mode 100644 index 0000000000..261d97ab49 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/README.md @@ -0,0 +1,14 @@ +# USB C Model M + +![modelm_usbc](https://raw.githubusercontent.com/ashpil/Model-M-Type-C-Controller/master/images/render.png) + +This is a configuration of QMK intended to be used with the [USB C Model M alt controller](https://github.com/ashpil/Model-M-Type-C-Controller "USB C Model M alt controller"). Many thanks to iw0rm3r for working on a similar project and providing the foundation for this! + +* Keyboard Maintainer: [ashpil](https://github.com/ashpil) +* Hardware Supported: [USB C Model M alt controller](https://github.com/ashpil/Model-M-Type-C-Controller) + +Make example for this keyboard (after setting up your build environment): + + make ashpil/modelm_usbc: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). diff --git a/keyboards/ashpil/modelm_usbc/config.h b/keyboards/ashpil/modelm_usbc/config.h new file mode 100644 index 0000000000..df4ed32277 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/config.h @@ -0,0 +1,128 @@ +/* +Copyright 2019 ashpil + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ashpil +#define PRODUCT IBM Model M 101/102 +#define DESCRIPTION Controlled by AVR chip + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C7, C6, C5, C4, C3, C2, C1, C0 } +#define MATRIX_COL_PINS { E6, E7, F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ +#define DEBOUNCE 5 + + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 2 \ No newline at end of file diff --git a/keyboards/ashpil/modelm_usbc/info.json b/keyboards/ashpil/modelm_usbc/info.json new file mode 100644 index 0000000000..e24a27f200 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "IBM Model M 101 ANSI/102 ISO", + "url": "https://github.com/ashpil/qmk_firmware/tree/master/keyboards/ashpil/modelm_usbc", + "maintainer": "ashpil", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_fullsize_iso_wkl": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + }, + "LAYOUT_fullsize_ansi_wkl": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + } + } +} diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h new file mode 100644 index 0000000000..d5cef677e8 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h @@ -0,0 +1,24 @@ +/* Copyright 2019 ashpil + * + * 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 . + */ + +#pragma once + +// place overrides here + + +/* Add combos */ +#define COMBO_COUNT 1 +#define COMBO_TERM 200 diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c new file mode 100644 index 0000000000..35b45e9ccf --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 ashpil + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_fullsize_ansi_wkl( /* Base layer */ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MEDIA_PLAY_PAUSE, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_AUDIO_VOL_DOWN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), +}; + +enum combo_events { + CTRL_PAUS_RESET, +}; + +const uint16_t PROGMEM reset_combo[] = {KC_LCTL, KC_PAUS, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [CTRL_PAUS_RESET] = COMBO_ACTION(reset_combo), +}; + +void process_combo_event(uint8_t combo_index, bool pressed) { + switch(combo_index) { + case CTRL_PAUS_RESET: + if (pressed) { + reset_keyboard(); + } + break; + } +} \ No newline at end of file diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/rules.mk b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/rules.mk new file mode 100644 index 0000000000..23b7c173b8 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes # Reset combo \ No newline at end of file diff --git a/keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c b/keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c new file mode 100644 index 0000000000..5bf60cf558 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 ashpil + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_fullsize_ansi_wkl( /* Base layer */ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), +}; diff --git a/keyboards/ashpil/modelm_usbc/modelm_usbc.c b/keyboards/ashpil/modelm_usbc/modelm_usbc.c new file mode 100644 index 0000000000..e505c72233 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/modelm_usbc.c @@ -0,0 +1,35 @@ +/* Copyright 2019 ashpil + * + * 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 . + */ +#include "modelm_usbc.h" + +void keyboard_pre_init_kb(void) { + /* Setting status LEDs pins to output and +5V (off) */ + setPinOutput(D5); + setPinOutput(D6); + setPinOutput(D7); + writePinHigh(D5); + writePinHigh(D6); + writePinHigh(D7); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D5, !led_state.num_lock); + writePin(D6, !led_state.caps_lock); + writePin(D7, !led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/ashpil/modelm_usbc/modelm_usbc.h b/keyboards/ashpil/modelm_usbc/modelm_usbc.h new file mode 100644 index 0000000000..da50b865c7 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/modelm_usbc.h @@ -0,0 +1,64 @@ +/* Copyright 2019 ashpil + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * The first section contains "names" for physical keys of the keyboard + * and defines their position on the board. + * The second section defines position of the keys on the switch matrix + * (where COLUMNS and ROWS crosses). */ + +#define LAYOUT_fullsize_ansi_wkl( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, K2O, K2P, K2Q, \ + K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ +{ \ + { KC_NO, KC_NO, K5A, KC_NO, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \ + { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \ + { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \ + { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \ + { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \ + { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \ + { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, KC_NO, K4R, K4S, K4T, K5P, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D } \ +} + +#define LAYOUT_fullsize_iso_wkl( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ +{ \ + { KC_NO, KC_NO, K5A, K1B, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \ + { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \ + { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \ + { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \ + { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \ + { KC_NO, KC_NO, K2B, K2C, K2D, K2E, KC_NO, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \ + { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, K2M, K4R, K4S, K4T, K5P, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D } \ +} diff --git a/keyboards/ashpil/modelm_usbc/rules.mk b/keyboards/ashpil/modelm_usbc/rules.mk new file mode 100644 index 0000000000..2b2e83c65d --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file diff --git a/keyboards/at101_blackheart/rules.mk b/keyboards/at101_blackheart/rules.mk index fadff6f23b..d8cfbd289f 100644 --- a/keyboards/at101_blackheart/rules.mk +++ b/keyboards/at101_blackheart/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -56,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no diff --git a/keyboards/at_at/660m/660m.c b/keyboards/at_at/660m/660m.c new file mode 100644 index 0000000000..1a54df3be5 --- /dev/null +++ b/keyboards/at_at/660m/660m.c @@ -0,0 +1 @@ +#include "660m.h" diff --git a/keyboards/at_at/660m/660m.h b/keyboards/at_at/660m/660m.h new file mode 100644 index 0000000000..78b6ea4aee --- /dev/null +++ b/keyboards/at_at/660m/660m.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#define KNO KC_NO + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KNO, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KNO, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KNO, k2D, KNO, KNO }, \ + { k30, KNO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KNO, k3E, KNO }, \ + { k40, k41, k42, KNO, KNO, KNO, k46, KNO, KNO, KNO, k4A, k4B, k4C, k4D, k4E, k4F } \ +} diff --git a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 0000000000..9d10fbd754 --- /dev/null +++ b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 0000000000..de3a93d1ce --- /dev/null +++ b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.mk similarity index 100% rename from keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.mk rename to keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.mk diff --git a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 0000000000..9c7cf4fd76 --- /dev/null +++ b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/chibios_test/stm32_f072_onekey/bootloader_defs.h b/keyboards/at_at/660m/bootloader_defs.h similarity index 100% rename from keyboards/chibios_test/stm32_f072_onekey/bootloader_defs.h rename to keyboards/at_at/660m/bootloader_defs.h diff --git a/keyboards/chibios_test/stm32_f072_onekey/chconf.h b/keyboards/at_at/660m/chconf.h similarity index 100% rename from keyboards/chibios_test/stm32_f072_onekey/chconf.h rename to keyboards/at_at/660m/chconf.h diff --git a/keyboards/at_at/660m/config.h b/keyboards/at_at/660m/config.h new file mode 100644 index 0000000000..f9b19c0181 --- /dev/null +++ b/keyboards/at_at/660m/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA22A +#define PRODUCT_ID 0x6600 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER AT-AT +#define PRODUCT 660M +#define DESCRIPTION 660M Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { B15, B14, B13, B12, B11, B10, B2, B1, B9, B8, B7, B6, B5, B3, B4, B0 } +#define MATRIX_ROW_PINS { A3, A4, A5, A0, A1 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/at_at/660m/halconf.h b/keyboards/at_at/660m/halconf.h new file mode 100644 index 0000000000..38743e0904 --- /dev/null +++ b/keyboards/at_at/660m/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/at_at/660m/info.json b/keyboards/at_at/660m/info.json new file mode 100644 index 0000000000..935b96200b --- /dev/null +++ b/keyboards/at_at/660m/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "AT-AT 660M", + "url": "", + "maintainer": "adrientetar", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15.5, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15.5, "y":1}, + {"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":2.25}, {"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":2.25}, {"label":"↑", "x":14.5, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6.25}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"Fn", "x":11, "y":4, "w":1.25}, {"label":"Ctrl", "x":12.25, "y":4, "w":1.25}, {"label":"←", "x":13.5, "y":4}, {"label":"↓", "x":14.5, "y":4}, {"label":"→", "x":15.5, "y":4} + ] + } + } +} diff --git a/keyboards/at_at/660m/keymaps/default/keymap.c b/keyboards/at_at/660m/keymaps/default/keymap.c new file mode 100644 index 0000000000..2006f1818e --- /dev/null +++ b/keyboards/at_at/660m/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT( + 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_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_MPRV, KC_MNXT, KC_MPLY, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/at_at/660m/mcuconf.h b/keyboards/at_at/660m/mcuconf.h new file mode 100644 index 0000000000..048eb4df65 --- /dev/null +++ b/keyboards/at_at/660m/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/at_at/660m/readme.md b/keyboards/at_at/660m/readme.md new file mode 100644 index 0000000000..999beec5b0 --- /dev/null +++ b/keyboards/at_at/660m/readme.md @@ -0,0 +1,14 @@ +# AT-AT 660M + +660M keyboard + +Keyboard Maintainer: [Adrien Tétar](https://github.com/adrientetar) +Hardware Supported: AT-AT 660M +Hardware Availability: + + +Make example for this keyboard (after setting up your build environment): + + make at_at/660m: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). diff --git a/keyboards/at_at/660m/rules.mk b/keyboards/at_at/660m/rules.mk new file mode 100644 index 0000000000..245cf23d57 --- /dev/null +++ b/keyboards/at_at/660m/rules.mk @@ -0,0 +1,53 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p df11 -v 0483 + +# Build Options +# comment out to disable the options. +# + +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes +# RGBLIGHT_ENABLE = yes +NO_USB_STARTUP_CHECK = yes # Workaround for issue 6369 + diff --git a/keyboards/atom47/keymaps/LEdiodes/rules.mk b/keyboards/atom47/keymaps/LEdiodes/rules.mk deleted file mode 100644 index d446d3a699..0000000000 --- a/keyboards/atom47/keymaps/LEdiodes/rules.mk +++ /dev/null @@ -1,65 +0,0 @@ -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/atom47/rev2/rules.mk b/keyboards/atom47/rev2/rules.mk deleted file mode 100644 index a3a258ed82..0000000000 --- a/keyboards/atom47/rev2/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ - -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/atom47/rules.mk b/keyboards/atom47/rules.mk deleted file mode 100644 index 5f3dbb6686..0000000000 --- a/keyboards/atom47/rules.mk +++ /dev/null @@ -1,66 +0,0 @@ -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 -BOOTLOADER= qmk-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID - -DEFAULT_FOLDER = atom47/rev3 - diff --git a/keyboards/atomic/atomic.c b/keyboards/atomic/atomic.c index 6f393315ee..eba5ed61f6 100644 --- a/keyboards/atomic/atomic.c +++ b/keyboards/atomic/atomic.c @@ -4,12 +4,9 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - MCUCR |= (1<event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/atomic/keymaps/twolayer.c b/keyboards/atomic/keymaps/twolayer.c index f0ff56467d..9ecbbc6df3 100644 --- a/keyboards/atomic/keymaps/twolayer.c +++ b/keyboards/atomic/keymaps/twolayer.c @@ -45,11 +45,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), - [2] = ACTION_LAYER_MOMENTARY(1), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { diff --git a/keyboards/atomic/rules.mk b/keyboards/atomic/rules.mk index eee6c2530a..8ccbcb11b4 100644 --- a/keyboards/atomic/rules.mk +++ b/keyboards/atomic/rules.mk @@ -1,52 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in @@ -68,4 +31,4 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = ortho_5x15 \ No newline at end of file +LAYOUTS = ortho_5x15 diff --git a/keyboards/atreus/astar/astar.c b/keyboards/atreus/astar/astar.c new file mode 100644 index 0000000000..19490deb99 --- /dev/null +++ b/keyboards/atreus/astar/astar.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "atreus.h" diff --git a/keyboards/atreus/astar/astar.h b/keyboards/atreus/astar/astar.h new file mode 100644 index 0000000000..bf74ceb17f --- /dev/null +++ b/keyboards/atreus/astar/astar.h @@ -0,0 +1,17 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once diff --git a/keyboards/atreus/astar/config.h b/keyboards/atreus/astar/config.h new file mode 100644 index 0000000000..a925c6fb1c --- /dev/null +++ b/keyboards/atreus/astar/config.h @@ -0,0 +1,40 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#if defined(PCBDOWN) + #define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#else + #define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } +#endif +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/astar/rules.mk b/keyboards/atreus/astar/rules.mk new file mode 100644 index 0000000000..e6fef51727 --- /dev/null +++ b/keyboards/atreus/astar/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina diff --git a/keyboards/atreus/astar_mirrored/astar_mirrored.c b/keyboards/atreus/astar_mirrored/astar_mirrored.c new file mode 100644 index 0000000000..b8eacded63 --- /dev/null +++ b/keyboards/atreus/astar_mirrored/astar_mirrored.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "astar_mirrored.h" diff --git a/keyboards/atreus/astar_mirrored/astar_mirrored.h b/keyboards/atreus/astar_mirrored/astar_mirrored.h new file mode 100644 index 0000000000..bf74ceb17f --- /dev/null +++ b/keyboards/atreus/astar_mirrored/astar_mirrored.h @@ -0,0 +1,17 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once diff --git a/keyboards/atreus/astar_mirrored/config.h b/keyboards/atreus/astar_mirrored/config.h new file mode 100644 index 0000000000..273f23a847 --- /dev/null +++ b/keyboards/atreus/astar_mirrored/config.h @@ -0,0 +1,38 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define PDBDOWN 1 + +#define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/astar_mirrored/rules.mk b/keyboards/atreus/astar_mirrored/rules.mk new file mode 100644 index 0000000000..e6fef51727 --- /dev/null +++ b/keyboards/atreus/astar_mirrored/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina diff --git a/keyboards/atreus/atreus.c b/keyboards/atreus/atreus.c index 263ec87323..33bb5f35ad 100644 --- a/keyboards/atreus/atreus.c +++ b/keyboards/atreus/atreus.c @@ -1 +1,17 @@ -#include "atreus.h" \ No newline at end of file +/* Copyright 2019 + * + * 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 . + */ + +#include "atreus.h" diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h index 8e868ecc0e..88dd4d9dc8 100644 --- a/keyboards/atreus/atreus.h +++ b/keyboards/atreus/atreus.h @@ -1,14 +1,36 @@ -#ifndef ATREUS_H -#define ATREUS_H +/* Copyright 2019 + * + * 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 . + */ +#pragma once #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include +#define ___ KC_NO + +#ifdef KEYBOARD_atreus_astar + #include "astar.h" +#elif KEYBOARD_atreus_astar_mirrored + #include "astar_mirrored.h" +#elif KEYBOARD_atreus_teensy2 + #include "teensy2.h" +#endif // This a shortcut to help you visually see your layout. -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array +// The first section contains all of the arguments. +// The second converts the arguments into a two-dimensional array. +// In the PCBDOWN case we need to swap the middle two keys: k35 and k36. +#if defined(PCBDOWN) #define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ @@ -18,8 +40,20 @@ { \ { k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \ { k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \ - { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \ + { k20, k21, k22, k23, k24, k36, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b } \ +} +#else +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, ___, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, ___, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \ } - #endif diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index b1559a29d8..d182014433 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -1,22 +1,20 @@ -/* -Copyright 2012 Jun Wako +/* Copyright 2019 + * + * 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 . + */ -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -27,31 +25,12 @@ along with this program. If not, see . #define DEVICE_VER 0x0008 #define MANUFACTURER Technomancy #define PRODUCT Atreus -#define DESCRIPTION q.m.k. keyboard firmware for Atreus +#define DESCRIPTION QMK keyboard firmware for Atreus /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 11 -// Change this to how you wired your keyboard -// COLS: Left to right, ROWS: Top to bottom -#if defined(ATREUS_ASTAR) -# define MATRIX_ROW_PINS { D0, D1, D3, D2 } -#if defined(PCBDOWN) -# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } -#else -# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } -#endif -# define UNUSED_PINS -#elif defined(ATREUS_TEENSY2) -# define MATRIX_ROW_PINS { D0, D1, D2, D3 } -# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } -# define UNUSED_PINS -#endif - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -83,5 +62,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus/keymaps/alphadox/config.h b/keyboards/atreus/keymaps/alphadox/config.h index e998e5edc3..271f48d001 100644 --- a/keyboards/atreus/keymaps/alphadox/config.h +++ b/keyboards/atreus/keymaps/alphadox/config.h @@ -1,75 +1,3 @@ -/* -Copyright 2012 Jun Wako +#pragma once -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Arbitrary Definitions -#define PRODUCT Planckeus -#define DESCRIPTION q.m.k. keyboard firmware for Planckeus - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 11 - -#define MATRIX_ROW_PINS { D0, D1, D2, D3 } -#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -//#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif +// place overrides here diff --git a/keyboards/atreus/keymaps/classic/keymap.c b/keyboards/atreus/keymaps/classic/keymap.c index dce9dd96de..3feeb97cfb 100644 --- a/keyboards/atreus/keymaps/classic/keymap.c +++ b/keyboards/atreus/keymaps/classic/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12 , KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET ), diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index 631697384b..95207f5c46 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -38,21 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/atreus/keymaps/dvorak_42_key/config.h b/keyboards/atreus/keymaps/dvorak_42_key/config.h index 12a221d7f5..ac5db196d9 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/config.h +++ b/keyboards/atreus/keymaps/dvorak_42_key/config.h @@ -1,24 +1,6 @@ -/* -Copyright 2012 Jun Wako +#pragma once -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" +// place overrides here // mouse speed @@ -31,69 +13,3 @@ along with this program. If not, see . #define MOUSEKEY_WHEEL_DELTA 1 #define MOUSEKEY_WHEEL_MAX_SPEED 1 #define MOUSEKEY_WHEEL_TIME_TO_MAX 100 - -/* USB Device descriptor parameter */ - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Technomancy -#define PRODUCT Atreus -#define DESCRIPTION q.m.k. keyboard firmware for Atreus - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 11 - -// Change this to how you wired your keyboard -// COLS: Left to right, ROWS: Top to bottom -#if defined(ATREUS_ASTAR) -# define MATRIX_ROW_PINS { D0, D1, D3, D2 } -#if defined(PCBDOWN) -# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } -#else -# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } -#endif -# define UNUSED_PINS -#elif defined(ATREUS_TEENSY2) -# define MATRIX_ROW_PINS { D0, D1, D2, D3 } -# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } -# define UNUSED_PINS -#endif - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -//#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index 4a7ade96ad..aa1d8445c6 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -1,90 +1,6 @@ -/* -Copyright 2012 Jun Wako +#pragma once -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" +// place overrides here /* Make Overloaded Keys switch faster */ #define TAPPING_TERM 150 - -/* USB Device descriptor parameter */ - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Technomancy -#define PRODUCT Atreus -#define DESCRIPTION q.m.k. keyboard firmware for Atreus - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 11 - -// Change this to how you wired your keyboard -// COLS: Left to right, ROWS: Top to bottom -#if defined(ATREUS_ASTAR) -# define MATRIX_ROW_PINS { D0, D1, D3, D2 } -#if defined(PCBDOWN) -# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } -#else -# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } -#endif -# define UNUSED_PINS -#elif defined(ATREUS_TEENSY2) -# define MATRIX_ROW_PINS { D0, D1, D2, D3 } -# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } -# define UNUSED_PINS -#endif - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -//#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index e890e7f528..e25f4f089d 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), - KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, MO(NUMS),KC_RALT, KC_SLSH, KC_BSLS ), [NUMS] = LAYOUT( /* Numbers / Arrows / Symbols */ @@ -39,7 +39,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // so that I can get out of mouse mode just by tapping/holding my base layer FN key. const uint16_t PROGMEM fn_actions[] = { [BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0 - [NUMS] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay [MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2 }; diff --git a/keyboards/atreus/keymaps/jeremy/keymap.c b/keyboards/atreus/keymaps/jeremy/keymap.c index baf506b974..e875af3cca 100644 --- a/keyboards/atreus/keymaps/jeremy/keymap.c +++ b/keyboards/atreus/keymaps/jeremy/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS ), [CURS] = LAYOUT( - KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS, + KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_COPY, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS diff --git a/keyboards/atreus/keymaps/nojjan/keymap.c b/keyboards/atreus/keymaps/nojjan/keymap.c index d0aa3b279a..a6872f9952 100644 --- a/keyboards/atreus/keymaps/nojjan/keymap.c +++ b/keyboards/atreus/keymaps/nojjan/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; diff --git a/keyboards/atreus/keymaps/ptillemans/keymap.c b/keyboards/atreus/keymaps/ptillemans/keymap.c index 9019e9a8c0..ea4edeca7d 100644 --- a/keyboards/atreus/keymaps/ptillemans/keymap.c +++ b/keyboards/atreus/keymaps/ptillemans/keymap.c @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, _______, _______, KC_MNXT, _______, _______, _______, TO(_QW), KC_PSCR, KC_SLCK, KC_MPLY ) diff --git a/keyboards/atreus/keymaps/ridingqwerty/config.h b/keyboards/atreus/keymaps/ridingqwerty/config.h new file mode 100644 index 0000000000..349d7b1c49 --- /dev/null +++ b/keyboards/atreus/keymaps/ridingqwerty/config.h @@ -0,0 +1,13 @@ +#pragma once + +#undef MATRIX_ROWS +#define MATRIX_ROWS 8 + +#undef MATRIX_COLS +#define MATRIX_COLS 6 + +#undef MATRIX_ROW_PINS +#define MATRIX_ROW_PINS { A6, A7, A8, A15, B11, B12, A14, A13 } + +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 } diff --git a/keyboards/atreus/keymaps/ridingqwerty/keymap.c b/keyboards/atreus/keymaps/ridingqwerty/keymap.c new file mode 100644 index 0000000000..336df49730 --- /dev/null +++ b/keyboards/atreus/keymaps/ridingqwerty/keymap.c @@ -0,0 +1,116 @@ +/* Copyright 2019 George Koenig + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "ridingqwerty.h" + +/* Atreus + ┏━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┓ ┏━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┓ + ┃ Q │ W │ E │ R │ T ┃ ┃ Y │ U │ I │ O │ P ┃ + ┠────────┼────────┼────────┼────────┼────────┨ ┠────────┼────────┼────────┼────────┼────────┨ + /┃ ¶ A │ S │ D │ F │ G ┃ ┃ H │ J │ K │ L │ 🔢 ; ┃ + ┠────────┼────────┼────────┼────────┼────────┞━━━━━━━━┳━━━━━━━━┞────────┼────────┼────────┼────────┼────────┨ + /┃ ⇧ Z │ X │ C │ V │ B │ ┃ │ N │ M │ , │ 𝔽 . │ ⇧ / ┃ + ┠────────┼────────┼────────┼────────┼────────┤ ¶ ⎋ ┃ ❦ ⇥ ├────────┼────────┼────────┼────────┼────────┨ + ┃ ⎈ ⎋ │ ⌘ ⇥ │ ⎇ [ │ ⇧ ] │ 🔢 ⌫ │ ┃ │ ★ ␣ │ ⇧ - │ ⎇ = │ ⌘ ' │ ⎈ ↵ ┃ + ┗━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┻━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┛ + MODS // LAYERS // MODS // +*/ + +#ifdef LAYOUT +#undef LAYOUT +#define LAYOUT( \ + K00, K01, K02, K03, K04, K40, K41, K42, K43, K44, \ + K10, K11, K12, K13, K14, K50, K51, K52, K53, K54, \ + K20, K21, K22, K23, K24, K60, K61, K62, K63, K64, \ + K30, K31, K32, K33, K34, K35, K70, K71, K72, K73, K74, K75 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO }, \ + { K10, K11, K12, K13, K14, KC_NO }, \ + { K20, K21, K22, K23, K24, KC_NO }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K44, K43, K42, K41, K40, KC_NO }, \ + { K54, K53, K52, K51, K50, KC_NO }, \ + { K64, K63, K62, K61, K60, KC_NO }, \ + { K75, K74, K73, K72, K71, K70 } \ +} +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + ED_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NM_SCLN, + LS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, FK_DOT, RS_SLSH, + LC_ESC, LG_TAB, LA_LBRC, LS_RBRC, NM_BSPC, ED_ESC, SC_TAB, SM_SPC, RS_MINS, RA_EQL, RG_QUOT, RC_ENT + ), + [_EDITOR] = LAYOUT( /* ED_A, ED_ESC */ + KC_GRV, _______, KC_END, _______, KC_TAB, _______, _______, KC_INS, _______, KC_PGUP, + KC_HOME, _______, KC_DELT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, + _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, KC_BSLS, + _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______ + ), + [_NUMBER] = LAYOUT( /* NM_SCLN, NM_BSPC */ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_4, KC_5, KC_6, _______, + _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_BSLS, + _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_0, KC_0, KC_DOT, _______, _______ + ), + [_SYMBOL] = LAYOUT( /* SM_SPC */ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, KC_COLN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, + _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______ + ), + [_F_KEYS] = LAYOUT( /* FK_DOT */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_F11, + KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_SECRET] = LAYOUT( /* shhhh... */ + RESET, _______, _______, RUSTY, FUEL, KC_F13, _______, _______, _______, _______, + AR1ST, SYSNOC, _______, _______, _______, _______, _______, _______, OS_LAB, _______, + CDLOCAL, _______, C0RE, VAXIS, _______, _______, MUNKY, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FINAL] = LAYOUT( /* . */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +// custom tap/hold keys +uint16_t key_timer; +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case RG_QUOT: + if (record->event.pressed) { + key_timer = timer_read(); + layer_on(_NUMBER); + register_mods(MOD_BIT(KC_RGUI)); + } else { + unregister_mods(MOD_BIT(KC_RGUI)); + layer_off(_NUMBER); + if (timer_elapsed(key_timer) < TAPPING_TERM) { + tap_code(KC_QUOT); + } + } + return false; break; + } + return true; +}; diff --git a/keyboards/atreus/keymaps/ridingqwerty/readme.md b/keyboards/atreus/keymaps/ridingqwerty/readme.md new file mode 100644 index 0000000000..936df36099 --- /dev/null +++ b/keyboards/atreus/keymaps/ridingqwerty/readme.md @@ -0,0 +1 @@ +This is a handwired Atreus42 using a Proton C diff --git a/keyboards/atreus/keymaps/ridingqwerty/rules.mk b/keyboards/atreus/keymaps/ridingqwerty/rules.mk new file mode 100644 index 0000000000..95b257f758 --- /dev/null +++ b/keyboards/atreus/keymaps/ridingqwerty/rules.mk @@ -0,0 +1,17 @@ +MCU = STM32F303 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +#MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = no +# SERIAL_LINK_ENABLE = yes +#TAP_DANCE_ENABLE = yes diff --git a/keyboards/atreus/keymaps/workman/README.md b/keyboards/atreus/keymaps/workman/README.md new file mode 100644 index 0000000000..249833a995 --- /dev/null +++ b/keyboards/atreus/keymaps/workman/README.md @@ -0,0 +1,33 @@ +Workman for Atreus +================== + +This is the Workman layout for Atreus. You can get PDF and SVG files +for the keymap from the author's +[website](https://alexschroeder.ch/pdfs/workman/). + +``` + q d r w b || j f u p ; + a s h t g || y n e o i + z x m c v || k l , . / + esc tab super shift bksp ctrl || alt space RS LW ' ret + + +Raised layer (RS) + + ! @ { } | || - 7 8 9 * + # $ ( ) ` || . 4 5 6 + + % ^ [ ] ~ || & 1 2 3 \ + menu caps < > del || _ 0 = + + +Lower layer (LW) + + insert home up end pgup || vol+ F7 F8 F9 F10 + del left down right pgdn || vol- F4 F5 F6 F11 + || mute F1 F2 F3 F12 + || – ¨ reset +``` + +A note on the EN DASH and DIARESIS mappings on the lower layer: these +only work if you set up CAPS as your *Multi Key* because they +effectively send ` - - .` and ` "`, respectively. diff --git a/keyboards/atreus/keymaps/workman/config.h b/keyboards/atreus/keymaps/workman/config.h new file mode 100644 index 0000000000..cf0b5e2ac5 --- /dev/null +++ b/keyboards/atreus/keymaps/workman/config.h @@ -0,0 +1,3 @@ +#define TAPPING_TOGGLE 1 +#define ONESHOT_TAP_TOGGLE 1 +#define PCBDOWN 1 diff --git a/keyboards/atreus/keymaps/workman/keymap.c b/keyboards/atreus/keymaps/workman/keymap.c new file mode 100644 index 0000000000..aef2c59590 --- /dev/null +++ b/keyboards/atreus/keymaps/workman/keymap.c @@ -0,0 +1,76 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QW 0 +#define _RS 1 +#define _LW 2 + +#define OSM_SFT OSM(MOD_LSFT) + +/* In your system, make sure Caps Lock acts as the Compose Key, also known as the Multi Key. If so, then the quote on + * the lower layer acts as macro to enter ¨ */ +enum custom_keycodes { + DIAERESIS = SAFE_RANGE, + EN_DASH +}; + + /* Basic layer (L0) + * q d r w b || j f u p ; + * a s h t g || y n e o i + * z x m c v || k l , . / + * esc tab super shift bksp ctrl || alt space RS LW ' ret + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* Workman */ + KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, + KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, + KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, OSM_SFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), MO(_LW), KC_QUOT, KC_ENT + ), + + /* Raised layer (RS) + * ! @ { } | || - 7 8 9 * + * # $ ( ) ` || . 4 5 6 + + * % ^ [ ] ~ || & 1 2 3 \ + * menu caps < > del || _ 0 = + */ + + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_7, KC_8, KC_9, KC_ASTR, + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOT, KC_4, KC_5, KC_6, KC_PLUS, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, + KC_MENU, KC_CAPS, KC_LT, KC_GT, KC_DEL, KC_TRNS, KC_TRNS, KC_UNDS, KC_TRNS, KC_TRNS, KC_0, KC_EQL ), + + /* Lower layer (LW) + * insert home up end pgup || vol+ F7 F8 F9 F10 + * del left down right pgdn || vol- F4 F5 F6 F11 + * || mute F1 F2 F3 F12 + * || – ¨ reset + */ + + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_F10, + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_F11, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EN_DASH, KC_TRNS, KC_TRNS, DIAERESIS, RESET ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case DIAERESIS: + // assuming KC_CAPS is your Multi Key + SEND_STRING(SS_TAP(X_CAPSLOCK)"\""); + return false; + case EN_DASH: + // assuming KC_CAPS is your Multi Key + SEND_STRING(SS_TAP(X_CAPSLOCK)"--."); + return false; + } + } + return true; +}; diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index fe1ca295d8..7653206ae5 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -3,8 +3,6 @@ // Preonic keyboards by Jack Humbert. #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -12,13 +10,16 @@ extern keymap_config_t keymap_config; // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _DVORMAC 3 -#define _LOWER 4 -#define _RAISE 5 -#define _ADJUST 16 + +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _DVORMAC, + _LOWER, + _RAISE, + _ADJUST +}; enum planck_keycodes { DVORAK = SAFE_RANGE, @@ -27,7 +28,7 @@ enum planck_keycodes { DVORMAC, LOWER, RAISE, - BACKLIT + ADJUST }; // Adding macros to make the keymaps below much easier to read. @@ -37,6 +38,9 @@ enum planck_keycodes { #define ALTENT ALT_T(KC_ENT) #define ESCTRL CTL_T(KC_ESC) #define TABALT ALT_T(KC_TAB) +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak Layer @@ -159,57 +163,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; case DVORAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); } return false; - break; case DVORMAC: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORMAC); + set_single_persistent_default_layer(_DVORMAC); } return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; } return true; -}; +} \ No newline at end of file diff --git a/keyboards/atreus/keymaps/xyverz/readme.md b/keyboards/atreus/keymaps/xyverz/readme.md index ec7d836c17..aa44f01dae 100644 --- a/keyboards/atreus/keymaps/xyverz/readme.md +++ b/keyboards/atreus/keymaps/xyverz/readme.md @@ -9,7 +9,7 @@ to a final go with this. I'm using MOD_TAP quite a bit in this keymap. On all layers, R4 pinky keys use mod-tap and are SHIFT when held and their normal keys when tapped. In addition, ESC and TAB are also set as Ctrl and ALT respectively when held, -and Enter/ALT on the right thumb key for all layers. +and Enter/ALT on the right thumb key for all alpha layers. I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts. @@ -44,7 +44,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' -### Keymap 2: Colemak layer +### Layer 2: Colemak layer ,----------------------------------. ,----------------------------------. | Q | W | F | P | G | | J | L | U | Y | L | @@ -56,7 +56,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' -### Keymap 3: Dvorak for Mac layout +### Layer 3: Dvorak for Mac layer ,----------------------------------. ,----------------------------------. | ' | , | . | P | Y | | F | G | C | R | L | @@ -68,7 +68,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ | `----------------------------------' `----------------------------------' -### Keymap 4: LOWER layer +### Layer 4: LOWER layer ,----------------------------------. ,----------------------------------. | ! | @ | # | $ | % | | ^ | & | * | ( | ) | @@ -81,7 +81,7 @@ Control. `----------------------------------' `----------------------------------' -### Keymap 5: RAISE layer +### Layer 5: RAISE layer ,----------------------------------. ,----------------------------------. | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | @@ -93,7 +93,7 @@ Control. | ` | | | | Del |------'`------| Ins | | | | | `----------------------------------' `----------------------------------' -### Keymap 6: ADJUST layer +### Layer 6: ADJUST layer ,----------------------------------. ,----------------------------------. | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 5cd797da96..0dbd098ca7 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -1,5 +1,6 @@ -Atreus -====== +# Atreus + +![Atreus](https://atreus.technomancy.us/photos/1.jpg) A small mechanical keyboard that is based around the shape of the human hand. @@ -9,16 +10,19 @@ Hardware Availability: https://atreus.technomancy.us These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2 (usually hand-wired), one powered by an A-Star (usually using a PCB). You will need to use different `make` commands depending on the variant you have; see examples below. -A-Star:\ -`make atreus:default:avrdude` +Make example for this keyboard (after setting up your build environment): + + make atreus:default:avrdude + +If you would like to use one of the alternative controllers: + + make atreus/astar:default:avrdude + make atreus/teensy2:default:teensy -Teensy:\ -`make TEENSY2=yes atreus:default:teensy` - If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands, e.g. -`make PCBDOWN=yes atreus:default:avrdude` + make PCBDOWN=yes atreus:default:avrdude *Unlike the TMK firmware, these commands should be run from the root of the repository, not the directory containing this readme.* -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools), then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +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). diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk index eda77404a0..403b0b0ca2 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -1,75 +1,7 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -ifdef TEENSY2 - BOOTLOADER = halfkay - OPT_DEFS += -DATREUS_TEENSY2 -else - BOOTLOADER = caterina - OPT_DEFS += -DATREUS_ASTAR - ifdef PCBDOWN - OPT_DEFS += -DPCBDOWN - endif -endif - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -77,12 +9,14 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = yes # Unicode +UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +DEFAULT_FOLDER = atreus/astar diff --git a/keyboards/atreus/teensy2/config.h b/keyboards/atreus/teensy2/config.h new file mode 100644 index 0000000000..4130ef9bb7 --- /dev/null +++ b/keyboards/atreus/teensy2/config.h @@ -0,0 +1,36 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/teensy2/rules.mk b/keyboards/atreus/teensy2/rules.mk new file mode 100644 index 0000000000..ae398e2588 --- /dev/null +++ b/keyboards/atreus/teensy2/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay diff --git a/keyboards/atreus/teensy2/teensy2.c b/keyboards/atreus/teensy2/teensy2.c new file mode 100644 index 0000000000..19490deb99 --- /dev/null +++ b/keyboards/atreus/teensy2/teensy2.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "atreus.h" diff --git a/keyboards/atreus/teensy2/teensy2.h b/keyboards/atreus/teensy2/teensy2.h new file mode 100644 index 0000000000..bf74ceb17f --- /dev/null +++ b/keyboards/atreus/teensy2/teensy2.h @@ -0,0 +1,17 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once diff --git a/keyboards/atreus62/atreus62.h b/keyboards/atreus62/atreus62.h index 4bf7dabc7d..de6f64063b 100644 --- a/keyboards/atreus62/atreus62.h +++ b/keyboards/atreus62/atreus62.h @@ -3,8 +3,6 @@ #include "quantum.h" -void promicro_bootloader_jmp(bool program); - // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c index 72bb886534..c7dcb67653 100644 --- a/keyboards/atreus62/keymaps/atreus52/keymap.c +++ b/keyboards/atreus62/keymaps/atreus52/keymap.c @@ -8,13 +8,16 @@ #define BDO 4 #define RESETL 5 +#define KC_RAIS MO(RAISE) +#define KC_LOWR MO(LOWER) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DVORAK] = LAYOUT_kc( NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \ NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \ NO, A, O, E, U, I, D, H, T, N, S, NO, \ NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \ - NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO + NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO ), [QWERTY] = LAYOUT_kc( @@ -22,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, Q, W, E, R, T, Y, U, I, O, P, NO, \ NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \ NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \ - NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO + NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO ), [RAISE] = LAYOUT_kc( @@ -59,8 +62,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer - [1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer [2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer [3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer }; diff --git a/keyboards/atreus62/keymaps/default/keymap.c b/keyboards/atreus62/keymaps/default/keymap.c index e39f5ad125..95beab3767 100644 --- a/keyboards/atreus62/keymaps/default/keymap.c +++ b/keyboards/atreus62/keymaps/default/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC , KC_TAB, 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_LBRC , - KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_DELT, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI + KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI ), [_NAV] = LAYOUT( @@ -46,18 +46,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), */ }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch (id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } - else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index ba46d405ea..e76751c335 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KN_AO, OSM_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KN_OE, KN_AE, OSM_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KN_MINS, OSM_LSFT, - MO(NAV), OSM_LCTL, OSM_LALT, KC_LGUI, MO(SYM), KC_BSPC, KC_DELT, KC_ENT, KC_SPC, MO(SYM), KC_LEAD, KC_LALT, KC_LCTRL, KC_HYP + MO(NAV), OSM_LCTL, OSM_LALT, KC_LGUI, MO(SYM), KC_BSPC, KC_DEL, KC_ENT, KC_SPC, MO(SYM), KC_LEAD, KC_LALT, KC_LCTRL, KC_HYP ), [NAV] = LAYOUT( diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index a7c33ce9ea..4babed4c11 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -14,19 +14,22 @@ CHANGELOG: 0.1 - Initial commit. Based off of Profet's default keymap. - 0.2 - Converted to a more Planck/Preonic keymap style file with + 0.2 - Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. Added a TODO list. - 0.3 - Moved location of media & volume keys. Added Print Screen, + 0.3 - Moved location of media & volume keys. Added Print Screen, Scroll Lock and Pause keys. Added a WOW gaming layer that changes the location of Ctrl & Alt to the thumb keys. Added readme. - 0.4 - After more useage, I realized that the ESC key was in the way + 0.4 - After more useage, I realized that the ESC key was in the way of my muscle memory (gee, thanks, Planck!) so I moved it to the normal Caps Lock position, and moved Caps Lock to the same position on the RAISE and LOWER layers. Added code to turn off the Pro Micro LEDs after flashing. 0.5 - Converted keymap to LAYOUT standard. + 0.6 - Swapped ESC and GRV in all layers. + 0.7 - Brought code up to current standards. + 0.8 - Added MACLOCK macro. TODO: @@ -39,151 +42,117 @@ TODO: // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _WOW 3 -#define _LOWER 4 -#define _RAISE 5 -#define _ADJUST 16 +enum layer_names { _DVORAK, _QWERTY, _COLEMAK, _WOW, _DESTINY, _LOWER, _RAISE, _ADJUST }; -enum atreus52_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - WOW, - LOWER, - RAISE -}; +enum atreus52_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, WOW, DESTINY, LOWER, RAISE, ADJUST }; // Aliases to make the keymap clearer. #define CTL_ENT CTL_T(KC_ENT) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +#define MACLOCK LGUI(LCTL(KC_Q)) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT ( /* dvorak */ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_QWERTY] = LAYOUT ( /* qwerty */ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, 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_GRV, 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_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_COLEMAK] = LAYOUT ( /* colemak */ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_GRV, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_WOW] = LAYOUT ( /* Dvorak with minor modifications for playing World of Warcraft */ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT ), + [_DESTINY] = LAYOUT ( /* Dvorak with minor modifications for playing Destiny 2 and other FPS Looters */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + ), + [_LOWER] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + _______, _______, KC_HOME, KC_END, _______, KC_DEL, MACLOCK, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), [_RAISE] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + _______, _______, KC_HOME, KC_END, _______, KC_DEL, MACLOCK, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), [_ADJUST] = LAYOUT ( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_F13, KC_F14, KC_F15, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW, + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, DESTINY, WOW, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - }; +//clang-format on void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); #endif }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +}; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case WOW: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_WOW); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } - return true; + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case WOW: + set_single_persistent_default_layer(_WOW); + return false; + case DESTINY: + set_single_persistent_default_layer(_DESTINY); + return false; + } + } + return true; }; diff --git a/keyboards/atreus62/keymaps/xyverz/readme.md b/keyboards/atreus62/keymaps/xyverz/readme.md index cf00b65e3a..f91a87da4f 100644 --- a/keyboards/atreus62/keymaps/xyverz/readme.md +++ b/keyboards/atreus62/keymaps/xyverz/readme.md @@ -23,6 +23,13 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h * Moved location of Escape key to Caps Lock position. Moved Caps Lock to same position on Raise/Lower Layers. * Put Tilde/Grave in the upper-left corner * Added code to turn off the red LEDs on the Pro Micro after flashing. They were annoying me. +### 0.5 + * Converted keymap to LAYOUT standard. +### 0.6 + * Swapped ESC and GRV in all layers. +### 0.7 + * Brought code up to new standards (as of 27 June 2019). + * Updated this readme file. ### TODO: @@ -34,11 +41,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Layer 0: Dvorak layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | O | E | U | I | | D | H | T | N | S | - | + | Grv | A | O | E | U | I | | D | H | T | N | S | - | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | ; | Q | J | K | X | Gui ||Enter | B | M | W | V | Z | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -48,11 +55,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Layer 1: QWERTY layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | S | D | F | G | | D | H | T | N | S | ' | + | Grv | A | S | D | F | G | | D | H | T | N | S | ' | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | Z | X | C | V | B | Gui ||Enter | N | M | , | . | / | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -62,11 +69,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Keymap 2: Colemak layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | Q | W | F | P | G | | J | U | U | Y | ; | Del | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | R | S | T | D | | H | N | E | I | O | ' | + | Grv | A | R | S | T | D | | H | N | E | I | O | ' | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | Z | X | C | V | B | Gui ||Enter | K | M | , | . | / | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -80,14 +87,28 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Caps | A | O | E | U | I | | D | H | T | N | S | - | + | Grv | A | O | E | U | I | | D | H | T | N | S | - | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | ; | Q | J | K | X | Alt ||Ctrl/ | B | M | W | V | Z | Shft | |------+------+------+------+------+------| ||Enter |------+------+------+------+------+------| | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | `-----------------------------------------' `-----------------------------------------' -### Keymap 4: LOWER layer +### Layer 4: Destiny layer + + ,-----------------------------------------. ,-----------------------------------------. + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Grv | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Del ||Enter | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 5: LOWER layer ,-----------------------------------------. ,-----------------------------------------. | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -102,7 +123,7 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h `-----------------------------------------' `-----------------------------------------' -### Keymap 5: RAISE layer +### Keymap 6: RAISE layer ,-----------------------------------------. ,-----------------------------------------. | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -116,7 +137,7 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | `-----------------------------------------' `-----------------------------------------' -### Keymap 6: ADJUST layer +### Keymap 7: ADJUST layer ,-----------------------------------------. ,-----------------------------------------. | | | | | | | | | | | | | | diff --git a/keyboards/atreus62/rules.mk b/keyboards/atreus62/rules.mk index 66f6660c6e..323976c2c2 100644 --- a/keyboards/atreus62/rules.mk +++ b/keyboards/atreus62/rules.mk @@ -1,49 +1,16 @@ - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/baguette/rules.mk b/keyboards/baguette/rules.mk index 062ff1b22c..351322b859 100644 --- a/keyboards/baguette/rules.mk +++ b/keyboards/baguette/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/bantam44/keymaps/default/keymap.c b/keyboards/bantam44/keymaps/default/keymap.c index dff91d6c20..430bdb850b 100644 --- a/keyboards/bantam44/keymaps/default/keymap.c +++ b/keyboards/bantam44/keymaps/default/keymap.c @@ -10,21 +10,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* LOWER */ [1] = LAYOUT( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_ENT, \ KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_END, KC_PGDN, KC_EXLM \ ), /* RAISE */ [2] = LAYOUT( \ - KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT, \ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \ KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT \ ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function -{ - return MACRO_NONE; -}; diff --git a/keyboards/bantam44/rules.mk b/keyboards/bantam44/rules.mk index f245a3ba10..a15b451f31 100644 --- a/keyboards/bantam44/rules.mk +++ b/keyboards/bantam44/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index 2160706fea..f7d006576c 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c @@ -16,51 +16,34 @@ along with this program. If not, see . */ #include "bfake.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} -#endif __attribute__ ((weak)) -void matrix_scan_user(void) { -} +void matrix_scan_user(void) {} void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index 235181d095..0a8911b09a 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -22,6 +22,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 #define MANUFACTURER NotActuallyWinkeyless #define PRODUCT b.fake @@ -37,7 +38,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/bfake/i2c.c b/keyboards/bfake/i2c.c deleted file mode 100644 index a4f9521352..0000000000 --- a/keyboards/bfake/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk index 6577ea193f..5963c9810a 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,13 +19,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c diff --git a/keyboards/bfake/usbconfig.h b/keyboards/bfake/usbconfig.h index d2d848fcdc..85a915bb46 100644 --- a/keyboards/bfake/usbconfig.h +++ b/keyboards/bfake/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/bigseries/1key/keymaps/ctrl-alt-del/keymap.c b/keyboards/bigseries/1key/keymaps/ctrl-alt-del/keymap.c index eb2d236827..d87471b007 100755 --- a/keyboards/bigseries/1key/keymaps/ctrl-alt-del/keymap.c +++ b/keyboards/bigseries/1key/keymaps/ctrl-alt-del/keymap.c @@ -29,10 +29,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/1key/keymaps/default/keymap.c b/keyboards/bigseries/1key/keymaps/default/keymap.c index 7ce837357f..781205d42a 100755 --- a/keyboards/bigseries/1key/keymaps/default/keymap.c +++ b/keyboards/bigseries/1key/keymaps/default/keymap.c @@ -28,10 +28,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/1key/keymaps/lock/keymap.c b/keyboards/bigseries/1key/keymaps/lock/keymap.c index 3d3b002b02..650554e020 100755 --- a/keyboards/bigseries/1key/keymaps/lock/keymap.c +++ b/keyboards/bigseries/1key/keymaps/lock/keymap.c @@ -28,10 +28,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/1key/keymaps/tester/keymap.c b/keyboards/bigseries/1key/keymaps/tester/keymap.c index 31553cef79..bfecdb38b8 100755 --- a/keyboards/bigseries/1key/keymaps/tester/keymap.c +++ b/keyboards/bigseries/1key/keymaps/tester/keymap.c @@ -28,10 +28,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/2key/keymaps/default/keymap.c b/keyboards/bigseries/2key/keymaps/default/keymap.c index 704649632b..de430d24d3 100755 --- a/keyboards/bigseries/2key/keymaps/default/keymap.c +++ b/keyboards/bigseries/2key/keymaps/default/keymap.c @@ -28,10 +28,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ // Disable to set a known state diff --git a/keyboards/bigseries/2key/keymaps/lock/keymap.c b/keyboards/bigseries/2key/keymaps/lock/keymap.c index 55a9240f32..6acf62d482 100755 --- a/keyboards/bigseries/2key/keymaps/lock/keymap.c +++ b/keyboards/bigseries/2key/keymaps/lock/keymap.c @@ -29,10 +29,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/2key/keymaps/tester/keymap.c b/keyboards/bigseries/2key/keymaps/tester/keymap.c index 5b574824d3..025fd73492 100755 --- a/keyboards/bigseries/2key/keymaps/tester/keymap.c +++ b/keyboards/bigseries/2key/keymaps/tester/keymap.c @@ -28,10 +28,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/3key/keymaps/ctrl-alt-del/keymap.c b/keyboards/bigseries/3key/keymaps/ctrl-alt-del/keymap.c index 8e5b10db8b..d1410ecf1e 100755 --- a/keyboards/bigseries/3key/keymaps/ctrl-alt-del/keymap.c +++ b/keyboards/bigseries/3key/keymaps/ctrl-alt-del/keymap.c @@ -29,10 +29,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/3key/keymaps/default/keymap.c b/keyboards/bigseries/3key/keymaps/default/keymap.c index 6f0ffc9e11..3d3f4923dd 100755 --- a/keyboards/bigseries/3key/keymaps/default/keymap.c +++ b/keyboards/bigseries/3key/keymaps/default/keymap.c @@ -27,10 +27,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/3key/keymaps/tester/keymap.c b/keyboards/bigseries/3key/keymaps/tester/keymap.c index 896a781fc5..a201acd7e4 100755 --- a/keyboards/bigseries/3key/keymaps/tester/keymap.c +++ b/keyboards/bigseries/3key/keymaps/tester/keymap.c @@ -28,10 +28,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/4key/keymaps/default/keymap.c b/keyboards/bigseries/4key/keymaps/default/keymap.c index 1c65f44b08..4d662a27b9 100755 --- a/keyboards/bigseries/4key/keymaps/default/keymap.c +++ b/keyboards/bigseries/4key/keymaps/default/keymap.c @@ -29,10 +29,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/4key/keymaps/tester/keymap.c b/keyboards/bigseries/4key/keymaps/tester/keymap.c index 5d5fe0d386..021c7c4b69 100755 --- a/keyboards/bigseries/4key/keymaps/tester/keymap.c +++ b/keyboards/bigseries/4key/keymaps/tester/keymap.c @@ -28,10 +28,6 @@ LAYOUT( bool initialized = 0; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - void matrix_init_user(void) { if (!initialized){ dprintf("Initializing in matrix_scan_user"); diff --git a/keyboards/bigseries/rules.mk b/keyboards/bigseries/rules.mk index c862f0b256..a3dd1ad6c5 100755 --- a/keyboards/bigseries/rules.mk +++ b/keyboards/bigseries/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/bigswitch/rules.mk b/keyboards/bigswitch/rules.mk index e4e72f09a2..14cc0c85b3 100755 --- a/keyboards/bigswitch/rules.mk +++ b/keyboards/bigswitch/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/blackplum/blackplum.c b/keyboards/blackplum/blackplum.c new file mode 100644 index 0000000000..ea8d34e9d9 --- /dev/null +++ b/keyboards/blackplum/blackplum.c @@ -0,0 +1 @@ +#include "blackplum.h" diff --git a/keyboards/blackplum/blackplum.h b/keyboards/blackplum/blackplum.h new file mode 100644 index 0000000000..fbd7814735 --- /dev/null +++ b/keyboards/blackplum/blackplum.h @@ -0,0 +1,22 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_68_ansi( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, \ + K80, K81, K82, K83, K84, K85, K86, K76, K67, K77\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46 }, \ + { K50, K51, K52, K53, K54, K55 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86 } \ +} + diff --git a/keyboards/blackplum/config.h b/keyboards/blackplum/config.h new file mode 100644 index 0000000000..0fd7e21cb6 --- /dev/null +++ b/keyboards/blackplum/config.h @@ -0,0 +1,39 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xFADE +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pixlup +#define PRODUCT Blackplum Keeb +#define DESCRIPTION Blackplum 68 Percent Mechanical Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, B6, B4, B5, D6, D7, D5, D3, D4 } +#define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 } +#define UNUSED_PINS + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +/* ws2812 RGB LED */ +#define RGB_DI_PIN C7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 +#define RGBLIGHT_SLEEP diff --git a/keyboards/blackplum/info.json b/keyboards/blackplum/info.json new file mode 100644 index 0000000000..8e3efc8738 --- /dev/null +++ b/keyboards/blackplum/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "blackplum", + "url": "www.tokopedia.com/pixlup", + "maintainer": "eriqadams", + "width": 17.25, + "height": 5.25, + "layouts": { + "LAYOUT_68_ansi": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"PgUp", "x":16.25, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"PgDn", "x":16.25, "y":1}, {"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":2.25}, {"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":2.75}, {"label":"\u2191", "x":15.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"OS", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":12.5, "y":4, "w":1.25}, {"label":"\u2190", "x":14.25, "y":4.25}, {"label":"\u2193", "x":15.25, "y":4.25}, {"label":"\u2192", "x":16.25, "y":4.25}] + } + } +} diff --git a/keyboards/blackplum/keymaps/default/keymap.c b/keyboards/blackplum/keymaps/default/keymap.c new file mode 100644 index 0000000000..5eccfd66b5 --- /dev/null +++ b/keyboards/blackplum/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN 1 + + + +enum custom_keycodes { + TG_GUI = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_68_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_PGUP,\ + 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_DEL, KC_PGDOWN,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,\ + KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , MO(_FN) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = LAYOUT_68_ansi( + 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_MPLY, KC_HOME,\ + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, _______, KC_MUTE, KC_END,\ + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,\ + _______, TG_GUI,_______, RESET, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed) { + switch(keycode) { + case TG_GUI: + keymap_config.no_gui ^= 1; + return false; + } + } + return true; +} diff --git a/keyboards/blackplum/readme.md b/keyboards/blackplum/readme.md new file mode 100644 index 0000000000..cd506a3421 --- /dev/null +++ b/keyboards/blackplum/readme.md @@ -0,0 +1,14 @@ +# Blackplum +![Blackplum](https://i.imgur.com/EOUQk4J.png) + +Blackplum a.k.a IMKG68 (which IMKG stands for Indonesian Mechanical Keyboard Group) is an 68% mechanical keyboard with RGB Underglow come with new layout you have never seen before. Recently the pcb and kits only available for purchase in Indonesia. + +Keyboard Maintainer: [eriqadams](https://github.com/eriqadams) +Hardware Supported: Blackplum PCB, ATMEGA32u4-au MCU +Hardware Availability: [If you're in Indonesia you can purchase here](https://tokopedia.com/pixlup) + +Make example for this keyboard (after setting up your build environment): + + make blackplum: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). diff --git a/keyboards/blackplum/rules.mk b/keyboards/blackplum/rules.mk new file mode 100644 index 0000000000..6465dec7f8 --- /dev/null +++ b/keyboards/blackplum/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +BOOTLOADER = qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +LAYOUTS = 68_ansi diff --git a/keyboards/blockey/rules.mk b/keyboards/blockey/rules.mk index fb628cfaa3..83bc96c11f 100644 --- a/keyboards/blockey/rules.mk +++ b/keyboards/blockey/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/bm16a/rules.mk b/keyboards/bm16a/rules.mk index 013dac3c90..50f0ff1211 100644 --- a/keyboards/bm16a/rules.mk +++ b/keyboards/bm16a/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/bm16s/rules.mk b/keyboards/bm16s/rules.mk index f4f1dfd639..23573664db 100755 --- a/keyboards/bm16s/rules.mk +++ b/keyboards/bm16s/rules.mk @@ -1,60 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # comment out to disable the options. # @@ -69,4 +25,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes -LAYOUTS = ortho_4x4 \ No newline at end of file +LAYOUTS = ortho_4x4 diff --git a/keyboards/bm43a/bm43a.c b/keyboards/bm43a/bm43a.c new file mode 100644 index 0000000000..36543e3721 --- /dev/null +++ b/keyboards/bm43a/bm43a.c @@ -0,0 +1,51 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "bm43a.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/bm43a/bm43a.h b/keyboards/bm43a/bm43a.h new file mode 100644 index 0000000000..87ca05c4d1 --- /dev/null +++ b/keyboards/bm43a/bm43a.h @@ -0,0 +1,30 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2B, \ + K30, K31, K32, K33, K35, K37, K38, K39, K3B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, K2B }, \ + { K30, K31, K32, K33, KC_NO, K35, KC_NO, K37, K38, K39, KC_NO, K3B }, \ +} diff --git a/keyboards/bm43a/config.h b/keyboards/bm43a/config.h new file mode 100644 index 0000000000..538b2eadde --- /dev/null +++ b/keyboards/bm43a/config.h @@ -0,0 +1,73 @@ +/* +Copyright 2019 mechmerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM43A +#define DESCRIPTION A QMK-powered custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D1, F4, F1, F0 } +#define MATRIX_COL_PINS { B0, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/bm43a/info.json b/keyboards/bm43a/info.json new file mode 100644 index 0000000000..59dd63c72e --- /dev/null +++ b/keyboards/bm43a/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "BM43A", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 43, + "layout": [ + {"label":"K00 (D1,B0)", "x":0, "y":0}, + {"label":"K01 (D1,F5)", "x":1, "y":0}, + {"label":"K02 (D1,F6)", "x":2, "y":0}, + {"label":"K03 (D1,F7)", "x":3, "y":0}, + {"label":"K04 (D1,C7)", "x":4, "y":0}, + {"label":"K05 (D1,C6)", "x":5, "y":0}, + {"label":"K06 (D1,B6)", "x":6, "y":0}, + {"label":"K07 (D1,B5)", "x":7, "y":0}, + {"label":"K08 (D1,B4)", "x":8, "y":0}, + {"label":"K09 (D1,D7)", "x":9, "y":0}, + {"label":"K0A (D1,D6)", "x":10, "y":0}, + {"label":"K0B (D1,D4)", "x":11, "y":0}, + {"label":"K10 (F4,B0)", "x":0, "y":1, "w":1.25}, + {"label":"K11 (F4,F5)", "x":1.25, "y":1}, + {"label":"K12 (F4,F6)", "x":2.25, "y":1}, + {"label":"K13 (F4,F7)", "x":3.25, "y":1}, + {"label":"K14 (F4,C7)", "x":4.25, "y":1}, + {"label":"K15 (F4,C6)", "x":5.25, "y":1}, + {"label":"K16 (F4,B6)", "x":6.25, "y":1}, + {"label":"K17 (F4,B5)", "x":7.25, "y":1}, + {"label":"K18 (F4,B4)", "x":8.25, "y":1}, + {"label":"K19 (F4,D7)", "x":9.25, "y":1}, + {"label":"K1B (F4,D4)", "x":10.25, "y":1, "w":1.75}, + {"label":"K20 (F1,B0)", "x":0, "y":2, "w":2}, + {"label":"K21 (F1,F5)", "x":2, "y":2}, + {"label":"K22 (F1,F6)", "x":3, "y":2}, + {"label":"K23 (F1,F7)", "x":4, "y":2}, + {"label":"K24 (F1,C7)", "x":5, "y":2}, + {"label":"K25 (F1,C6)", "x":6, "y":2}, + {"label":"K26 (F1,B6)", "x":7, "y":2}, + {"label":"K27 (F1,B5)", "x":8, "y":2}, + {"label":"K28 (F1,B4)", "x":9, "y":2}, + {"label":"K29 (F1,D7)", "x":10, "y":2}, + {"label":"K2B (F1,D4)", "x":11, "y":2}, + {"label":"K30 (F0,B0)", "x":0, "y":3}, + {"label":"K31 (F0,F5)", "x":1, "y":3}, + {"label":"K32 (F0,F6)", "x":2, "y":3}, + {"label":"K33 (F0,F7)", "x":3, "y":3, "w":2.75}, + {"label":"K35 (F0,C6)", "x":5.75, "y":3, "w":2.25}, + {"label":"K37 (F0,B5)", "x":8, "y":3}, + {"label":"K38 (F0,B4)", "x":9, "y":3}, + {"label":"K39 (F0,D7)", "x":10, "y":3}, + {"label":"K3B (F0,D4)", "x":11, "y":3} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} \ No newline at end of file diff --git a/keyboards/bm43a/keymaps/default/config.h b/keyboards/bm43a/keymaps/default/config.h new file mode 100644 index 0000000000..60dd02a9d0 --- /dev/null +++ b/keyboards/bm43a/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/bm43a/keymaps/default/keymap.c b/keyboards/bm43a/keymaps/default/keymap.c new file mode 100644 index 0000000000..7cafeadb32 --- /dev/null +++ b/keyboards/bm43a/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + diff --git a/keyboards/bm43a/keymaps/default/readme.md b/keyboards/bm43a/keymaps/default/readme.md new file mode 100644 index 0000000000..cec19a1f9e --- /dev/null +++ b/keyboards/bm43a/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm43a diff --git a/keyboards/bm43a/readme.md b/keyboards/bm43a/readme.md new file mode 100644 index 0000000000..ee5c173338 --- /dev/null +++ b/keyboards/bm43a/readme.md @@ -0,0 +1,16 @@ +# bm43a + +A 40% mechanical keyboard. + +This firmware was originally taken from a kbfirmware.json and converted through [kbf_qmk_converter](https://noroadsleft.github.io/kbf_qmk_converter/). You may find the original `.json` files [here](https://drive.google.com/drive/folders/11DowBYrFN_uCNa9Q9bXwuMn91vmZYBcG). + + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: bm43a PCB +Hardware Availability: [KPRepublic](https://kprepublic.com/products/bm43a-bm43-43-keys-40-custom-mechanical-keyboard-pcb-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx) + +Make example for this keyboard (after setting up your build environment): + + make bm43a: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). diff --git a/keyboards/bm43a/rules.mk b/keyboards/bm43a/rules.mk new file mode 100644 index 0000000000..66a778b6c2 --- /dev/null +++ b/keyboards/bm43a/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/boardwalk/rules.mk b/keyboards/boardwalk/rules.mk index 0a02497bc3..215dfe34ee 100644 --- a/keyboards/boardwalk/rules.mk +++ b/keyboards/boardwalk/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # QMK Build Options diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h index 5652816446..fa3dda730e 100644 --- a/keyboards/boston_meetup/2019/config.h +++ b/keyboards/boston_meetup/2019/config.h @@ -26,7 +26,6 @@ #define MATRIX_ROW_PINS { A3, B8, B9, B1 } #define MATRIX_COL_PINS { A7, A8, B2, B10 } -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B13 } #define ENCODERS_PAD_B { B14 } @@ -142,7 +141,7 @@ #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ /* default 3V ERM vibration motor voltage and library*/ -#if FB_ERM_LRA == 0 +#if FB_ERM_LRA == 0 #define RATED_VOLTAGE 3 #define V_RMS 2.3 #define V_PEAK 3.30 @@ -193,4 +192,3 @@ #define RGB_MATRIX_KEYPRESSES #define SOLENOID_PIN A14 - diff --git a/keyboards/boston_meetup/2019/rules.mk b/keyboards/boston_meetup/2019/rules.mk index 7c03a025ee..73f9008f01 100644 --- a/keyboards/boston_meetup/2019/rules.mk +++ b/keyboards/boston_meetup/2019/rules.mk @@ -1,7 +1,5 @@ -# project specific files - -# Cortex version -MCU = STM32F303 +# MCU name +MCU = STM32F303 # Build Options # comment out to disable the options. diff --git a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c index f76b7e02c8..d9a81b195a 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c +++ b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c @@ -23,12 +23,10 @@ enum custom_macros { const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, - [1] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE - }; #define SPC_LW FUNC(0) -#define MSE FUNC(1) +#define MSE MO(_MOUSE) #define PIPE M(R_PIPE) #define POINT M(R_POINT) diff --git a/keyboards/bpiphany/frosty_flake/rules.mk b/keyboards/bpiphany/frosty_flake/rules.mk index 94619e03d1..a890c4a594 100644 --- a/keyboards/bpiphany/frosty_flake/rules.mk +++ b/keyboards/bpiphany/frosty_flake/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/bpiphany/kitten_paw/keymaps/default/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/default/keymap.c index 3ad3247d49..bd909c288c 100644 --- a/keyboards/bpiphany/kitten_paw/keymaps/default/keymap.c +++ b/keyboards/bpiphany/kitten_paw/keymaps/default/keymap.c @@ -14,22 +14,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/bpiphany/kitten_paw/rules.mk b/keyboards/bpiphany/kitten_paw/rules.mk index fab9c422fe..72a7f14b3f 100644 --- a/keyboards/bpiphany/kitten_paw/rules.mk +++ b/keyboards/bpiphany/kitten_paw/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 - OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/bpiphany/pegasushoof/2013/2013.c b/keyboards/bpiphany/pegasushoof/2013/2013.c new file mode 100644 index 0000000000..7a489b22a7 --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/2013/2013.c @@ -0,0 +1,59 @@ +/* +Copyright 2016 Daniel Svensson + +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 . +*/ + +#include "2013.h" + + +extern inline void ph_caps_led_on(void); +extern inline void ph_caps_led_off(void); + +extern inline void ph_sclk_led_on(void); +extern inline void ph_sclk_led_off(void); + + +__attribute__ ((weak)) +void matrix_init_user(void) { +}; + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +__attribute__ ((weak)) +bool process_action_user(keyrecord_t *record) { + return true; +} + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { +} + +void matrix_init_kb(void) { + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +bool process_action_kb(keyrecord_t *record) { + return process_action_user(record); +} + +void led_set_kb(uint8_t usb_led) { + led_set_user(usb_led); +} diff --git a/keyboards/bpiphany/pegasushoof/2013/2013.h b/keyboards/bpiphany/pegasushoof/2013/2013.h new file mode 100644 index 0000000000..b3e911ab41 --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/2013/2013.h @@ -0,0 +1,80 @@ +/* +Copyright 2016 Daniel Svensson + +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 . +*/ + +#pragma once + +#include "matrix.h" +#include "quantum.h" + +#define LAYOUT( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { KC_NO , KC_NO , KC0 , KC_NO , KC_NO , KF0 , KC_NO , KC_NO , KC_NO , KJ0 , KK0 , KC_NO , KM0 , KN0 , KO0 , KC_NO , KQ0 , KR0 }, \ + /* 1 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , KC_NO , KO1 , KP1 , KC_NO , KC_NO }, \ + /* 2 */ { KC_NO , KB2 , KC_NO , KD2 , KC_NO , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , KC_NO , KO2 , KC_NO , KC_NO , KC_NO }, \ + /* 3 */ { KA3 , KB3 , KC_NO , KC_NO , KC_NO , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , KC_NO , KO3 , KC_NO , KC_NO , KC_NO }, \ + /* 4 */ { KC_NO , KC_NO , KC4 , KC_NO , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , KC_NO , KO4 , KP4 , KQ4 , KR4 }, \ + /* 5 */ { KC_NO , KC_NO , KC5 , KC_NO , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , KC_NO , KC_NO }, \ + /* 6 */ { KC_NO , KC_NO , KC6 , KC_NO , KC_NO , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , KL6 , KC_NO , KN6 , KO6 , KC_NO , KQ6 , KC_NO }, \ + /* 7 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , KC_NO , KP7 , KC_NO , KC_NO } \ + } + +#define LAYOUT_tkl_ansi( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ + ) LAYOUT( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2,KC_NO,KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ + ) + +#define LAYOUT_tkl_jis( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO7, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \ + KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KL0, KB3, KC6, \ + KP4, KD2, KN6, KG0, KQ6, KH0, KI0, KN0, KM0, KP1, KC0, KQ0, KR0 \ + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KG0, KH0, KI0, KJ0, KK0, KL0, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ + /* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ + /* 2 */ { KC_NO, KB2, KC_NO, KD2, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KC_NO, KO2, KC_NO, KC_NO, KC_NO }, \ + /* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KC_NO, KO3, KC_NO, KC_NO, KC_NO }, \ + /* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ + /* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ + /* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KC_NO, KI6, KJ6, KK6, KL6, KC_NO, KN6, KO6, KC_NO, KQ6, KC_NO }, \ + /* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KK7, KL7, KO7, KP7, KC_NO, KC_NO } \ +} + +inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); } +inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); } + +inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); } +inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } + diff --git a/keyboards/bpiphany/pegasushoof/2013/config.h b/keyboards/bpiphany/pegasushoof/2013/config.h new file mode 100644 index 0000000000..d2f81fedc3 --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/2013/config.h @@ -0,0 +1,37 @@ +/* +Copyright 2016 Daniel Svensson + +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 . +*/ + +#pragma once + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6050 +#define DEVICE_VER 0x0104 +#define MANUFACTURER Filco +#define PRODUCT Majestouch TKL \\w The Pegasus Hoof 2013 +#define DESCRIPTION QMK firmware for Majestouch TKL + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 18 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/bpiphany/pegasushoof/matrix.c b/keyboards/bpiphany/pegasushoof/2013/matrix.c similarity index 100% rename from keyboards/bpiphany/pegasushoof/matrix.c rename to keyboards/bpiphany/pegasushoof/2013/matrix.c diff --git a/keyboards/bpiphany/pegasushoof/2013/rules.mk b/keyboards/bpiphany/pegasushoof/2013/rules.mk new file mode 100644 index 0000000000..3215e3588a --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/2013/rules.mk @@ -0,0 +1,2 @@ +CUSTOM_MATRIX = yes +SRC = matrix.c diff --git a/keyboards/bpiphany/pegasushoof/2015/2015.c b/keyboards/bpiphany/pegasushoof/2015/2015.c new file mode 100644 index 0000000000..62841e7af1 --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/2015/2015.c @@ -0,0 +1,58 @@ +/* +Copyright 2016 Daniel Svensson + +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 . +*/ + +#include "2015.h" + + +extern inline void ph_caps_led_on(void); +extern inline void ph_caps_led_off(void); + +extern inline void ph_sclk_led_on(void); +extern inline void ph_sclk_led_off(void); + +__attribute__ ((weak)) +void matrix_init_user(void) { +}; + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +__attribute__ ((weak)) +bool process_action_user(keyrecord_t *record) { + return true; +} + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { +} + +void matrix_init_kb(void) { + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +bool process_action_kb(keyrecord_t *record) { + return process_action_user(record); +} + +void led_set_kb(uint8_t usb_led) { + led_set_user(usb_led); +} diff --git a/keyboards/bpiphany/pegasushoof/2015/2015.h b/keyboards/bpiphany/pegasushoof/2015/2015.h new file mode 100644 index 0000000000..18bfc46b81 --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/2015/2015.h @@ -0,0 +1,82 @@ +/* +Copyright 2016 Daniel Svensson + +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 . +*/ + +#pragma once + +#include "matrix.h" +#include "quantum.h" + +#define ___ XXXXXXX + +#define LAYOUT( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { ___ , KB0 , KC0 , KD0 , ___ , KF0 , KG0 , ___ , ___ , ___ , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \ + /* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ }, \ + /* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \ + /* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , KM3 , KN3 , ___ , ___ , ___ , KR3 }, \ + /* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \ + /* 5 */ { KA5 , ___ , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \ + /* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \ + /* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \ + } + +#define LAYOUT_tkl_ansi( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ + ) LAYOUT( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2,KC_NO,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ + ) + +#define LAYOUT_tkl_jis( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB5, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB3, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KE0, KN3, KO6, \ + KA4, KP2, KC6, KJ0, KK6, KI0, KH0, KC0, KD0, KA1, KO0, KK0, KL0 \ + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { ___ , KB0 , KC0 , KD0 , KE0 , KF0 , KG0 , KH0 , KI0 , KJ0 , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \ + /* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , }, \ + /* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \ + /* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , ___ , KN3 , ___ , ___ , ___ , KR3 }, \ + /* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \ + /* 5 */ { KA5 , KB5 , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \ + /* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , ___ , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \ + /* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \ +} + +inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); } +inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); } + +inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); } +inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } + diff --git a/keyboards/bpiphany/pegasushoof/2015/config.h b/keyboards/bpiphany/pegasushoof/2015/config.h new file mode 100644 index 0000000000..6edfa59930 --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/2015/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2016 Daniel Svensson + +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 . +*/ + +#pragma once + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6050 +#define DEVICE_VER 0x0104 +#define MANUFACTURER Filco +#define PRODUCT Majestouch TKL \\w The Pegasus Hoof 2015 +#define DESCRIPTION QMK firmware for Majestouch TKL + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 18 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + diff --git a/keyboards/bpiphany/pegasushoof/2015/matrix.c b/keyboards/bpiphany/pegasushoof/2015/matrix.c new file mode 100644 index 0000000000..db03993544 --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/2015/matrix.c @@ -0,0 +1,146 @@ +/* + Copyright 2014 Ralf Schmitt + Copyright 2016 Daniel Svensson + + 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 . +*/ + +#include +#include +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void select_row(uint8_t col); + +inline uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + /* Column output pins */ + DDRD |= 0b01111011; + /* Row input pins */ + DDRC &= ~0b10000000; + DDRB &= ~0b01111111; + PORTC |= 0b10000000; + PORTB |= 0b01111111; + + for (uint8_t i=0; i < matrix_rows(); i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + bool changed = false; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_row(col); + wait_us(30); + matrix_row_t rows = read_cols(); + for (uint8_t row = 0; row < matrix_rows(); row++) { + bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< +Copyright 2017 Danny Nguyen 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 @@ -15,27 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 -#define MANUFACTURER Filco -#define PRODUCT Majestouch TKL \\w The Pegasus Hoof -#define DESCRIPTION QMK firmware for Majestouch TKL - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 18 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -#endif diff --git a/keyboards/bpiphany/pegasushoof/info.json b/keyboards/bpiphany/pegasushoof/info.json index c4fa28ac46..0fb9f4a746 100644 --- a/keyboards/bpiphany/pegasushoof/info.json +++ b/keyboards/bpiphany/pegasushoof/info.json @@ -187,6 +187,101 @@ {"label":"Down", "x":16.25, "y":5.5}, {"label":"Right", "x":17.25, "y":5.5} ] + }, + "LAYOUT_tkl_jis": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"Print Screen", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"Half-width/Full-width", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"-", "x":11, "y":1.5}, + {"label":"^", "x":12, "y":1.5}, + {"label":"Yen", "x":13, "y":1.5}, + {"label":"Backspace", "x":14, "y":1.5}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"@", "x":11.5, "y":2.5}, + {"label":"[", "x":12.5, "y":2.5}, + {"label":"Del", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"Page Down", "x":17.25, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":";", "x":10.75, "y":3.5}, + {"label":":", "x":11.75, "y":3.5}, + {"label":"]", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",", "x":9.25, "y":4.5}, + {"label":".", "x":10.25, "y":4.5}, + {"label":"/", "x":11.25, "y":4.5}, + {"label":"\\", "x":12.25, "y":4.5}, + {"label":"Shift", "x":13.25, "y":4.5, "w":1.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5}, + {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, + {"label":"Muhenkan", "x":3.5, "y":5.5}, + {"label":"Space", "x":4.5, "y":5.5, "w":4.5}, + {"label":"Henkan", "x":9, "y":5.5, "w":1.25}, + {"label":"Kana", "x":10.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":11.5, "y":5.5, "w":1.25}, + {"label":"Fn", "x":12.75, "y":5.5}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] } } } diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c index 7db7e5d39e..aad2d643cd 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \ KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ - KC_FN0, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), + MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), /* Layer 1: Standard ISO layer */ [KM_QWERTY] = LAYOUT( \ KC_ESC, 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_PSCR,KC_SLCK,KC_PAUS, \ @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \ KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \ - KC_FN0, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), + MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), /* Layer 2: Media layer */ [KM_MEDIA] = LAYOUT( \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \ @@ -76,7 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(KM_MEDIA), [1] = ACTION_LAYER_TOGGLE(KM_QWERTY) }; diff --git a/keyboards/bpiphany/pegasushoof/pegasushoof.c b/keyboards/bpiphany/pegasushoof/pegasushoof.c deleted file mode 100644 index cde814812e..0000000000 --- a/keyboards/bpiphany/pegasushoof/pegasushoof.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2016 Daniel Svensson - -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 . -*/ - -#include "pegasushoof.h" - - -extern inline void ph_caps_led_on(void); -extern inline void ph_caps_led_off(void); - -extern inline void ph_sclk_led_on(void); -extern inline void ph_sclk_led_off(void); - - -__attribute__ ((weak)) -void matrix_init_user(void) { -}; - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -__attribute__ ((weak)) -bool process_action_user(keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { -} - -void matrix_init_kb(void) { - matrix_init_user(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -bool process_action_kb(keyrecord_t *record) { - return process_action_user(record); -} - -void led_set_kb(uint8_t usb_led) { - led_set_user(usb_led); -} diff --git a/keyboards/bpiphany/pegasushoof/pegasushoof.h b/keyboards/bpiphany/pegasushoof/pegasushoof.h deleted file mode 100644 index b91235aadd..0000000000 --- a/keyboards/bpiphany/pegasushoof/pegasushoof.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -Copyright 2016 Daniel Svensson - -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 . -*/ - -#ifndef PEGASUSHOOF_H -#define PEGASUSHOOF_H - -#include "matrix.h" -#include "quantum.h" - -#define LAYOUT( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ - ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ - /* 0 */ { KC_NO , KC_NO , KC0 , KC_NO , KC_NO , KF0 , KC_NO , KC_NO , KC_NO , KJ0 , KK0 , KC_NO , KM0 , KN0 , KO0 , KC_NO , KQ0 , KR0 }, \ - /* 1 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , KC_NO , KO1 , KP1 , KC_NO , KC_NO }, \ - /* 2 */ { KC_NO , KB2 , KC_NO , KD2 , KC_NO , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , KC_NO , KO2 , KC_NO , KC_NO , KC_NO }, \ - /* 3 */ { KA3 , KB3 , KC_NO , KC_NO , KC_NO , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , KC_NO , KO3 , KC_NO , KC_NO , KC_NO }, \ - /* 4 */ { KC_NO , KC_NO , KC4 , KC_NO , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , KC_NO , KO4 , KP4 , KQ4 , KR4 }, \ - /* 5 */ { KC_NO , KC_NO , KC5 , KC_NO , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , KC_NO , KC_NO }, \ - /* 6 */ { KC_NO , KC_NO , KC6 , KC_NO , KC_NO , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , KL6 , KC_NO , KN6 , KO6 , KC_NO , KQ6 , KC_NO }, \ - /* 7 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , KC_NO , KP7 , KC_NO , KC_NO } \ - } - -#define LAYOUT_tkl_ansi( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ - ) LAYOUT( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2,KC_NO,KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ - ) - -#define LAYOUT_tkl_jis( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO7, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \ - KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KL0, KB3, KC6, \ - KP4, KD2, KN6, KG0, KQ6, KH0, KI0, KN0, KM0, KP1, KC0, KQ0, KR0 \ - ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ - /* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KG0, KH0, KI0, KJ0, KK0, KL0, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ - /* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ - /* 2 */ { KC_NO, KB2, KC_NO, KD2, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KC_NO, KO2, KC_NO, KC_NO, KC_NO }, \ - /* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KC_NO, KO3, KC_NO, KC_NO, KC_NO }, \ - /* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ - /* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ - /* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KC_NO, KI6, KJ6, KK6, KL6, KC_NO, KN6, KO6, KC_NO, KQ6, KC_NO }, \ - /* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KK7, KL7, KO7, KP7, KC_NO, KC_NO } \ -} - -inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); } -inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); } - -inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); } -inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } - - -#endif diff --git a/keyboards/bpiphany/pegasushoof/readme.md b/keyboards/bpiphany/pegasushoof/readme.md index 10ec79300a..ab49db03c4 100644 --- a/keyboards/bpiphany/pegasushoof/readme.md +++ b/keyboards/bpiphany/pegasushoof/readme.md @@ -3,7 +3,7 @@ A replacement controller that turns your Filco Majestouch 87/88 mechanical keyboard into a fully programmable keyboard. Keyboard Maintainer: QMK Community -Hardware Supported: Pegasus Hoof +Hardware Supported: Pegasus Hoof, revisions [20131001](2013/) and [20150108](2015/) Hardware Availability: [1upkeyboards](https://www.1upkeyboards.com/shop/controllers/filco-pegasus-hoof-controller/) Make example for this keyboard (after setting up your build environment): @@ -11,3 +11,11 @@ Make example for this keyboard (after setting up your build environment): make bpiphany/pegasus_hoof: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). + +### Additional Resources + +With many thanks to Bathroom Epiphanies for all the kind advice and help. + + * [Schematic](https://deskthority.net/wiki/Costar_replacement_controllers#Schematic) + * [bpiphany TMK source](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard) + * [bpiphany QMK source](https://github.com/BathroomEpiphanies/epiphanies_qmk_keyboard) diff --git a/keyboards/bpiphany/pegasushoof/rules.mk b/keyboards/bpiphany/pegasushoof/rules.mk index 00e4bb0ea1..0910feb61b 100644 --- a/keyboards/bpiphany/pegasushoof/rules.mk +++ b/keyboards/bpiphany/pegasushoof/rules.mk @@ -1,50 +1,15 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -64,5 +29,4 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. LAYOUTS = tkl_ansi -CUSTOM_MATRIX = yes -SRC = matrix.c +DEFAULT_FOLDER=bpiphany/pegasushoof/2013 diff --git a/keyboards/bpiphany/sixshooter/rules.mk b/keyboards/bpiphany/sixshooter/rules.mk index 5bf8d21650..ad76051eb2 100644 --- a/keyboards/bpiphany/sixshooter/rules.mk +++ b/keyboards/bpiphany/sixshooter/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - # Build Options # change yes to no to disable # diff --git a/keyboards/bpiphany/tiger_lily/rules.mk b/keyboards/bpiphany/tiger_lily/rules.mk index 8f07bb006e..edd3ab6a4a 100644 --- a/keyboards/bpiphany/tiger_lily/rules.mk +++ b/keyboards/bpiphany/tiger_lily/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/bpiphany/unloved_bastard/info.json b/keyboards/bpiphany/unloved_bastard/info.json index efa995088b..b0e3346e07 100644 --- a/keyboards/bpiphany/unloved_bastard/info.json +++ b/keyboards/bpiphany/unloved_bastard/info.json @@ -9,6 +9,9 @@ "LAYOUT": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] }, + "LAYOUT_tkl_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, "LAYOUT_tkl_ansi": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] } diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c b/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c index 0576cb2422..3c23088357 100644 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c @@ -25,22 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default_ansi/keymap.c b/keyboards/bpiphany/unloved_bastard/keymaps/default_ansi/keymap.c index afae406b1e..783e37196e 100644 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default_ansi/keymap.c +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default_ansi/keymap.c @@ -25,22 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/config.h b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/config.h new file mode 100644 index 0000000000..c55f7f9f7d --- /dev/null +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Alexander Fougner + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/keymap.c b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/keymap.c new file mode 100644 index 0000000000..b6b78c2c5a --- /dev/null +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2018 Alexander Fougner + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_iso(\ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + 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_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, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/readme.md b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/readme.md new file mode 100644 index 0000000000..40fae94480 --- /dev/null +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/readme.md @@ -0,0 +1,3 @@ +# default_iso + +A standard tenkeyless ISO-layout keymap for Unloved Bastard-powered keyboards. diff --git a/keyboards/bpiphany/unloved_bastard/rules.mk b/keyboards/bpiphany/unloved_bastard/rules.mk index 2db321c573..65123020f3 100644 --- a/keyboards/bpiphany/unloved_bastard/rules.mk +++ b/keyboards/bpiphany/unloved_bastard/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -70,4 +33,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches CUSTOM_MATRIX = yes SRC += matrix.c -LAYOUTS = tkl_ansi +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h index 9eaf587d7a..0223e7233d 100644 --- a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h +++ b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 Alexander Fougner * * 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 @@ -18,7 +18,7 @@ #include "quantum.h" -#define LAYOUT( \ +#define LAYOUT_all( \ KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ @@ -47,17 +47,32 @@ KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ ) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KC_NO, KC_NO, KC_NO, KJ0, KK0, KC_NO, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KC_NO, KC_NO }, \ -/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ -/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ -/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KC_NO, KI6, KJ6, KK6, KL6, KC_NO,KN6, KO6, KC_NO, KQ6, KC_NO }, \ -/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, KC_NO, KP7, KC_NO, KC_NO } \ -} +LAYOUT_all( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2,KC_NO,KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) + +#define LAYOUT_tkl_iso( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) \ +LAYOUT_all( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) + +#define LAYOUT LAYOUT_all #endif diff --git a/keyboards/bthlabs/geekpad/rules.mk b/keyboards/bthlabs/geekpad/rules.mk index d4785aabbe..e05730c69e 100644 --- a/keyboards/bthlabs/geekpad/rules.mk +++ b/keyboards/bthlabs/geekpad/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/business_card/alpha/info.json b/keyboards/business_card/alpha/info.json new file mode 100644 index 0000000000..f0cd04efa2 --- /dev/null +++ b/keyboards/business_card/alpha/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "business_card alpha", + "url": "", + "maintainer": "kakunpc", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"1", "x":0, "y":0}, + {"label":"2", "x":1, "y":0}, + {"label":"3", "x":2, "y":0}, + {"label":"4", "x":0, "y":1}, + {"label":"5", "x":1, "y":1}, + {"label":"6", "x":2, "y":1} + ] + } + } +} diff --git a/keyboards/business_card/alpha/rules.mk b/keyboards/business_card/alpha/rules.mk index 8bb38a5142..e03f942e9d 100644 --- a/keyboards/business_card/alpha/rules.mk +++ b/keyboards/business_card/alpha/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/business_card/beta/info.json b/keyboards/business_card/beta/info.json new file mode 100644 index 0000000000..62f2797a75 --- /dev/null +++ b/keyboards/business_card/beta/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "business_card beta", + "url": "", + "maintainer": "kakunpc", + "width": 2, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"1", "x":0, "y":0}, + {"label":"2", "x":1, "y":0}, + {"label":"3", "x":0, "y":1}, + {"label":"4", "x":1, "y":1}, + {"label":"5", "x":0, "y":2}, + {"label":"6", "x":1, "y":2} + ] + } + } +} diff --git a/keyboards/business_card/beta/rules.mk b/keyboards/business_card/beta/rules.mk index 8bb38a5142..e03f942e9d 100644 --- a/keyboards/business_card/beta/rules.mk +++ b/keyboards/business_card/beta/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/business_card/rules.mk b/keyboards/business_card/rules.mk index c12d659d06..7e37685de6 100644 --- a/keyboards/business_card/rules.mk +++ b/keyboards/business_card/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/butterstick/keymaps/default/keymap.c b/keyboards/butterstick/keymaps/default/keymap.c index e4d1ea91f3..749e9ba071 100644 --- a/keyboards/butterstick/keymaps/default/keymap.c +++ b/keyboards/butterstick/keymaps/default/keymap.c @@ -45,21 +45,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { uint32_t processQwerty(bool lookup) { // SECRET AGENT CHORDS P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__)); - P( LR | ST2| RR | RB, SEND(KC_BSPC)); + P( LR | ST2| RR | RB, SEND(KC_BSPC)); P( LSD | RZ, SEND(KC_SPC)); // Dual chords P( LP | LH, CLICK_MOUSE(KC_MS_BTN2)); P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1)); - P( LSU | LFT, SEND(KC_ESC)); - P( LSD | LK, SEND(KC_LSFT)); - P( RZ | RS, SEND(KC_LSFT)); - P( ST2 | RR, SEND(KC_SPC)); + P( LSU | LFT, SEND(KC_ESC)); + P( LSD | LK, SEND(KC_LSFT)); + P( RZ | RS, SEND(KC_LSFT)); + P( ST2 | RR, SEND(KC_SPC)); P( RP | RL, SEND(KC_LGUI)); P( RT | RD, SEND(KC_LCTL)); P( RL | RT, SEND(KC_LALT)); - P( LSU | LSD | LFT | LK, SEND(KC_LCTL)); - P( RS | RT | RD | RZ, SEND(KC_ENT)); + P( LSU | LSD | LFT | LK, SEND(KC_LCTL)); + P( RS | RT | RD | RZ, SEND(KC_ENT)); // Function Layer P( FUNCT | RF, SEND(KC_F1)); @@ -179,6 +179,5 @@ uint32_t processQwerty(bool lookup) { return 0; } - // Don't fuck with this, thanks. size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); diff --git a/keyboards/butterstick/rules.mk b/keyboards/butterstick/rules.mk index 68b117bf59..764e7d6aa2 100644 --- a/keyboards/butterstick/rules.mk +++ b/keyboards/butterstick/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -DONLYQWERTY -DDEBUG_MATRIX -SRC += sten.c -EXTRAFLAGS += -flto - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu + MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -17,3 +18,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover STENO_ENABLE = yes # Needed for chording +OPT_DEFS += -DONLYQWERTY -DDEBUG_MATRIX +SRC += sten.c +EXTRAFLAGS += -flto diff --git a/keyboards/butterstick/sten.c b/keyboards/butterstick/sten.c index a239e38842..197abaf92f 100644 --- a/keyboards/butterstick/sten.c +++ b/keyboards/butterstick/sten.c @@ -11,6 +11,18 @@ uint32_t pChord = 0; // Previous Chord int pChordIndex = 0; // Keys in previousachord uint32_t pChordState[32]; // Previous chord sate uint32_t stickyBits = 0; // Or'd with every incoming press +#ifndef NO_DEBUG +char debugMsg[32]; +#endif + +// StenoLayer +uint32_t releasedChord = 0; // Keys released from current chord +uint32_t tChord = 0; // Protects state of cChord + +#ifndef STENOLAYERS +uint32_t stenoLayers[] = { PWR }; +size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]); +#endif // Mode state enum MODE { STENO = 0, QWERTY, COMMAND }; @@ -39,7 +51,6 @@ bool inMouse = false; int8_t mousePress; // All processing done at chordUp goes through here -// Note, this is a gutted version of the Georgi sten.h bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) { // Check for mousekeys, this is release #ifdef MOUSEKEY_ENABLE @@ -50,8 +61,21 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) { } #endif + // Toggle Serial/QWERTY steno + if (cChord == (PWR | FN | ST1 | ST2)) { +#ifndef NO_DEBUG + uprintf("Fallback Toggle\n"); +#endif + QWERSTENO = !QWERSTENO; + + goto out; + } + // handle command mode - if (cChord == (LSU | LSD | RD | RZ)) { + if (cChord == (PWR | FN | RD | RZ)) { +#ifndef NO_DEBUG + uprintf("COMMAND Toggle\n"); +#endif if (cMode != COMMAND) { // Entering Command Mode CMDLEN = 0; pMode = cMode; @@ -70,7 +94,7 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) { } // Handle Gaming Toggle, - if (cChord == (LSU | LSD | LFT | LK | RT | RS | RD | RZ) && keymapsCount > 1) { + if (cChord == (PWR | FN | ST4 | ST3) && keymapsCount > 1) { #ifndef NO_DEBUG uprintf("Switching to QMK\n"); #endif @@ -78,11 +102,38 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) { goto out; } + // Lone FN press, toggle QWERTY +#ifndef ONLYQWERTY + if (cChord == FN) { + (cMode == STENO) ? (cMode = QWERTY) : (cMode = STENO); + goto out; + } +#endif + + // Check for Plover momentary + if (cMode == QWERTY && (cChord & FN)) { + cChord ^= FN; + goto steno; + } + // Do QWERTY and Momentary QWERTY - if (cMode == QWERTY || (cMode == COMMAND)) { + if (cMode == QWERTY || (cMode == COMMAND) || (cChord & (FN | PWR))) { processChord(false); goto out; - } + } + + // Fallback NKRO Steno + if (cMode == STENO && QWERSTENO) { + processChord(true); + goto out; + } + +steno: + // Hey that's a steno chord! + inChord = false; + chordIndex = 0; + cChord = 0; + return true; out: cChord = 0; diff --git a/keyboards/butterstick/sten.h b/keyboards/butterstick/sten.h index 5a9771d9a0..84635a554c 100644 --- a/keyboards/butterstick/sten.h +++ b/keyboards/butterstick/sten.h @@ -13,11 +13,14 @@ extern size_t keymapsCount; // Total keymaps extern uint32_t cChord; // Current Chord +extern uint32_t stenoLayers[]; // Chords that simulate QMK layers +extern size_t stenoLayerCount; // Number of simulated layers +uint32_t refChord; // Reference chord for PC macro // Function defs void processChord(bool useFakeSteno); -uint32_t processQwerty(bool lookup); -uint32_t processFakeSteno(bool lookup); +uint32_t processQwerty(bool lookup); +uint32_t processFakeSteno(bool lookup); void saveState(uint32_t cChord); void restoreState(void); @@ -30,6 +33,11 @@ void CLICK_MOUSE(uint8_t); // Keymap helper #define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} +#define PC(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} \ + for(int i = 0; i < stenoLayerCount; i++) { \ + refChord = stenoLayers[i] | chord; \ + if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \ +} // Shift to internal representation // i.e) S(teno)R(ight)F diff --git a/keyboards/c39/keymaps/drashna/config.h b/keyboards/c39/keymaps/drashna/config.h new file mode 100644 index 0000000000..5d53fe54bb --- /dev/null +++ b/keyboards/c39/keymaps/drashna/config.h @@ -0,0 +1,12 @@ +#pragma once + +// place overrides here +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS \ + { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 } +#undef MATRIX_ROW_PINS +#define MATRIX_ROW_PINS \ + { B7, B1, B0 } + +#define RGB_DI_PIN B10 +#define RGBLED_NUM 15 diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c new file mode 100755 index 0000000000..882938138f --- /dev/null +++ b/keyboards/c39/keymaps/drashna/keymap.c @@ -0,0 +1,97 @@ +#include "drashna.h" + +/* + * The `LAYOUT_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ +// clang-format off +#define LAYOUT_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, KC_DEL, \ + ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + KC_MLSF, CTL_T(K21), K22, K23, K24, LT(_LOWER,K25), KC_SPC, LT(_RAISE,K26), K27, K28, K29, RCTL_T(K2A), KC_ENT \ + ) +#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + [_MODS] = LAYOUT_wrapper( + _______, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______ + ), + + [_LOWER] = LAYOUT_wrapper( + KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC, + KC_DEL, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _______, _________________LOWER_R3__________________, _______ + ), + + [_RAISE] = LAYOUT_wrapper( + KC_GRV, _________________RAISE_L1__________________, _______, _________________RAISE_R1__________________, KC_BSPC, + KC_DEL, _________________RAISE_L2__________________, _______, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _________________RAISE_R3__________________, _______ + ), + + [_ADJUST] = LAYOUT_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L2_________________, MG_NKRO, _________________ADJUST_R2_________________, EEP_RST, + TG_MODS, _________________ADJUST_L3_________________, KC_RGB_T,_________________ADJUST_R3_________________, RGB_IDL + ) +}; +// clang-format on diff --git a/keyboards/c39/keymaps/drashna/readme.md b/keyboards/c39/keymaps/drashna/readme.md new file mode 100755 index 0000000000..a8efbaa5fe --- /dev/null +++ b/keyboards/c39/keymaps/drashna/readme.md @@ -0,0 +1,3 @@ +# @drashna's keymap for the C39 + +HERE BE DRAGONS diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk new file mode 100644 index 0000000000..d216f6abe6 --- /dev/null +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -0,0 +1,20 @@ +MCU = STM32F303 +BOOTLOADER = + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +RGBLIGHT_ENABLE = yes # RGB Enable / Disable + +RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/keyboards/c39/keymaps/kuchosauronad0/config.h b/keyboards/c39/keymaps/kuchosauronad0/config.h new file mode 100644 index 0000000000..cf0726e2bb --- /dev/null +++ b/keyboards/c39/keymaps/kuchosauronad0/config.h @@ -0,0 +1,43 @@ + +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +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 . +*/ + +#pragma once + +/* key combination for magic key command */ +#undef IS_COMMAND +#define IS_COMMAND() ( \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ +) + +#ifdef RGBLIGHT_ENABLE +# define RGB_DI_PIN D0 +# define RGBLED_NUM 4 +#endif // !RGBLIGHT_ENABLE + +/* +#ifdef AUDIO_ENABLE +# Timer 1: #define B5_AUDIO #define B6_AUDIO #define B7_AUDIO +# Timer 3: #define C4_AUDIO #define C5_AUDIO #define C6_AUDIO +//TODO: only D0 and D1 available +#endif // !AUDIO_ENABLE +*/ + diff --git a/keyboards/c39/keymaps/kuchosauronad0/keymap.c b/keyboards/c39/keymaps/kuchosauronad0/keymap.c new file mode 100644 index 0000000000..231e3cf44d --- /dev/null +++ b/keyboards/c39/keymaps/kuchosauronad0/keymap.c @@ -0,0 +1,131 @@ +/* +This is the keymap for the keyboard + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +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 . +*/ + +#include QMK_KEYBOARD_H +#include "kuchosauronad0.h" + +#ifdef RGBLIGHT_ENABLE + extern rgblight_config_t rgblight_config; +#endif + +#ifdef INDICATOR_LIGHTS + extern userspace_config_t userspace_config; + uint8_t last_mod; + uint8_t last_led; + uint8_t last_osm; +#endif + + +#define LAYOUT_collide39_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + MT(MOD_LALT,KC_TAB), K01, K02, K03, K04, K05, LT(RAISE,KC_PGUP), K06, K07, K08, K09, K0A, KC_BSPC, \ + SFT_T(KC_ESC), K11, K12, K13, K14, K15, LT(LOWER,KC_PGDN), K16, K17, K18, K19, K1A, SFT_T(KC_ENT), \ + MT(MOD_LCTL,KC_DEL), K21, K22, K23, K24, K25, KC_SPACE, K26, K27, K28, K29, K2A, KC_LEAD \ + ) + +/* + * ,------. ,----------------------------------------------------------------------------. ,------. + * |ALTTAB| | Q | W | E | R | T |RSE/PU| Y | U | I | O | P | | BSPC | + * |------| |------+------+------+------+------+------+------+------+------+------+------+ |------| + * |SF/ESC| | A | S | D | F | G |LWR/PD| H | J | K | L | ; | | ENTER| + * |------| |------+------+------+------+------+------+------+------+------+------+------+ |------| + * |CTLDEL| | Z | X | C | V | B |SPACE | N | M | , | . | / | |LEADER| + * `------' `----------------------------------------------------------------------------' `------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_collide39_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_collide39_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_collide39_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + +#ifdef UNICODEMAP_ENABLE + [_UNICODE] = LAYOUT_collide39_base_wrapper( + _______________UNICODE_L1__________________, _______________UNICODE_R1__________________, + _______________UNICODE_L2__________________, _______________UNICODE_R2__________________, + _______________UNICODE_L3__________________, _______________UNICODE_R3__________________ + ), +#endif + [_WORKMAN] = LAYOUT_collide39_base_wrapper( + _________________RGB_UP____________________, _________________RGB_UP____________________, + _________________RGB_CENTER________________, _________________RGB_CENTER________________, + _________________RGB_DOWN__________________, _________________RGB_DOWN__________________ + ), + + [_PLOVER] = LAYOUT_wrapper(\ + KC_1, _________________PLOVER_L1_________________, _______, _________________PLOVER_R1_________________, KC_1, + KC_NO, _________________PLOVER_L2_________________, _______, _________________PLOVER_R2_________________, KC_NO, + KC_NO, _________________PLOVER_L3_________________, _______, _________________PLOVER_R3_________________, _______ + ), + + [_MODS] = LAYOUT_wrapper(\ + KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RALT, + KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_wrapper(\ + KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC, + KC_F11, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE, + KC_F12, _________________LOWER_L3__________________, _______, _________________LOWER_R3__________________, _______ + ), + + [_RAISE] = LAYOUT_wrapper(\ + KC_GRV, _________________RAISE_L1__________________, _______, _________________RAISE_R1__________________, KC_BSPC, + _______, _________________RAISE_L2__________________, _______, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _________________RAISE_R3__________________, _______ + ), + + [_ADJUST] = LAYOUT_wrapper(\ + KC_MAKE, _________________ADJUST_L1_________________, _______, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _______, _________________ADJUST_R2_________________, EEP_RST, + DEBUG, _________________ADJUST_L3_________________, _______, _________________ADJUST_R3_________________, _______ + ) + +}; + +void matrix_init_keymap(void) { + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); + setPinOutput(B0); + writePinHigh(B0); + #endif +} + diff --git a/keyboards/c39/keymaps/kuchosauronad0/readme.md b/keyboards/c39/keymaps/kuchosauronad0/readme.md new file mode 100644 index 0000000000..ff01fb5ffa --- /dev/null +++ b/keyboards/c39/keymaps/kuchosauronad0/readme.md @@ -0,0 +1,10 @@ +# Personal keymap for the collide39 + +## Features: + +- leader key +- combos +- tap dance +- rgb backlight for the space key using a chameleon 4x WS28xx leds + +# diff --git a/keyboards/c39/keymaps/kuchosauronad0/rules.mk b/keyboards/c39/keymaps/kuchosauronad0/rules.mk new file mode 100644 index 0000000000..ac7c77dd46 --- /dev/null +++ b/keyboards/c39/keymaps/kuchosauronad0/rules.mk @@ -0,0 +1,20 @@ +BOOTLOADER = caterina +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +LEADER_ENABLE = yes # default is yes +TAP_DANCE_ENABLE = no #(+1254) +COMBO_ENABLE = yes +UNICODE_ENABLE = no #(+1134) +UNICODEMAP_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no +NKRO_ENABLE = yes + +INDICATOR_LIGHTS = yes +MACROS_ENABLED = no +RGBLIGHT_STARTUP_ANIMATION = yes + +NO_SECRETS = no diff --git a/keyboards/c39/rules.mk b/keyboards/c39/rules.mk index 8fcb089817..c7a902045a 100755 --- a/keyboards/c39/rules.mk +++ b/keyboards/c39/rules.mk @@ -1,50 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/cannonkeys/an_c/an_c.h b/keyboards/cannonkeys/an_c/an_c.h index 6d20850163..06963b4091 100644 --- a/keyboards/cannonkeys/an_c/an_c.h +++ b/keyboards/cannonkeys/an_c/an_c.h @@ -23,13 +23,13 @@ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\ - K40, K41, K42, K45, K49, K4B, K4E \ + K40, K41, K42, K45, K4A, K4B, 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, K1C, KNO, K1E }, \ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \ - { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, KNO, K4B, KNO, KNO, K4E } \ + { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, KNO, K4A, K4B, KNO, KNO, K4E } \ } #define LAYOUT_all( \ diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h index f8ded7c1f1..ef480521bc 100644 --- a/keyboards/cannonkeys/an_c/config.h +++ b/keyboards/cannonkeys/an_c/config.h @@ -62,21 +62,21 @@ along with this program. If not, see . // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 40 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x02 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION 0x03 +#define EEPROM_VERSION_ADDR 42 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 // start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -#define EEPROM_CUSTOM_BACKLIGHT 636 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 644 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 /* diff --git a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 0000000000..9d10fbd754 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 0000000000..de3a93d1ce --- /dev/null +++ b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 0000000000..b98dcdd26c --- /dev/null +++ b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 0000000000..9c7cf4fd76 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/chimera65/bootloader_defs.h b/keyboards/cannonkeys/chimera65/bootloader_defs.h new file mode 100644 index 0000000000..02c48c4e6d --- /dev/null +++ b/keyboards/cannonkeys/chimera65/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/chimera65/chconf.h b/keyboards/cannonkeys/chimera65/chconf.h new file mode 100644 index 0000000000..99fa8ce398 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/chimera65/chimera65.c b/keyboards/cannonkeys/chimera65/chimera65.c new file mode 100644 index 0000000000..14f170d9c2 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/chimera65.c @@ -0,0 +1 @@ +#include "chimera65.h" diff --git a/keyboards/cannonkeys/chimera65/chimera65.h b/keyboards/cannonkeys/chimera65/chimera65.h new file mode 100644 index 0000000000..81532f3f19 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/chimera65.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K406, K409, K410, K411, K412, K413, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, K411, K412, K413, KC_NO, K415 } \ +} diff --git a/keyboards/cannonkeys/chimera65/config.h b/keyboards/cannonkeys/chimera65/config.h new file mode 100644 index 0000000000..ace3565bea --- /dev/null +++ b/keyboards/cannonkeys/chimera65/config.h @@ -0,0 +1,89 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0xC024 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT Chimera65 +#define DESCRIPTION Chimera65 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { B11, B10, B2, B1, A5, A4, A3, A2, A1, F0, C15, C14, A9, A8, A10, B3 } +#define MATRIX_ROW_PINS { A13, A14, A15, C13, B8 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 36 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 +// start + layer * rows * col * 2 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +#define EEPROM_CUSTOM_BACKLIGHT 678 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 679 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 202 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/cannonkeys/chimera65/halconf.h b/keyboards/cannonkeys/chimera65/halconf.h new file mode 100644 index 0000000000..64cf68298b --- /dev/null +++ b/keyboards/cannonkeys/chimera65/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/chimera65/info.json b/keyboards/cannonkeys/chimera65/info.json new file mode 100644 index 0000000000..75a5f293d1 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/info.json @@ -0,0 +1,7 @@ +{ + "keyboard_name": "Chimera65", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 5 +} diff --git a/keyboards/cannonkeys/chimera65/keymaps/default/keymap.c b/keyboards/cannonkeys/chimera65/keymaps/default/keymap.c new file mode 100644 index 0000000000..a63fcf6f75 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_DEL, + 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_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, 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_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/chimera65/keymaps/via/keymap.c b/keyboards/cannonkeys/chimera65/keymaps/via/keymap.c new file mode 100644 index 0000000000..a63fcf6f75 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_DEL, + 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_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, 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_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk b/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk new file mode 100644 index 0000000000..d12497792d --- /dev/null +++ b/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/chimera65/mcuconf.h b/keyboards/cannonkeys/chimera65/mcuconf.h new file mode 100644 index 0000000000..048eb4df65 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/chimera65/readme.md b/keyboards/cannonkeys/chimera65/readme.md new file mode 100644 index 0000000000..e612240e40 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/readme.md @@ -0,0 +1,12 @@ +# Chimera65 + +Chimera65 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/chimera65: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). diff --git a/keyboards/cannonkeys/chimera65/rules.mk b/keyboards/cannonkeys/chimera65/rules.mk new file mode 100644 index 0000000000..580a7712c6 --- /dev/null +++ b/keyboards/cannonkeys/chimera65/rules.mk @@ -0,0 +1,57 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = no + +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h index 095384fb9e..9da2043d2f 100644 --- a/keyboards/cannonkeys/instant60/config.h +++ b/keyboards/cannonkeys/instant60/config.h @@ -62,21 +62,21 @@ along with this program. If not, see . // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 40 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x02 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION 0x03 +#define EEPROM_VERSION_ADDR 42 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 // start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -#define EEPROM_CUSTOM_BACKLIGHT 636 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 644 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 /* diff --git a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c index 303f307301..f9c7995ae0 100644 --- a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index 5d4fb1cf72..c0a62e9433 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -31,6 +31,10 @@ ARMV = 6 # /tmk_core/tool/chibios/ch-bootloader-jump.patch #STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + # Build Options # comment out to disable the options. # diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 0000000000..9d10fbd754 --- /dev/null +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 0000000000..de3a93d1ce --- /dev/null +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 0000000000..b98dcdd26c --- /dev/null +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 0000000000..9c7cf4fd76 --- /dev/null +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/iron165/bootloader_defs.h b/keyboards/cannonkeys/iron165/bootloader_defs.h new file mode 100644 index 0000000000..02c48c4e6d --- /dev/null +++ b/keyboards/cannonkeys/iron165/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/iron165/chconf.h b/keyboards/cannonkeys/iron165/chconf.h new file mode 100644 index 0000000000..99fa8ce398 --- /dev/null +++ b/keyboards/cannonkeys/iron165/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/iron165/config.h b/keyboards/cannonkeys/iron165/config.h new file mode 100644 index 0000000000..c5fcd4518a --- /dev/null +++ b/keyboards/cannonkeys/iron165/config.h @@ -0,0 +1,89 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5A12 +#define PRODUCT_ID 0x5165 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER SmithAndRune +#define PRODUCT Iron165 +#define DESCRIPTION Iron165 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { A5, B10, A3, A2, B0, A8, C13, B9, B8, B7, B6, B5, B4, B3, A15, A14 } +#define MATRIX_ROW_PINS { B12, B13, B14, B15, A1 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 40 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 42 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 +// start + layer * rows * col * 2 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 684 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/cannonkeys/iron165/halconf.h b/keyboards/cannonkeys/iron165/halconf.h new file mode 100644 index 0000000000..acd7678e7b --- /dev/null +++ b/keyboards/cannonkeys/iron165/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/iron165/info.json b/keyboards/cannonkeys/iron165/info.json new file mode 100644 index 0000000000..c9d1ebea3b --- /dev/null +++ b/keyboards/cannonkeys/iron165/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Iron165", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_default": { + "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"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":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"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}, {"x":14, "y":3}, {"x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } + +} diff --git a/keyboards/cannonkeys/iron165/iron165.c b/keyboards/cannonkeys/iron165/iron165.c new file mode 100644 index 0000000000..da21712fb2 --- /dev/null +++ b/keyboards/cannonkeys/iron165/iron165.c @@ -0,0 +1 @@ +#include "iron165.h" diff --git a/keyboards/cannonkeys/iron165/iron165.h b/keyboards/cannonkeys/iron165/iron165.h new file mode 100644 index 0000000000..d5579a09a4 --- /dev/null +++ b/keyboards/cannonkeys/iron165/iron165.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K406, K410, K411, K412, K413, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO, K415 } \ +} diff --git a/keyboards/cannonkeys/iron165/keymaps/default/keymap.c b/keyboards/cannonkeys/iron165/keymaps/default/keymap.c new file mode 100644 index 0000000000..12c2a69937 --- /dev/null +++ b/keyboards/cannonkeys/iron165/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + 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_BSPC, KC_DEL, + 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_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, 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_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/iron165/keymaps/via/keymap.c b/keyboards/cannonkeys/iron165/keymaps/via/keymap.c new file mode 100644 index 0000000000..ac0efd62c4 --- /dev/null +++ b/keyboards/cannonkeys/iron165/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + 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_DEL, + 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_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, 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_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/iron165/keymaps/via/rules.mk b/keyboards/cannonkeys/iron165/keymaps/via/rules.mk new file mode 100644 index 0000000000..d12497792d --- /dev/null +++ b/keyboards/cannonkeys/iron165/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/iron165/mcuconf.h b/keyboards/cannonkeys/iron165/mcuconf.h new file mode 100644 index 0000000000..0e49478c8b --- /dev/null +++ b/keyboards/cannonkeys/iron165/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/iron165/readme.md b/keyboards/cannonkeys/iron165/readme.md new file mode 100644 index 0000000000..6cfb7a2067 --- /dev/null +++ b/keyboards/cannonkeys/iron165/readme.md @@ -0,0 +1,12 @@ +# Smith+Rune Iron165 + +Iron165 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/iron165: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). diff --git a/keyboards/cannonkeys/iron165/rules.mk b/keyboards/cannonkeys/iron165/rules.mk new file mode 100644 index 0000000000..5480987a33 --- /dev/null +++ b/keyboards/cannonkeys/iron165/rules.mk @@ -0,0 +1,55 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -v 0483 -p DF11 + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = no diff --git a/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c index 2c3bc80c5d..ba26b9adb2 100644 --- a/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c index 56caa4dc84..8ae3da3d72 100644 --- a/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/ortho75/config.h b/keyboards/cannonkeys/ortho75/config.h index 6c240e2d69..588e2b9215 100644 --- a/keyboards/cannonkeys/ortho75/config.h +++ b/keyboards/cannonkeys/ortho75/config.h @@ -39,7 +39,6 @@ along with this program. If not, see . #define BACKLIGHT_BREATHING #define BREATHING_PERIOD 6 -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B9 } #define ENCODERS_PAD_B { B8 } diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index db155867e5..113fff5554 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -54,4 +54,4 @@ BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes -LAYOUTS = LAYOUT_ortho_5x15 +LAYOUTS = ortho_5x15 diff --git a/keyboards/cannonkeys/practice60/keymaps/default/keymap.c b/keyboards/cannonkeys/practice60/keymaps/default/keymap.c index 66ebe0646d..b917cf3eeb 100644 --- a/keyboards/cannonkeys/practice60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/practice60/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/practice65/keymaps/default/keymap.c b/keyboards/cannonkeys/practice65/keymaps/default/keymap.c index fdc06e3985..9c0641fe3f 100644 --- a/keyboards/cannonkeys/practice65/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/practice65/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 092b372577..8387289d87 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 } #define DIODE_DIRECTION COL2ROW -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B9 } #define ENCODERS_PAD_B { B8 } @@ -72,15 +71,15 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 40 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x01 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 42 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 // Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) = 803 @@ -90,13 +89,13 @@ along with this program. If not, see . // 1 for OLED default mode // 6 for 3x custom encoder settings, left, right, and press (18 total) -#define DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES 803 -#define DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT 804 -#define DYNAMIC_KEYMAP_DEFAULT_OLED 805 -#define DYNAMIC_KEYMAP_CUSTOM_ENCODER 806 +#define DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES 811 +#define DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT 812 +#define DYNAMIC_KEYMAP_DEFAULT_OLED 813 +#define DYNAMIC_KEYMAP_CUSTOM_ENCODER 814 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 824 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 832 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c index 56e810d32a..0e3adbbf16 100644 --- a/keyboards/cannonkeys/satisfaction75/i2c_master.c +++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c @@ -110,11 +110,11 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, return chibios_to_qmk(status); } -i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout) +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_address = devaddr; i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout)); return chibios_to_qmk(status); } diff --git a/keyboards/cannonkeys/satisfaction75/prototype/info.json b/keyboards/cannonkeys/satisfaction75/prototype/info.json new file mode 100644 index 0000000000..8f5ab9f2a6 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/prototype/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Satisfaction75 prototype", + "url": "", + "maintainer": "Cannon Keys", + "width": 16.5, + "height": 6.5, + "layouts": { + "LAYOUT_default": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + } + } +} diff --git a/keyboards/cannonkeys/satisfaction75/rev1/info.json b/keyboards/cannonkeys/satisfaction75/rev1/info.json new file mode 100644 index 0000000000..fd25aacdb7 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/rev1/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "Satisfaction75 rev1", + "url": "", + "maintainer": "Cannon Keys", + "width": 16.5, + "height": 6.5, + "layouts": { + "LAYOUT_default": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_iso": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"x":13.75, "y":2.25, "w":1.25, "h":2}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_3x2": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25, "w":1.5}, {"x":11.5, "y":5.25, "w":1.5}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_2x2": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.5}, {"x":1.5, "y":5.25, "w":1.5}, {"x":3, "y":5.25, "w":7}, {"x":10, "y":5.25, "w":1.5}, {"x":11.5, "y":5.25, "w":1.5}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_split_space": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":2.25}, {"x":6, "y":5.25, "w":1.25}, {"x":7.25, "y":5.25, "w":2.75}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"x":13.75, "y":3.25, "w":1.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":2.25}, {"x":6, "y":5.25, "w":1.25}, {"x":7.25, "y":5.25, "w":2.75}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + } + } +} diff --git a/keyboards/cannonkeys/satisfaction75/rev1/rev1.h b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h index 302b7e43de..65ff16b985 100644 --- a/keyboards/cannonkeys/satisfaction75/rev1/rev1.h +++ b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h @@ -24,7 +24,7 @@ #define LAYOUT_iso( \ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 0e788b29b7..12d3660dae 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -17,8 +17,8 @@ #include "tmk_core/common/eeprom.h" // HACK -#include "keyboards/zeal60/zeal60_api.h" // Temporary hack -#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack +#include "keyboards/wilba_tech/via_api.h" // Temporary hack +#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack /* Artificial delay added to get media keys to work in the encoder*/ @@ -72,7 +72,7 @@ void eeprom_set_valid(bool valid) void eeprom_reset(void) { - // Set the Zeal60 specific EEPROM state as invalid. + // Set the VIA specific EEPROM state as invalid. eeprom_set_valid(false); // Set the TMK/QMK EEPROM state as invalid. eeconfig_disable(); @@ -94,51 +94,53 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) } case id_get_keyboard_value: { - switch( command_data[0]) - { - case id_uptime: - { - uint32_t value = timer_read32(); - command_data[1] = (value >> 24 ) & 0xFF; - command_data[2] = (value >> 16 ) & 0xFF; - command_data[3] = (value >> 8 ) & 0xFF; - command_data[4] = value & 0xFF; - break; - } - case id_oled_default_mode: - { - uint8_t default_oled = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); - command_data[1] = default_oled; - break; - } - case id_oled_mode: - { - command_data[1] = oled_mode; - break; - - } - case id_encoder_modes: - { - command_data[1] = enabled_encoder_modes; - break; - } - case id_encoder_custom: - { - // uint8_t custom_encoder_idx = command_data[1]; - // command_data[2] = 0x00; - // command_data[3] = 0x00; - // command_data[4] = 0x00; - // command_data[5] = 0x00; - // command_data[6] = 0x00; - // command_data[7] = 0x00; - break; - } - default: - { - *command_id = id_unhandled; - break; - } - } + switch( command_data[0]) + { + case id_uptime: + { + uint32_t value = timer_read32(); + command_data[1] = (value >> 24 ) & 0xFF; + command_data[2] = (value >> 16 ) & 0xFF; + command_data[3] = (value >> 8 ) & 0xFF; + command_data[4] = value & 0xFF; + break; + } + case id_oled_default_mode: + { + uint8_t default_oled = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); + command_data[1] = default_oled; + break; + } + case id_oled_mode: + { + command_data[1] = oled_mode; + break; + } + case id_encoder_modes: + { + command_data[1] = enabled_encoder_modes; + break; + } + case id_encoder_custom: + { + uint8_t custom_encoder_idx = command_data[1]; + uint16_t keycode = retrieve_custom_encoder_config(custom_encoder_idx, ENC_CUSTOM_CW); + command_data[2] = keycode >> 8; + command_data[3] = keycode & 0xFF; + keycode = retrieve_custom_encoder_config(custom_encoder_idx, ENC_CUSTOM_CCW); + command_data[4] = keycode >> 8; + command_data[5] = keycode & 0xFF; + keycode = retrieve_custom_encoder_config(custom_encoder_idx, ENC_CUSTOM_PRESS); + command_data[6] = keycode >> 8; + command_data[7] = keycode & 0xFF; + break; + } + default: + { + *command_id = id_unhandled; + break; + } + } break; } #ifdef DYNAMIC_KEYMAP_ENABLE @@ -164,7 +166,10 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) } case id_encoder_custom: { - // uint8_t custom_encoder_idx = command_data[1]; + uint8_t custom_encoder_idx = command_data[1]; + uint8_t encoder_behavior = command_data[2]; + uint16_t keycode = (command_data[3] << 8) | command_data[4]; + set_custom_encoder_config(custom_encoder_idx, encoder_behavior, keycode); break; } default: @@ -205,13 +210,6 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) break; } case id_dynamic_keymap_macro_get_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); - break; - } - case id_dynamic_keymap_macro_set_buffer: { uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; uint16_t size = command_data[2]; // size <= 28 @@ -339,9 +337,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { uint16_t mapped_code = handle_encoder_press(); uint16_t held_keycode_timer = timer_read(); if(mapped_code != 0){ - register_code(mapped_code); + register_code16(mapped_code); while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } - unregister_code(mapped_code); + unregister_code16(mapped_code); } } else { // Do something else when release @@ -380,9 +378,9 @@ void encoder_update_kb(uint8_t index, bool clockwise) { } uint16_t held_keycode_timer = timer_read(); if(mapped_code != 0){ - register_code(mapped_code); + register_code16(mapped_code); while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } - unregister_code(mapped_code); + unregister_code16(mapped_code); } } else { if(clockwise){ diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h index dfab68017f..188a1d4970 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.h +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h @@ -47,6 +47,12 @@ enum encoder_modes { ENC_MODE_CLOCK_SET // This shouldn't be included in the default modes, so we put it after NUM_ENCODER_MODES }; +enum custom_encoder_behavior { + ENC_CUSTOM_CW = 0, + ENC_CUSTOM_CCW, + ENC_CUSTOM_PRESS +}; + enum oled_modes { OLED_DEFAULT, OLED_TIME, @@ -96,6 +102,8 @@ void change_encoder_mode(bool negative); uint16_t handle_encoder_clockwise(void); uint16_t handle_encoder_ccw(void); uint16_t handle_encoder_press(void); +uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior); +void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code); void update_time_config(int8_t increment); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index 6776816918..e866d897c7 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -1,4 +1,5 @@ #include "satisfaction75.h" +#include "tmk_core/common/eeprom.h" void pre_encoder_mode_change(){ if(encoder_mode == ENC_MODE_CLOCK_SET){ @@ -111,6 +112,17 @@ uint16_t handle_encoder_clockwise(){ case ENC_MODE_BRIGHTNESS: mapped_code = KC_BRIGHTNESS_UP; break; +#ifdef DYNAMIC_KEYMAP_ENABLE + case ENC_MODE_CUSTOM0: + mapped_code = retrieve_custom_encoder_config(0, ENC_CUSTOM_CW); + break; + case ENC_MODE_CUSTOM1: + mapped_code = retrieve_custom_encoder_config(1, ENC_CUSTOM_CW); + break; + case ENC_MODE_CUSTOM2: + mapped_code = retrieve_custom_encoder_config(2, ENC_CUSTOM_CW); + break; +#endif case ENC_MODE_CLOCK_SET: update_time_config(1); queue_for_send = true; @@ -145,6 +157,18 @@ uint16_t handle_encoder_ccw(){ case ENC_MODE_BRIGHTNESS: mapped_code = KC_BRIGHTNESS_DOWN; break; +#ifdef DYNAMIC_KEYMAP_ENABLE + case ENC_MODE_CUSTOM0: + mapped_code = retrieve_custom_encoder_config(0, ENC_CUSTOM_CCW); + break; + case ENC_MODE_CUSTOM1: + mapped_code = retrieve_custom_encoder_config(1, ENC_CUSTOM_CCW); + break; + case ENC_MODE_CUSTOM2: + mapped_code = retrieve_custom_encoder_config(2, ENC_CUSTOM_CCW); + break; +#endif + case ENC_MODE_CLOCK_SET: update_time_config(-1); queue_for_send = true; @@ -159,6 +183,7 @@ uint16_t handle_encoder_press(){ case ENC_MODE_VOLUME: mapped_code = KC_MUTE; break; + default: case ENC_MODE_MEDIA: mapped_code = KC_MEDIA_PLAY_PAUSE; break; @@ -174,11 +199,42 @@ uint16_t handle_encoder_press(){ breathing_enable(); } break; +#ifdef DYNAMIC_KEYMAP_ENABLE + case ENC_MODE_CUSTOM0: + mapped_code = retrieve_custom_encoder_config(0, ENC_CUSTOM_PRESS); + break; + case ENC_MODE_CUSTOM1: + mapped_code = retrieve_custom_encoder_config(1, ENC_CUSTOM_PRESS); + break; + case ENC_MODE_CUSTOM2: + mapped_code = retrieve_custom_encoder_config(2, ENC_CUSTOM_PRESS); + break; +#endif case ENC_MODE_CLOCK_SET: time_config_idx = (time_config_idx + 1) % 5; - default: case ENC_MODE_BRIGHTNESS: break; } return mapped_code; } + + +uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ +#ifdef DYNAMIC_KEYMAP_ENABLE + void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); + //big endian + uint16_t keycode = eeprom_read_byte(addr) << 8; + keycode |= eeprom_read_byte(addr + 1); + return keycode; +#else + return 0; +#endif +} + +void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){ +#ifdef DYNAMIC_KEYMAP_ENABLE + void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); + eeprom_update_byte(addr, (uint8_t)(new_code >> 8)); + eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF)); +#endif +} diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c index 4e22587db8..6553bd1300 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -91,8 +91,8 @@ void draw_default(){ if (hour == 0){ hour = 12; } - char hour_str[2] = ""; - char min_str[2] = ""; + char hour_str[3] = ""; + char min_str[3] = ""; sprintf(hour_str, "%02d", hour); sprintf(min_str, "%02d", minute); @@ -199,11 +199,11 @@ void draw_clock(){ if (hour == 0){ hour = 12; } - char hour_str[2] = ""; - char min_str[2] = ""; - char year_str[4] = ""; - char month_str[2] = ""; - char day_str[2] = ""; + char hour_str[3] = ""; + char min_str[3] = ""; + char year_str[5] = ""; + char month_str[3] = ""; + char day_str[3] = ""; sprintf(hour_str, "%02d", hour); sprintf(min_str, "%02d", minute); diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 0000000000..9d10fbd754 --- /dev/null +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 0000000000..de3a93d1ce --- /dev/null +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 0000000000..b98dcdd26c --- /dev/null +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 0000000000..9c7cf4fd76 --- /dev/null +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/savage65/bootloader_defs.h b/keyboards/cannonkeys/savage65/bootloader_defs.h new file mode 100644 index 0000000000..02c48c4e6d --- /dev/null +++ b/keyboards/cannonkeys/savage65/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/savage65/chconf.h b/keyboards/cannonkeys/savage65/chconf.h new file mode 100644 index 0000000000..99fa8ce398 --- /dev/null +++ b/keyboards/cannonkeys/savage65/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/savage65/config.h b/keyboards/cannonkeys/savage65/config.h new file mode 100644 index 0000000000..996b939515 --- /dev/null +++ b/keyboards/cannonkeys/savage65/config.h @@ -0,0 +1,97 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x5A65 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT Savage65 +#define DESCRIPTION Savage65 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { A5, B10, A3, A2, B0, A9, C13, B9, B8, B7, B6, B5, B4, B3, A15, A14 } +#define MATRIX_ROW_PINS { B12, B11, B14, A8, A1 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 20 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 40 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 42 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 +// start + layer * rows * col * 2 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 684 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/cannonkeys/savage65/halconf.h b/keyboards/cannonkeys/savage65/halconf.h new file mode 100644 index 0000000000..9bcb477c03 --- /dev/null +++ b/keyboards/cannonkeys/savage65/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/savage65/info.json b/keyboards/cannonkeys/savage65/info.json new file mode 100644 index 0000000000..3a0f0c3854 --- /dev/null +++ b/keyboards/cannonkeys/savage65/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Savage65", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_default": { + "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"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}, {"x":14, "y":3}, {"x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } + +} diff --git a/keyboards/cannonkeys/savage65/keymaps/default/keymap.c b/keyboards/cannonkeys/savage65/keymaps/default/keymap.c new file mode 100644 index 0000000000..0184b49399 --- /dev/null +++ b/keyboards/cannonkeys/savage65/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, + 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_DEL, + 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_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, 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_DEL, KC_TRNS, RGB_TOG, + 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, RGB_MOD, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/savage65/keymaps/via/keymap.c b/keyboards/cannonkeys/savage65/keymaps/via/keymap.c new file mode 100644 index 0000000000..f9f0bd4acc --- /dev/null +++ b/keyboards/cannonkeys/savage65/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, + 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_DEL, + 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_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, 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_DEL, KC_TRNS, RGB_TOG, + 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, RGB_MOD, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/savage65/keymaps/via/rules.mk b/keyboards/cannonkeys/savage65/keymaps/via/rules.mk new file mode 100644 index 0000000000..d12497792d --- /dev/null +++ b/keyboards/cannonkeys/savage65/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/savage65/mcuconf.h b/keyboards/cannonkeys/savage65/mcuconf.h new file mode 100644 index 0000000000..43fe0a462e --- /dev/null +++ b/keyboards/cannonkeys/savage65/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/savage65/readme.md b/keyboards/cannonkeys/savage65/readme.md new file mode 100644 index 0000000000..d87657e5b3 --- /dev/null +++ b/keyboards/cannonkeys/savage65/readme.md @@ -0,0 +1,12 @@ +# CannonKeys Savage65 + +Savage65 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/savage65: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). diff --git a/keyboards/cannonkeys/savage65/rules.mk b/keyboards/cannonkeys/savage65/rules.mk new file mode 100644 index 0000000000..c6789d6c3a --- /dev/null +++ b/keyboards/cannonkeys/savage65/rules.mk @@ -0,0 +1,56 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -v 0483 -p DF11 + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = yes + diff --git a/keyboards/cannonkeys/savage65/savage65.c b/keyboards/cannonkeys/savage65/savage65.c new file mode 100644 index 0000000000..d8e610c8b9 --- /dev/null +++ b/keyboards/cannonkeys/savage65/savage65.c @@ -0,0 +1 @@ +#include "savage65.h" diff --git a/keyboards/cannonkeys/savage65/savage65.h b/keyboards/cannonkeys/savage65/savage65.h new file mode 100644 index 0000000000..e9109cf7a6 --- /dev/null +++ b/keyboards/cannonkeys/savage65/savage65.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K406, K410, K411, K412, K413, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO, K415 } \ +} diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c index 02c6dae18b..5a9ccafff7 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.c +++ b/keyboards/cannonkeys/stm32f072/keyboard.c @@ -12,8 +12,8 @@ #include "tmk_core/common/eeprom.h" // HACK -#include "keyboards/zeal60/zeal60_api.h" // Temporary hack -#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack +#include "keyboards/wilba_tech/via_api.h" // Temporary hack +#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack backlight_config_t kb_backlight_config = { @@ -86,10 +86,9 @@ void matrix_init_board(void); void matrix_init_kb(void){ eeprom_init_kb(); /* MOSI pin*/ +#ifdef RGBLIGHT_ENABLE palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); wait_ms(500); - -#ifdef RGBLIGHT_ENABLE leds_init(); #endif backlight_init_ports(); @@ -162,7 +161,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { } #endif //DYNAMIC_KEYMAP_ENABLE - return true; + return process_record_user(keycode, record);; } diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 0000000000..9d10fbd754 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 0000000000..de3a93d1ce --- /dev/null +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 0000000000..b98dcdd26c --- /dev/null +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 0000000000..9c7cf4fd76 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/tmov2/bootloader_defs.h b/keyboards/cannonkeys/tmov2/bootloader_defs.h new file mode 100644 index 0000000000..02c48c4e6d --- /dev/null +++ b/keyboards/cannonkeys/tmov2/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/tmov2/chconf.h b/keyboards/cannonkeys/tmov2/chconf.h new file mode 100644 index 0000000000..99fa8ce398 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h new file mode 100644 index 0000000000..0c586de9e5 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/config.h @@ -0,0 +1,97 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x70F2 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT TMOv2 +#define DESCRIPTION TMOv2 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B14, A14, C13, C14, C15, F0, F1, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { A10, A9, A8, B12 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 22 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 40 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 42 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (43+(4*4*15*2)) = (43+480) = 523 +// start + layer * rows * col * 2c +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 523 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 524 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/cannonkeys/tmov2/halconf.h b/keyboards/cannonkeys/tmov2/halconf.h new file mode 100644 index 0000000000..38743e0904 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/tmov2/info.json b/keyboards/cannonkeys/tmov2/info.json new file mode 100644 index 0000000000..2734e94e49 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TMOv2", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 17, + "height": 4, + "layouts": { + "LAYOUT_default": { + "layout": [{"x":0, "y":0}, {"label":"Tab", "x":1.25, "y":0, "w":1.5}, {"label":"Q", "x":2.75, "y":0}, {"label":"W", "x":3.75, "y":0}, {"label":"E", "x":4.75, "y":0}, {"label":"R", "x":5.75, "y":0}, {"label":"T", "x":6.75, "y":0}, {"label":"Y", "x":7.75, "y":0}, {"label":"U", "x":8.75, "y":0}, {"label":"I", "x":9.75, "y":0}, {"label":"O", "x":10.75, "y":0}, {"label":"P", "x":11.75, "y":0}, {"label":"{", "x":12.75, "y":0}, {"label":"}", "x":13.75, "y":0}, {"label":"Backspace", "x":14.75, "y":0}, {"x":0, "y":1}, {"label":"Caps Lock", "x":1.25, "y":1, "w":1.75}, {"label":"A", "x":3, "y":1}, {"label":"S", "x":4, "y":1}, {"label":"D", "x":5, "y":1}, {"label":"F", "x":6, "y":1}, {"label":"G", "x":7, "y":1}, {"label":"H", "x":8, "y":1}, {"label":"J", "x":9, "y":1}, {"label":"K", "x":10, "y":1}, {"label":"L", "x":11, "y":1}, {"label":":", "x":12, "y":1}, {"label":"\"", "x":13, "y":1}, {"label":"Enter", "x":14, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":2.25}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"?", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2, "w":1.25}, {"x":14.75, "y":2}, {"x":0, "y":3}, {"label":"Win", "x":3.25, "y":3}, {"label":"Alt", "x":4.25, "y":3, "w":1.5}, {"x":5.75, "y":3, "w":2.25}, {"x":8, "y":3, "w":2.75}, {"label":"Alt", "x":10.75, "y":3, "w":1.5}, {"label":"Menu", "x":12.25, "y":3}] + } + } +} diff --git a/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c b/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c new file mode 100644 index 0000000000..9e01965b53 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + BL_INC, 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_BSPC, + BL_DEC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + RGB_MOD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2), + RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3) + ), + + [_FN1] = LAYOUT_default( + KC_TRNS, 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_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN2] = LAYOUT_default( + RGB_TOG, 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_TRNS, + RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN3] = LAYOUT_default( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c b/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c new file mode 100644 index 0000000000..9e01965b53 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + BL_INC, 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_BSPC, + BL_DEC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + RGB_MOD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2), + RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3) + ), + + [_FN1] = LAYOUT_default( + KC_TRNS, 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_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN2] = LAYOUT_default( + RGB_TOG, 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_TRNS, + RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN3] = LAYOUT_default( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk b/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk new file mode 100644 index 0000000000..d12497792d --- /dev/null +++ b/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/tmov2/mcuconf.h b/keyboards/cannonkeys/tmov2/mcuconf.h new file mode 100644 index 0000000000..048eb4df65 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/tmov2/readme.md b/keyboards/cannonkeys/tmov2/readme.md new file mode 100644 index 0000000000..d19ba33935 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/readme.md @@ -0,0 +1,12 @@ +# TMO V2 Keyboard + +TMO V2 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/tmov2: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). diff --git a/keyboards/cannonkeys/tmov2/rules.mk b/keyboards/cannonkeys/tmov2/rules.mk new file mode 100644 index 0000000000..828fa8ff80 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/rules.mk @@ -0,0 +1,64 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -v 0483 -p DF11 + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 right now +RGBLIGHT_ENABLE = yes + diff --git a/keyboards/cannonkeys/tmov2/tmov2.c b/keyboards/cannonkeys/tmov2/tmov2.c new file mode 100644 index 0000000000..47295ac270 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/tmov2.c @@ -0,0 +1 @@ +#include "tmov2.h" diff --git a/keyboards/cannonkeys/tmov2/tmov2.h b/keyboards/cannonkeys/tmov2/tmov2.h new file mode 100644 index 0000000000..838075e71b --- /dev/null +++ b/keyboards/cannonkeys/tmov2/tmov2.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K302, K303, K305, K307, K309, K310 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO}, \ + { K300, KC_NO, K302, K303, KC_NO, K305, KC_NO, K307, KC_NO, K309, K310, KC_NO, KC_NO, KC_NO} \ +} diff --git a/keyboards/canoe/canoe.c b/keyboards/canoe/canoe.c deleted file mode 100644 index a7427e1528..0000000000 --- a/keyboards/canoe/canoe.c +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include "canoe.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "i2c.h" -#include "rgblight.h" -#endif - -#ifdef BACKLIGHT_ENABLE -void backlight_set(uint8_t level) { - if (level == 0) { - // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); - } else { - // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - } -} - -void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); -} - -#endif - -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -#ifndef CANOE_CONFIG_H -#define CANOE_CONFIG_H - -#include "config_common.h" - -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -#define MANUFACTURER NotActuallyPercent -#define PRODUCT CANOE - -#define RGBLED_NUM 2 - -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 - -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } -#define UNUSED_PINS - -#define DIODE_DIRECTION COL2ROW -#define DEBOUNCE 5 - -#define NO_BACKLIGHT_CLOCK -#define BACKLIGHT_LEVELS 1 -#define RGBLIGHT_ANIMATIONS - -#define NO_UART 1 - -#endif diff --git a/keyboards/canoe/i2c.c b/keyboards/canoe/i2c.c deleted file mode 100644 index a4f9521352..0000000000 --- a/keyboards/canoe/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/canoe/info.json b/keyboards/canoe/info.json deleted file mode 100644 index 17bdacaa5d..0000000000 --- a/keyboards/canoe/info.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "keyboard_name": "Canoe", - "maintainer": "qmk", - "url": "", - "height": 6, - "width": 15, - "layouts": { - "LAYOUT_iso": { - "key_count": 68, - "layout": [{"label":"K0D", "x":0, "y":0}, {"label":"K0C", "x":1, "y":0}, {"label":"K0B", "x":2, "y":0}, {"label":"K0A", "x":3, "y":0}, {"label":"K09", "x":4, "y":0}, {"label":"K08", "x":5, "y":0}, {"label":"K07", "x":6, "y":0}, {"label":"K06", "x":7, "y":0}, {"label":"K05", "x":8, "y":0}, {"label":"K04", "x":9, "y":0}, {"label":"K03", "x":10, "y":0}, {"label":"K02", "x":11, "y":0}, {"label":"K01", "x":12, "y":0}, {"label":"K00", "x":13, "y":0, "w":2}, {"label":"K0E", "x":15, "y":0}, {"label":"K1D", "x":0, "y":1, "w":1.5}, {"label":"K1C", "x":1.5, "y":1}, {"label":"K1B", "x":2.5, "y":1}, {"label":"K1A", "x":3.5, "y":1}, {"label":"K19", "x":4.5, "y":1}, {"label":"K18", "x":5.5, "y":1}, {"label":"K17", "x":6.5, "y":1}, {"label":"K16", "x":7.5, "y":1}, {"label":"K15", "x":8.5, "y":1}, {"label":"K14", "x":9.5, "y":1}, {"label":"K13", "x":10.5, "y":1}, {"label":"K12", "x":11.5, "y":1}, {"label":"K11", "x":12.5, "y":1}, {"label":"K1E", "x":15, "y":1}, {"label":"K2D", "x":0, "y":2, "w":1.75}, {"label":"K2C", "x":1.75, "y":2}, {"label":"K2B", "x":2.75, "y":2}, {"label":"K2A", "x":3.75, "y":2}, {"label":"K29", "x":4.75, "y":2}, {"label":"K28", "x":5.75, "y":2}, {"label":"K27", "x":6.75, "y":2}, {"label":"K26", "x":7.75, "y":2}, {"label":"K25", "x":8.75, "y":2}, {"label":"K24", "x":9.75, "y":2}, {"label":"K23", "x":10.75, "y":2}, {"label":"K22", "x":11.75, "y":2}, {"label":"K10", "x":12.75, "y":2}, {"label":"K21", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"K2E", "x":15, "y":2}, {"label":"K3D", "x":0, "y":3, "w":1.25}, {"label":"K4A", "x":1.25, "y":3}, {"label":"K3C", "x":2.25, "y":3}, {"label":"K3B", "x":3.25, "y":3}, {"label":"K3A", "x":4.25, "y":3}, {"label":"K39", "x":5.25, "y":3}, {"label":"K38", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K36", "x":8.25, "y":3}, {"label":"K35", "x":9.25, "y":3}, {"label":"K34", "x":10.25, "y":3}, {"label":"K33", "x":11.25, "y":3}, {"label":"K32", "x":12.25, "y":3, "w":1.75}, {"label":"K30", "x":14, "y":3}, {"label":"K3E", "x":15, "y":3}, {"label":"K4D", "x":0, "y":4, "w":1.25}, {"label":"K4C", "x":1.25, "y":4, "w":1.25}, {"label":"K4B", "x":2.5, "y":4, "w":1.25}, {"label":"K48", "x":3.75, "y":4, "w":6.25}, {"label":"K44", "x":10, "y":4, "w":1.25}, {"label":"K43", "x":11.25, "y":4, "w":1.25}, {"label":"K42", "x":13, "y":4}, {"label":"K40", "x":14, "y":4}, {"label":"K4E", "x":15, "y":4}] - }, - "LAYOUT": { - "key_count": 67, - "layout": [{"label":"K0D", "x":0, "y":0}, {"label":"K0C", "x":1, "y":0}, {"label":"K0B", "x":2, "y":0}, {"label":"K0A", "x":3, "y":0}, {"label":"K09", "x":4, "y":0}, {"label":"K08", "x":5, "y":0}, {"label":"K07", "x":6, "y":0}, {"label":"K06", "x":7, "y":0}, {"label":"K05", "x":8, "y":0}, {"label":"K04", "x":9, "y":0}, {"label":"K03", "x":10, "y":0}, {"label":"K02", "x":11, "y":0}, {"label":"K01", "x":12, "y":0}, {"label":"K00", "x":13, "y":0, "w":2}, {"label":"K0E", "x":15, "y":0}, {"label":"K1D", "x":0, "y":1, "w":1.5}, {"label":"K1C", "x":1.5, "y":1}, {"label":"K1B", "x":2.5, "y":1}, {"label":"K1A", "x":3.5, "y":1}, {"label":"K19", "x":4.5, "y":1}, {"label":"K18", "x":5.5, "y":1}, {"label":"K17", "x":6.5, "y":1}, {"label":"K16", "x":7.5, "y":1}, {"label":"K15", "x":8.5, "y":1}, {"label":"K14", "x":9.5, "y":1}, {"label":"K13", "x":10.5, "y":1}, {"label":"K12", "x":11.5, "y":1}, {"label":"K11", "x":12.5, "y":1}, {"label":"K10", "x":13.5, "y":1, "w":1.5}, {"label":"K1E", "x":15, "y":1}, {"label":"K2D", "x":0, "y":2, "w":1.75}, {"label":"K2C", "x":1.75, "y":2}, {"label":"K2B", "x":2.75, "y":2}, {"label":"K2A", "x":3.75, "y":2}, {"label":"K29", "x":4.75, "y":2}, {"label":"K28", "x":5.75, "y":2}, {"label":"K27", "x":6.75, "y":2}, {"label":"K26", "x":7.75, "y":2}, {"label":"K25", "x":8.75, "y":2}, {"label":"K24", "x":9.75, "y":2}, {"label":"K23", "x":10.75, "y":2}, {"label":"K22", "x":11.75, "y":2}, {"label":"K21", "x":12.75, "y":2, "w":2.25}, {"label":"K2E", "x":15, "y":2}, {"label":"K3D", "x":0, "y":3, "w":2.25}, {"label":"K3C", "x":2.25, "y":3}, {"label":"K3B", "x":3.25, "y":3}, {"label":"K3A", "x":4.25, "y":3}, {"label":"K39", "x":5.25, "y":3}, {"label":"K38", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K36", "x":8.25, "y":3}, {"label":"K35", "x":9.25, "y":3}, {"label":"K34", "x":10.25, "y":3}, {"label":"K33", "x":11.25, "y":3}, {"label":"K32", "x":12.25, "y":3, "w":1.75}, {"label":"K30", "x":14, "y":3}, {"label":"K3E", "x":15, "y":3}, {"label":"K4D", "x":0, "y":4, "w":1.25}, {"label":"K4C", "x":1.25, "y":4, "w":1.25}, {"label":"K4B", "x":2.5, "y":4, "w":1.25}, {"label":"K48", "x":3.75, "y":4, "w":6.25}, {"label":"K44", "x":10, "y":4, "w":1.25}, {"label":"K43", "x":11.25, "y":4, "w":1.25}, {"label":"K42", "x":13, "y":4}, {"label":"K40", "x":14, "y":4}, {"label":"K4E", "x":15, "y":4}] - } - } -} diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md deleted file mode 100644 index 729ab1a0fa..0000000000 --- a/keyboards/canoe/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -CANOE -======== - -A 65% keyboard with some RGB - -Keyboard Maintainer: QMK Community -Hardware Supported: Canoe -Hardware Availability: https://geekhack.org/index.php?topic=92418.0 - -Make example for this keyboard (after setting up your build environment): - - make canoe:default - -Flashing - -ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. - -Windows: -1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). -2. Place your keyboard into reset. -3. Press the `Find Device` button and ensure that your keyboard is found. -4. Press the `Open .hex File` button and locate the `.hex` file you created. -5. Press the `Flash Device` button and wait for the process to complete. - -macOS: -1. Install homebrew by typing the following: - ``` - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - ``` -2. Install `crosspack-avr`. - ``` - brew cask install crosspack-avr - ``` -3. Install the following packages: - ``` - brew install python - pip install pyusb - brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb - -4. Place your keyboard into reset. -5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. - - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/canoe/rules.mk b/keyboards/canoe/rules.mk deleted file mode 100644 index 3d7bc0215d..0000000000 --- a/keyboards/canoe/rules.mk +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - -# MCU name -MCU = atmega32a -PROTOCOL = VUSB - -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = bootloadHID - -# build options -BOOTMAGIC_ENABLE = full -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes - -OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/canoe/usbconfig.h b/keyboards/canoe/usbconfig.h deleted file mode 100644 index d2d848fcdc..0000000000 --- a/keyboards/canoe/usbconfig.h +++ /dev/null @@ -1,396 +0,0 @@ -/* Name: usbconfig.h - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2005-04-01 - * Tabsize: 4 - * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ - */ - -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ - -#include "config.h" - -/* -General Description: -This file is an example configuration (with inline documentation) for the USB -driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is -also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may -wire the lines to any other port, as long as D+ is also wired to INT0 (or any -other hardware interrupt, as long as it is the highest level interrupt, see -section at the end of this file). -*/ - -/* ---------------------------- Hardware Config ---------------------------- */ - -#define USB_CFG_IOPORTNAME D -/* This is the port where the USB bus is connected. When you configure it to - * "B", the registers PORTB, PINB and DDRB will be used. - */ -#define USB_CFG_DMINUS_BIT 3 -/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. - * This may be any bit in the port. - */ -#define USB_CFG_DPLUS_BIT 2 -/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. - * This may be any bit in the port. Please note that D+ must also be connected - * to interrupt pin INT0! [You can also use other interrupts, see section - * "Optional MCU Description" below, or you can connect D- to the interrupt, as - * it is required if you use the USB_COUNT_SOF feature. If you use D- for the - * interrupt, the USB interrupt will also be triggered at Start-Of-Frame - * markers every millisecond.] - */ -#define USB_CFG_CLOCK_KHZ (F_CPU/1000) -/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, - * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code - * require no crystal, they tolerate +/- 1% deviation from the nominal - * frequency. All other rates require a precision of 2000 ppm and thus a - * crystal! - * Since F_CPU should be defined to your actual clock rate anyway, you should - * not need to modify this setting. - */ -#define USB_CFG_CHECK_CRC 0 -/* Define this to 1 if you want that the driver checks integrity of incoming - * data packets (CRC checks). CRC checks cost quite a bit of code size and are - * currently only available for 18 MHz crystal clock. You must choose - * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. - */ - -/* ----------------------- Optional Hardware Config ------------------------ */ - -/* #define USB_CFG_PULLUP_IOPORTNAME D */ -/* If you connect the 1.5k pullup resistor from D- to a port pin instead of - * V+, you can connect and disconnect the device from firmware by calling - * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). - * This constant defines the port on which the pullup resistor is connected. - */ -/* #define USB_CFG_PULLUP_BIT 4 */ -/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined - * above) where the 1.5k pullup resistor is connected. See description - * above for details. - */ - -/* --------------------------- Functional Range ---------------------------- */ - -#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 -/* Define this to 1 if you want to compile a version with two endpoints: The - * default control endpoint 0 and an interrupt-in endpoint (any other endpoint - * number). - */ -#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 -/* Define this to 1 if you want to compile a version with three endpoints: The - * default control endpoint 0, an interrupt-in endpoint 3 (or the number - * configured below) and a catch-all default interrupt-in endpoint as above. - * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. - */ -#define USB_CFG_EP3_NUMBER 3 -/* If the so-called endpoint 3 is used, it can now be configured to any other - * endpoint number (except 0) with this macro. Default if undefined is 3. - */ -/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ -/* The above macro defines the startup condition for data toggling on the - * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. - * Since the token is toggled BEFORE sending any data, the first packet is - * sent with the oposite value of this configuration! - */ -#define USB_CFG_IMPLEMENT_HALT 0 -/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature - * for endpoint 1 (interrupt endpoint). Although you may not need this feature, - * it is required by the standard. We have made it a config option because it - * bloats the code considerably. - */ -#define USB_CFG_SUPPRESS_INTR_CODE 0 -/* Define this to 1 if you want to declare interrupt-in endpoints, but don't - * want to send any data over them. If this macro is defined to 1, functions - * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if - * you need the interrupt-in endpoints in order to comply to an interface - * (e.g. HID), but never want to send any data. This option saves a couple - * of bytes in flash memory and the transmit buffers in RAM. - */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ -#define USB_CFG_IS_SELF_POWERED 0 -/* Define this to 1 if the device has its own power supply. Set it to 0 if the - * device is powered from the USB bus. - */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ -#define USB_CFG_IMPLEMENT_FN_WRITE 1 -/* Set this to 1 if you want usbFunctionWrite() to be called for control-out - * transfers. Set it to 0 if you don't need it and want to save a couple of - * bytes. - */ -#define USB_CFG_IMPLEMENT_FN_READ 0 -/* Set this to 1 if you need to send control replies which are generated - * "on the fly" when usbFunctionRead() is called. If you only want to send - * data from a static buffer, set it to 0 and return the data from - * usbFunctionSetup(). This saves a couple of bytes. - */ -#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 -/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. - * You must implement the function usbFunctionWriteOut() which receives all - * interrupt/bulk data sent to any endpoint other than 0. The endpoint number - * can be found in 'usbRxToken'. - */ -#define USB_CFG_HAVE_FLOWCONTROL 0 -/* Define this to 1 if you want flowcontrol over USB data. See the definition - * of the macros usbDisableAllRequests() and usbEnableAllRequests() in - * usbdrv.h. - */ -#define USB_CFG_DRIVER_FLASH_PAGE 0 -/* If the device has more than 64 kBytes of flash, define this to the 64 k page - * where the driver's constants (descriptors) are located. Or in other words: - * Define this to 1 for boot loaders on the ATMega128. - */ -#define USB_CFG_LONG_TRANSFERS 0 -/* Define this to 1 if you want to send/receive blocks of more than 254 bytes - * in a single control-in or control-out transfer. Note that the capability - * for long transfers increases the driver size. - */ -/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ -/* This macro is a hook if you want to do unconventional things. If it is - * defined, it's inserted at the beginning of received message processing. - * If you eat the received message and don't want default processing to - * proceed, do a return after doing your things. One possible application - * (besides debugging) is to flash a status LED on each packet. - */ -/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ -/* This macro is a hook if you need to know when an USB RESET occurs. It has - * one parameter which distinguishes between the start of RESET state and its - * end. - */ -/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ -/* This macro (if defined) is executed when a USB SET_ADDRESS request was - * received. - */ -#define USB_COUNT_SOF 1 -/* define this macro to 1 if you need the global variable "usbSofCount" which - * counts SOF packets. This feature requires that the hardware interrupt is - * connected to D- instead of D+. - */ -/* #ifdef __ASSEMBLER__ - * macro myAssemblerMacro - * in YL, TCNT0 - * sts timer0Snapshot, YL - * endm - * #endif - * #define USB_SOF_HOOK myAssemblerMacro - * This macro (if defined) is executed in the assembler module when a - * Start Of Frame condition is detected. It is recommended to define it to - * the name of an assembler macro which is defined here as well so that more - * than one assembler instruction can be used. The macro may use the register - * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages - * immediately after an SOF pulse may be lost and must be retried by the host. - * What can you do with this hook? Since the SOF signal occurs exactly every - * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in - * designs running on the internal RC oscillator. - * Please note that Start Of Frame detection works only if D- is wired to the - * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! - */ -#define USB_CFG_CHECK_DATA_TOGGLING 0 -/* define this macro to 1 if you want to filter out duplicate data packets - * sent by the host. Duplicates occur only as a consequence of communication - * errors, when the host does not receive an ACK. Please note that you need to - * implement the filtering yourself in usbFunctionWriteOut() and - * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable - * for each control- and out-endpoint to check for duplicate packets. - */ -#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 -/* define this macro to 1 if you want the function usbMeasureFrameLength() - * compiled in. This function can be used to calibrate the AVR's RC oscillator. - */ -#define USB_USE_FAST_CRC 0 -/* The assembler module has two implementations for the CRC algorithm. One is - * faster, the other is smaller. This CRC routine is only used for transmitted - * messages where timing is not critical. The faster routine needs 31 cycles - * per byte while the smaller one needs 61 to 69 cycles. The faster routine - * may be worth the 32 bytes bigger code size if you transmit lots of data and - * run the AVR close to its limit. - */ - -/* -------------------------- Device Description --------------------------- */ - -#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) -/* USB vendor ID for the device, low byte first. If you have registered your - * own Vendor ID, define it here. Otherwise you may use one of obdev's free - * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) -/* This is the ID of the product, low byte first. It is interpreted in the - * scope of the vendor ID. If you have registered your own VID with usb.org - * or if you have licensed a PID from somebody else, define it here. Otherwise - * you may use one of obdev's free shared VID/PID pairs. See the file - * USB-IDs-for-free.txt for details! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 -/* Version number of the device: Minor number first, then major number. - */ -#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' -#define USB_CFG_VENDOR_NAME_LEN 13 -/* These two values define the vendor name returned by the USB device. The name - * must be given as a list of characters under single quotes. The characters - * are interpreted as Unicode (UTF-16) entities. - * If you don't want a vendor name string, undefine these macros. - * ALWAYS define a vendor name containing your Internet domain name if you use - * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for - * details. - */ -#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' -#define USB_CFG_DEVICE_NAME_LEN 8 -/* Same as above for the device name. If you don't want a device name, undefine - * the macros. See the file USB-IDs-for-free.txt before you assign a name if - * you use a shared VID/PID. - */ -/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ -/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ -/* Same as above for the serial number. If you don't want a serial number, - * undefine the macros. - * It may be useful to provide the serial number through other means than at - * compile time. See the section about descriptor properties below for how - * to fine tune control over USB descriptors such as the string descriptor - * for the serial number. - */ -#define USB_CFG_DEVICE_CLASS 0 -#define USB_CFG_DEVICE_SUBCLASS 0 -/* See USB specification if you want to conform to an existing device class. - * Class 0xff is "vendor specific". - */ -#define USB_CFG_INTERFACE_CLASS 3 /* HID */ -#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ -#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ -/* See USB specification if you want to conform to an existing device class or - * protocol. The following classes must be set at interface level: - * HID class is 3, no subclass and protocol required (but may be useful!) - * CDC class is 2, use subclass 2 and protocol 1 for ACM - */ -#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 -/* Define this to the length of the HID report descriptor, if you implement - * an HID device. Otherwise don't define it or define it to 0. - * If you use this define, you must add a PROGMEM character array named - * "usbHidReportDescriptor" to your code which contains the report descriptor. - * Don't forget to keep the array and this define in sync! - */ - -/* #define USB_PUBLIC static */ -/* Use the define above if you #include usbdrv.c instead of linking against it. - * This technique saves a couple of bytes in flash memory. - */ - -/* ------------------- Fine Control over USB Descriptors ------------------- */ -/* If you don't want to use the driver's default USB descriptors, you can - * provide our own. These can be provided as (1) fixed length static data in - * flash memory, (2) fixed length static data in RAM or (3) dynamically at - * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more - * information about this function. - * Descriptor handling is configured through the descriptor's properties. If - * no properties are defined or if they are 0, the default descriptor is used. - * Possible properties are: - * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched - * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is - * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if - * you want RAM pointers. - * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found - * in static memory is in RAM, not in flash memory. - * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), - * the driver must know the descriptor's length. The descriptor itself is - * found at the address of a well known identifier (see below). - * List of static descriptor names (must be declared PROGMEM if in flash): - * char usbDescriptorDevice[]; - * char usbDescriptorConfiguration[]; - * char usbDescriptorHidReport[]; - * char usbDescriptorString0[]; - * int usbDescriptorStringVendor[]; - * int usbDescriptorStringDevice[]; - * int usbDescriptorStringSerialNumber[]; - * Other descriptors can't be provided statically, they must be provided - * dynamically at runtime. - * - * Descriptor properties are or-ed or added together, e.g.: - * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) - * - * The following descriptors are defined: - * USB_CFG_DESCR_PROPS_DEVICE - * USB_CFG_DESCR_PROPS_CONFIGURATION - * USB_CFG_DESCR_PROPS_STRINGS - * USB_CFG_DESCR_PROPS_STRING_0 - * USB_CFG_DESCR_PROPS_STRING_VENDOR - * USB_CFG_DESCR_PROPS_STRING_PRODUCT - * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER - * USB_CFG_DESCR_PROPS_HID - * USB_CFG_DESCR_PROPS_HID_REPORT - * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) - * - * Note about string descriptors: String descriptors are not just strings, they - * are Unicode strings prefixed with a 2 byte header. Example: - * int serialNumberDescriptor[] = { - * USB_STRING_DESCRIPTOR_HEADER(6), - * 'S', 'e', 'r', 'i', 'a', 'l' - * }; - */ - -#define USB_CFG_DESCR_PROPS_DEVICE 0 -#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 -#define USB_CFG_DESCR_PROPS_STRINGS 0 -#define USB_CFG_DESCR_PROPS_STRING_0 0 -#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 -#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 -#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 -#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID 0 -#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 -#define USB_CFG_DESCR_PROPS_UNKNOWN 0 - -#define usbMsgPtr_t unsigned short -/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to - * a scalar type here because gcc generates slightly shorter code for scalar - * arithmetics than for pointer arithmetics. Remove this define for backward - * type compatibility or define it to an 8 bit type if you use data in RAM only - * and all RAM is below 256 bytes (tiny memory model in IAR CC). - */ - -/* ----------------------- Optional MCU Description ------------------------ */ - -/* The following configurations have working defaults in usbdrv.h. You - * usually don't need to set them explicitly. Only if you want to run - * the driver on a device which is not yet supported or with a compiler - * which is not fully supported (such as IAR C) or if you use a differnt - * interrupt than INT0, you may have to define some of these. - */ -/* #define USB_INTR_CFG MCUCR */ -/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE GIMSK */ -/* #define USB_INTR_ENABLE_BIT INT0 */ -/* #define USB_INTR_PENDING GIFR */ -/* #define USB_INTR_PENDING_BIT INTF0 */ -/* #define USB_INTR_VECTOR INT0_vect */ - -/* Set INT1 for D- falling edge to count SOF */ -/* #define USB_INTR_CFG EICRA */ -#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE EIMSK */ -#define USB_INTR_ENABLE_BIT INT1 -/* #define USB_INTR_PENDING EIFR */ -#define USB_INTR_PENDING_BIT INTF1 -#define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/catch22/keymaps/default/keymap.c b/keyboards/catch22/keymaps/default/keymap.c index 3216c02707..abe88df23c 100644 --- a/keyboards/catch22/keymaps/default/keymap.c +++ b/keyboards/catch22/keymaps/default/keymap.c @@ -19,8 +19,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______ \ ), }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function -{ - return MACRO_NONE; -}; diff --git a/keyboards/catch22/rules.mk b/keyboards/catch22/rules.mk index 2b76e465cf..227117b766 100644 --- a/keyboards/catch22/rules.mk +++ b/keyboards/catch22/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -57,4 +24,3 @@ NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. - diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c deleted file mode 100644 index 2809c9d184..0000000000 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { -} diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h deleted file mode 100644 index b31d74307b..0000000000 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOC_LED 13 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk deleted file mode 100644 index 6b8b312fd9..0000000000 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/mini_stm32_mapping.png b/keyboards/chibios_test/boards/GENERIC_STM32_F103/mini_stm32_mapping.png deleted file mode 100644 index c44a7d9ebc..0000000000 Binary files a/keyboards/chibios_test/boards/GENERIC_STM32_F103/mini_stm32_mapping.png and /dev/null differ diff --git a/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.c deleted file mode 100644 index 7e9f90853e..0000000000 --- a/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#include "hal.h" - -#if HAL_USE_PAL || defined(__DOXYGEN__) -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -const PALConfig pal_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} -#endif -}; -#endif - -void enter_bootloader_mode_if_requested(void); - -/** - * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. - */ -void __early_init(void) { - enter_bootloader_mode_if_requested(); - stm32_clock_init(); -} - - - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) { -} diff --git a/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.h deleted file mode 100644 index 173f7b6054..0000000000 --- a/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.h +++ /dev/null @@ -1,923 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#ifndef BOARD_H -#define BOARD_H - -/* - * Setup for ST STM32F072B-Discovery board. - */ - -/* - * Board identifier. - */ -#define BOARD_ST_STM32F072B_DISCOVERY -#define BOARD_NAME "ST STM32F072B-Discovery" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - * NOTE: HSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 0U -#endif - -#define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F072xB - -/* - * IO pins assignments. - */ -#define GPIOA_BUTTON 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_USB_DM 11U -#define GPIOA_USB_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_SPI2_SCK 13U -#define GPIOB_SPI2_MISO 14U -#define GPIOB_SPI2_MOSI 15U - -#define GPIOC_MEMS_CS 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_LED_RED 6U -#define GPIOC_LED_BLUE 7U -#define GPIOC_LED_ORANGE 8U -#define GPIOC_LED_GREEN 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_OSC32_IN 14U -#define GPIOC_OSC32_OUT 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_OSC_IN 0U -#define GPIOF_OSC_OUT 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_BUTTON PAL_LINE(GPIOA, 0U) -#define LINE_USB_DM PAL_LINE(GPIOA, 11U) -#define LINE_USB_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) - -#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) -#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) -#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) - -#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) -#define LINE_LED_RED PAL_LINE(GPIOC, 6U) -#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) -#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) -#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) -#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) -#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) - - - -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - BUTTON (input floating). - * PA1 - PIN1 (input pullup). - * PA2 - PIN2 (input pullup). - * PA3 - PIN3 (input pullup). - * PA4 - PIN4 (input pullup). - * PA5 - PIN5 (input pullup). - * PA6 - PIN6 (input pullup). - * PA7 - PIN7 (input pullup). - * PA8 - PIN8 (input pullup). - * PA9 - PIN9 (input pullup). - * PA10 - PIN10 (input pullup). - * PA11 - USB_DM (input floating). - * PA12 - USB_DP (input floating). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - PIN15 (input pullup). - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ - PIN_MODE_INPUT(GPIOA_PIN1) | \ - PIN_MODE_INPUT(GPIOA_PIN2) | \ - PIN_MODE_INPUT(GPIOA_PIN3) | \ - PIN_MODE_INPUT(GPIOA_PIN4) | \ - PIN_MODE_INPUT(GPIOA_PIN5) | \ - PIN_MODE_INPUT(GPIOA_PIN6) | \ - PIN_MODE_INPUT(GPIOA_PIN7) | \ - PIN_MODE_INPUT(GPIOA_PIN8) | \ - PIN_MODE_INPUT(GPIOA_PIN9) | \ - PIN_MODE_INPUT(GPIOA_PIN10) | \ - PIN_MODE_INPUT(GPIOA_USB_DM) | \ - PIN_MODE_INPUT(GPIOA_USB_DP) | \ - PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ - PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ - PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ - PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_PIN4) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_USB_DM) | \ - PIN_ODR_HIGH(GPIOA_USB_DP) | \ - PIN_ODR_HIGH(GPIOA_SWDIO) | \ - PIN_ODR_HIGH(GPIOA_SWCLK) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN7, 0U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0U)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (input pullup). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 (input pullup). - * PB7 - PIN7 (input pullup). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - SPI2_SCK (alternate 0). - * PB14 - SPI2_MISO (alternate 0). - * PB15 - SPI2_MOSI (alternate 0). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_INPUT(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_INPUT(GPIOB_PIN6) | \ - PIN_MODE_INPUT(GPIOB_PIN7) | \ - PIN_MODE_INPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ - PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ - PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ - PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ - PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_HIGH(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_HIGH(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ - PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ - PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ - PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ - PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_PIN3) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_HIGH(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ - PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ - PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ - PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ - PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) - -/* - * GPIOC setup: - * - * PC0 - MEMS_CS (output pushpull maximum). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - LED_RED (output pushpull maximum). - * PC7 - LED_BLUE (output pushpull maximum). - * PC8 - LED_ORANGE (output pushpull maximum). - * PC9 - LED_GREEN (output pushpull maximum). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - OSC32_IN (input floating). - * PC15 - OSC32_OUT (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ - PIN_MODE_INPUT(GPIOC_PIN1) | \ - PIN_MODE_INPUT(GPIOC_PIN2) | \ - PIN_MODE_INPUT(GPIOC_PIN3) | \ - PIN_MODE_INPUT(GPIOC_PIN4) | \ - PIN_MODE_INPUT(GPIOC_PIN5) | \ - PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ - PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ - PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ - PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ - PIN_MODE_INPUT(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ - PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ - PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ - PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ - PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ - PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ - PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ - PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ - PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ - PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ - PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ - PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ - PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ - PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_LOW(GPIOC_LED_RED) | \ - PIN_ODR_LOW(GPIOC_LED_BLUE) | \ - PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ - PIN_ODR_LOW(GPIOC_LED_GREEN) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ - PIN_ODR_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ - PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ - PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ - PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - PIN4 (input pullup). - * PD5 - PIN5 (input pullup). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD10 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - PIN12 (input pullup). - * PD13 - PIN13 (input pullup). - * PD14 - PIN14 (input pullup). - * PD15 - PIN15 (input pullup). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ - PIN_MODE_INPUT(GPIOD_PIN1) | \ - PIN_MODE_INPUT(GPIOD_PIN2) | \ - PIN_MODE_INPUT(GPIOD_PIN3) | \ - PIN_MODE_INPUT(GPIOD_PIN4) | \ - PIN_MODE_INPUT(GPIOD_PIN5) | \ - PIN_MODE_INPUT(GPIOD_PIN6) | \ - PIN_MODE_INPUT(GPIOD_PIN7) | \ - PIN_MODE_INPUT(GPIOD_PIN8) | \ - PIN_MODE_INPUT(GPIOD_PIN9) | \ - PIN_MODE_INPUT(GPIOD_PIN10) | \ - PIN_MODE_INPUT(GPIOD_PIN11) | \ - PIN_MODE_INPUT(GPIOD_PIN12) | \ - PIN_MODE_INPUT(GPIOD_PIN13) | \ - PIN_MODE_INPUT(GPIOD_PIN14) | \ - PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_PIN4) | \ - PIN_ODR_HIGH(GPIOD_PIN5) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_HIGH(GPIOD_PIN12) | \ - PIN_ODR_HIGH(GPIOD_PIN13) | \ - PIN_ODR_HIGH(GPIOD_PIN14) | \ - PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0U)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0U)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 (input pullup). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (input pullup). - * PE9 - PIN9 (input pullup). - * PE10 - PIN10 (input pullup). - * PE11 - PIN11 (input pullup). - * PE12 - PIN12 (input pullup). - * PE13 - PIN13 (input pullup). - * PE14 - PIN14 (input pullup). - * PE15 - PIN15 (input pullup). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) | \ - PIN_MODE_INPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) | \ - PIN_MODE_INPUT(GPIOE_PIN5) | \ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_INPUT(GPIOE_PIN8) | \ - PIN_MODE_INPUT(GPIOE_PIN9) | \ - PIN_MODE_INPUT(GPIOE_PIN10) | \ - PIN_MODE_INPUT(GPIOE_PIN11) | \ - PIN_MODE_INPUT(GPIOE_PIN12) | \ - PIN_MODE_INPUT(GPIOE_PIN13) | \ - PIN_MODE_INPUT(GPIOE_PIN14) | \ - PIN_MODE_INPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_HIGH(GPIOE_PIN8) | \ - PIN_ODR_HIGH(GPIOE_PIN9) | \ - PIN_ODR_HIGH(GPIOE_PIN10) | \ - PIN_ODR_HIGH(GPIOE_PIN11) | \ - PIN_ODR_HIGH(GPIOE_PIN12) | \ - PIN_ODR_HIGH(GPIOE_PIN13) | \ - PIN_ODR_HIGH(GPIOE_PIN14) | \ - PIN_ODR_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0U)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0U)) - -/* - * GPIOF setup: - * - * PF0 - OSC_IN (input floating). - * PF1 - OSC_OUT (input floating). - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ - PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ - PIN_MODE_INPUT(GPIOF_PIN2) | \ - PIN_MODE_INPUT(GPIOF_PIN3) | \ - PIN_MODE_INPUT(GPIOF_PIN4) | \ - PIN_MODE_INPUT(GPIOF_PIN5) | \ - PIN_MODE_INPUT(GPIOF_PIN6) | \ - PIN_MODE_INPUT(GPIOF_PIN7) | \ - PIN_MODE_INPUT(GPIOF_PIN8) | \ - PIN_MODE_INPUT(GPIOF_PIN9) | \ - PIN_MODE_INPUT(GPIOF_PIN10) | \ - PIN_MODE_INPUT(GPIOF_PIN11) | \ - PIN_MODE_INPUT(GPIOF_PIN12) | \ - PIN_MODE_INPUT(GPIOF_PIN13) | \ - PIN_MODE_INPUT(GPIOF_PIN14) | \ - PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ - PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ - PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ - PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ - PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ - PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0U)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0U)) - - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* BOARD_H */ diff --git a/keyboards/chibios_test/boards/maple_mini_mapping.png b/keyboards/chibios_test/boards/maple_mini_mapping.png deleted file mode 100644 index 12cfa81db2..0000000000 Binary files a/keyboards/chibios_test/boards/maple_mini_mapping.png and /dev/null differ diff --git a/keyboards/chibios_test/chibios_test.c b/keyboards/chibios_test/chibios_test.c deleted file mode 100644 index efe2d4a5d6..0000000000 --- a/keyboards/chibios_test/chibios_test.c +++ /dev/null @@ -1 +0,0 @@ -#include "chibios_test.h" diff --git a/keyboards/chibios_test/chibios_test.h b/keyboards/chibios_test/chibios_test.h deleted file mode 100644 index 9fc996ff75..0000000000 --- a/keyboards/chibios_test/chibios_test.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef KEYBOARDS_CHIBIOS_TEST_CHIBIOS_TEST_H_ -#define KEYBOARDS_CHIBIOS_TEST_CHIBIOS_TEST_H_ - -#include "quantum.h" - -#define LAYOUT(k00) {{ k00 }} - -#endif /* KEYBOARDS_CHIBIOS_TEST_CHIBIOS_TEST_H_ */ diff --git a/keyboards/chibios_test/config.h b/keyboards/chibios_test/config.h deleted file mode 100644 index 91350c4457..0000000000 --- a/keyboards/chibios_test/config.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2015 Jun Wako - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6464 -#define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ -#define MANUFACTURER QMK -#define PRODUCT ChibiOS QMK test -#define DESCRIPTION QMK keyboard firmware test for ChibiOS - -/* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 1 -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/chibios_test/keymaps/default/keymap.c b/keyboards/chibios_test/keymaps/default/keymap.c deleted file mode 100644 index 0edc697bf9..0000000000 --- a/keyboards/chibios_test/keymaps/default/keymap.c +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako - -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 . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - {{KC_CAPS}}, // test with KC_CAPS, KC_A, RESET -}; diff --git a/keyboards/chibios_test/ld/MKL26Z64.ld b/keyboards/chibios_test/ld/MKL26Z64.ld deleted file mode 100644 index c4ca8b874c..0000000000 --- a/keyboards/chibios_test/ld/MKL26Z64.ld +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com - * (C) 2016 flabbergast - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * KL26Z64 memory setup. - */ -MEMORY -{ - flash0 : org = 0x00000000, len = 0x100 - flash1 : org = 0x00000400, len = 0x10 - flash2 : org = 0x00000410, len = 62k - 0x410 - flash3 : org = 0x0000F800, len = 2k - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x1FFFF800, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* Flash region for the configuration bytes.*/ -SECTIONS -{ - .cfmprotect : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.cfmconfig)) - } > flash1 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash2); -REGION_ALIAS("XTORS_FLASH_LMA", flash2); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash2); -REGION_ALIAS("TEXT_FLASH_LMA", flash2); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash2); -REGION_ALIAS("RODATA_FLASH_LMA", flash2); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash2); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash2); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -__eeprom_workarea_start__ = ORIGIN(flash3); -__eeprom_workarea_size__ = LENGTH(flash3); -__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index f9bfe9c005..0000000000 --- a/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null @@ -1,88 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 128k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/chibios_test/readme.md b/keyboards/chibios_test/readme.md deleted file mode 100644 index 096ecd6aea..0000000000 --- a/keyboards/chibios_test/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# ChibiOS Test Keyboards - -Test code for several ARM based ChibiOS boards \ No newline at end of file diff --git a/keyboards/chibios_test/rules.mk b/keyboards/chibios_test/rules.mk deleted file mode 100644 index 45f03be020..0000000000 --- a/keyboards/chibios_test/rules.mk +++ /dev/null @@ -1,10 +0,0 @@ -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = yes # Custom matrix file - -DEFAULT_FOLDER = chibios_test/stm32_f072_onekey \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f072_onekey/config.h b/keyboards/chibios_test/stm32_f072_onekey/config.h deleted file mode 100644 index bbaf0dc4bf..0000000000 --- a/keyboards/chibios_test/stm32_f072_onekey/config.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef KEYBOARDS_CHIBIOS_TEST_STM32_F072_ONEKEY_CONFIG_H_ -#define KEYBOARDS_CHIBIOS_TEST_STM32_F072_ONEKEY_CONFIG_H_ - -#include "../config.h" - - -#endif /* KEYBOARDS_CHIBIOS_TEST_STM32_F072_ONEKEY_CONFIG_H_ */ diff --git a/keyboards/chibios_test/stm32_f072_onekey/led.c b/keyboards/chibios_test/stm32_f072_onekey/led.c deleted file mode 100644 index 18edb8ba89..0000000000 --- a/keyboards/chibios_test/stm32_f072_onekey/led.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#include "hal.h" - -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - (void)usb_led; - if (usb_led & (1< - -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 . -*/ - -#include "ch.h" -#include "hal.h" - -/* - * scan matrix - */ -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "wait.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -#define LED_ON() do { palSetPad(GPIOC, GPIOC_LED_BLUE) ;} while (0) -#define LED_OFF() do { palClearPad(GPIOC, GPIOC_LED_BLUE); } while (0) -#define LED_TGL() do { palTogglePad(GPIOC, GPIOC_LED_BLUE); } while (0) - -void matrix_init(void) -{ - // initialize row and col - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - //debug - debug_matrix = true; - LED_ON(); - wait_ms(500); - LED_OFF(); -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - wait_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - wait_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf -# This also requires a patch to chibios: -# /tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 - -# Build Options -# comment out to disable the options. -# \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.c b/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.c deleted file mode 100644 index 820d062ffd..0000000000 --- a/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.c +++ /dev/null @@ -1 +0,0 @@ -#include "stm32_f072_onekey.h" diff --git a/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.h b/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.h deleted file mode 100644 index 345bf3bede..0000000000 --- a/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef STM32_F072_ONEKEY_H -#define STM32_F072_ONEKEY_H -#include "chibios_test.h" - -#define LAYOUT(k00) {{ k00 }} - -#endif diff --git a/keyboards/chibios_test/stm32_f103_onekey/bootloader_defs.h b/keyboards/chibios_test/stm32_f103_onekey/bootloader_defs.h deleted file mode 100644 index 0f45203cb6..0000000000 --- a/keyboards/chibios_test/stm32_f103_onekey/bootloader_defs.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103* does NOT have an USB bootloader in ROM (only serial), -// so setting anything here does not make much sense -// #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/chibios_test/stm32_f103_onekey/chconf.h b/keyboards/chibios_test/stm32_f103_onekey/chconf.h deleted file mode 100644 index dfb1f9dfb9..0000000000 --- a/keyboards/chibios_test/stm32_f103_onekey/chconf.h +++ /dev/null @@ -1,524 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/chconf.h - * @brief Configuration file template. - * @details A copy of this file must be placed in each project directory, it - * contains the application specific kernel settings. - * - * @addtogroup config - * @details Kernel related settings and hooks. - * @{ - */ - -#ifndef CHCONF_H -#define CHCONF_H - -#define _CHIBIOS_RT_CONF_ - -/*===========================================================================*/ -/** - * @name System timers settings - * @{ - */ -/*===========================================================================*/ - -/** - * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. - */ -#define CH_CFG_ST_RESOLUTION 16 - -/** - * @brief System tick frequency. - * @details Frequency of the system timer that drives the system ticks. This - * setting also defines the system tick time unit. - */ -#define CH_CFG_ST_FREQUENCY 2000 - -/** - * @brief Time delta constant for the tick-less mode. - * @note If this value is zero then the system uses the classic - * periodic tick. This value represents the minimum number - * of ticks that is safe to specify in a timeout directive. - * The value one is not valid, timeouts are rounded up to - * this value. - */ -#define CH_CFG_ST_TIMEDELTA 2 - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel parameters and options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Round robin interval. - * @details This constant is the number of system ticks allowed for the - * threads before preemption occurs. Setting this value to zero - * disables the preemption for threads with equal priority and the - * round robin becomes cooperative. Note that higher priority - * threads can still preempt, the kernel is always preemptive. - * @note Disabling the round robin preemption makes the kernel more compact - * and generally faster. - * @note The round robin preemption is not supported in tickless mode and - * must be set to zero in that case. - */ -#define CH_CFG_TIME_QUANTUM 0 - -/** - * @brief Managed RAM size. - * @details Size of the RAM area to be managed by the OS. If set to zero - * then the whole available RAM is used. The core memory is made - * available to the heap allocator and/or can be used directly through - * the simplified core memory allocator. - * - * @note In order to let the OS manage the whole RAM the linker script must - * provide the @p __heap_base__ and @p __heap_end__ symbols. - * @note Requires @p CH_CFG_USE_MEMCORE. - */ -#define CH_CFG_MEMCORE_SIZE 0 - -/** - * @brief Idle thread automatic spawn suppression. - * @details When this option is activated the function @p chSysInit() - * does not spawn the idle thread. The application @p main() - * function becomes the idle thread and must implement an - * infinite loop. - */ -#define CH_CFG_NO_IDLE_THREAD FALSE - -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Performance options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief OS optimization. - * @details If enabled then time efficient rather than space efficient code - * is used when two possible implementations exist. - * - * @note This is not related to the compiler optimization options. - * @note The default is @p TRUE. - */ -#define CH_CFG_OPTIMIZE_SPEED TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Subsystem options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Time Measurement APIs. - * @details If enabled then the time measurement APIs are included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_TM FALSE - -/** - * @brief Threads registry APIs. - * @details If enabled then the registry APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_REGISTRY TRUE - -/** - * @brief Threads synchronization APIs. - * @details If enabled then the @p chThdWait() function is included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_WAITEXIT TRUE - -/** - * @brief Semaphores APIs. - * @details If enabled then the Semaphores APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_SEMAPHORES TRUE - -/** - * @brief Semaphores queuing mode. - * @details If enabled then the threads are enqueued on semaphores by - * priority rather than in FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE - -/** - * @brief Mutexes APIs. - * @details If enabled then the mutexes APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MUTEXES TRUE - -/** - * @brief Enables recursive behavior on mutexes. - * @note Recursive mutexes are heavier and have an increased - * memory footprint. - * - * @note The default is @p FALSE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE - -/** - * @brief Conditional Variables APIs. - * @details If enabled then the conditional variables APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_CONDVARS TRUE - -/** - * @brief Conditional Variables APIs with timeout. - * @details If enabled then the conditional variables APIs with timeout - * specification are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_CONDVARS. - */ -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -/** - * @brief Events Flags APIs. - * @details If enabled then the event flags APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_EVENTS TRUE - -/** - * @brief Events Flags APIs with timeout. - * @details If enabled then the events APIs with timeout specification - * are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_EVENTS. - */ -#define CH_CFG_USE_EVENTS_TIMEOUT TRUE - -/** - * @brief Synchronous Messages APIs. - * @details If enabled then the synchronous messages APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MESSAGES TRUE - -/** - * @brief Synchronous Messages queuing mode. - * @details If enabled then messages are served by priority rather than in - * FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_MESSAGES. - */ -#define CH_CFG_USE_MESSAGES_PRIORITY FALSE - -/** - * @brief Mailboxes APIs. - * @details If enabled then the asynchronous messages (mailboxes) APIs are - * included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_MAILBOXES TRUE - -/** - * @brief Core Memory Manager APIs. - * @details If enabled then the core memory manager APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMCORE TRUE - -/** - * @brief Heap Allocator APIs. - * @details If enabled then the memory heap allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or - * @p CH_CFG_USE_SEMAPHORES. - * @note Mutexes are recommended. - */ -#define CH_CFG_USE_HEAP TRUE - -/** - * @brief Memory Pools Allocator APIs. - * @details If enabled then the memory pools allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMPOOLS FALSE - -/** - * @brief Dynamic Threads APIs. - * @details If enabled then the dynamic threads creation APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_WAITEXIT. - * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. - */ -#define CH_CFG_USE_DYNAMIC FALSE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Debug options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Debug option, kernel statistics. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_STATISTICS FALSE - -/** - * @brief Debug option, system state check. - * @details If enabled the correct call protocol for system APIs is checked - * at runtime. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_SYSTEM_STATE_CHECK FALSE - -/** - * @brief Debug option, parameters checks. - * @details If enabled then the checks on the API functions input - * parameters are activated. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_CHECKS FALSE - -/** - * @brief Debug option, consistency checks. - * @details If enabled then all the assertions in the kernel code are - * activated. This includes consistency checks inside the kernel, - * runtime anomalies and port-defined checks. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_ASSERTS FALSE - -/** - * @brief Debug option, trace buffer. - * @details If enabled then the trace buffer is activated. - * - * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED - -/** - * @brief Trace buffer entries. - * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is - * different from @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_BUFFER_SIZE 128 - -/** - * @brief Debug option, stack checks. - * @details If enabled then a runtime stack check is performed. - * - * @note The default is @p FALSE. - * @note The stack check is performed in a architecture/port dependent way. - * It may not be implemented or some ports. - * @note The default failure mode is to halt the system with the global - * @p panic_msg variable set to @p NULL. - */ -#define CH_DBG_ENABLE_STACK_CHECK FALSE - -/** - * @brief Debug option, stacks initialization. - * @details If enabled then the threads working area is filled with a byte - * value when a thread is created. This can be useful for the - * runtime measurement of the used stack. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_FILL_THREADS FALSE - -/** - * @brief Debug option, threads profiling. - * @details If enabled then a field is added to the @p thread_t structure that - * counts the system ticks occurred while executing the thread. - * - * @note The default is @p FALSE. - * @note This debug option is not currently compatible with the - * tickless mode. - */ -#define CH_DBG_THREADS_PROFILING FALSE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel hooks - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Threads descriptor structure extension. - * @details User fields added to the end of the @p thread_t structure. - */ -#define CH_CFG_THREAD_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ - -/** - * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. - * - * @note It is invoked from within @p chThdInit() and implicitly from all - * the threads creation APIs. - */ -#define CH_CFG_THREAD_INIT_HOOK(tp) { \ - /* Add threads initialization code here.*/ \ -} - -/** - * @brief Threads finalization hook. - * @details User finalization code added to the @p chThdExit() API. - */ -#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ - /* Add threads finalization code here.*/ \ -} - -/** - * @brief Context switch hook. - * @details This hook is invoked just before switching between threads. - */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* Context switch code here.*/ \ -} - -/** - * @brief ISR enter hook. - */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ - /* IRQ prologue code here.*/ \ -} - -/** - * @brief ISR exit hook. - */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ - /* IRQ epilogue code here.*/ \ -} - -/** - * @brief Idle thread enter hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to activate a power saving mode. - */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ - /* Idle-enter code here.*/ \ -} - -/** - * @brief Idle thread leave hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to deactivate a power saving mode. - */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ - /* Idle-leave code here.*/ \ -} - -/** - * @brief Idle Loop hook. - * @details This hook is continuously invoked by the idle thread loop. - */ -#define CH_CFG_IDLE_LOOP_HOOK() { \ - /* Idle loop code here.*/ \ -} - -/** - * @brief System tick event hook. - * @details This hook is invoked in the system tick handler immediately - * after processing the virtual timers queue. - */ -#define CH_CFG_SYSTEM_TICK_HOOK() { \ - /* System tick event code here.*/ \ -} - -/** - * @brief System halt hook. - * @details This hook is invoked in case to a system halting error before - * the system is halted. - */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* System halt code here.*/ \ -} - -/** - * @brief Trace hook. - * @details This hook is invoked each time a new record is written in the - * trace buffer. - */ -#define CH_CFG_TRACE_HOOK(tep) { \ - /* Trace code here.*/ \ -} - -/** @} */ - -/*===========================================================================*/ -/* Port-specific settings (override port settings defaulted in chcore.h). */ -/*===========================================================================*/ - -#endif /* CHCONF_H */ - -/** @} */ diff --git a/keyboards/chibios_test/stm32_f103_onekey/config.h b/keyboards/chibios_test/stm32_f103_onekey/config.h deleted file mode 100644 index de0b906f35..0000000000 --- a/keyboards/chibios_test/stm32_f103_onekey/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef KEYBOARDS_CHIBIOS_TEST_STM32_F103_ONEKEY_CONFIG_H_ -#define KEYBOARDS_CHIBIOS_TEST_STM32_F103_ONEKEY_CONFIG_H_ - -#include "../config.h" - -#endif /* KEYBOARDS_CHIBIOS_TEST_STM32_F103_ONEKEY_CONFIG_H_ */ diff --git a/keyboards/chibios_test/stm32_f103_onekey/flash.sh b/keyboards/chibios_test/stm32_f103_onekey/flash.sh deleted file mode 100755 index 15501dfa57..0000000000 --- a/keyboards/chibios_test/stm32_f103_onekey/flash.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -Arduino_STM32_usb_hid/tools/linux/maple_upload ttyACM0 2 1EAF:0003 build/ch.bin diff --git a/keyboards/chibios_test/stm32_f103_onekey/halconf.h b/keyboards/chibios_test/stm32_f103_onekey/halconf.h deleted file mode 100644 index 8b9724b1a3..0000000000 --- a/keyboards/chibios_test/stm32_f103_onekey/halconf.h +++ /dev/null @@ -1,353 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. - * - * @addtogroup HAL_CONF - * @{ - */ - -#ifndef _HALCONF_H_ -#define _HALCONF_H_ - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE -#endif - -/** - * @brief Enables the EXT subsystem. - */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/*===========================================================================*/ -/* ADC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* CAN driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Sleep mode related APIs inclusion switch. - */ -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif - -/*===========================================================================*/ -/* I2C driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the mutual exclusion APIs on the I2C bus. - */ -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* MAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE -#endif - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -#define MAC_USE_EVENTS TRUE -#endif - -/*===========================================================================*/ -/* MMC_SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - * This option is recommended also if the SPI driver does not - * use a DMA channel and heavily loads the CPU. - */ -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SDC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Number of initialization attempts before rejecting the card. - * @note Attempts are performed at 10mS intervals. - */ -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 -#endif - -/** - * @brief Include support for MMC cards. - * @note MMC support is not yet implemented so this option must be kept - * at @p FALSE. - */ -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE -#endif - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - */ -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SERIAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Serial buffers size. - * @details Configuration parameter, you can change the depth of the queue - * buffers depending on the requirements of your application. - * @note The default is 64 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 64 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 -#endif - -/*===========================================================================*/ -/* SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define SPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -#endif /* _HALCONF_H_ */ - -/** @} */ diff --git a/keyboards/chibios_test/stm32_f103_onekey/led.c b/keyboards/chibios_test/stm32_f103_onekey/led.c deleted file mode 100644 index f5c55f7d9b..0000000000 --- a/keyboards/chibios_test/stm32_f103_onekey/led.c +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#include "hal.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1< - -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 . -*/ - -#include "ch.h" -#include "hal.h" - -/* - * scan matrix - */ -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "wait.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -/* generic STM32F103C8T6 board */ -#ifdef BOARD_GENERIC_STM32_F103 -#define LED_ON() do { palClearPad(GPIOC, GPIOC_LED) ;} while (0) -#define LED_OFF() do { palSetPad(GPIOC, GPIOC_LED); } while (0) -#define LED_TGL() do { palTogglePad(GPIOC, GPIOC_LED); } while (0) -#endif - -/* Maple Mini */ -#ifdef BOARD_MAPLEMINI_STM32_F103 -#define LED_ON() do { palSetPad(GPIOB, 1) ;} while (0) -#define LED_OFF() do { palClearPad(GPIOB, 1); } while (0) -#define LED_TGL() do { palTogglePad(GPIOB, 1); } while (0) -#endif - -void matrix_init(void) -{ - // initialize row and col - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - //debug - debug_matrix = true; - LED_ON(); - wait_ms(500); - LED_OFF(); -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - wait_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - wait_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf -# This also requires a patch to chibios: -# /tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.c b/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.c deleted file mode 100644 index 7fa99bb28d..0000000000 --- a/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.c +++ /dev/null @@ -1 +0,0 @@ -#include "stm32_f103_onekey.h" diff --git a/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.h b/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.h deleted file mode 100644 index b9ba65a9e9..0000000000 --- a/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef STM32_F103_ONEKEY_H -#define STM32_F103_ONEKEY_H -#include "chibios_test.h" - -#define LAYOUT(k00) {{ k00 }} - -#endif diff --git a/keyboards/chibios_test/teensy_lc_onekey/chconf.h b/keyboards/chibios_test/teensy_lc_onekey/chconf.h deleted file mode 100644 index 3294ac7eee..0000000000 --- a/keyboards/chibios_test/teensy_lc_onekey/chconf.h +++ /dev/null @@ -1,524 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/chconf.h - * @brief Configuration file template. - * @details A copy of this file must be placed in each project directory, it - * contains the application specific kernel settings. - * - * @addtogroup config - * @details Kernel related settings and hooks. - * @{ - */ - -#ifndef CHCONF_H -#define CHCONF_H - -#define _CHIBIOS_RT_CONF_ - -/*===========================================================================*/ -/** - * @name System timers settings - * @{ - */ -/*===========================================================================*/ - -/** - * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. - */ -#define CH_CFG_ST_RESOLUTION 32 - -/** - * @brief System tick frequency. - * @details Frequency of the system timer that drives the system ticks. This - * setting also defines the system tick time unit. - */ -#define CH_CFG_ST_FREQUENCY 1000 - -/** - * @brief Time delta constant for the tick-less mode. - * @note If this value is zero then the system uses the classic - * periodic tick. This value represents the minimum number - * of ticks that is safe to specify in a timeout directive. - * The value one is not valid, timeouts are rounded up to - * this value. - */ -#define CH_CFG_ST_TIMEDELTA 0 - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel parameters and options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Round robin interval. - * @details This constant is the number of system ticks allowed for the - * threads before preemption occurs. Setting this value to zero - * disables the preemption for threads with equal priority and the - * round robin becomes cooperative. Note that higher priority - * threads can still preempt, the kernel is always preemptive. - * @note Disabling the round robin preemption makes the kernel more compact - * and generally faster. - * @note The round robin preemption is not supported in tickless mode and - * must be set to zero in that case. - */ -#define CH_CFG_TIME_QUANTUM 20 - -/** - * @brief Managed RAM size. - * @details Size of the RAM area to be managed by the OS. If set to zero - * then the whole available RAM is used. The core memory is made - * available to the heap allocator and/or can be used directly through - * the simplified core memory allocator. - * - * @note In order to let the OS manage the whole RAM the linker script must - * provide the @p __heap_base__ and @p __heap_end__ symbols. - * @note Requires @p CH_CFG_USE_MEMCORE. - */ -#define CH_CFG_MEMCORE_SIZE 0 - -/** - * @brief Idle thread automatic spawn suppression. - * @details When this option is activated the function @p chSysInit() - * does not spawn the idle thread. The application @p main() - * function becomes the idle thread and must implement an - * infinite loop. - */ -#define CH_CFG_NO_IDLE_THREAD FALSE - -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Performance options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief OS optimization. - * @details If enabled then time efficient rather than space efficient code - * is used when two possible implementations exist. - * - * @note This is not related to the compiler optimization options. - * @note The default is @p TRUE. - */ -#define CH_CFG_OPTIMIZE_SPEED TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Subsystem options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Time Measurement APIs. - * @details If enabled then the time measurement APIs are included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_TM FALSE - -/** - * @brief Threads registry APIs. - * @details If enabled then the registry APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_REGISTRY TRUE - -/** - * @brief Threads synchronization APIs. - * @details If enabled then the @p chThdWait() function is included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_WAITEXIT TRUE - -/** - * @brief Semaphores APIs. - * @details If enabled then the Semaphores APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_SEMAPHORES TRUE - -/** - * @brief Semaphores queuing mode. - * @details If enabled then the threads are enqueued on semaphores by - * priority rather than in FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE - -/** - * @brief Mutexes APIs. - * @details If enabled then the mutexes APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MUTEXES TRUE - -/** - * @brief Enables recursive behavior on mutexes. - * @note Recursive mutexes are heavier and have an increased - * memory footprint. - * - * @note The default is @p FALSE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE - -/** - * @brief Conditional Variables APIs. - * @details If enabled then the conditional variables APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_CONDVARS TRUE - -/** - * @brief Conditional Variables APIs with timeout. - * @details If enabled then the conditional variables APIs with timeout - * specification are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_CONDVARS. - */ -#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE - -/** - * @brief Events Flags APIs. - * @details If enabled then the event flags APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_EVENTS TRUE - -/** - * @brief Events Flags APIs with timeout. - * @details If enabled then the events APIs with timeout specification - * are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_EVENTS. - */ -#define CH_CFG_USE_EVENTS_TIMEOUT TRUE - -/** - * @brief Synchronous Messages APIs. - * @details If enabled then the synchronous messages APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MESSAGES TRUE - -/** - * @brief Synchronous Messages queuing mode. - * @details If enabled then messages are served by priority rather than in - * FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_MESSAGES. - */ -#define CH_CFG_USE_MESSAGES_PRIORITY FALSE - -/** - * @brief Mailboxes APIs. - * @details If enabled then the asynchronous messages (mailboxes) APIs are - * included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_MAILBOXES TRUE - -/** - * @brief Core Memory Manager APIs. - * @details If enabled then the core memory manager APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMCORE TRUE - -/** - * @brief Heap Allocator APIs. - * @details If enabled then the memory heap allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or - * @p CH_CFG_USE_SEMAPHORES. - * @note Mutexes are recommended. - */ -#define CH_CFG_USE_HEAP TRUE - -/** - * @brief Memory Pools Allocator APIs. - * @details If enabled then the memory pools allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMPOOLS TRUE - -/** - * @brief Dynamic Threads APIs. - * @details If enabled then the dynamic threads creation APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_WAITEXIT. - * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. - */ -#define CH_CFG_USE_DYNAMIC TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Debug options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Debug option, kernel statistics. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_STATISTICS FALSE - -/** - * @brief Debug option, system state check. - * @details If enabled the correct call protocol for system APIs is checked - * at runtime. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_SYSTEM_STATE_CHECK TRUE - -/** - * @brief Debug option, parameters checks. - * @details If enabled then the checks on the API functions input - * parameters are activated. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_CHECKS TRUE - -/** - * @brief Debug option, consistency checks. - * @details If enabled then all the assertions in the kernel code are - * activated. This includes consistency checks inside the kernel, - * runtime anomalies and port-defined checks. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_ASSERTS TRUE - -/** - * @brief Debug option, trace buffer. - * @details If enabled then the trace buffer is activated. - * - * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED - -/** - * @brief Trace buffer entries. - * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is - * different from @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_BUFFER_SIZE 128 - -/** - * @brief Debug option, stack checks. - * @details If enabled then a runtime stack check is performed. - * - * @note The default is @p FALSE. - * @note The stack check is performed in a architecture/port dependent way. - * It may not be implemented or some ports. - * @note The default failure mode is to halt the system with the global - * @p panic_msg variable set to @p NULL. - */ -#define CH_DBG_ENABLE_STACK_CHECK TRUE - -/** - * @brief Debug option, stacks initialization. - * @details If enabled then the threads working area is filled with a byte - * value when a thread is created. This can be useful for the - * runtime measurement of the used stack. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_FILL_THREADS TRUE - -/** - * @brief Debug option, threads profiling. - * @details If enabled then a field is added to the @p thread_t structure that - * counts the system ticks occurred while executing the thread. - * - * @note The default is @p FALSE. - * @note This debug option is not currently compatible with the - * tickless mode. - */ -#define CH_DBG_THREADS_PROFILING FALSE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel hooks - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Threads descriptor structure extension. - * @details User fields added to the end of the @p thread_t structure. - */ -#define CH_CFG_THREAD_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ - -/** - * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. - * - * @note It is invoked from within @p chThdInit() and implicitly from all - * the threads creation APIs. - */ -#define CH_CFG_THREAD_INIT_HOOK(tp) { \ - /* Add threads initialization code here.*/ \ -} - -/** - * @brief Threads finalization hook. - * @details User finalization code added to the @p chThdExit() API. - */ -#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ - /* Add threads finalization code here.*/ \ -} - -/** - * @brief Context switch hook. - * @details This hook is invoked just before switching between threads. - */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* Context switch code here.*/ \ -} - -/** - * @brief ISR enter hook. - */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ - /* IRQ prologue code here.*/ \ -} - -/** - * @brief ISR exit hook. - */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ - /* IRQ epilogue code here.*/ \ -} - -/** - * @brief Idle thread enter hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to activate a power saving mode. - */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ - /* Idle-enter code here.*/ \ -} - -/** - * @brief Idle thread leave hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to deactivate a power saving mode. - */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ - /* Idle-leave code here.*/ \ -} - -/** - * @brief Idle Loop hook. - * @details This hook is continuously invoked by the idle thread loop. - */ -#define CH_CFG_IDLE_LOOP_HOOK() { \ - /* Idle loop code here.*/ \ -} - -/** - * @brief System tick event hook. - * @details This hook is invoked in the system tick handler immediately - * after processing the virtual timers queue. - */ -#define CH_CFG_SYSTEM_TICK_HOOK() { \ - /* System tick event code here.*/ \ -} - -/** - * @brief System halt hook. - * @details This hook is invoked in case to a system halting error before - * the system is halted. - */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* System halt code here.*/ \ -} - -/** - * @brief Trace hook. - * @details This hook is invoked each time a new record is written in the - * trace buffer. - */ -#define CH_CFG_TRACE_HOOK(tep) { \ - /* Trace code here.*/ \ -} - -/** @} */ - -/*===========================================================================*/ -/* Port-specific settings (override port settings defaulted in chcore.h). */ -/*===========================================================================*/ - -#endif /* CHCONF_H */ - -/** @} */ diff --git a/keyboards/chibios_test/teensy_lc_onekey/config.h b/keyboards/chibios_test/teensy_lc_onekey/config.h deleted file mode 100644 index d9eb05d2ac..0000000000 --- a/keyboards/chibios_test/teensy_lc_onekey/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef KEYBOARDS_CHIBIOS_TEST_TEENSY_LC_ONEKEY_CONFIG_H_ -#define KEYBOARDS_CHIBIOS_TEST_TEENSY_LC_ONEKEY_CONFIG_H_ - -#include "../config.h" - -#endif /* KEYBOARDS_CHIBIOS_TEST_TEENSY_LC_ONEKEY_CONFIG_H_ */ diff --git a/keyboards/chibios_test/teensy_lc_onekey/halconf.h b/keyboards/chibios_test/teensy_lc_onekey/halconf.h deleted file mode 100644 index 1b6f2adc20..0000000000 --- a/keyboards/chibios_test/teensy_lc_onekey/halconf.h +++ /dev/null @@ -1,354 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. - * - * @addtogroup HAL_CONF - * @{ - */ - -#ifndef _HALCONF_H_ -#define _HALCONF_H_ - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE -#endif - -/** - * @brief Enables the EXT subsystem. - */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/*===========================================================================*/ -/* ADC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* CAN driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Sleep mode related APIs inclusion switch. - */ -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif - -/*===========================================================================*/ -/* I2C driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the mutual exclusion APIs on the I2C bus. - */ -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* MAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE -#endif - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -#define MAC_USE_EVENTS TRUE -#endif - -/*===========================================================================*/ -/* MMC_SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - * This option is recommended also if the SPI driver does not - * use a DMA channel and heavily loads the CPU. - */ -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SDC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Number of initialization attempts before rejecting the card. - * @note Attempts are performed at 10mS intervals. - */ -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 -#endif - -/** - * @brief Include support for MMC cards. - * @note MMC support is not yet implemented so this option must be kept - * at @p FALSE. - */ -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE -#endif - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - */ -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SERIAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Serial buffers size. - * @details Configuration parameter, you can change the depth of the queue - * buffers depending on the requirements of your application. - * @note The default is 64 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 64 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 -#endif - -/*===========================================================================*/ -/* SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define SPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -#endif /* _HALCONF_H_ */ - -/** @} */ - diff --git a/keyboards/chibios_test/teensy_lc_onekey/instructions.md b/keyboards/chibios_test/teensy_lc_onekey/instructions.md deleted file mode 100644 index 66f73bf14b..0000000000 --- a/keyboards/chibios_test/teensy_lc_onekey/instructions.md +++ /dev/null @@ -1,97 +0,0 @@ -# Teensy LC, 3.0, 3.1, 3.2 support - -These ARM Teensies are now supported through [ChibiOS](http://chibios.org). - -## Installing the ARM toolchain - -You'll need to install an ARM toolchain, there is now a nice documentation about the two AVR/ARM toolchain : https://docs.qmk.fm/getting_started_build_tools.html and you can just run `sudo util/install_dependencies.sh`. -This toolchain is used instead of `avr-gcc`, which is only for AVR chips. Naturally you'll also need the usual development tools (e.g. `make`), just as in the AVR setting. - -You can find others way with the [gcc ARM embedded](https://launchpad.net/gcc-arm-embedded) website, or using your favourite package manager. After installing, you should be able to run `arm-none-eabi-gcc -v` in the command prompt and get sensible output. - -## Installing ChibiOS - -Next, you'll need ChibiOS. For Teensies, you'll need code from two repositories: [chibios-main](https://github.com/ChibiOS/ChibiOS) and [chibios-contrib](https://github.com/ChibiOS/ChibiOS). - -### If you’re using git - -Run `git submodule sync --recursive && git submodule update --init --recursive`. This will install ChibiOS and ChibiOS-Contrib in the `/lib/` directory. - -### If you’re not using Git - -If you're not using git, you can just download a [zip of chibios from here](https://github.com/ChibiOS/ChibiOS/archive/a7df9a891067621e8e1a5c2a2c0ceada82403afe.zip), unpack the zip, and rename/move the unpacked directory (named `ChibiOS-`) to `lib/chibios/chibios` (so that the file `lib/chibios/chibios/license.txt` exists). Now the same procedure with a [zip of chibios-contrib from here](https://github.com/ChibiOS/ChibiOS-Contrib/archive/e1311c4db6cd366cf760673f769e925741ac0ad3.zip): unpack and move `ChibiOS-Contrib-` to `lib/chibios/chibios-contrib`. - -(If you're using git, you can just clone the two repos: [chibios](https://github.com/ChibiOS/ChibiOS) and [chibios-contrib](https://github.com/ChibiOS/ChibiOS-Contrib). However - be warned that things may be somewhat out-of-sync (updates at different rates), so you may need to hunt a bit for the right commits.) - -(Why do we need chibios-contrib? Well, the main repo focuses on STM32 chips, and Freescale/NXP Kinetis chips are supported via the Contrib repository.) - -This should be it. Running `make` in `keyboard/teensy_lc_onekey` should create a working firmware in `build/`, called `ch.hex`. - -For more notes about the ChibiOS backend in TMK, see `tmk_core/protocol/chibios/README.md`. - -## About this onekey example - -It's set up for Teensy LC. To use 3.x, you'll need to edit the `Makefile` (and comment out one line in `mcuconf.h`). A sample makefile for Teensy 3.0 is provided as `Makefile.3.0`, can be used without renaming with `make -f Makefile.3.0`. Similarly for Teensy 3.2, there's `Makefile.3.2`. - -## Credits - -TMK itself is written by hasu, original sources [here](https://github.com/tmk/tmk_keyboard). - -The USB support for Kinetis MCUs is due to RedoX. His ChibiOS fork is also [on github](https://github.com/RedoXyde/ChibiOS); but it doesn't include Teensy LC definitions. - -## Features that are not implemented yet - -Currently only the more fancy suspend features are not there (power saving during suspend). The rest should work fine (reports either way are welcome). - -# Matrix programming notes - -The notes below explain what commands can be used to examine and set the status of Teensy pins. - -## ChibiOS pin manipulation basics - -### Pins - -Each pin sits on a "port", each of which comprises at most 32 individual pins. -So for instance "PTC5" from Kinetis manual/datasheet refers to port C (or GPIOA), pin 5. Most functions dealing with pins take 2 parameters which specify the pin -- the first being the port, the second being the pin number. - -Within ChibiOS, there are definitions which simplify this a bit for the Teensies. `TEENSY_PINn_IOPORT` represents the port of the MCU's pin connected Teensy's PIN `n`, and `TEENSY_PINn` represents its MCU's pin number. - -### Mode - -A MCU pin can be in several modes. The basic command to set a pin mode is - - palSetPadMode(TEENSY_PINn_IOPORT, TEENSY_PINn, PAL_MODE_INPUT_PULLUP); - -The last parameter is the mode. For keyboards, the usual ones that are used are `PAL_MODE_INPUT_PULLUP` (input with a pullup), `PAL_MODE_INPUT_PULLDOWN` (input with a pulldown), `PAL_MODE_INPUT` (input floating, a.k.a. Hi-Z), `PAL_MODE_OUTPUT_PUSHPULL` (output in the Arduino sense -- can be then set HIGH or LOW). - -### Setting - -Pins are set HIGH (after they've been put into `OUTPUT_PUSHPULL` mode) by - - palSetPad(TEENSY_PINn_IOPORT, TEENSY_PINn); - -or set LOW by - - palClearPad(TEENSY_PINn_IOPORT, TEENSY_PINn); - -Toggling can be done with - - palTogglePad(TEENSY_PINn_IOPORT, TEENSY_PINn); - -Alternatively, you can use - - palWritePad(TEENSY_PINn_IOPORT, TEENSY_PINn, bit); - -where `bit` is either `PAL_LOW` or `PAL_HIGH` (i.e. `0` or `1`). - -### Reading - -Reading pin status is done with - - palReadPad(TEENSY_PINn_IOPORT, TEENSY_PINn); - -The function returns either `PAL_HIGH` (actually `1`) or `PAL_LOW` (actually `0`). - -### Further docs - -All the commands that are available for pin manipulation through ChibiOS HAL are documented in [ChibiOS PAL driver docs](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html). diff --git a/keyboards/chibios_test/teensy_lc_onekey/led.c b/keyboards/chibios_test/teensy_lc_onekey/led.c deleted file mode 100644 index dfa60c1076..0000000000 --- a/keyboards/chibios_test/teensy_lc_onekey/led.c +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#include "hal.h" - -#include "led.h" - - -void led_set(uint8_t usb_led) { - if (usb_led & (1< - -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 . -*/ - -#include "ch.h" -#include "hal.h" - -/* - * scan matrix - */ -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "wait.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -#define LED_ON() do { palSetPad(TEENSY_PIN13_IOPORT, TEENSY_PIN13) ;} while (0) -#define LED_OFF() do { palClearPad(TEENSY_PIN13_IOPORT, TEENSY_PIN13); } while (0) -#define LED_TGL() do { palTogglePad(TEENSY_PIN13_IOPORT, TEENSY_PIN13); } while (0) - -void matrix_init(void) -{ - // initialize row and col - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - //debug - debug_matrix = true; - LED_ON(); - wait_ms(500); - LED_OFF(); -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - wait_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - wait_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -MCU_FAMILY = KINETIS -MCU_SERIES = KL2x - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -MCU_LDSCRIPT = MKL26Z64 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = kl2x - -# Board: it should exist either in /os/hal/boards/ -# or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -BOARD = PJRC_TEENSY_LC - -# Cortex version -# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4 -MCU = cortex-m0plus - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 6 \ No newline at end of file diff --git a/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.c b/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.c deleted file mode 100644 index b6c4327932..0000000000 --- a/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.c +++ /dev/null @@ -1 +0,0 @@ -#include "teensy_lc_onekey.h" diff --git a/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.h b/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.h deleted file mode 100644 index e94c13b663..0000000000 --- a/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef TEENSY_LC_ONEKEY_H -#define TEENSY_LC_ONEKEY_H -#include "chibios_test.h" - -#define LAYOUT(k00) {{ k00 }} - -#endif diff --git a/keyboards/chimera_ergo/chimera_ergo.h b/keyboards/chimera_ergo/chimera_ergo.h index a9275e3a85..78e5c0dac5 100644 --- a/keyboards/chimera_ergo/chimera_ergo.h +++ b/keyboards/chimera_ergo/chimera_ergo.h @@ -2,9 +2,6 @@ #define CHIMERA_ERGO_H #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include #define red_led_off PORTF |= (1<<5) #define red_led_on PORTF &= ~(1<<5) diff --git a/keyboards/chimera_ergo/keymaps/default/keymap.c b/keyboards/chimera_ergo/keymaps/default/keymap.c index 0b60b1dafa..51ab0e92cd 100644 --- a/keyboards/chimera_ergo/keymaps/default/keymap.c +++ b/keyboards/chimera_ergo/keymaps/default/keymap.c @@ -17,6 +17,14 @@ enum chimera_ergo_layers _NAV }; +enum custom_keycodes { + SC_INCL = SAFE_RANGE, + SC_PULL, + SC_PUSH, + SC_SCAP, + SC_SCOF +}; + #define SC_NMPD TG(_NUMPAD) #define SC_SYMB TG(_SYMBOLS) #define SC_SPFN LT(_NAV,KC_EQL) @@ -26,11 +34,6 @@ enum chimera_ergo_layers #define SC_SPRT MT(MOD_LALT, KC_1) #define SC_GBRC MT(MOD_RGUI, KC_RBRC) #define SC_MESC LT(_MACROS, KC_ESC) -#define SC_INCL M(0) -#define SC_PULL M(1) -#define SC_PUSH M(2) -#define SC_SCAP M(3) -#define SC_SCOF M(4) #define SC_CAD LALT(LCTL(KC_DEL)) #define LONGPRESS_DELAY 150 @@ -88,47 +91,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { /* include some kind of library or header */ - case 0: + case SC_INCL: if (record->event.pressed) { SEND_STRING("#include <>"); - return MACRO( T(LEFT), END); + tap_code(KC_LEFT); } - break; - case 1: + return false; + case SC_PULL: if (record->event.pressed) { SEND_STRING("git pull"); - return MACRO( T(ENT), END ); + tap_code(KC_ENT); } - break; - case 2: - if (record->event.pressed){ + return false; + case SC_PUSH: + if (record->event.pressed) { SEND_STRING("git push"); - return MACRO( T(ENT), END ); + tap_code(KC_ENT); } - break; - case 3: - if (record->event.pressed){ + return false; + case SC_SCAP: + if (record->event.pressed) { layer_on(_CAPS); - register_code(KC_CAPSLOCK); - unregister_code(KC_CAPSLOCK); + tap_code(KC_CAPS); } - break; - case 4: - if (record->event.pressed){ + return false; + case SC_SCOF: + if (record->event.pressed) { layer_off(_CAPS); - register_code(KC_CAPSLOCK); - unregister_code(KC_CAPSLOCK); + tap_code(KC_CAPS); } - break; + return false; + default: + return true; } - return MACRO_NONE; + return true; }; - void matrix_scan_user(void) { uint8_t layer = biton32(layer_state); diff --git a/keyboards/chimera_ergo/rules.mk b/keyboards/chimera_ergo/rules.mk index 379da9ae70..0e26588e37 100644 --- a/keyboards/chimera_ergo/rules.mk +++ b/keyboards/chimera_ergo/rules.mk @@ -1,67 +1,16 @@ - -OPT_DEFS += -DCHIMERA_ERGO_PROMICRO -CHIMERA_ERGO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -79,4 +28,12 @@ NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID + +OPT_DEFS += -DCHIMERA_ERGO_PROMICRO +CHIMERA_ERGO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c + USB = /dev/ttyACM0 diff --git a/keyboards/chimera_ls/chimera_ls.h b/keyboards/chimera_ls/chimera_ls.h index bb99684e5f..8ca8534eb9 100644 --- a/keyboards/chimera_ls/chimera_ls.h +++ b/keyboards/chimera_ls/chimera_ls.h @@ -2,9 +2,6 @@ #define CHIMERA_LETS_SPLIT_H #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include #define red_led_off PORTF |= (1<<5) #define red_led_on PORTF &= ~(1<<5) diff --git a/keyboards/chimera_ls/rules.mk b/keyboards/chimera_ls/rules.mk index 497e58677e..5060b9ebfc 100644 --- a/keyboards/chimera_ls/rules.mk +++ b/keyboards/chimera_ls/rules.mk @@ -1,67 +1,16 @@ - -OPT_DEFS += -DCHIMERA_LS_PROMICRO -CHIMERA_LS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -81,4 +30,11 @@ UNICODE_ENABLE = YES # Unicode USB = /dev/ttyACM0 +OPT_DEFS += -DCHIMERA_LS_PROMICRO +CHIMERA_LS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# project specific files +SRC = matrix.c + LAYOUTS = ortho_4x12 diff --git a/keyboards/chimera_ortho/chimera_ortho.h b/keyboards/chimera_ortho/chimera_ortho.h index 5981252751..fc2eba86bd 100644 --- a/keyboards/chimera_ortho/chimera_ortho.h +++ b/keyboards/chimera_ortho/chimera_ortho.h @@ -2,9 +2,6 @@ #define CHIMERA_ORTHO_H #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include #define red_led_off PORTF |= (1<<5) #define red_led_on PORTF &= ~(1<<5) diff --git a/keyboards/chimera_ortho/rules.mk b/keyboards/chimera_ortho/rules.mk index 4f95949f9f..549f311496 100644 --- a/keyboards/chimera_ortho/rules.mk +++ b/keyboards/chimera_ortho/rules.mk @@ -1,58 +1,16 @@ - -OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO -CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -71,3 +29,10 @@ UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID USB = /dev/ttyACM0 + +OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO +CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# project specific files +SRC = matrix.c diff --git a/keyboards/choco60/choco60.c b/keyboards/choco60/choco60.c new file mode 100644 index 0000000000..e38f335c1c --- /dev/null +++ b/keyboards/choco60/choco60.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Naoto Takai + * + * 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 . + */ +#include "choco60.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/choco60/choco60.h b/keyboards/choco60/choco60.h new file mode 100644 index 0000000000..fedcf942bf --- /dev/null +++ b/keyboards/choco60/choco60.h @@ -0,0 +1,46 @@ +/* Copyright 2019 Naoto Takai + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, R08, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L43, R40, R41, R43, R44 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO, KC_NO, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, KC_NO, KC_NO, KC_NO }, \ + { L40, L41, KC_NO, L43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07, R08 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, KC_NO }, \ + { R20, R21, R22, R23, R24, R25, R26, KC_NO, KC_NO }, \ + { R30, R31, R32, R33, R34, R35, R36, KC_NO, KC_NO }, \ + { R40, R41, KC_NO, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/choco60/config.h b/keyboards/choco60/config.h new file mode 100644 index 0000000000..97d7c61acd --- /dev/null +++ b/keyboards/choco60/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2019 Naoto Takai + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC0C0 +#define PRODUCT_ID 0x6000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Naoto Takai +#define PRODUCT choco60 +#define DESCRIPTION A 60% split keyboard for programmers. + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D3 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D0 diff --git a/keyboards/choco60/info.json b/keyboards/choco60/info.json new file mode 100644 index 0000000000..3918dcb5f0 --- /dev/null +++ b/keyboards/choco60/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Choco60", + "url": "https://keys.recompile.net/projects/choco60/", + "maintainer": "Naoto Takai", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "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":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":"~", "x":15, "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":7.5, "y":1}, {"label":"U", "x":8.5, "y":1}, {"label":"I", "x":9.5, "y":1}, {"label":"O", "x":10.5, "y":1}, {"label":"P", "x":11.5, "y":1}, {"label":"{", "x":12.5, "y":1}, {"label":"}", "x":13.5, "y":1}, {"label":"Delete", "x":14.5, "y":1, "w":1.5}, {"label":"Control", "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":7.75, "y":2}, {"label":"J", "x":8.75, "y":2}, {"label":"K", "x":9.75, "y":2}, {"label":"L", "x":10.75, "y":2}, {"label":":", "x":11.75, "y":2}, {"label":"\"", "x":12.75, "y":2}, {"label":"Return", "x":13.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":8.25, "y":3}, {"label":"M", "x":9.25, "y":3}, {"label":"<", "x":10.25, "y":3}, {"label":">", "x":11.25, "y":3}, {"label":"?", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"Fn", "x":15, "y":3}, {"label":"Opt", "x":1.5, "y":4}, {"label":"\u2318", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":2.75}, {"label":"Opt", "x":7.75, "y":4}, {"x":8.75, "y":4, "w":2.25}, {"label":"\u2318", "x":11, "y":4, "w":1.5}, {"label":"Ctrl", "x":12.5, "y":4}] + } + } +} diff --git a/keyboards/choco60/keymaps/default/config.h b/keyboards/choco60/keymaps/default/config.h new file mode 100644 index 0000000000..cf4c8bcbe6 --- /dev/null +++ b/keyboards/choco60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Naoto Takai + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/choco60/keymaps/default/keymap.c b/keyboards/choco60/keymaps/default/keymap.c new file mode 100644 index 0000000000..ab3f2c6a2b --- /dev/null +++ b/keyboards/choco60/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 Naoto Takai + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN, +}; + +#define KC_FN MO(_FN) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSLASH, KC_GRAVE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSPACE, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, + KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_FN, + KC_LALT, KC_LGUI, KC_SPACE, KC_SPACE, KC_SPACE, KC_RGUI, KC_RALT + ), + [_FN] = LAYOUT( + _______, 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_INSERT, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCREEN, KC_SCROLLLOCK, KC_PAUSE, KC_UP, KC_RBRACKET, KC_BSPACE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_ENTER, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDOWN, KC_DOWN, KC_RSHIFT, KC_FN, + _______, _______, _______, _______, _______, KC_STOP, _______ + ) +}; diff --git a/keyboards/choco60/keymaps/default/readme.md b/keyboards/choco60/keymaps/default/readme.md new file mode 100644 index 0000000000..f55e392c39 --- /dev/null +++ b/keyboards/choco60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for choco60 diff --git a/keyboards/choco60/readme.md b/keyboards/choco60/readme.md new file mode 100644 index 0000000000..ca309fdcbc --- /dev/null +++ b/keyboards/choco60/readme.md @@ -0,0 +1,15 @@ +# choco60 + +![choco60](https://keys.recompile.net/images/choco60-main@600w.jpg) + +A 60% split keyboard for programmers. + +Keyboard Maintainer: [Naoto Takai](https://github.com/takai) +Hardware Supported: The Choco60 PCBs, Pro Micro supported +Hardware Availability: https://keys.recompile.net/projects/choco60/ + +Make example for this keyboard (after setting up your build environment): + + make choco60: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). diff --git a/keyboards/choco60/rules.mk b/keyboards/choco60/rules.mk new file mode 100644 index 0000000000..65b98b73b6 --- /dev/null +++ b/keyboards/choco60/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SPLIT_KEYBOARD = yes # Enable split keyboard diff --git a/keyboards/christmas_tree/keymaps/default/keymap.c b/keyboards/christmas_tree/keymaps/default/keymap.c index 6621201996..6931b91a61 100644 --- a/keyboards/christmas_tree/keymaps/default/keymap.c +++ b/keyboards/christmas_tree/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum layers { _BASE, diff --git a/keyboards/christmas_tree/rules.mk b/keyboards/christmas_tree/rules.mk index 741747ecac..7e5269baf0 100644 --- a/keyboards/christmas_tree/rules.mk +++ b/keyboards/christmas_tree/rules.mk @@ -1,50 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/ckeys/handwire_101/keymaps/default/keymap.c b/keyboards/ckeys/handwire_101/keymaps/default/keymap.c index 383b3355de..8c65406ddb 100755 --- a/keyboards/ckeys/handwire_101/keymaps/default/keymap.c +++ b/keyboards/ckeys/handwire_101/keymaps/default/keymap.c @@ -18,7 +18,6 @@ enum custom_keycodes { CKEYS_ABOUT, }; -extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE (numpad) diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk index 957a6c8fba..07b0c57b44 100755 --- a/keyboards/ckeys/handwire_101/rules.mk +++ b/keyboards/ckeys/handwire_101/rules.mk @@ -1,53 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/ckeys/nakey/keymaps/default/keymap.c b/keyboards/ckeys/nakey/keymaps/default/keymap.c index ee14c1716e..be147b2d88 100644 --- a/keyboards/ckeys/nakey/keymaps/default/keymap.c +++ b/keyboards/ckeys/nakey/keymaps/default/keymap.c @@ -25,21 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk index 36b2193aae..afd508247f 100644 --- a/keyboards/ckeys/nakey/rules.mk +++ b/keyboards/ckeys/nakey/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/ckeys/obelus/keymaps/default/keymap.c b/keyboards/ckeys/obelus/keymaps/default/keymap.c index f71ac56276..870fdb10d3 100644 --- a/keyboards/ckeys/obelus/keymaps/default/keymap.c +++ b/keyboards/ckeys/obelus/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LAYERS diff --git a/keyboards/ckeys/obelus/rules.mk b/keyboards/ckeys/obelus/rules.mk index f40610ee95..0c55043003 100644 --- a/keyboards/ckeys/obelus/rules.mk +++ b/keyboards/ckeys/obelus/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/ckeys/readme.md b/keyboards/ckeys/readme.md index bdcf5b34d8..f04626cd33 100644 --- a/keyboards/ckeys/readme.md +++ b/keyboards/ckeys/readme.md @@ -1,10 +1,11 @@ # cKeys.org -[cKeys](https://ckeys.org/) is a mechanical keyboard-based nonprofit organization located in Seattle, Washington. +[cKeys](https://ckeys.org/) is an all volunteer run 501c3 nonprofit organization located in Seattle, Washington. -In addition, to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), they have [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository. +In addition to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), we teach [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository. * Supported Hardware * The Obelus - 4x4 Macropad * naKey - Through hole numpad * Handwire 101 - Handwired 4x4 (Proton C or Pro Micro) + * The Dora Board - 4x5 with rotary encoder and Proton C pinouts diff --git a/keyboards/ckeys/thedora/config.h b/keyboards/ckeys/thedora/config.h new file mode 100755 index 0000000000..f2b93ee70e --- /dev/null +++ b/keyboards/ckeys/thedora/config.h @@ -0,0 +1,188 @@ +/* Copyright 2019 Branden Byers + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ckeys +#define PRODUCT thedora +#define DESCRIPTION A board for keyboard exploration. + +#define ENCODERS_PAD_A { B13 } +#define ENCODERS_PAD_B { B15 } +#define ENCODER_RESOLUTION 4 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 6 + +#define MATRIX_ROW_PINS { A2, A1, A0, B8 } +#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 } + +// #define UNUSED_PINS { B14 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +//#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +//#define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define AUDIO_CLICKY + +#define DAC_SAMPLE_MAX 65535U + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +// Audio Click + +// Music Mode Polyphony +// NOTE: Must change polyphony_rate to a number higher than 0 in voices.c +#define AUDIO_VOICES +#define PITCH_STANDARD_A 880.0f + +// Mouse keys +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_TIME_TO_MAX 5 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/ckeys/thedora/info.json b/keyboards/ckeys/thedora/info.json new file mode 100644 index 0000000000..a0daa5b21e --- /dev/null +++ b/keyboards/ckeys/thedora/info.json @@ -0,0 +1,38 @@ +{ + "keyboard_name": "The Dora Board.", + "url": "https://ckeys.org/slides/exboard", + "maintainer": "brandenbyers", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x5": { + "key_count": 21, + "layout": [ + {"label":"k00", "x":1, "y":0}, + {"label":"k01", "x":2, "y":0}, + {"label":"k02", "x":3, "y":0}, + {"label":"k03", "x":4, "y":0}, + {"label":"k04", "x":5, "y":0}, + {"label":"k05 (Rotary Push)", "x":0, "y":3}, + + {"label":"k06", "x":1, "y":1}, + {"label":"k07", "x":2, "y":1}, + {"label":"k08", "x":3, "y":1}, + {"label":"k09", "x":4, "y":1}, + {"label":"k10", "x":5, "y":1}, + + {"label":"k11", "x":1, "y":2}, + {"label":"k12", "x":2, "y":2}, + {"label":"k13", "x":3, "y":2}, + {"label":"k14", "x":4, "y":2}, + {"label":"k15", "x":5, "y":2}, + + {"label":"k16", "x":1, "y":3}, + {"label":"k17", "x":2, "y":3}, + {"label":"k18", "x":3, "y":3}, + {"label":"k19", "x":4, "y":3}, + {"label":"k20", "x":5, "y":3} + ] + } + } +} diff --git a/keyboards/ckeys/thedora/keymaps/default/config.h b/keyboards/ckeys/thedora/keymaps/default/config.h new file mode 100755 index 0000000000..507a9ccdca --- /dev/null +++ b/keyboards/ckeys/thedora/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// Add overrides here diff --git a/keyboards/ckeys/thedora/keymaps/default/keymap.c b/keyboards/ckeys/thedora/keymaps/default/keymap.c new file mode 100755 index 0000000000..c407fbe264 --- /dev/null +++ b/keyboards/ckeys/thedora/keymaps/default/keymap.c @@ -0,0 +1,155 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, // base layer + _MUSIC, // music mode + _MIDI, // midi mode + _MOUSE, // mouse keys + _ADMIN // admin duties +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ +// │ │ │ │ │ │ +// │ 7 │ 8 │ 9 │ / │ ADMIN │ +// ROTORY │ │ │ │ │ │ +// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ +// VOL UP │ │ │ │ │ │ +// │ 4 │ 5 │ 6 │ * │ MOUSE │ +// ROTORY │ │ │ │ │ │ +// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ +// VOL DOWN │ │ │ │ │ │ +// │ 1 │ 2 │ 3 │ - │ MIDI │ +// │ │ │ │ │ │ +// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ +// │ TOGGLE │ │ │ │ │ │ +// │ MUSIC │ 0 │ . │ = │ + │ MUSIC │ +// │ │ │ │ │ │ │ +// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + + [_BASE] = LAYOUT( + KC_KP_7, KC_KP_8, KC_KP_9, KC_PSLS, MO(_ADMIN), MU_TOG, + KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, TG(_MOUSE), + KC_KP_1, KC_KP_2, KC_KP_3, KC_PMNS, TG(_MIDI), + KC_KP_0, KC_KP_DOT, KC_KP_EQUAL, KC_PPLS, MO(_MUSIC) + ), + +// MUSIC LAYER + // ┌─────────┬─────────┬─────────┬─────────┬─────────┐ + // │ │ │ │ │ │ + // │ │ │ │ │ │ + // ROTORY │ │ │ │ │ │ + // RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ + // PAGE UP │ │ │ │ │ │ + // │ │ │ │ │ │ + // ROTORY │ │ │ │ │ │ + // LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ + // PAGE DOWN│ │ │ │ │ │ + // │ │ │ │ MODE │ │ + // │ │ │ │ │ │ + //┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ + //│ │ │ │ │ │ │ + //│ │ RECORD │ STOP │ │ PLAY │ │ + //│ │ │ │ │ │ │ + //└─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + + [_MUSIC] = LAYOUT( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, MU_MOD, + KC_LCTL, KC_LALT, _______, KC_LGUI, _______ + ), + +// MIDI LAYER +// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ +// │ │ │ │ │ │ +// │ D♯ │ E │ F │ F♯ │ G │ +// ROTORY │ │ │ │ │ │ +// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ +// PAGE UP │ │ │ │ │ │ +// │ A♯ │ B │ C │ C♯ │ D │ +// ROTORY │ │ │ │ │ │ +// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ +// PAGE DOWN│ │ │ │ │ │ +// │ F │ F♯ │ G │ G♯ │ A │ +// │ │ │ │ │ │ +// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ +// │ │ │ │ │ │ │ +// │ │ C │ C♯ │ D │ D♯ │ E │ +// │ │ │ │ │ │ │ +// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + + [_MIDI] = LAYOUT( + MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3, _______, + MI_As_2, MI_B_2, MI_C_3, MI_Cs_3, MI_D_3, + MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, TG(_MIDI), + MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2 + ), + +// MOUSE LAYER +// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ +// │ │ │ │ │ │ +// │ BTN 5 │ │ WHEEL │ │ │ +// ROTORY │ │ │ UP │ │ │ +// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ +// PAGE DOWN│ │ │ │ │ │ +// │ │ LEFT │ MOUSE │ RIGHT │ │ +// ROTORY │ │ CLICK │ UP │ CLICK │ │ +// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ +// PAGE UP │ │ │ │ │ │ +// │ BTN 4 │ MOUSE │ MOUSE │ MOUSE │ │ +// │ │ LEFT │ DOWN │ RIGHT │ │ +// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ +// │ │ │ │ │ │ │ +// │ │ BTN 3 │ WHEEL │ WHEEL │ WHEEL │ │ +// │ │ │ LEFT │ DOWN │ RIGHT │ │ +// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + + [_MOUSE] = LAYOUT( + KC_MS_BTN5, _______, KC_MS_WH_UP, _______, _______, _______, + _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, TG(_MOUSE), + KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, + KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, _______ + ), + +// ADMIN LAYER +// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ +// │ │ │ │ │ │ +// │ RESET │ │ │ │ │ +// ROTORY │ │ │ │ │ │ +// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ +// PAGE UP │ │ │ │ │ │ +// │ 4 │ 5 │ 6 │ * │ │ +// ROTORY │ │ │ │ │ │ +// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ +// PAGE DOWN│ │ │ │ │ │ +// │ 1 │ 2 │ 3 │ │ │ +// │ │ │ │ │ │ +// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ +// │ │ │ │ │ │ │ +// │ │ 0 │ . │ = │ │ │ +// │ │ │ │ │ │ │ +// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + + [_ADMIN] = LAYOUT( + RESET, _______, _______, _______, TG(_ADMIN), _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} diff --git a/keyboards/ckeys/thedora/keymaps/default/readme.md b/keyboards/ckeys/thedora/keymaps/default/readme.md new file mode 100755 index 0000000000..4594bdfe31 --- /dev/null +++ b/keyboards/ckeys/thedora/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the cKeys Handwire 101 4x4 keyboard. \ No newline at end of file diff --git a/keyboards/ckeys/thedora/readme.md b/keyboards/ckeys/thedora/readme.md new file mode 100755 index 0000000000..920162075b --- /dev/null +++ b/keyboards/ckeys/thedora/readme.md @@ -0,0 +1,57 @@ +# theDora Board + +![Thedora Board](https://ckeys.org/images/exboard-3.jpg) + +A 4x5 keyboard with rotary encoder, QWIIC connector, and header pinouts for easy access to all pins on the Proton C. This keyboard was built for QMK exploration big and small. What will you discover next? + +Keyboard Maintainer: [brandenbyers](https://github.com/brandenbyers) +Hardware Supported: theDora +Hardware Availability: [cKeys.org](https://ckeys.org) + +Make example for this keyboard (after setting up your build environment): + +`make ckeys/thedora: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](Complete Newbs Guide). + +--- + +## Slides + +Slides can be found at: https://ckeys.org/slides/exboard/ + +## Case Design + +The acrylic laser cutter file is coming soon! + +## PCB Design + +All cKeys PCBs are open source. However, this one has not been posted yet because it needs to be cleaned up a bit! Coming soon! + +## Firmware + +If you want to reflash the pre-installed firmware, use the `.bin` file for Proton C. Flash with the QMK Toolbox or via the command line. + +Building for Proton C: `make ckeys/thedora:default` + +## Default Layout + +You can find the default layout in `thedora/keymaps/default/keymap.c` + +## Rotary Encoder + +This is the bit of code at the end of `keymap.c` that needs to changed if you want to change the behavior of the rotary encoder. + +``` +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); // What the rotary encoder repeatedly does when turned right. + } else { + tap_code(KC_PGUP); // What it does when turned to the left. + } + } +} +``` + +![The Dora Board](https://ckeys.org/images/exboard-1.jpg) diff --git a/keyboards/ckeys/thedora/rules.mk b/keyboards/ckeys/thedora/rules.mk new file mode 100755 index 0000000000..92665ffb6d --- /dev/null +++ b/keyboards/ckeys/thedora/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = yes +MIDI_ENABLE = yes # MIDI controls +RGBLIGHT_ENABLE = no +ENCODER_ENABLE = yes +# SERIAL_LINK_ENABLE = yes diff --git a/keyboards/ckeys/thedora/thedora.c b/keyboards/ckeys/thedora/thedora.c new file mode 100755 index 0000000000..438320ef1c --- /dev/null +++ b/keyboards/ckeys/thedora/thedora.c @@ -0,0 +1,28 @@ +#include "thedora.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + // Turn status LED on + //DDRD |= (1<<6); + //PORTD |= (1<<6); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} diff --git a/keyboards/ckeys/thedora/thedora.h b/keyboards/ckeys/thedora/thedora.h new file mode 100755 index 0000000000..2c4443c3ad --- /dev/null +++ b/keyboards/ckeys/thedora/thedora.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, \ + k06, k07, k08, k09, k10, \ + k11, k12, k13, k14, k15, \ + k16, k17, k18, k19, k20 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, }, \ + { k06, k07, k08, k09, k10 }, \ + { k11, k12, k13, k14, k15 }, \ + { k16, k17, k18, k19, k20 } \ +} + diff --git a/keyboards/claw44/keymaps/default/keymap.c b/keyboards/claw44/keymaps/default/keymap.c index c346571255..088087c773 100644 --- a/keyboards/claw44/keymaps/default/keymap.c +++ b/keyboards/claw44/keymaps/default/keymap.c @@ -7,7 +7,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; extern uint8_t is_master; diff --git a/keyboards/claw44/rev1/rev1.h b/keyboards/claw44/rev1/rev1.h index f7ec2cbfe6..c6c9057fdc 100644 --- a/keyboards/claw44/rev1/rev1.h +++ b/keyboards/claw44/rev1/rev1.h @@ -2,7 +2,6 @@ #include "../claw44.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef RGBLIGHT_ENABLE @@ -18,7 +17,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ diff --git a/keyboards/claw44/rules.mk b/keyboards/claw44/rules.mk index 907a5c8325..b2c3b436e9 100644 --- a/keyboards/claw44/rules.mk +++ b/keyboards/claw44/rules.mk @@ -1,55 +1,16 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -70,5 +31,11 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto DEFAULT_FOLDER = claw44/rev1 diff --git a/keyboards/claw44/serial.c b/keyboards/claw44/serial.c index 325c29a3f7..f6293c3dc2 100644 --- a/keyboards/claw44/serial.c +++ b/keyboards/claw44/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/clueboard/17/17.c b/keyboards/clueboard/17/17.c index 627aa236dd..9e8ca644ec 100644 --- a/keyboards/clueboard/17/17.c +++ b/keyboards/clueboard/17/17.c @@ -6,10 +6,6 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up matrix_init_user(); - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<event.pressed) { - stop_all_notes(); - PLAY_SONG(song_basketcase); - } - return false; - case S_ODEJY: - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(song_ode_to_joy); - } - return false; - case S_RCKBY: - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(song_rock_a_bye_baby); - } - return false; - case S_DOEDR: - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(song_doe_a_deer); - } - return false; - case S_SCALE: - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(song_scale); - } - return false; - case S_ONEUP: - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(song_one_up); - } - return false; - case S_COIN: - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(song_coin); - } - return false; - case S_SONIC: - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(song_sonic_ring); - } - return false; - case S_ZELDA: - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(song_zelda_puzzle); - } - return false; - } - return true; -} diff --git a/keyboards/clueboard/60/keymaps/yanfali/readme.md b/keyboards/clueboard/60/keymaps/yanfali/readme.md deleted file mode 100644 index 8b87051762..0000000000 --- a/keyboards/clueboard/60/keymaps/yanfali/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# /u/yanfali keymap for clueboard 60% - -Almost the same as default but differs in the following ways - - 1. `Caps Lock` -> `MT(KC_LCTL, KC_ESC)`. - I'm a heavy vim user and I prefer escape to be closer than default. I also move `Control` to this key if you hold it. - 1. Switch Alt and GUI. - I spend most of my time on OSX, so I reverse Alt and GUI to be - more comfortable on OSX. - 1. Added a custom layer. - I use this to map the cursor keys to WASD, the familiar directional - gaming keys. As I use a split right shift, this naturally leads - to the left hand being used for navigation. This is also the - best place to add custom mappings, macros and combo keys. diff --git a/keyboards/clueboard/60/led.c b/keyboards/clueboard/60/led.c index 350696736b..91a2c537dc 100644 --- a/keyboards/clueboard/60/led.c +++ b/keyboards/clueboard/60/led.c @@ -16,21 +16,21 @@ */ #include "hal.h" -#include "backlight.h" #include "led.h" #include "printf.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" + void backlight_init_ports(void) { printf("backlight_init_ports()\n"); - #ifdef BACKLIGHT_ENABLE + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); palSetPad(GPIOB, 8); - #endif } void backlight_set(uint8_t level) { printf("backlight_set(%d)\n", level); - #ifdef BACKLIGHT_ENABLE if (level == 0) { // Turn backlight off palSetPad(GPIOB, 8); @@ -38,8 +38,8 @@ void backlight_set(uint8_t level) { // Turn backlight on palClearPad(GPIOB, 8); } - #endif } +#endif void led_set_kb(uint8_t usb_led) { printf("led_set_kb(%d)\n", usb_led); diff --git a/keyboards/clueboard/60/rules.mk b/keyboards/clueboard/60/rules.mk index a0927025bb..a9151b87d2 100644 --- a/keyboards/clueboard/60/rules.mk +++ b/keyboards/clueboard/60/rules.mk @@ -1,41 +1,5 @@ -# project specific files -SRC = led.c -LAYOUTS += 60_ansi 60_ansi_split_bs_rshift 60_iso - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -OPT_DEFS = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 +# MCU name +MCU = STM32F303 # Build Options # comment out to disable the options. @@ -48,3 +12,7 @@ CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover AUDIO_ENABLE = yes + +# project specific files +SRC = led.c +LAYOUTS += 60_ansi 60_ansi_split_bs_rshift 60_iso diff --git a/keyboards/clueboard/66/keymaps/xyverz/config.h b/keyboards/clueboard/66/keymaps/xyverz/config.h deleted file mode 100644 index 979cbf5768..0000000000 --- a/keyboards/clueboard/66/keymaps/xyverz/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#define TAPPING_TERM 600 // ms diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c deleted file mode 100644 index 3341ced918..0000000000 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,139 +0,0 @@ -// Xyverz' keymap. -// It's based on the default keymap, but Dvorak! - -#include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _FL 3 -#define _CL 4 - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK -}; - -// Useful defines -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -#define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _QWERTY: Base Layer (Default Layer) - * ,-----------------------------------------------------------. ,---. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PgU| - * |-----------------------------------------------------------| |---| - * |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PgD| - * |-----------------------------------------------------------| `---' - * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '| | Ent| - * |--------------------------------------------------------------. - * |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up| - * |------------------------------------------------------------------. - * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| - * `------------------------------------------------------------------' - */ - -[_QWERTY] = LAYOUT ( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ - 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_PGDN, \ - FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _COLEMAK: Base Layer - * ,-----------------------------------------------------------. ,---. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| - * |-----------------------------------------------------------| |---| - * |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD| - * |-----------------------------------------------------------| `---' - * |FnCaps| A| R| S| T| D| H| N| E| I| O| '| | Ent| - * |--------------------------------------------------------------. - * |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up| - * |------------------------------------------------------------------. - * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| - * `------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT ( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _DVORAK: Base Layer - * ,-----------------------------------------------------------. ,---. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU| - * |-----------------------------------------------------------| |---| - * |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD| - * |-----------------------------------------------------------| `---' - * |FnCaps| A| O| E| U| I| D| H| T| N| S| -| | Ent| - * |--------------------------------------------------------------. - * |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up| - * |------------------------------------------------------------------. - * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| - * `------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT ( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ - FN_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = LAYOUT ( - 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_DEL, BL_STEP, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL), _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = LAYOUT ( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL), _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ - _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; - - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - } - return true; -} diff --git a/keyboards/clueboard/66/keymaps/xyverz/rules.mk b/keyboards/clueboard/66/keymaps/xyverz/rules.mk deleted file mode 100644 index 6fa110a7b6..0000000000 --- a/keyboards/clueboard/66/keymaps/xyverz/rules.mk +++ /dev/null @@ -1,46 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Build Options -# change to "no" to disable the options, or define them in the makefile.mk in -# the appropriate keymap folder that will get included automatically -# -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. - diff --git a/keyboards/clueboard/66/rev1/rules.mk b/keyboards/clueboard/66/rev1/rules.mk index 96d4125ac4..39fd55921f 100644 --- a/keyboards/clueboard/66/rev1/rules.mk +++ b/keyboards/clueboard/66/rev1/rules.mk @@ -1,10 +1,15 @@ -LAYOUTS = 66_ansi 66_iso +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -21,3 +26,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 66_ansi 66_iso diff --git a/keyboards/clueboard/66/rev2/rev2.c b/keyboards/clueboard/66/rev2/rev2.c index 1a35b87b84..d676b6d5fb 100644 --- a/keyboards/clueboard/66/rev2/rev2.c +++ b/keyboards/clueboard/66/rev2/rev2.c @@ -8,10 +8,6 @@ void matrix_init_kb(void) { // runs once when the firmware starts up matrix_init_user(); led_init_ports(); - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<. */ #include "gen1.h" -#include "is31fl3731-simple.h" - -void matrix_init_kb(void) { -} - -void matrix_scan_kb(void) { -} #ifdef LED_MATRIX_ENABLE + #include "is31fl3731-simple.h" + const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver diff --git a/keyboards/clueboard/66_hotswap/gen1/rules.mk b/keyboards/clueboard/66_hotswap/gen1/rules.mk index 326912a34b..50f140defa 100644 --- a/keyboards/clueboard/66_hotswap/gen1/rules.mk +++ b/keyboards/clueboard/66_hotswap/gen1/rules.mk @@ -1,43 +1,5 @@ -# project specific files -SRC = led.c -LAYOUTS += 66_ansi - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 +# MCU name +MCU = STM32F303 # LED Configuration LED_MATRIX_ENABLE = IS31FL3731 @@ -57,3 +19,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover #CUSTOM_MATRIX = yes # Custom matrix file AUDIO_ENABLE = yes # SERIAL_LINK_ENABLE = yes + +# project specific files +SRC = led.c +LAYOUTS += 66_ansi diff --git a/keyboards/clueboard/66_hotswap/keymaps/json/keymap.json b/keyboards/clueboard/66_hotswap/keymaps/json/keymap.json new file mode 100644 index 0000000000..20aa9f0f6c --- /dev/null +++ b/keyboards/clueboard/66_hotswap/keymaps/json/keymap.json @@ -0,0 +1 @@ +{"keyboard":"clueboard/66_hotswap/gen1","keymap":"default_66","layout":"LAYOUT","layers":[["KC_GESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_MINS","KC_EQL","KC_BSPC","KC_PGUP","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_PGDN","KC_CAPS","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_ENT","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","KC_UP","KC_LCTL","KC_LGUI","KC_LALT","KC_SPC","KC_SPC","KC_RALT","KC_RGUI","MO(1)","KC_RCTL","KC_LEFT","KC_DOWN","KC_RGHT"],["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_DEL","BL_INC","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_MPRV","KC_MPLY","KC_MNXT","KC_NO","KC_MUTE","BL_DEC","KC_NO","KC_NO","MO(2)","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_PGUP","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","MO(1)","KC_NO","KC_HOME","KC_PGDN","KC_END"],["KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","BL_TOGG","BL_INC","KC_NO","KC_NO","KC_NO","KC_NO","RESET","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","BL_DEC","KC_NO","KC_NO","MO(2)","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","BL_STEP","KC_NO","KC_NO","MO(1)","KC_NO","KC_NO","KC_NO","KC_NO"]],"author":"","notes":""} \ No newline at end of file diff --git a/keyboards/clueboard/66_hotswap/prototype/prototype.c b/keyboards/clueboard/66_hotswap/prototype/prototype.c index 991d4b8fae..7c307be61a 100644 --- a/keyboards/clueboard/66_hotswap/prototype/prototype.c +++ b/keyboards/clueboard/66_hotswap/prototype/prototype.c @@ -8,10 +8,6 @@ void matrix_init_kb(void) { // runs once when the firmware starts up matrix_init_user(); led_init_ports(); - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<. + */ +#include "cocoa40.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/cocoa40/cocoa40.h b/keyboards/cocoa40/cocoa40.h new file mode 100644 index 0000000000..a468a75ef2 --- /dev/null +++ b/keyboards/cocoa40/cocoa40.h @@ -0,0 +1,44 @@ +/* Copyright 2019 'Naoto Takai' + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, \ + L31, L32, L33, R30, R32, R33 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \ + { KC_NO, L31, L32, L33, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07 }, \ + { R10, R11, R12, R13, R14, R15, R16, KC_NO }, \ + { R20, R21, R22, R23, R24, R25, R26, KC_NO }, \ + { R30, KC_NO, R32, R33, KC_NO, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/cocoa40/config.h b/keyboards/cocoa40/config.h new file mode 100644 index 0000000000..0dfa02aa67 --- /dev/null +++ b/keyboards/cocoa40/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2019 'Naoto Takai' + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC0C0 +#define PRODUCT_ID 0x4000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER recompile keys +#define PRODUCT cocoa40 +#define DESCRIPTION A 40% keyboard for programmers. + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D3 diff --git a/keyboards/cocoa40/info.json b/keyboards/cocoa40/info.json new file mode 100644 index 0000000000..d359c0ddb6 --- /dev/null +++ b/keyboards/cocoa40/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Cocoa40", + "url": "https://keys.recompile.net/projects/cocoa40/", + "maintainer": "Naoto Takai", + "width": 15.25, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":7.25, "y":0}, {"label":"U", "x":8.25, "y":0}, {"label":"I", "x":9.25, "y":0}, {"label":"O", "x":10.25, "y":0}, {"label":"P", "x":11.25, "y":0}, {"label":"{", "x":12.25, "y":0}, {"label":"}", "x":13.25, "y":0}, {"label":"Back
Space", "x":14.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":7.5, "y":1}, {"label":"J", "x":8.5, "y":1}, {"label":"K", "x":9.5, "y":1}, {"label":"L", "x":10.5, "y":1}, {"label":":", "x":11.5, "y":1}, {"label":"\"", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1, "w":1.75}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":8, "y":2}, {"label":"M", "x":9, "y":2}, {"label":"<", "x":10, "y":2}, {"label":">", "x":11, "y":2}, {"label":"?", "x":12, "y":2}, {"label":"Shift", "x":13, "y":2, "w":1.25}, {"label":"Fn", "x":14.25, "y":2}, {"label":"Opt", "x":1.5, "y":3}, {"label":"Command", "x":2.5, "y":3, "w":1.5}, {"label":"", "x":4, "y":3, "w":2.25}, {"label":"", "x":7.5, "y":3, "w":2.75}, {"label":"Command", "x":10.25, "y":3, "w":1.5}, {"label":"Opt", "x":11.75, "y":3}] + } + } +} diff --git a/keyboards/cocoa40/keymaps/default/config.h b/keyboards/cocoa40/keymaps/default/config.h new file mode 100644 index 0000000000..01232ff92f --- /dev/null +++ b/keyboards/cocoa40/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 'Naoto Takai' + * + * 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 . + */ + +#pragma once + +// place overrides here + diff --git a/keyboards/cocoa40/keymaps/default/keymap.c b/keyboards/cocoa40/keymaps/default/keymap.c new file mode 100644 index 0000000000..320f918a9e --- /dev/null +++ b/keyboards/cocoa40/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2019 'Naoto Takai' + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _NUMS, + _SYMS, + _FN, +}; + +#define KC_NUMS LT(_NUMS, KC_SPACE) +#define KC_SYMS LT(_SYMS, KC_SPACE) +#define KC_FN MO(_FN) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSPACE, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, + KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_FN, + KC_LALT, KC_LGUI, KC_NUMS, KC_SYMS, KC_RGUI, KC_RALT + ), + [_NUMS] = LAYOUT( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSLASH, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_SYMS] = LAYOUT( + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_MINUS, KC_PLUS, KC_PIPE, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_FN] = LAYOUT( + KC_ESC, 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_DELETE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/cocoa40/keymaps/default/readme.md b/keyboards/cocoa40/keymaps/default/readme.md new file mode 100644 index 0000000000..9e530faff0 --- /dev/null +++ b/keyboards/cocoa40/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for cocoa40 diff --git a/keyboards/cocoa40/readme.md b/keyboards/cocoa40/readme.md new file mode 100644 index 0000000000..e05caaba9c --- /dev/null +++ b/keyboards/cocoa40/readme.md @@ -0,0 +1,15 @@ +# cocoa40 + +![cocoa40](https://keys.recompile.net/images/cocoa40-main@600w.jpg) + +A 40% split keyboard for programmers. + +Keyboard Maintainer: [Naoto Takai](https://github.com/takai) +Hardware Supported: The Cocoa40 PCBs, Pro Micro supported +Hardware Availability: https://keys.recompile.net/projects/cocoa40/ + +Make example for this keyboard (after setting up your build environment): + + make cocoa40: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). diff --git a/keyboards/cocoa40/rules.mk b/keyboards/cocoa40/rules.mk new file mode 100644 index 0000000000..ad0ffbf0fe --- /dev/null +++ b/keyboards/cocoa40/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE =no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +SPLIT_KEYBOARD = yes diff --git a/keyboards/comet46/comet46.h b/keyboards/comet46/comet46.h index 07dad0a001..b6598f0178 100644 --- a/keyboards/comet46/comet46.h +++ b/keyboards/comet46/comet46.h @@ -2,9 +2,6 @@ #define COMET46_H #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include // This a shortcut to help you visually see your layout. // The first section contains all of the arguements diff --git a/keyboards/comet46/rules.mk b/keyboards/comet46/rules.mk index 897cc9b8c6..d38f16734f 100644 --- a/keyboards/comet46/rules.mk +++ b/keyboards/comet46/rules.mk @@ -1,51 +1,15 @@ -# # project specific files -SRC += matrix.c \ - i2c.c \ - ssd1306.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -# BOOTLOADER = caterina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -65,3 +29,7 @@ UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID USB = /dev/ttyACM0 +# project specific files +SRC += matrix.c \ + i2c.c \ + ssd1306.c diff --git a/keyboards/contra/keymaps/default/keymap.c b/keyboards/contra/keymaps/default/keymap.c index c63bcc0945..31e90ed267 100644 --- a/keyboards/contra/keymaps/default/keymap.c +++ b/keyboards/contra/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum planck_layers { _QWERTY, diff --git a/keyboards/contra/rules.mk b/keyboards/contra/rules.mk index 3a97834cff..0aded0f29a 100755 --- a/keyboards/contra/rules.mk +++ b/keyboards/contra/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 7901898c7c..66ca765266 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -1,59 +1,16 @@ # MCU name -# atmega32u4 Teensy2.0 -# atemga32u4 TMK Converter rev.1 -# atemga32u2 TMK Converter rev.2 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -# -F_CPU = 16000000 -# F_CPU = 8000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 -# LUFA bootloader 4096 -# USBaspLoader 2048 - # Build Options # comment out to disable the options. # diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk index 25be649995..b23aaadeca 100644 --- a/keyboards/converter/hp_46010a/rules.mk +++ b/keyboards/converter/hp_46010a/rules.mk @@ -1,46 +1,14 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options diff --git a/keyboards/converter/ibm_5291/rules.mk b/keyboards/converter/ibm_5291/rules.mk index 57e385f0a9..edb456a7d8 100644 --- a/keyboards/converter/ibm_5291/rules.mk +++ b/keyboards/converter/ibm_5291/rules.mk @@ -1,46 +1,14 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index a48038ccde..36913ef331 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -1,48 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index bffee05fde..36c3dfa3fd 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -1,59 +1,19 @@ # MCU name -# atmega32u4 Teensy2.0 -# atemga32u4 TMK Converter rev.1 -# atemga32u2 TMK Converter rev.2 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -# -#F_CPU = 16000000 +# Processor frequency F_CPU = 8000000 -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 -# LUFA bootloader 4096 -# USBaspLoader 2048 - # Build Options # comment out to disable the options. # diff --git a/keyboards/converter/modelm101/rules.mk b/keyboards/converter/modelm101/rules.mk index 6205269715..dada3f22d9 100644 --- a/keyboards/converter/modelm101/rules.mk +++ b/keyboards/converter/modelm101/rules.mk @@ -1,43 +1,5 @@ # MCU name MCU = at90usb1286 -#MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -45,20 +7,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -#OPT_DEFS += -DBOOTLOADER_SIZE=1024 - - # Build Options # change yes to no to disable # diff --git a/keyboards/converter/numeric_keypad_IIe/rules.mk b/keyboards/converter/numeric_keypad_IIe/rules.mk index f61a7d4501..03c1bc8f86 100644 --- a/keyboards/converter/numeric_keypad_IIe/rules.mk +++ b/keyboards/converter/numeric_keypad_IIe/rules.mk @@ -1,59 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # change yes to no to disable # diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index 7374fd955f..2cd2c47e59 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -1,11 +1,14 @@ -MCU = atmega32u4 # Teensy 2.0 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# MCU name +MCU = atmega32u4 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index db6b5c7ee4..60beb4d9b0 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -1,11 +1,14 @@ -MCU = atmega32u4 # Teensy 2.0 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# MCU name +MCU = atmega32u4 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = lufa-dfu # Build Options diff --git a/keyboards/converter/usb_usb/README.md b/keyboards/converter/usb_usb/README.md index 64334a85fb..594a9be877 100644 --- a/keyboards/converter/usb_usb/README.md +++ b/keyboards/converter/usb_usb/README.md @@ -36,18 +36,18 @@ https://geekhack.org/index.php?topic=69169.0 ### Build one yourself using Arduino Leonardo + Circuit@Home USB Host Shield 2.0 Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be better, you won't need even soldering iron. -http://arduino.cc/en/Main/ArduinoBoardLeonardo -https://www.circuitsathome.com/arduino_usb_host_shield_projects/ +- http://arduino.cc/en/Main/ArduinoBoardLeonardo +- https://www.circuitsathome.com/arduino_usb_host_shield_projects/ Other compatible boards like Arduino's Shield will also work well but I think Sparkfun's needs to be modified. -http://arduino.cc/en/Main/ArduinoUSBHostShield -https://www.sparkfun.com/products/9947 +- http://arduino.cc/en/Main/ArduinoUSBHostShield +- https://www.sparkfun.com/products/9947 Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing. -[Build guide](https://geekhack.org/index.php?topic=80421.0) -https://www.circuitsathome.com/arduino_usb_host_shield_projects/ -https://www.sparkfun.com/products/12587 -https://www.pjrc.com/teensy/td_libs_USBHostShield.html +- [Build guide](https://geekhack.org/index.php?topic=80421.0) +- https://www.circuitsathome.com/arduino_usb_host_shield_projects/ +- https://www.sparkfun.com/products/12587 +- https://www.pjrc.com/teensy/td_libs_USBHostShield.html Limitations ---------- @@ -56,24 +56,14 @@ Note that the converter can host only USB "boot protocol" keyboard(6KRO), not NK Resources -------- -Hasu's main thread for the converter - https://geekhack.org/index.php?topic=69169.0 -Build guide for the Pro Micro variant - https://geekhack.org/index.php?topic=80421.0 -Original TMK version of the converter - https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb -USB Host Shield 2.0 - https://www.circuitsathome.com/arduino_usb_host_shield_projects/ -USB Host Shield 2.0 source - https://github.com/felis/USB_Host_Shield_2.0 -Arduino USB Host Shield (with bootst converter) - http://arduino.cc/en/Main/ArduinoUSBHostShield -Arduino source - https://github.com/arduino/Arduino -Initial release of TMK USB-USB converter - https://geekhack.org/index.php?topic=33057.msg653549#msg653549 - http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854 -Arduino-based hardware keyboard remapper - Colemak forum - http://forum.colemak.com/viewtopic.php?id=1561 -Teensy + Host Shield - http://www.pjrc.com/teensy/td_libs_USBHostShield.html +- [Hasu's main thread for the converter](https://geekhack.org/index.php?topic=69169.0) +- [Build guide for the Pro Micro variant](https://geekhack.org/index.php?topic=80421.0) +- [Original TMK version of the converter](https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb) +- [USB Host Shield 2.0](https://www.circuitsathome.com/arduino_usb_host_shield_projects/) +- [USB Host Shield 2.0 source](https://github.com/felis/USB_Host_Shield_2.0) +- [Arduino USB Host Shield (with bootst converter)](http://arduino.cc/en/Main/ArduinoUSBHostShield) +- [Arduino source](https://github.com/arduino/Arduino) +- [Initial release of TMK USB-USB converter](https://geekhack.org/index.php?topic=33057.msg653549#msg653549) +- [Teensy/Arduino + Host Shield](http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854) +- [Arduino-based hardware keyboard remapper - Colemak forum](http://forum.colemak.com/viewtopic.php?id=1561) +- [Teensy + Host Shield](http://www.pjrc.com/teensy/td_libs_USBHostShield.html) diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk index f5ab3880bf..a882bd1458 100644 --- a/keyboards/converter/usb_usb/ble/rules.mk +++ b/keyboards/converter/usb_usb/ble/rules.mk @@ -1,5 +1,4 @@ -BLUETOOTH = AdafruitBLE -ADAFRUIT_BLE_ENABLE = yes +# Processor frequency F_CPU = 8000000 BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) @@ -19,5 +18,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +BLUETOOTH = AdafruitBLE +ADAFRUIT_BLE_ENABLE = yes EXTRAFLAGS += -flto diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp index 6f381aabf4..296f7fcd02 100644 --- a/keyboards/converter/usb_usb/custom_matrix.cpp +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -74,8 +74,6 @@ static bool matrix_is_mod = false; * This supports two cascaded hubs and four keyboards */ USB usb_host; -USBHub hub1(&usb_host); -USBHub hub2(&usb_host); HIDBoot kbd1(&usb_host); HIDBoot kbd2(&usb_host); HIDBoot kbd3(&usb_host); @@ -84,6 +82,8 @@ KBDReportParser kbd_parser1; KBDReportParser kbd_parser2; KBDReportParser kbd_parser3; KBDReportParser kbd_parser4; +USBHub hub1(&usb_host); +USBHub hub2(&usb_host); extern "C" @@ -252,10 +252,10 @@ extern "C" void led_set(uint8_t usb_led) { - kbd1.SetReport(0, 0, 2, 0, 1, &usb_led); - kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); - kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); - kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); + if (kbd1.isReady()) kbd1.SetReport(0, 0, 2, 0, 1, &usb_led); + if (kbd2.isReady()) kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); + if (kbd3.isReady()) kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); + if (kbd4.isReady()) kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); led_set_kb(usb_led); } diff --git a/keyboards/converter/usb_usb/hasu/rules.mk b/keyboards/converter/usb_usb/hasu/rules.mk index 27d8af7683..c2ee0bc86f 100644 --- a/keyboards/converter/usb_usb/hasu/rules.mk +++ b/keyboards/converter/usb_usb/hasu/rules.mk @@ -1 +1,2 @@ +# Processor frequency F_CPU = 16000000 diff --git a/keyboards/converter/usb_usb/keymaps/narze/README.md b/keyboards/converter/usb_usb/keymaps/narze/README.md new file mode 100644 index 0000000000..a089568d2c --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/narze/README.md @@ -0,0 +1,10 @@ +# narze's layout for usb-usb converter + +## Key features +- Qwerty + [Colemak](https://colemak.com) layouts, and you can type Qwerty on software-level Colemak as well. Very useful for gaming or when your friend wanna type something but don't use Colemak. +- [(S)uper (D)uper Mode](https://github.com/jasonrudolph/keyboard#super-duper-mode) inspired by [jasonrudolph](https://github.com/jasonrudolph), with [some extensions](https://gist.github.com/narze/861e2167784842d38771) such as backspace & forward delete. + +## Build instructions +- `cd /path/to/qmk_firmware` +- Ensure latest libraries are loaded `make git-submodule` +- Build & flash : `make converter/usb_usb:narze:flash` diff --git a/keyboards/converter/usb_usb/keymaps/narze/config.h b/keyboards/converter/usb_usb/keymaps/narze/config.h new file mode 100644 index 0000000000..cbdb7d94e3 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/narze/config.h @@ -0,0 +1,48 @@ +#pragma once + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#undef TAPPING_TERM +#define TAPPING_TERM 100 + +#define COMBO_TERM 20 +#define COMBO_COUNT 1 + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#define SUPER_DUPER_SOUND S__NOTE(_B1) + +#define MOUSEKEY_DELAY 100 + +#define USB_POLLING_INTERVAL_MS 1 + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif diff --git a/keyboards/converter/usb_usb/keymaps/narze/keymap.c b/keyboards/converter/usb_usb/keymaps/narze/keymap.c new file mode 100644 index 0000000000..b5938fa359 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/narze/keymap.c @@ -0,0 +1,167 @@ +#include QMK_KEYBOARD_H +#include "narze.h" +#include "keymap_colemak.h" + +enum usb_usb_layers { + _QWERTY, + _COLEMAK, + _QWOC, + _SUPERDUPER, +}; + +enum usb_usb_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + QWOC, + SUPERDUPER, + SDTOGG, // Toggle SuperDuper + GUI_UNDS, + LSFT_LPRN, + RSFT_RPRN, +}; + +#define HPR_ESC ALL_T(KC_ESC) +#define SFT_ENT SFT_T(KC_ENT) +#define BRWS_L S(LGUI(KC_LBRC)) +#define BRWS_R S(LGUI(KC_RBRC)) + +enum process_combo_event { + CB_SUPERDUPER, +}; + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [_QWERTY] = LAYOUT_all( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + HPR_ESC, 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_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY, + LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + [_COLEMAK] = LAYOUT_all( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + HPR_ESC, 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_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY, + LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + [_QWOC] = LAYOUT_all( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + HPR_ESC, 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_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY, + LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + [_SUPERDUPER] = LAYOUT_all( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + RESET, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, BRWS_L, BRWS_R, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + KC_SPC, KC_LALT, _______, _______, KC_BSPC,KC_LGUI,KC_LEFT, KC_DOWN, KC_UP,KC_RGHT, KC_DEL, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, KC_LSFT, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______, ______,______, ______,______ + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + + set_superduper_key_combo_layer(_QWERTY); + } + return false; + + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + + set_superduper_key_combo_layer(_COLEMAK); + } + return false; + + case QWOC: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWOC); + + set_superduper_key_combo_layer(_QWOC); + } + return false; + + case SDTOGG: + if (record->event.pressed) { + toggle_superduper_mode(); + } + return false; + + // Macros + + // 1. Hold for LGUI, tap for Underscore + case GUI_UNDS: + perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + return false; + + // 2. Hold for LSHIFT, tap for Parens open + case LSFT_LPRN: + perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + return false; + + // 3. Hold for RSHIFT, tap for Parens close + case RSFT_RPRN: + perform_space_cadet(record, KC_RSFT, KC_RSFT, KC_0); + return false; + + default: + return true; + } + return true; +} + +void matrix_setup(void) { + set_superduper_key_combos(); +} + +void process_combo_event(uint8_t combo_index, bool pressed) { + if (pressed) { + switch(combo_index) { + case CB_SUPERDUPER: + layer_on(_SUPERDUPER); + break; + } + } else { + layer_off(_SUPERDUPER); + unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them + } +} diff --git a/keyboards/converter/usb_usb/keymaps/narze/rules.mk b/keyboards/converter/usb_usb/keymaps/narze/rules.mk new file mode 100644 index 0000000000..657773e84e --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/narze/rules.mk @@ -0,0 +1,3 @@ +EXTRAKEY_ENABLE = no +NKRO_ENABLE = yes +COMBO_ENABLE = yes diff --git a/keyboards/converter/usb_usb/pro_micro/rules.mk b/keyboards/converter/usb_usb/pro_micro/rules.mk index 7c04fa34fd..3437a35bdf 100644 --- a/keyboards/converter/usb_usb/pro_micro/rules.mk +++ b/keyboards/converter/usb_usb/pro_micro/rules.mk @@ -1 +1,2 @@ +# Processor frequency F_CPU = 8000000 diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk index dfe89ee7d9..b4f37d3ad8 100644 --- a/keyboards/converter/usb_usb/rules.mk +++ b/keyboards/converter/usb_usb/rules.mk @@ -1,55 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. - -# Since there are different hardware variations of these adapters and since these -# have different CPU clocks, the clock speed should be set in the rules.mk file of the -# respective hardware variantion (i.e. subproject). For example, in /pro_micro/rules.mk -# this is set to 8000000. -# The value here is only a fallback and is ignored if it is defined in the subproject. -F_CPU ?= 16000000 - -DEFAULT_FOLDER = converter/usb_usb/hasu - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -65,3 +26,5 @@ USB_HID_ENABLE = yes CUSTOM_MATRIX = yes SRC = custom_matrix.cpp + +DEFAULT_FOLDER = converter/usb_usb/hasu diff --git a/keyboards/converter/xt_usb/config.h b/keyboards/converter/xt_usb/config.h index ecebc123fa..fe79953873 100644 --- a/keyboards/converter/xt_usb/config.h +++ b/keyboards/converter/xt_usb/config.h @@ -17,6 +17,8 @@ along with this program. If not, see . #pragma once +#include "config_common.h" + #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6512 #define DEVICE_VER 0x0001 diff --git a/keyboards/converter/xt_usb/info.json b/keyboards/converter/xt_usb/info.json index 1fde77d1f9..2de390ae07 100644 --- a/keyboards/converter/xt_usb/info.json +++ b/keyboards/converter/xt_usb/info.json @@ -40,7 +40,7 @@ {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"[", "x":13.75, "y":1}, - {"label":"]", "x":14.75, "y":1}, + {"label":"]", "x":14.75, "y":1, "w": 1.25}, {"label":"7", "x":17, "y":1}, {"label":"8", "x":18, "y":1}, {"label":"9", "x":19, "y":1}, @@ -79,7 +79,7 @@ {"label":".", "x":12.5, "y":3}, {"label":"/", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.5}, - {"label":"Print Screen", "x":16, "y":3}, + {"label":"*", "x":16, "y":3}, {"label":"1", "x":17, "y":3}, {"label":"2", "x":18, "y":3}, {"label":"3", "x":19, "y":3}, diff --git a/keyboards/converter/xt_usb/keymaps/default/keymap.c b/keyboards/converter/xt_usb/keymaps/default/keymap.c index 3ef6060700..b44b946e8f 100644 --- a/keyboards/converter/xt_usb/keymaps/default/keymap.c +++ b/keyboards/converter/xt_usb/keymaps/default/keymap.c @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------| |------------------------------------------------------|Ent|---------------| * | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| | * |-------| |----------------------------------------------------------------------| | - * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +| + * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift| *| 1| 2| 3| +| * |-------| |----------------------------------------------------------------------| | * | F9|F10| | Alt | Space |CapsLck| 0 | . | | * `-------' `--------------------------------------------------------------------------' @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, 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_NLCK, KC_SLCK, KC_F3, KC_F4, 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_P7, KC_P8, KC_P9, KC_PMNS, KC_F5, KC_F6, 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_GRV, KC_ENT, KC_P4, KC_P5, KC_P6, - KC_F7, KC_F8, KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PSCR,KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_F7, KC_F8, KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PAST,KC_P1, KC_P2, KC_P3, KC_PPLS, KC_F9, KC_F10, KC_LALT, KC_SPC, KC_CAPS, KC_P0, KC_PDOT ), diff --git a/keyboards/converter/xt_usb/led.c b/keyboards/converter/xt_usb/led.c deleted file mode 100644 index 6fa077032b..0000000000 --- a/keyboards/converter/xt_usb/led.c +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2016 Ethan Apodaca - -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 . -*/ - -#include "led.h" - -void led_set(uint8_t usb_led) { - //XT Keyboards do not have LEDs, nothing to do. -} diff --git a/keyboards/converter/xt_usb/matrix.c b/keyboards/converter/xt_usb/matrix.c index e2d7117b13..d48f1a887f 100644 --- a/keyboards/converter/xt_usb/matrix.c +++ b/keyboards/converter/xt_usb/matrix.c @@ -99,25 +99,25 @@ static uint8_t move_e0code(uint8_t code) { uint8_t matrix_scan(void) { static enum { - INIT, - E0, + XT_STATE_INIT, + XT_STATE_E0, // Pause: E1 1D 45, E1 9D C5 - E1, - E1_1D, - E1_9D, - } state = INIT; + XT_STATE_E1, + XT_STATE_E1_1D, + XT_STATE_E1_9D, + } state = XT_STATE_INIT; uint8_t code = xt_host_recv(); if (!code) return 0; xprintf("%02X ", code); switch (state) { - case INIT: + case XT_STATE_INIT: switch (code) { case 0xE0: - state = E0; + state = XT_STATE_E0; break; case 0xE1: - state = E1; + state = XT_STATE_E1; break; default: if (code < 0x80) @@ -127,59 +127,59 @@ uint8_t matrix_scan(void) break; } break; - case E0: + case XT_STATE_E0: switch (code) { case 0x2A: case 0xAA: case 0x36: case 0xB6: //ignore fake shift - state = INIT; + state = XT_STATE_INIT; break; default: if (code < 0x80) matrix_make(move_e0code(code)); else matrix_break(move_e0code(code & 0x7F)); - state = INIT; + state = XT_STATE_INIT; break; } break; - case E1: + case XT_STATE_E1: switch (code) { case 0x1D: - state = E1_1D; + state = XT_STATE_E1_1D; break; case 0x9D: - state = E1_9D; + state = XT_STATE_E1_9D; break; default: - state = INIT; + state = XT_STATE_INIT; break; } break; - case E1_1D: + case XT_STATE_E1_1D: switch (code) { case 0x45: matrix_make(0x55); break; default: - state = INIT; + state = XT_STATE_INIT; break; } break; - case E1_9D: + case XT_STATE_E1_9D: switch (code) { case 0x45: matrix_break(0x55); break; default: - state = INIT; + state = XT_STATE_INIT; break; } break; default: - state = INIT; + state = XT_STATE_INIT; } matrix_scan_quantum(); return 1; diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index 1f96251830..444e5f02df 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This indicates which bootloader is present on the board. -# BOOTLOADER = caterina # Pro Micro -BOOTLOADER = halfkay # Teensy +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. @@ -53,7 +23,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover XT_ENABLE = yes CUSTOM_MATRIX = yes -SRC = matrix.c led.c +SRC += matrix.c # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax diff --git a/keyboards/converter/xt_usb/xt_usb.h b/keyboards/converter/xt_usb/xt_usb.h index 9785158b4c..88d9f576c8 100644 --- a/keyboards/converter/xt_usb/xt_usb.h +++ b/keyboards/converter/xt_usb/xt_usb.h @@ -26,7 +26,7 @@ along with this program. If not, see . * |-------| |------------------------------------------------------|Ent|---------------| * | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| | * |-------| |----------------------------------------------------------------------| | - * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +| + * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift| *| 1| 2| 3| +| * |-------| |----------------------------------------------------------------------| | * | F9|F10| | Alt | Space |CapsLck| 0 | . | | * `-------' `--------------------------------------------------------------------------' @@ -38,7 +38,7 @@ along with this program. If not, see . * |-------| |------------------------------------------------------| 1C|---------------| * | 3F| 40| | 1D | 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| | 4B| 4C| 4D| | * |-------| |----------------------------------------------------------------------| | - * | 41| 42| | 2A | 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 36 |*37| 4F| 50| 51| 4E| + * | 41| 42| | 2A | 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 36 | 37| 4F| 50| 51| 4E| * |-------| |----------------------------------------------------------------------| | * | 43| 44| | 38 | 39 | 3A | 52 | 53 | | * `-------' `--------------------------------------------------------------------------' @@ -47,7 +47,7 @@ along with this program. If not, see . K3B,K3C, K01,K02,K03,K04,K05,K06,K07,K08,K09,K0A,K0B,K0C,K0D,K0E, K45, K46, \ K3D,K3E, K0F,K10,K11,K12,K13,K14,K15,K16,K17,K18,K19,K1A,K1B, K47,K48,K49,K4A, \ K3F,K40, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K1C,K4B,K4C,K4D, \ - K41,K42, K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,K35,K36,K54,K4F,K50,K51,K4E, \ + K41,K42, K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,K35,K36,K37,K4F,K50,K51,K4E, \ K43,K44, K38, K39, K3A, K52, K53 \ ) { \ { KC_NO, K01, K02, K03, K04, K05, K06, K07 }, \ @@ -56,11 +56,11 @@ along with this program. If not, see . { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ { K20, K21, K22, K23, K24, K25, K26, K27 }, \ { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ { K40, K41, K42, K43, K44, K45, K46, K47 }, \ { K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ - { K50, K51, K52, K53, K54, KC_NO, KC_NO, KC_NO }, \ + { K50, K51, K52, K53, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ diff --git a/keyboards/copenhagen_click/click_pad_v1/click_pad_v1.c b/keyboards/copenhagen_click/click_pad_v1/click_pad_v1.c new file mode 100755 index 0000000000..aab96c9388 --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/click_pad_v1.c @@ -0,0 +1,16 @@ +/* Copyright 2019 mini-ninja-64 + * + * 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 . + */ +#include "click_pad_v1.h" diff --git a/keyboards/copenhagen_click/click_pad_v1/click_pad_v1.h b/keyboards/copenhagen_click/click_pad_v1/click_pad_v1.h new file mode 100755 index 0000000000..a5a8d9d699 --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/click_pad_v1.h @@ -0,0 +1,28 @@ +/* Copyright 2019 mini-ninja-64 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( k00 ) { { k00 } } \ No newline at end of file diff --git a/keyboards/copenhagen_click/click_pad_v1/config.h b/keyboards/copenhagen_click/click_pad_v1/config.h new file mode 100755 index 0000000000..e459925c84 --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 mini-ninja-64 + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x27DB +#define DEVICE_VER 0x0001 +#define MANUFACTURER Copenhagen Click +#define PRODUCT Click Pad V1 +#define DESCRIPTION A single switch macropad given out at the Copenhagen Click 2019 meetup. + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F7 } +#define MATRIX_COL_PINS { F5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/copenhagen_click/click_pad_v1/info.json b/keyboards/copenhagen_click/click_pad_v1/info.json new file mode 100755 index 0000000000..b3327e8809 --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "CopenhagenClickPad-V1", + "url": "http://copenhagenclick.com/ClickPad-V1/", + "maintainer": "mini-ninja-64", + "width": 1, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}] + } + } +} \ No newline at end of file diff --git a/keyboards/copenhagen_click/click_pad_v1/keymaps/default/config.h b/keyboards/copenhagen_click/click_pad_v1/keymaps/default/config.h new file mode 100755 index 0000000000..3b73639db2 --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 mini-ninja-64 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/copenhagen_click/click_pad_v1/keymaps/default/keymap.c b/keyboards/copenhagen_click/click_pad_v1/keymaps/default/keymap.c new file mode 100755 index 0000000000..a118727826 --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/keymaps/default/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2019 mini-ninja-64 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + COPENHAGEN = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( COPENHAGEN ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COPENHAGEN: + if (record->event.pressed) { + // when keycode COPENHAGEN is pressed + SEND_STRING("Copenhagen Click!"); + } else { + // when keycode COPENHAGEN is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + backlight_enable(); + breathing_enable(); + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/copenhagen_click/click_pad_v1/keymaps/default/readme.md b/keyboards/copenhagen_click/click_pad_v1/keymaps/default/readme.md new file mode 100755 index 0000000000..97b159b94e --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for CopenhagenClickPad-V1 diff --git a/keyboards/copenhagen_click/click_pad_v1/readme.md b/keyboards/copenhagen_click/click_pad_v1/readme.md new file mode 100755 index 0000000000..48f07a2149 --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/readme.md @@ -0,0 +1,15 @@ +# CopenhagenClickPad-V1 + +![ClickPad](https://i.imgur.com/de8Z0wj.jpg) + +A single switch macropad given out at the Copenhagen Click 2019 meetup. + +Keyboard Maintainer: [mini-ninja-64](https://github.com/mini-ninja-64) +Hardware Supported: Copenhagen Click Pad V1 +Hardware Availability: Copenhagen Click 2019 + +Make example for this keyboard (after setting up your build environment): + + make copenhagen_click/click_pad_v1: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). diff --git a/keyboards/copenhagen_click/click_pad_v1/rules.mk b/keyboards/copenhagen_click/click_pad_v1/rules.mk new file mode 100755 index 0000000000..dd7a086de8 --- /dev/null +++ b/keyboards/copenhagen_click/click_pad_v1/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/coseyfannitutti/discipad/config.h b/keyboards/coseyfannitutti/discipad/config.h new file mode 100644 index 0000000000..7fe0915824 --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/config.h @@ -0,0 +1,250 @@ +/* +Copyright 2019 coseyfannitutti + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1769 +#define DEVICE_VER 0x0001 +#define MANUFACTURER coseyfannitutti +#define PRODUCT DISCIPAD +#define DESCRIPTION 17-key numpad assembled with only through hole components + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + +/* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ +#define MATRIX_ROW_PINS { B1, B0, D7, D6, D4 } +#define MATRIX_COL_PINS { C0, C1, C2, C3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +*/ diff --git a/keyboards/coseyfannitutti/discipad/discipad.c b/keyboards/coseyfannitutti/discipad/discipad.c new file mode 100644 index 0000000000..c8f6e0a178 --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/discipad.c @@ -0,0 +1,24 @@ +/* Copyright 2019 coseyfannitutti + * + * 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 . + */ +#include "discipad.h" + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/coseyfannitutti/discipad/discipad.h b/keyboards/coseyfannitutti/discipad/discipad.h new file mode 100644 index 0000000000..5ce8b46342 --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/discipad.h @@ -0,0 +1,43 @@ +/* Copyright 2019 coseyfannitutti + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define _x_ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K40, K42, K43 \ +) { \ +{ K00, K01, K02, K03, }, \ +{ K10, K11, K12, _x_, }, \ +{ K20, K21, K22, K23, }, \ +{ K30, K31, K32, _x_, }, \ +{ K40, _x_, K42, K43, }, \ +} + diff --git a/keyboards/coseyfannitutti/discipad/info.json b/keyboards/coseyfannitutti/discipad/info.json new file mode 100644 index 0000000000..fc50d3a187 --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "DISCIPAD", + "url": "https://github.com/coseyfannitutti/discipad", + "maintainer": "coseyfannitutti", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":3, "h":2}] + } + } +} diff --git a/keyboards/coseyfannitutti/discipad/keymaps/default/keymap.c b/keyboards/coseyfannitutti/discipad/keymaps/default/keymap.c new file mode 100644 index 0000000000..ffdc1044df --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT ) +}; diff --git a/keyboards/coseyfannitutti/discipad/readme.md b/keyboards/coseyfannitutti/discipad/readme.md new file mode 100644 index 0000000000..4d5365fced --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/readme.md @@ -0,0 +1,15 @@ +# DISCIPAD + +![discipline](https://i.imgur.com/3Coydx7.jpg) + +A 17-key numpad that can be assembled with only through hole components, including usb type-c + +Keyboard Maintainer: [coseyfannitutti](https://github.com/coseyfannitutti) +Hardware Supported: DISCIPAD, atmega328p +Hardware Availability: [cftkb.com](http://www.cftkb.com), [GitHub](https://github.com/coseyfannitutti/discipad) + +Make example for this keyboard (after setting up your build environment): + + make coseyfannitutti/discipad: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). diff --git a/keyboards/coseyfannitutti/discipad/rules.mk b/keyboards/coseyfannitutti/discipad/rules.mk new file mode 100644 index 0000000000..a9d06d608c --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/rules.mk @@ -0,0 +1,41 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + +# Flash program via avrdude, but default command is not suitable. +# You can use coseyfannitutti/discipad:default:program +PROGRAM_CMD = avrdude -c usbasp -p m328p -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +# disable debug code +OPT_DEFS = -DDEBUG_LEVEL=0 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/coseyfannitutti/discipad/usbconfig.h b/keyboards/coseyfannitutti/discipad/usbconfig.h new file mode 100644 index 0000000000..510658b447 --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/usbconfig.h @@ -0,0 +1,386 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'c','o','s','e','y','f','a','n','n','i','t','u','t','t','i' +#define USB_CFG_VENDOR_NAME_LEN 15 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'D','I','S','C','I','P','A','D' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +#define USB_CFG_SERIAL_NUMBER '0' +#define USB_CFG_SERIAL_NUMBER_LEN 1 +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +// /* #define USB_INTR_CFG_CLR 0 */ +// /* #define USB_INTR_ENABLE EIMSK */ +// #define USB_INTR_ENABLE_BIT INT1 +// /* #define USB_INTR_PENDING EIFR */ +// #define USB_INTR_PENDING_BIT INTF1 +// #define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/coseyfannitutti/discipline/config.h b/keyboards/coseyfannitutti/discipline/config.h new file mode 100644 index 0000000000..46dd49c51f --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/config.h @@ -0,0 +1,248 @@ +/*Copyright 2019 coseyfannitutti + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6869 +#define DEVICE_VER 0x0001 +#define MANUFACTURER coseyfannitutti +#define PRODUCT DISCIPLINE +#define DESCRIPTION 65% keyboard that can be assembled with only through hole components + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + +#define MATRIX_ROW_PINS { B2, A1, B1, A0, B0 } +#define MATRIX_COL_PINS { A2, B3, A3, B4, A4, D5, D6, C6, C5, C4, C3, C2, C1, C0, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + diff --git a/keyboards/coseyfannitutti/discipline/discipline.c b/keyboards/coseyfannitutti/discipline/discipline.c new file mode 100644 index 0000000000..6a788ce0e8 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/discipline.c @@ -0,0 +1,24 @@ +/* Copyright 2019 coseyfannitutti + * + * 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 . + */ +#include "discipline.h" + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/coseyfannitutti/discipline/discipline.h b/keyboards/coseyfannitutti/discipline/discipline.h new file mode 100644 index 0000000000..1703a61284 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/discipline.h @@ -0,0 +1,78 @@ +/* Copyright 2019 coseyfannitutti + * + * 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 . + */ + +#pragma once + +#define _x_ KC_NO + +#include "quantum.h" + +#define LAYOUT_65_ansi( \ + 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, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, 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, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ +} + +#define LAYOUT_65_ansi_2_right_mods( \ + 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, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4C, 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, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, _x_, K4C, K4D, K4E} \ +} + +#define LAYOUT_wkl_ansi_2_right_mods( \ + 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, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K42, K46, K49, K4A, K4C, 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, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, _x_, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, _x_, K4C, K4D, K4E} \ +} + +#define LAYOUT_wkl_ansi_3_right_mods( \ + 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, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K42, K46, K49, K4A, K4B, K4C, 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, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, _x_, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ +} + diff --git a/keyboards/coseyfannitutti/discipline/info.json b/keyboards/coseyfannitutti/discipline/info.json new file mode 100644 index 0000000000..522e800678 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "DISCIPLINE", + "url": "https://github.com/coseyfannitutti/discipline", + "maintainer": "coseyfannitutti", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"~", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_2_right_mods": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"~", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_wkl_ansi_2_right_mods": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"~", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_wkl_ansi_3_right_mods": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"~", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} diff --git a/keyboards/coseyfannitutti/discipline/keymaps/67_ansi/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/67_ansi/keymap.c new file mode 100644 index 0000000000..34410d54af --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/67_ansi/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | FN ||||||| L | D | R | + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| + * |---------------------------------------------------------------------------------------------+ + * | Tab | | | |RESET| | | | | | |PAUSE| | \ | | + * |---------------------------------------------------------------------------------------------+ + * | Caps | | | | | | | | | | | INS | Enter | HOME| + * |---------------------------------------------------------------------------------------------+ + * | Shift | | | | | | | | | | | Shift |VOLUP| END | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt| FN ||||||| L |VOLDN| R | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_65_ansi_2_right_mods( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT_65_ansi_2_right_mods( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/discipline/keymaps/coseyfannitutti/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/coseyfannitutti/keymap.c new file mode 100644 index 0000000000..cb14d23f10 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/coseyfannitutti/keymap.c @@ -0,0 +1,69 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | FN ||||||| L | D | R | + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| + * |---------------------------------------------------------------------------------------------+ + * | Tab | | | |RESET| | | | | | |PAUSE| | \ | | + * |---------------------------------------------------------------------------------------------+ + * | Caps | | | | | | | | | | | INS | Enter | HOME| + * |---------------------------------------------------------------------------------------------+ + * | Shift | | | | | | | | | | | Shift |VOLUP| END | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt| FN ||||||| L |VOLDN| R | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_65_ansi_2_right_mods( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(_FL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT_65_ansi_2_right_mods( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; + diff --git a/keyboards/coseyfannitutti/discipline/keymaps/default/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/default/keymap.c new file mode 100644 index 0000000000..da433c1a6b --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | FN |RCtrl| L | D | R | + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| + * |---------------------------------------------------------------------------------------------+ + * | Tab | | | |RESET| | | | | | |PAUSE| | \ | | + * |---------------------------------------------------------------------------------------------+ + * | Caps | | | | | | | | | | | INS | Enter | HOME| + * |---------------------------------------------------------------------------------------------+ + * | Shift | | | | | | | | | | | Shift |VOLUP| END | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt| FN |RCtrl| L |VOLDN| R | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_65_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT_65_ansi( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_2_right_mods/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_2_right_mods/keymap.c new file mode 100644 index 0000000000..01b1e21f11 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_2_right_mods/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Space | RAlt | FN | L | D | R | + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| + * |---------------------------------------------------------------------------------------------+ + * | Tab | | | |RESET| | | | | | |PAUSE| | \ | | + * |---------------------------------------------------------------------------------------------+ + * | Caps | | | | | | | | | | | INS | Enter | HOME| + * |---------------------------------------------------------------------------------------------+ + * | Shift | | | | | | | | | | | Shift |VOLUP| END | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Alt | | RAlt | FN | L |VOLDN| R | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_wkl_ansi_2_right_mods( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT_wkl_ansi_2_right_mods( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl alt space alt fn left down right*/ + KC_LCTL, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_3_right_mods/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_3_right_mods/keymap.c new file mode 100644 index 0000000000..05f8810e6c --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_3_right_mods/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Space | RAlt | FN |RCtrl| L | D | R | + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| + * |---------------------------------------------------------------------------------------------+ + * | Tab |STATC|BRTHE|RNBOW|RESET| | | | | | |PAUSE| | \ | | + * |---------------------------------------------------------------------------------------------+ + * | Caps |RGBH+|RGBS+|RGBB+| | | | | | | | INS | Enter | HOME| + * |---------------------------------------------------------------------------------------------+ + * | Shift |RGBH-|RGBS-|RGBB-| | | | |RGBM-|RGBM+|RGBTG| Shift |VOLUP| END | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Alt | | RAlt| FN |RCtrl| L |VOLDN| R | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_wkl_ansi_3_right_mods( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT_wkl_ansi_3_right_mods( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl alt space alt fn ctrl left down right*/ + KC_LCTL, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/discipline/readme.md b/keyboards/coseyfannitutti/discipline/readme.md new file mode 100644 index 0000000000..d11f1724f6 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/readme.md @@ -0,0 +1,15 @@ +# DISCIPLINE + +![discipline](https://i.imgur.com/OqQ1Ko8.jpg) + +A 65% keyboard that can be assembled with only through hole components, including usb type-c + +Keyboard Maintainer: [coseyfannitutti](https://github.com/coseyfannitutti) +Hardware Supported: DISCIPLINE, atmega32a +Hardware Availability: [cftkb.com](http://www.cftkb.com), [GitHub](https://github.com/coseyfannitutti/discipline) + +Make example for this keyboard (after setting up your build environment): + + make coseyfannitutti/discipline: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). diff --git a/keyboards/coseyfannitutti/discipline/rules.mk b/keyboards/coseyfannitutti/discipline/rules.mk new file mode 100644 index 0000000000..24b5969b74 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/rules.mk @@ -0,0 +1,45 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + +# Flash program via avrdude, but default command is not suitable. +# You can use plaid:default:program +PROGRAM_CMD = avrdude -c usbasp -p m32 -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +# disable debug code +OPT_DEFS = -DDEBUG_LEVEL=0 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 65_ansi diff --git a/keyboards/coseyfannitutti/discipline/usbconfig.h b/keyboards/coseyfannitutti/discipline/usbconfig.h new file mode 100644 index 0000000000..da3ed46079 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/usbconfig.h @@ -0,0 +1,386 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'c','o','s','e','y','f','a','n','n','i','t','u','t','t','i' +#define USB_CFG_VENDOR_NAME_LEN 15 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'D','I','S','C','I','P','L','I','N','E' +#define USB_CFG_DEVICE_NAME_LEN 10 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +#define USB_CFG_SERIAL_NUMBER '0' +#define USB_CFG_SERIAL_NUMBER_LEN 1 +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +// /* #define USB_INTR_CFG_CLR 0 */ +// /* #define USB_INTR_ENABLE EIMSK */ +// #define USB_INTR_ENABLE_BIT INT1 +// /* #define USB_INTR_PENDING EIFR */ +// #define USB_INTR_PENDING_BIT INTF1 +// #define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk index fa02fe6fce..f390cfbe09 100644 --- a/keyboards/coseyfannitutti/mullet/rules.mk +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/coseyfannitutti/mulletpad/rules.mk b/keyboards/coseyfannitutti/mulletpad/rules.mk index b3a473ef4b..282a4a3650 100644 --- a/keyboards/coseyfannitutti/mulletpad/rules.mk +++ b/keyboards/coseyfannitutti/mulletpad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/cospad/rules.mk b/keyboards/cospad/rules.mk index 61c7a5182c..075320a22f 100644 --- a/keyboards/cospad/rules.mk +++ b/keyboards/cospad/rules.mk @@ -1,63 +1,16 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/crawlpad/rules.mk b/keyboards/crawlpad/rules.mk index 2dda38e201..00931610a1 100755 --- a/keyboards/crawlpad/rules.mk +++ b/keyboards/crawlpad/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/crkbd/crkbd.c b/keyboards/crkbd/crkbd.c index d420ccda27..7417ad6047 100644 --- a/keyboards/crkbd/crkbd.c +++ b/keyboards/crkbd/crkbd.c @@ -1,5 +1,4 @@ #include "crkbd.h" -#include "ssd1306.h" bool process_record_kb(uint16_t keycode, keyrecord_t *record) { #ifdef SSD1306OLED diff --git a/keyboards/crkbd/keymaps/default/config.h b/keyboards/crkbd/keymaps/default/config.h index 644e813650..899fde008d 100644 --- a/keyboards/crkbd/keymaps/default/config.h +++ b/keyboards/crkbd/keymaps/default/config.h @@ -35,10 +35,12 @@ along with this program. If not, see . #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 27 -#define RGBLIGHT_LIMIT_VAL 120 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#ifdef RGBLIGHT_ENABLE + #undef RGBLED_NUM + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 27 + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#endif diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 5bb89d2594..446e3281e4 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -1,14 +1,5 @@ #include QMK_KEYBOARD_H -#include "bootloader.h" -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -39,71 +30,54 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; -#define KC______ KC_TRNS -#define KC_XXXXX KC_NO -#define KC_LOWER LOWER -#define KC_RAISE RAISE -#define KC_RST RESET -#define KC_LRST RGBRST -#define KC_LTOG RGB_TOG -#define KC_LHUI RGB_HUI -#define KC_LHUD RGB_HUD -#define KC_LSAI RGB_SAI -#define KC_LSAD RGB_SAD -#define KC_LVAI RGB_VAI -#define KC_LVAD RGB_VAD -#define KC_LMOD RGB_MOD -#define KC_CTLTB CTL_T(KC_TAB) -#define KC_GUIEI GUI_T(KC_LANG2) -#define KC_ALTKN ALT_T(KC_LANG1) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' + [_QWERTY] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + //`--------------------------' `--------------------------' + ), - [_LOWER] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - CTLTB, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, XXXXX,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, XXXXX,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' + [_LOWER] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + //`--------------------------' `--------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + //`--------------------------' `--------------------------' ), - [_RAISE] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - ESC, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' - ), - - [_ADJUST] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' + [_ADJUST] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + //`--------------------------' `--------------------------' ) }; @@ -157,7 +131,7 @@ void matrix_render_user(struct CharacterMatrix *matrix) { // If you want to change the display of OLED, you need to change here matrix_write_ln(matrix, read_layer_state()); matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_keylogs()); //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); //matrix_write_ln(matrix, read_host_led_state()); //matrix_write_ln(matrix, read_timelog()); @@ -195,7 +169,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { persistent_default_layer_set(1UL<<_QWERTY); } return false; - break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -205,7 +178,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; - break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); @@ -215,7 +187,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; - break; case ADJUST: if (record->event.pressed) { layer_on(_ADJUST); @@ -223,7 +194,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_ADJUST); } return false; - break; case RGB_MOD: #ifdef RGBLIGHT_ENABLE if (record->event.pressed) { @@ -233,7 +203,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #endif return false; - break; case RGBRST: #ifdef RGBLIGHT_ENABLE if (record->event.pressed) { diff --git a/keyboards/crkbd/keymaps/default/rules.mk b/keyboards/crkbd/keymaps/default/rules.mk index 16deaf45d1..f84e5b2af8 100644 --- a/keyboards/crkbd/keymaps/default/rules.mk +++ b/keyboards/crkbd/keymaps/default/rules.mk @@ -1,25 +1,4 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - # If you want to change the display of OLED, you need to change here SRC += ./lib/glcdfont.c \ ./lib/rgb_state_reader.c \ diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h index 724d52c38c..26af029573 100644 --- a/keyboards/crkbd/keymaps/drashna/config.h +++ b/keyboards/crkbd/keymaps/drashna/config.h @@ -20,7 +20,6 @@ along with this program. If not, see . #pragma once - /* Select hand configuration */ // #define MASTER_LEFT @@ -36,53 +35,36 @@ along with this program. If not, see . // #define TAPPING_TERM 100 #ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 27 +# undef RGBLED_NUM +# define RGBLED_NUM 27 -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_LIMIT_VAL 100 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 5 +# define RGBLIGHT_LIMIT_VAL 120 #endif #ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS - -// # define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 #endif #ifdef AUDIO_ENABLE -# define B6_AUDIO -// #define NO_MUSIC_MODE +# define B6_AUDIO +# define NO_MUSIC_MODE +#endif + +#ifdef HAPTIC_ENABLE +# define SOLENOID_PIN B7 #endif #undef PRODUCT @@ -92,4 +74,5 @@ along with this program. If not, see . // #define OLED_FONT_WIDTH 5 // #define OLED_FONT_HEIGHT 7 +#define OLED_DISABLE_TIMEOUT #define TAPPING_TERM_PER_KEY diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c index 28521b4289..2bfc3fac6d 100644 --- a/keyboards/crkbd/keymaps/drashna/glcdfont.c +++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c @@ -1,17 +1,18 @@ #pragma once #ifdef __AVR__ - #include - #include +# include +# include #elif defined(ESP8266) - #include +# include #else - #define PROGMEM +# define PROGMEM #endif -// Helidox 8x6 font with QMK Firmware Logo -// Online editor: http://teripom.x0.com/ +// Corne 8x6 font with QMK Firmware Logo +// Online editor: https://helixfonteditor.netlify.com/ +// clang-format off const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index af0bc0d9a7..9a1beeb74b 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -1,18 +1,50 @@ -#include QMK_KEYBOARD_H #include "drashna.h" -extern keymap_config_t keymap_config; extern uint8_t is_master; #ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings +// Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; #endif - -enum crkbd_keycodes { - RGBRST = NEW_SAFE_RANGE +#ifdef OLED_DRIVER_ENABLE +# define KEYLOGGER_LENGTH 5 +static uint32_t oled_timer = 0; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; +static uint16_t log_timer = 0; +// clang-format off +static const char PROGMEM code_to_name[0xFF] = { +// 0 1 2 3 4 5 6 7 8 9 A B c D E F + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x + '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x + ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x + ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx + 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx }; +void add_keylog(uint16_t keycode); +#endif + +enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; + +/* + * The `LAYOUT_crkbd_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + #define LAYOUT_crkbd_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -20,7 +52,7 @@ enum crkbd_keycodes { ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ ) @@ -99,166 +131,174 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_wrapper( \ KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, - _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, - _______, KC_NUKE, _______, _______, TG_MODS, _______ + MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, + HPT_TOG, KC_NUKE, _______, _______, TG_MODS, HPT_FBK ) }; +// clang-format on -void matrix_init_keymap(void) { -#ifndef CONVERT_TO_PROTON_C - setPinOutput(D5); - writePinHigh(D5); - - setPinOutput(B0); - writePinHigh(B0); +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + add_keylog(keycode); #endif +#ifndef SPLIT_KEYBOARD + if (keycode == RESET && !is_master) { + return false; + } +#endif + } + return true; } - #ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (is_master) { - return OLED_ROTATION_270; - } else { - return rotation; - } -} - -void render_crkbd_logo(void) { - static const char PROGMEM crkbd_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, - 0}; - oled_write_P(crkbd_logo, false); -} - -#define KEYLOG_LEN (int)(32 / OLED_FONT_WIDTH) -char keylog_str[KEYLOG_LEN] = {}; -uint8_t keylogs_str_idx = 0; -uint16_t log_timer = 0; - -const char code_to_name[60] = { - ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', - 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', - '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } void add_keylog(uint16_t keycode) { - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || - (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { + keycode = keycode & 0xFF; + } else if (keycode > 0xFF) { + keycode = 0; + } - for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) { + for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { keylog_str[i] = keylog_str[i - 1]; } - if (keycode < 60) { - keylog_str[0] = code_to_name[keycode]; + + if (keycode < (sizeof(code_to_name) / sizeof(char))) { + keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); } - keylog_str[KEYLOG_LEN] = 0; log_timer = timer_read(); } void update_log(void) { if (timer_elapsed(log_timer) > 750) { - add_keylog(0); + // add_keylog(0); } } - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { add_keylog(keycode); } - return true; -} - -void render_status(void) { - - oled_write_P(PSTR("Layer"), false); - switch (biton32(layer_state)) { - case 0: - oled_write_P(PSTR("Base "), false); - break; - case _RAISE: - oled_write_P(PSTR("Raise"), false); - break; - case _LOWER: - oled_write_P(PSTR("Lower"), false); - break; - case _ADJUST: - oled_write_P(PSTR("Adjst"), false); - break; - default: - oled_write_P(PSTR("Unkn "), false); - break; - } - oled_write_P(PSTR("Lyout"), false); - switch (biton32(default_layer_state)) { - case _QWERTY: - oled_write_P(PSTR("QWRTY"), false); - break; - case _COLEMAK: - oled_write_P(PSTR("COLMK"), false); - break; - case _DVORAK: - oled_write_P(PSTR("DVRAK"), false); - break; - case _WORKMAN: - oled_write_P(PSTR("WRKMN"), false); - break; - case _NORMAN: - oled_write_P(PSTR("NORMN"), false); - break; - case _MALTRON: - oled_write_P(PSTR("MLTRN"), false); - break; - case _EUCALYN: - oled_write_P(PSTR("ECLYN"), false); - break; - case _CARPLAX: - oled_write_P(PSTR("CRPLX"), false); - break; - } - - uint8_t modifiers = get_mods(); - uint8_t one_shot = get_oneshot_mods(); - - oled_write_P(PSTR("Mods:"), false); - oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false); - oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false); - oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false); - oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false); - - - oled_write_P(PSTR("BTMGK"), false); - - if (keymap_config.swap_lalt_lgui) { - oled_write_P(PSTR(" Mac "), false); - } else { - oled_write_P(PSTR(" Win "), false); - } - - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(PSTR("Lock:"), false); - oled_write_P(led_usb_state & (1< 30000) { + oled_off(); + return; + } +# ifndef SPLIT_KEYBOARD + else { + oled_on(); + } +# endif + + update_log(); + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_status_secondary(); } } -void matrix_scan_keymap(void) { update_log(); } #endif uint16_t get_tapping_term(uint16_t keycode) { @@ -272,58 +312,72 @@ uint16_t get_tapping_term(uint16_t keycode) { #ifdef RGB_MATRIX_ENABLE -void suspend_power_down_keymap(void) { - rgb_matrix_set_suspend_state(true); -} +void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } -void suspend_wakeup_init_keymap(void) { - rgb_matrix_set_suspend_state(false); +void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } + +void check_default_layer(uint8_t mode, uint8_t type) { + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); + break; + case _COLEMAK: + rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); + break; + case _DVORAK: + rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); + break; + case _WORKMAN: + rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type); + break; + case _NORMAN: + rgb_matrix_layer_helper(HSV_CORAL, mode, rgb_matrix_config.speed, type); + break; + case _MALTRON: + rgb_matrix_layer_helper(HSV_YELLOW, mode, rgb_matrix_config.speed, type); + break; + case _EUCALYN: + rgb_matrix_layer_helper(HSV_PINK, mode, rgb_matrix_config.speed, type); + break; + case _CARPLAX: + rgb_matrix_layer_helper(HSV_BLUE, mode, rgb_matrix_config.speed, type); + break; + } } void rgb_matrix_indicators_user(void) { - if ( userspace_config.rgb_layer_change && -#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + if (userspace_config.rgb_layer_change && +# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED !g_suspend_state && -#endif -#if defined(RGBLIGHT_ENABLE) +# endif +# if defined(RGBLIGHT_ENABLE) (!rgblight_config.enable && rgb_matrix_config.enable) -#else +# else rgb_matrix_config.enable -#endif +# endif ) { - switch (biton32(layer_state)) { - case _MODS: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + switch (get_highest_layer(layer_state)) { case _GAMEPAD: - rgb_matrix_layer_helper(0xFF, 0x80, 0x00, LED_FLAG_UNDERGLOW); break; + rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; case _DIABLO: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; case _RAISE: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; case _LOWER: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; case _ADJUST: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; - default: - switch (biton32(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_UNDERGLOW); break; - case _COLEMAK: - rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; - case _DVORAK: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; - case _WORKMAN: - rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_UNDERGLOW); break; - case _NORMAN: - rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_UNDERGLOW); break; - case _MALTRON: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; - case _EUCALYN: - rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_UNDERGLOW); break; - case _CARPLAX: - rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; - } + rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + default: { + check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); + break; + } } + check_default_layer(0, LED_FLAG_MODIFIER); } } #endif diff --git a/keyboards/crkbd/keymaps/drashna/rules.mk b/keyboards/crkbd/keymaps/drashna/rules.mk index 39b48f9447..492c17e20f 100644 --- a/keyboards/crkbd/keymaps/drashna/rules.mk +++ b/keyboards/crkbd/keymaps/drashna/rules.mk @@ -16,16 +16,12 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing -RGBLIGHT_STARTUP_ANIMATION = yes RGB_MATRIX_ENABLE = WS2812 +HAPTIC_ENABLE = SOLENOID # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend BOOTLOADER = qmk-dfu OLED_DRIVER_ENABLE = yes - -ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes) - RGB_MATRIX_SPLIT_RIGHT=yes -endif diff --git a/keyboards/crkbd/keymaps/dsanchezseco/README.md b/keyboards/crkbd/keymaps/dsanchezseco/README.md new file mode 100644 index 0000000000..ce161e3c55 --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/README.md @@ -0,0 +1,10 @@ +# Dvorak keymap for CRKBD + +To flash the halves use: + +``` +#left side +make crkbd:dsanchezseco:dfu-split-left +#right side, with RGB matrix fix +make crkbd:dsanchezseco:dfu-split-right RGB_MATRIX_SPLIT_RIGHT=yes +``` diff --git a/keyboards/crkbd/keymaps/dsanchezseco/config.h b/keyboards/crkbd/keymaps/dsanchezseco/config.h new file mode 100644 index 0000000000..14efb7d4ec --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/config.h @@ -0,0 +1,69 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C +#define USE_SERIAL + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +// lower maximum brightness to lower power usage and prevent unresponsiveness +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT + +//disable effects +#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom speed controls how much gradient changes +#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue pulses keys hit to shifted hue then fades to current hue +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_EFFECT_MAX diff --git a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c new file mode 100644 index 0000000000..a2e799e198 --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c @@ -0,0 +1,111 @@ +#include QMK_KEYBOARD_H +#include "split_util.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ESC_CTL LCTL_T(KC_ESC) + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum crkbd_layers { + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DVORAK] = LAYOUT( \ + //,-----------------------------------------------. ,-----------------------------------------------. + KC_TAB, KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ESC_CTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_LSFT,KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z,KC_SFTENT,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE,KC_RALT \ + //`-----------------------' `----------------------' + ), + + + [_LOWER] = LAYOUT( \ + //,-----------------------------------------------. ,-----------------------------------------------. + KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RIGHT,KC_RPRN,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,KC_VOLD,KC_VOLU,KC_MPRV,KC_MPLY,KC_MNXT, _______,KC_LEFT,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,KC_DOWN, KC_UP, _______, _______,_______,_______,KC_HOME, KC_END,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______, KC_DEL,_______,_______ \ + //`-----------------------' `----------------------' + ), + + [_RAISE] = LAYOUT( \ + //,-----------------------------------------------. ,-----------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9,KC_RIGHT, KC_0, \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,KC_LEFT, KC_EQL,KC_LBRC,KC_RBRC,KC_BSLS,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,KC_DOWN, KC_UP, _______, _______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______, KC_DEL ,_______,_______ \ + //`-----------------------' `----------------------' + ), + + [_ADJUST] = LAYOUT( \ + //,-----------------------------------------------. ,-----------------------------------------------. + RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,_______,RGB_M_T, _______,_______,_______,_______,KC_RIGHT,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,_______,_______, _______,KC_LEFT,_______,_______,_______,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,KC_PSCR,_______,KC_DOWN, KC_UP, _______, _______,_______,_______,_______,_______,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______, KC_DEL ,_______,_______ \ + //`-----------------------' `----------------------' + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!isLeftHand) + return OLED_ROTATION_180; // flips the display 180 to see it from my side + return rotation; +} + +const char *read_logo(void); +void oled_task_user(void){ + switch (biton32(layer_state)){ + case _DVORAK: + oled_write_ln_P(PSTR("DVRK"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("RAISE"), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("ADJST"), false); + break; + default: + oled_write_ln_P(PSTR("?????"), false); + } + //now print logo + oled_write(read_logo(), false); +} +#endif diff --git a/keyboards/crkbd/keymaps/dsanchezseco/logo_reader.c b/keyboards/crkbd/keymaps/dsanchezseco/logo_reader.c new file mode 100644 index 0000000000..039a538cc5 --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/logo_reader.c @@ -0,0 +1,9 @@ +const char *read_logo(void) { + static char logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + + return logo; +} diff --git a/keyboards/crkbd/keymaps/dsanchezseco/rules.mk b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk new file mode 100644 index 0000000000..44f60368b8 --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk @@ -0,0 +1,15 @@ + +# If you want to change the display of OLED, you need to change here +SRC += ./logo_reader.c + +# enable OLED displays +OLED_DRIVER_ENABLE = yes + +# enable media keys +EXTRAKEY_ENABLE = yes + +# enable LEDs +RGB_MATRIX_ENABLE = WS2812 + +# using elite-c controllers +BOOTLOADER = qmk-dfu diff --git a/keyboards/crkbd/keymaps/foostan/config.h b/keyboards/crkbd/keymaps/foostan/config.h new file mode 100644 index 0000000000..644e813650 --- /dev/null +++ b/keyboards/crkbd/keymaps/foostan/config.h @@ -0,0 +1,44 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/crkbd/keymaps/foostan/keymap.c b/keyboards/crkbd/keymaps/foostan/keymap.c new file mode 100644 index 0000000000..5235b78363 --- /dev/null +++ b/keyboards/crkbd/keymaps/foostan/keymap.c @@ -0,0 +1,241 @@ +#include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + BACKLIT, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_RST RESET +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD +#define KC_GUIEI GUI_T(KC_LANG2) +#define KC_ALTKN ALT_T(KC_LANG1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ESC,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LCTL, F1, F2, F3, F4, F5, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LCTL, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} diff --git a/keyboards/crkbd/keymaps/foostan/rules.mk b/keyboards/crkbd/keymaps/foostan/rules.mk new file mode 100644 index 0000000000..f84e5b2af8 --- /dev/null +++ b/keyboards/crkbd/keymaps/foostan/rules.mk @@ -0,0 +1,10 @@ + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/crkbd/keymaps/hvp/config.h b/keyboards/crkbd/keymaps/hvp/config.h new file mode 100644 index 0000000000..c5c6d1cba8 --- /dev/null +++ b/keyboards/crkbd/keymaps/hvp/config.h @@ -0,0 +1,50 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +//#define TAPPING_FORCE_HOLD +//#define TAPPING_TERM 100 + +#define TAPPING_TERM 150 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 27 +# define RGBLIGHT_LIMIT_VAL 120 +# define RGBLIGHT_HUE_STEP 10 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 +#endif diff --git a/keyboards/crkbd/keymaps/hvp/keymap.c b/keyboards/crkbd/keymaps/hvp/keymap.c new file mode 100644 index 0000000000..b66c360e18 --- /dev/null +++ b/keyboards/crkbd/keymaps/hvp/keymap.c @@ -0,0 +1,183 @@ +#include QMK_KEYBOARD_H +#include "hvp.c" + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,-----------------------------------------. ,-----------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LT(_ADJUST, KC_ESC), KC_A, KC_S, KC_D, LT(_RAISE,KC_F), MT(MOD_LCTL,KC_G), KC_H, KC_J, KC_K, KC_L,TD(TD1),TD(TD2),\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,TD(TD3),KC_SFTENT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT( \ + //,-----------------------------------------. ,-----------------------------------------. + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,KC_NO, KC_DEL,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_NO,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT( \ + //,-----------------------------------------. ,-----------------------------------------. + KC_TAB,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT( \ + //,-----------------------------------------. ,-----------------------------------------. + 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_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + RESET,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_MPLY, KC_MNXT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + //matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/hvp/readme.md b/keyboards/crkbd/keymaps/hvp/readme.md new file mode 100644 index 0000000000..33bb83b83f --- /dev/null +++ b/keyboards/crkbd/keymaps/hvp/readme.md @@ -0,0 +1,5 @@ +Keymap to be used with Eurkey for easy access to swedish characters on first layer. + +Links: + +- https://eurkey.steffen.bruentjen.eu/ \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/hvp/rules.mk b/keyboards/crkbd/keymaps/hvp/rules.mk new file mode 100644 index 0000000000..a651e528cf --- /dev/null +++ b/keyboards/crkbd/keymaps/hvp/rules.mk @@ -0,0 +1,14 @@ + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ + +TAP_DANCE_ENABLE = yes +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# LOCAL_GLCDFONT = yes \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/ninjonas/README.md b/keyboards/crkbd/keymaps/ninjonas/README.md new file mode 100644 index 0000000000..4d7434fa7a --- /dev/null +++ b/keyboards/crkbd/keymaps/ninjonas/README.md @@ -0,0 +1,99 @@ +# ninjonas Keymap for [Corne Keyboard (crkbd)](https://github.com/foostan/crkbd) + +## Keymap +This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](../../../../users/ninjonas). + +More information about the crkbd keyboard can be found [here](https://thomasbaart.nl/2018/11/26/corne-keyboard-helidox-build-log/) + +### QWERTY +```c + //,----------------------------------------------------. ,----------------------------------------------------. + // Tab, Q, W, E, R, T, Y, U, I, O, P, \ + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // ESC, A, S, D, F, G, H, J, K, L, ;, ' + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // LShift, Z, X, C, V, B, N, M, ,, ., /, = + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // , Ctrl, Space, Enter, BackSP, Del + //`---------------------' `---------------------' +``` + +### DVORAK +```c + //,----------------------------------------------------. ,----------------------------------------------------. + // Tab, ', ,, ., P, Y, F, G, C, R, L, \ + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // ESC, A, O, E, U, I, D, H, T, N, S, / + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // LShift, ;, Q, J, K, X, B, M, W, V, Z, = + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // , Ctrl, Space, Enter, BackSP, Del + //`---------------------' `---------------------' +``` + +### COLEMAK +```c + //,----------------------------------------------------. ,----------------------------------------------------. + // Tab, Q, W, F, P, G, J, L, U, Y, ;, \ + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // ESC, A, R, S, T, D, H, N, E, I, O, ' + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // LShift, Z, X, C, V, B, K, M, ,, ., /, = + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // , Ctrl, Space, Enter, BackSP, Del + //`---------------------' `---------------------' +``` + +### LOWER +```c + //,----------------------------------------------------. ,----------------------------------------------------. + // , , KC_BRIU, Play, Mute, K_CSCN, PgUp, Home, Up, End, , K_MDSH + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // , , KC_BRID, Next, VolUp, , PgDn, Left, Down, Right, K_LOCK, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // , , , Prev, VolDn, [, ], , , M_CODE, M_XXX1, M_PYNV, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // , , , , , + //`---------------------' `---------------------' +``` + +### RAISE +```c + //,----------------------------------------------------. ,----------------------------------------------------. + // `, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, - + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // ~, !, @, #, $, %, ^, &, *, (, ), _ + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12 + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // , , , , , + //`---------------------' `---------------------' +``` + +### ADJUST +```c + //,----------------------------------------------------. ,----------------------------------------------------. + // M_MAKE, EEP_RST, , , , , RGB_TOG, , , COLEMAK, DVORAK, QWERTY, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // M_VRSN, M_MALL, , RGB_SAI, RGB_HUI, RGB_VAI, , , , , , , + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // M_FLSH, , , RGB_SAD, RGB_HUD, RGB_VAD, RGB_M_P, RGB_M_B,RGB_M_SW, , , , + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + // , , , , , + //`---------------------' `---------------------' +``` + + \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/ninjonas/config.h b/keyboards/crkbd/keymaps/ninjonas/config.h new file mode 100644 index 0000000000..5d21446623 --- /dev/null +++ b/keyboards/crkbd/keymaps/ninjonas/config.h @@ -0,0 +1,92 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD + +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 + #define RGB_MATRIX_HUE_STEP 10 + #define RGB_MATRIX_SAT_STEP 10 + #define RGB_MATRIX_VAL_STEP 10 + #define RGB_MATRIX_SPD_STEP 10 + // #define RGB_MATRIX_KEYPRESSES + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + + // BEGIN: Disable RGB Effects + //#define DISABLE_RGB_MATRIX_SOLID_COLOR + //#define DISABLE_RGB_MATRIX_ALPHAS_MODS + //#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define DISABLE_RGB_MATRIX_BREATHING + #define DISABLE_RGB_MATRIX_BAND_SAT + #define DISABLE_RGB_MATRIX_BAND_VAL + // #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define DISABLE_RGB_MATRIX_CYCLE_ALL + #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL + #define DISABLE_RGB_MATRIX_DUAL_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define DISABLE_RGB_MATRIX_RAINDROPS + #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + + // BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS + #define DISABLE_RGB_MATRIX_TYPING_HEATMAP + // #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + // END: RGB_MATRIX_FRAMEBUFFER_EFFECTS + + // BEGIN: RGB_MATRIX_KEYPRESSES + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + // END: RGB_MATRIX_KEYPRESSES + // END: Disable RGB Effects +#endif + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" +#define OLED_DISABLE_TIMEOUT \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/ninjonas/keymap.c b/keyboards/crkbd/keymaps/ninjonas/keymap.c new file mode 100644 index 0000000000..57164441b6 --- /dev/null +++ b/keyboards/crkbd/keymaps/ninjonas/keymap.c @@ -0,0 +1,89 @@ +#include QMK_KEYBOARD_H +#include "ninjonas.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_wrapper( + //,----------------------------------------------------. ,----------------------------------------------------. + _____________________QWERTY_L1______________________, _____________________QWERTY_R1______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________QWERTY_L3______________________, _____________________QWERTY_R3______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + ________MOD_LEFT_________, ________MOD_RIGHT________ + //`---------------------' `---------------------' + ), + + [_DVORAK] = LAYOUT_wrapper( + //,----------------------------------------------------. ,----------------------------------------------------. + _____________________DVORAK_L1______________________, _____________________DVORAK_R1______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________DVORAK_L3______________________, _____________________DVORAK_R3______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + ________MOD_LEFT_________, ________MOD_RIGHT________ + //`---------------------' `---------------------' + ), + + [_COLEMAK] = LAYOUT_wrapper( + //,----------------------------------------------------. ,----------------------------------------------------. + _____________________COLEMAK_L1_____________________, _____________________COLEMAK_R1_____________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________COLEMAK_L3_____________________, _____________________COLEMAK_R3_____________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + ________MOD_LEFT_________, ________MOD_RIGHT________ + //`---------------------' `---------------------' + ), + + [_LOWER] = LAYOUT_wrapper( + //,----------------------------------------------------. ,----------------------------------------------------. + _____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________LOWER_L3_______________________, _____________________LOWER_R3_______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _______,_______,_______, _______,_______,_______ + //`---------------------' `---------------------' + ), + + [_RAISE] = LAYOUT_wrapper( \ + //,----------------------------------------------------. ,----------------------------------------------------. + _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________SYM_LEFT_______________________, _____________________SYM_RIGHT______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _______,_______,_______, _______,_______,_______ + //`---------------------' `---------------------' + ), + + [_ADJUST] = LAYOUT_wrapper( \ + //,----------------------------------------------------. ,----------------------------------------------------. + _____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _____________________ADJUST_L3______________________, _____________________ADJUST_R3______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _______,_______,_______, _______,_______,_______ + //`---------------------' `---------------------' + ), +/* + [_TEMPLATE] = LAYOUT_wrapper( \ + //,----------------------------------------------------. ,----------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _______,_______,_______, _______,_______,_______ + //`---------------------' `---------------------' + ), +*/ +}; \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/ninjonas/rules.mk b/keyboards/crkbd/keymaps/ninjonas/rules.mk new file mode 100644 index 0000000000..95cc3fed36 --- /dev/null +++ b/keyboards/crkbd/keymaps/ninjonas/rules.mk @@ -0,0 +1,7 @@ +RGB_MATRIX_ENABLE = WS2812 +MOUSEKEY_ENABLE = no +OLED_DRIVER_ENABLE = yes +LINK_TIME_OPTIMIZATION_ENABLE = yes + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h new file mode 100644 index 0000000000..da47524a89 --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -0,0 +1,112 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ +#define EE_HANDS + +#undef SSD1306OLED + +#define USE_SERIAL_PD2 + +#define FORCE_NKRO + +#define QMK_ESC_OUTPUT F4 // usually COL +#define QMK_ESC_INPUT D4 // usually ROW +#define QMK_LED B0 + +#ifdef RGB_MATRIX_ENABLE + #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 + + #define RGB_MATRIX_HUE_STEP 10 + #define RGB_MATRIX_SAT_STEP 15 + #define RGB_MATRIX_VAL_STEP 16 + #define RGB_MATRIX_SPD_STEP 10 + + #define DISABLE_RGB_MATRIX_ALPHAS_MODS + #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define DISABLE_RGB_MATRIX_BREATHING + #define DISABLE_RGB_MATRIX_BAND_SAT + #define DISABLE_RGB_MATRIX_BAND_VAL + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL + // #define DISABLE_RGB_MATRIX_CYCLE_ALL + #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL + // #define DISABLE_RGB_MATRIX_DUAL_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define DISABLE_RGB_MATRIX_RAINDROPS + #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + // #define DISABLE_RGB_MATRIX_TYPING_HEATMAP + #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses + + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + + // #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP +#endif + +#define TAPPING_TERM 150 +// #define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +// #define RETRO_TAPPING + +#define TAPPING_TOGGLE 2 + +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 6 +#define MOUSEKEY_TIME_TO_MAX 32 +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#define OLED_FONT_H "keyboards/crkbd/keymaps/rpbaptist/glcdfont.c" + +#define NO_ACTION_ONESHOT + +#undef PRODUCT +#define PRODUCT Corne Keyboard diff --git a/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c new file mode 100644 index 0000000000..044c16d9c1 --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c @@ -0,0 +1,240 @@ +#pragma once + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Helidox 8x6 font with QMK Firmware Logo +// Online editor: http://teripom.x0.com/ + +const unsigned char font[] PROGMEM = { +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, 0xE0, +0x38, 0x1C, 0x0C, 0x06, 0x03, 0x03, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, +0x03, 0x03, 0x82, 0x86, 0xCC, 0xF8, +0xF0, 0xF0, 0x38, 0x1C, 0x0C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xC0, 0x70, +0xF8, 0x0C, 0x04, 0xC6, 0xA2, 0xB3, +0x9F, 0x87, 0x01, 0x01, 0x1F, 0x66, +0x66, 0x44, 0x4C, 0x58, 0x70, 0xE0, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, +0xE0, 0x78, 0x18, 0x8C, 0xC6, 0xE6, +0xE3, 0xE3, 0xC3, 0x83, 0x03, 0x03, +0x73, 0x76, 0x76, 0x0C, 0x18, 0xF8, +0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xC0, 0x40, 0x7F, 0xF3, +0x60, 0x20, 0x30, 0x30, 0x38, 0x18, +0x9C, 0xCC, 0x6C, 0x6E, 0x3E, 0x3E, +0x1F, 0x0F, 0x0F, 0x03, 0x03, 0x01, +0xC0, 0xFF, 0x3E, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7F, 0xC1, 0x00, +0x1D, 0x67, 0xC0, 0x80, 0x01, 0x00, +0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, +0x0C, 0x1A, 0x32, 0xC2, 0x01, 0xC1, +0xFF, 0x3E, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x7E, 0xFF, +0x80, 0x00, 0x00, 0xC3, 0xC7, 0xC7, +0x8F, 0x0F, 0x07, 0x03, 0x80, 0xC0, +0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x07, +0x0F, 0xFF, 0x7F, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x40, 0x60, 0x31, +0x3B, 0x1E, 0x0C, 0x1E, 0x36, 0x23, +0x61, 0x60, 0x60, 0x60, 0x60, 0x60, +0x60, 0x30, 0x1C, 0x3E, 0x3E, 0x3F, +0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x07, +0x0C, 0x18, 0x10, 0x33, 0x3E, 0x38, +0x6E, 0x67, 0x60, 0x60, 0x60, 0x20, +0x30, 0x18, 0x08, 0x0F, 0x06, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +0x03, 0x06, 0x0C, 0x19, 0x31, 0x21, +0x60, 0x60, 0x60, 0x60, 0x61, 0x63, +0x67, 0x67, 0x33, 0x39, 0x18, 0x0E, +0x07, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/crkbd/keymaps/rpbaptist/keymap.c b/keyboards/crkbd/keymaps/rpbaptist/keymap.c new file mode 100644 index 0000000000..932641a9f8 --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/keymap.c @@ -0,0 +1,234 @@ +#include QMK_KEYBOARD_H + +extern uint8_t is_master; + +enum layer_names { + _COLEMAKDHM, + _GAMING, + _GAMING_EXT, + _NUM, + _FN, + _NAV, + _UTIL +}; + +// Base layers +#define COLEMAK DF(_COLEMAKDHM) +#define GAMING DF(_GAMING) + +// Layer toggle and switch +#define T_NAV TT(_NAV) +#define S_NAV MO(_NAV) + +#define T_NUM TT(_NUM) +#define S_NUM MO(_NUM) + +// Layer keys with functionality on tap +#define FN_TAB LT(_FN, KC_TAB) +#define NAV_0 LT(_NAV, KC_0) +#define EXT_SF LT(_GAMING_EXT, KC_LSHIFT) + +// Tap/mod keys +#define RCTBR RCTL_T(KC_RBRACKET) +#define LCTBR LCTL_T(KC_LBRACKET) + +#define SFSPC LSFT_T(KC_SPACE) +#define SFENT LSFT_T(KC_ENTER) + +// Global tab forward and backward +#define TBFWD LCTL(KC_TAB) +#define TBBCK LCTL(LSFT(KC_TAB)) + +// Custom key for NUM layer +#define CTEQL RCTL_T(KC_EQL) + +// € +#define KC_EUR ALGR(KC_5) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_COLEMAKDHM] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + FN_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + LCTBR, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, RCTBR,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LALT, T_NUM, SFSPC, SFENT, T_NAV, KC_RGUI \ + //`--------------------------' `--------------------------' + ), + + [_GAMING] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, EXT_SF, KC_SPC, _______, _______, _______ \ + //`--------------------------' `--------------------------' + ), + + [_GAMING_EXT] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_GRV, KC_1, KC_2, _______, KC_3, KC_4, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_DEL,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LBRC, KC_RBRC, _______, _______, _______, KC_BSLS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F11, KC_F12, KC_MINS, KC_EQL, _______, _______,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_ENT, _______, _______ \ + //`--------------------------' `--------------------------' + ), + + [_FN] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, KC_NLCK, XXXXXXX, KC_MINS, KC_PIPE, KC_BSLS, KC_PLUS, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, KC_PAUS, KC_SLCK, KC_PSCR, KC_INS, XXXXXXX, KC_UNDS, KC_LT, KC_GT, KC_EQL, _______,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ \ + //`--------------------------' `--------------------------' + ), + + [_NUM] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_SLSH, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_CIRC, KC_AMPR, KC_EUR, KC_LPRN, KC_RPRN, KC_ASTR, KC_1, KC_2, KC_3, KC_UNDS, CTEQL,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, S_NUM, _______, _______, NAV_0, KC_DOT \ + //`--------------------------' `--------------------------' + ), + + [_NAV] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_WH_U, TBBCK, KC_MS_U, TBFWD, KC_BTN2, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_DEL,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, KC_WH_L, XXXXXXX, KC_WH_R, XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, _______,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------+---------| + _______, _______, _______, _______, S_NAV, _______ \ + //`--------------------------' `--------------------------' + ), + + [_UTIL] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, XXXXXXX, KC_MSTP, KC_VOLU, KC_MNXT, XXXXXXX, COLEMAK, GAMING, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, KC_MPRV, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, KC_SLEP, XXXXXXX, KC_MUTE, XXXXXXX, XXXXXXX, RGB_TOG,RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ \ + //`--------------------------' `--------------------------' + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(default_layer_state)) { + case _COLEMAKDHM: + state = update_tri_layer_state(state, _NUM, _NAV, _UTIL); + break; + case _GAMING: + state = update_tri_layer_state(state, _GAMING_EXT, _NAV, _UTIL); + break; + } + return state; +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_master) { + return OLED_ROTATION_270; + } else { + return OLED_ROTATION_180; + } +} + +void render_crkbd_logo(void) { + static const char PROGMEM crkbd_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(crkbd_logo, false); +} + +void render_status(void) { + // oled_write_P(PSTR("Layout: "), false); + switch (get_highest_layer(default_layer_state)) { + case _COLEMAKDHM: + oled_write_P(PSTR("CLMK "), false); + break; + case _GAMING: + oled_write_P(PSTR("GAME "), false); + break; + } + + oled_write_P(PSTR("\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR(" "), false); + break; + case _NUM: + oled_write_P(PSTR("Comm "), false); + break; + case _FN: + oled_write_P(PSTR("Stage"), false); + break; + case _NAV: + oled_write_P(PSTR("Fuel "), false); + break; + case _GAMING_EXT: + oled_write_P(PSTR("Ext "), false); + break; + case _UTIL: + oled_write_P(PSTR("Util "), false); + break; + default: + oled_write_P(PSTR("Unkn "), false); + break; + } + oled_write_P(PSTR("\n"), false); + + uint8_t modifiers = get_mods(); + + oled_write_P( (modifiers & MOD_MASK_CTRL) ? PSTR("PROG ") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_SHIFT) ? PSTR("PULSE") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_ALT) ? PSTR("STBY ") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_GUI) ? PSTR("GYRO ") : PSTR(" "), false); + + oled_write_P(PSTR("\n"), false); + + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(PSTR("Mode:\n"), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_master) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_crkbd_logo(); + // oled_scroll_left(); // Turns on scrolling + } +} +#endif + +void suspend_power_down_keymap(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_keymap(void) { + rgb_matrix_set_suspend_state(false); +} diff --git a/keyboards/crkbd/keymaps/rpbaptist/readme.md b/keyboards/crkbd/keymaps/rpbaptist/readme.md new file mode 100644 index 0000000000..cb53e75f2d --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/readme.md @@ -0,0 +1,57 @@ +# Corne keyboard layout + +This is my highly personalized CRKBD layout. I use Colemak DHm as main typing layer. I use this keyboard and layout in my daily programming job and for everything at home, including gaming. + +This keymap is the result of an evolution from Ultimate Hacking Keyboard to Iris, to Corne. It took many iterations and changes and only now I feel this is ready to be merged into the main QMK repository, because I think further changes will be minor. This is my 1.0 release so to speak. + +Many thanks to foostan for the keyboard, all QMK contributors and drashna specifically for his work on this keyboard. + +## Layers + +### COLEMAKDHM + +Main typing layer. I really love having SHIFT available on thumbs. I am a left thumb space bar person, so I put SPACE there and ENTER on right. I use CTRL key combos lot in my text editor and desktop environment. That's why I have two of them. I also found them to be a great position for the square brackets. (`[` and `]`) + +I don't know about you but "lower" and "raise" don't mean that much to me. I named my layers `NUM`, short for numbers and `NAV`, short for navigation. Holding the key will activate the layer for as long as it is held, double tapping it will switch to it. Single tapping it once will switch to main layer again. + +Everything else is pretty standard I'd say. + +### NUM + +Includes a number row, the symbols normally on SHIFT and numbers, as well as a numpad under right side homing keys. + +### NAV + +This is where I access arrow keys, page up, down, home, end and mouse control. I also added general tab forward and backward keys. I use these in my browser, terminal and text editor. + +## FN + +Short for function. This gives access to the function keys, as well as rarely used keys on the left side and often used symbols (for me) on the right side. It is accessed by holding TAB. + +### UTIL + +Short for utility. This is accessed by pressing both `NUM` and `NAV` at the same time. It has a software `RESET` key, media keys, RGB control and switches main layer between Colemak and a gaming layer. + +### GAMING + +Sometimes I switch to type in Discord, Steam, or in game chat, so I think it's more important to keep typing functional than put WASD on where I want movement to be. This means I rebind my keys in all games. It's worth it to me. + +I put movement on FRST (would be ESDF on QWERTY), because it lines up more comfortably with the columnar staggered layout of the Corne. It also gives more easy access to all keys on left half. + +Most notable here is that there are no tap and hold differences anymore on left hand side besides the new layer key. This is a different layer than `NUM`. + +### GAMING_EXT + +This is the gaming extended layer where movement keys remain the same. This means I can keep moving while accessing second layer keys. All other keys are keys on which I can easily rebind something. Besides that it gives me the function keys and an ENTER key which does not change. This is good when a game requires you to hold ENTER. + +## Notes + +I use MT3 Godspeed caps and thought it would be fun to theme the OLED output towards it. The slave side has the icon and two planets. The left side refers to modifiers by matching the novelty mod legends. + +## Building + +I am using DFU and have to flash both halves individually. + +Left half: `make crkbd/rev1:rpbaptist:dfu-split-left` + +Right half: `make crkbd/rev1:rpbaptist:dfu-split-right RGB_MATRIX_SPLIT_RIGHT=yes` diff --git a/keyboards/crkbd/keymaps/rpbaptist/rules.mk b/keyboards/crkbd/keymaps/rpbaptist/rules.mk new file mode 100644 index 0000000000..0eed4f997c --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/rules.mk @@ -0,0 +1,34 @@ +# This enables Link Time Optimization. This can save a good chunk of space (several KB for me), but the macro and function ... functions cause it to error out. +LINK_TIME_OPTIMIZATION_ENABLE = yes + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +RGB_MATRIX_ENABLE = WS2812 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +BOOTLOADER = qmk-dfu + +OLED_DRIVER_ENABLE = yes + +# ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes) +# RGB_MATRIX_SPLIT_RIGHT=yes +# endif diff --git a/keyboards/crkbd/keymaps/soundmonster/README.md b/keyboards/crkbd/keymaps/soundmonster/README.md new file mode 100644 index 0000000000..8b271cbbba --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/README.md @@ -0,0 +1,13 @@ +# Soundmonster's layout for Corne + +Features: + +* Modern OLED support (many thanks to @drashna): + * Proper orientation + * Graphic layer indicator ↑ ↓ + * Graphic modifier indicator ⌘ ⇧ ⌥ ⌃ +* Similar enough to the default keymap so you can easily port your custom keymap to it +* Mac-friendly (Command and Option on the thumbs) +* Vim-friendly (Esc, `:` and Ctrl on the thumbs) +* Full per-key RGB Matrix support out of the box (you still have to go through the nightmare of soldering yourself though 😉) + diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h new file mode 100644 index 0000000000..1e58af3abe --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -0,0 +1,110 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// #define SSD1306OLED +#undef USE_I2C +#undef SSD1306OLED + +#define USE_SERIAL_PD2 + +// #define TAPPING_FORCE_HOLD +#define TAPPING_TERM 150 +#define RETRO_TAPPING +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef RGBLIGHT_ENABLE + #undef RGBLED_NUM + #define RGBLED_NUM 27 + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP + #define RGBLIGHT_SPLIT + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#endif + +#define OLED_FONT_H "keyboards/crkbd/keymaps/soundmonster/glcdfont.c" +// #define OLED_FONT_WIDTH 5 +// #define OLED_FONT_HEIGHT 7 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 + +/* Disable the animations you don't want/need. You will need to disable a good number of these * + * because they take up a lot of space. Disable until you can successfully compile your firmware. */ +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BREATHING +// # define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_VAL +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define DISABLE_RGB_MATRIX_CYCLE_ALL +# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define DISABLE_RGB_MATRIX_DUAL_BEACON +# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +# define DISABLE_RGB_MATRIX_RAINBOW_BEACON +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define DISABLE_RGB_MATRIX_RAINDROPS +# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH +# define DISABLE_RGB_MATRIX_SOLID_SPLASH +# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/crkbd/keymaps/soundmonster/glcdfont.c b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c new file mode 100644 index 0000000000..291445b5e3 --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c @@ -0,0 +1,241 @@ +#pragma once + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Corne 8x6 font with QMK Firmware Logo +// Online editor: https://helixfonteditor.netlify.com/ +// See also: https://github.com/soundmonster/glcdfont_converter + +const unsigned char font[] PROGMEM = { +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, 0xC0, 0xE0, 0xF0, 0xF8, +0xF8, 0x18, 0x00, 0xC0, 0xF0, 0xFC, +0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, +0x00, 0xF8, 0x04, 0x22, 0x52, 0xE2, +0x42, 0x42, 0x42, 0xE2, 0x52, 0x22, +0x22, 0x22, 0x42, 0x82, 0x02, 0x02, +0x22, 0x22, 0x02, 0x04, 0xF8, 0x00, +0x00, 0xF8, 0x04, 0x02, 0x02, 0x82, +0x42, 0x22, 0x42, 0x82, 0x02, 0x02, +0x02, 0x82, 0x42, 0x22, 0x12, 0x22, +0x42, 0x82, 0x02, 0x04, 0xF8, 0x00, +0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E, +0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE, +0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, +0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00, +0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E, +0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x80, 0x40, 0x40, 0x20, 0x20, +0x10, 0x10, 0x08, 0x08, 0x10, 0x10, +0x20, 0x20, 0x40, 0x40, 0x80, 0x80, +0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, +0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, +0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, +0x80, 0x80, 0x40, 0x40, 0x20, 0x20, +0x10, 0x10, 0x08, 0x08, 0x10, 0x10, +0x20, 0x20, 0x40, 0x40, 0x80, 0x80, +0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, +0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, +0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, +0x00, 0xF8, 0xFC, 0xFE, 0xFF, 0xE0, +0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, +0x07, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47, +0x42, 0x42, 0x42, 0x47, 0x4A, 0x44, +0x40, 0x40, 0x40, 0x40, 0x41, 0x42, +0x44, 0x44, 0x40, 0x20, 0x1F, 0x00, +0x00, 0x1F, 0x20, 0x40, 0x41, 0x40, +0x40, 0x40, 0x40, 0x40, 0x41, 0x40, +0x41, 0x41, 0x4F, 0x48, 0x48, 0x48, +0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00, +0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78, +0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B, +0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D, +0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00, +0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F, +0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, +0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, +0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, +0x88, 0x88, 0x55, 0x55, 0x23, 0x23, +0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, +0x23, 0x23, 0x55, 0x55, 0x88, 0x88, +0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, +0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, +0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, +0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, +0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, +0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, +0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3F, +0x3F, 0x3F, 0x1F, 0x1F, 0x3F, 0x3F, +0x7F, 0x7F, 0x7F, 0x3F, 0x3F, 0x1F, +0x3F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7C, +0x78, 0x78, 0x38, 0x1C, 0x0F, 0x00, +0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04, +0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20, +0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04, +0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20, +0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC, +0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F, +0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC, +0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F, +0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE, +0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00, +0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77, +0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x02, 0x02, +0x04, 0x04, 0x08, 0x08, 0x04, 0x04, +0x02, 0x02, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x02, 0x02, +0x04, 0x04, 0x08, 0x08, 0x04, 0x04, +0x02, 0x02, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x03, 0x03, +0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, +0x03, 0x03, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x03, 0x02, +0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, +0x03, 0x02, 0x01, 0x01, 0x00, 0x00 +}; diff --git a/keyboards/crkbd/keymaps/soundmonster/keymap.c b/keyboards/crkbd/keymaps/soundmonster/keymap.c new file mode 100644 index 0000000000..28b3e19d13 --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/keymap.c @@ -0,0 +1,393 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#ifdef OLED_DRIVER_ENABLE +static uint32_t oled_timer = 0; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Custom keycodes for layer keys +// Dual function escape with left command +#define KC_LGESC LGUI_T(KC_ESC) + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST, + KC_RACL // right alt / colon +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------. ,---------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|------+------+------+------+------+------| |------+------+-------+------+-------+--------| + 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSPC, + //|------+------+------+------+------+------+------| |------+------+------+-------+------+-------+--------| + KC_LGESC,LOWER, KC_SPC, RCTL_T(KC_ENT), RAISE, KC_RACL + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------. ,-----------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|------+------+-------+-------+-------+-------| |------+------+------+------+------+------| + KC_LCTL, KC_NO,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R, KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,KC_NO,KC_NO, + //|------+------+-------+-------+-------+-------| |------+------+------+------+------+------| + KC_LSFT, KC_NO,KC_BTN2,KC_WH_D,KC_WH_U,KC_BTN1, KC_HOME,KC_PGDN,KC_PGUP,KC_END,KC_NO,KC_NO, + //|------+------+-------+-------+-------+-------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------. ,-----------------------------------------. + KC_ESC,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LCTL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9,KC_F10, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------. ,-----------------------------------------. + RESET,RGBRST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC__MUTE, KC_NO, KC_NO, KC_NO, KC_NO, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,RGB_SPI,KC_NO, KC_PAUSE,KC__VOLUP, KC_NO, KC_NO, KC_NO, KC_NO, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,RGB_SPD,KC_NO, KC_SCROLLLOCK,KC__VOLDOWN, KC_NO, KC_NO, KC_NO, RGB_RMOD, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } + +void render_space(void) { + oled_write_P(PSTR(" "), false); +} + +void render_mod_status_gui_alt(uint8_t modifiers) { + static const char PROGMEM gui_off_1[] = {0x85, 0x86, 0}; + static const char PROGMEM gui_off_2[] = {0xa5, 0xa6, 0}; + static const char PROGMEM gui_on_1[] = {0x8d, 0x8e, 0}; + static const char PROGMEM gui_on_2[] = {0xad, 0xae, 0}; + + static const char PROGMEM alt_off_1[] = {0x87, 0x88, 0}; + static const char PROGMEM alt_off_2[] = {0xa7, 0xa8, 0}; + static const char PROGMEM alt_on_1[] = {0x8f, 0x90, 0}; + static const char PROGMEM alt_on_2[] = {0xaf, 0xb0, 0}; + + // fillers between the modifier icons bleed into the icon frames + static const char PROGMEM off_off_1[] = {0xc5, 0}; + static const char PROGMEM off_off_2[] = {0xc6, 0}; + static const char PROGMEM on_off_1[] = {0xc7, 0}; + static const char PROGMEM on_off_2[] = {0xc8, 0}; + static const char PROGMEM off_on_1[] = {0xc9, 0}; + static const char PROGMEM off_on_2[] = {0xca, 0}; + static const char PROGMEM on_on_1[] = {0xcb, 0}; + static const char PROGMEM on_on_2[] = {0xcc, 0}; + + if(modifiers & MOD_MASK_GUI) { + oled_write_P(gui_on_1, false); + } else { + oled_write_P(gui_off_1, false); + } + + if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) { + oled_write_P(on_on_1, false); + } else if(modifiers & MOD_MASK_GUI) { + oled_write_P(on_off_1, false); + } else if(modifiers & MOD_MASK_ALT) { + oled_write_P(off_on_1, false); + } else { + oled_write_P(off_off_1, false); + } + + if(modifiers & MOD_MASK_ALT) { + oled_write_P(alt_on_1, false); + } else { + oled_write_P(alt_off_1, false); + } + + if(modifiers & MOD_MASK_GUI) { + oled_write_P(gui_on_2, false); + } else { + oled_write_P(gui_off_2, false); + } + + if (modifiers & MOD_MASK_GUI & MOD_MASK_ALT) { + oled_write_P(on_on_2, false); + } else if(modifiers & MOD_MASK_GUI) { + oled_write_P(on_off_2, false); + } else if(modifiers & MOD_MASK_ALT) { + oled_write_P(off_on_2, false); + } else { + oled_write_P(off_off_2, false); + } + + if(modifiers & MOD_MASK_ALT) { + oled_write_P(alt_on_2, false); + } else { + oled_write_P(alt_off_2, false); + } +} + +void render_mod_status_ctrl_shift(uint8_t modifiers) { + static const char PROGMEM ctrl_off_1[] = {0x89, 0x8a, 0}; + static const char PROGMEM ctrl_off_2[] = {0xa9, 0xaa, 0}; + static const char PROGMEM ctrl_on_1[] = {0x91, 0x92, 0}; + static const char PROGMEM ctrl_on_2[] = {0xb1, 0xb2, 0}; + + static const char PROGMEM shift_off_1[] = {0x8b, 0x8c, 0}; + static const char PROGMEM shift_off_2[] = {0xab, 0xac, 0}; + static const char PROGMEM shift_on_1[] = {0xcd, 0xce, 0}; + static const char PROGMEM shift_on_2[] = {0xcf, 0xd0, 0}; + + // fillers between the modifier icons bleed into the icon frames + static const char PROGMEM off_off_1[] = {0xc5, 0}; + static const char PROGMEM off_off_2[] = {0xc6, 0}; + static const char PROGMEM on_off_1[] = {0xc7, 0}; + static const char PROGMEM on_off_2[] = {0xc8, 0}; + static const char PROGMEM off_on_1[] = {0xc9, 0}; + static const char PROGMEM off_on_2[] = {0xca, 0}; + static const char PROGMEM on_on_1[] = {0xcb, 0}; + static const char PROGMEM on_on_2[] = {0xcc, 0}; + + if(modifiers & MOD_MASK_CTRL) { + oled_write_P(ctrl_on_1, false); + } else { + oled_write_P(ctrl_off_1, false); + } + + if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) { + oled_write_P(on_on_1, false); + } else if(modifiers & MOD_MASK_CTRL) { + oled_write_P(on_off_1, false); + } else if(modifiers & MOD_MASK_SHIFT) { + oled_write_P(off_on_1, false); + } else { + oled_write_P(off_off_1, false); + } + + if(modifiers & MOD_MASK_SHIFT) { + oled_write_P(shift_on_1, false); + } else { + oled_write_P(shift_off_1, false); + } + + if(modifiers & MOD_MASK_CTRL) { + oled_write_P(ctrl_on_2, false); + } else { + oled_write_P(ctrl_off_2, false); + } + + if (modifiers & MOD_MASK_CTRL & MOD_MASK_SHIFT) { + oled_write_P(on_on_2, false); + } else if(modifiers & MOD_MASK_CTRL) { + oled_write_P(on_off_2, false); + } else if(modifiers & MOD_MASK_SHIFT) { + oled_write_P(off_on_2, false); + } else { + oled_write_P(off_off_2, false); + } + + if(modifiers & MOD_MASK_SHIFT) { + oled_write_P(shift_on_2, false); + } else { + oled_write_P(shift_off_2, false); + } +} + +void render_logo(void) { + static const char PROGMEM corne_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0}; + oled_write_P(corne_logo, false); + oled_write_P(PSTR("corne"), false); +} + +void render_layer_state(void) { + static const char PROGMEM default_layer[] = { + 0x20, 0x94, 0x95, 0x96, 0x20, + 0x20, 0xb4, 0xb5, 0xb6, 0x20, + 0x20, 0xd4, 0xd5, 0xd6, 0x20, 0}; + static const char PROGMEM raise_layer[] = { + 0x20, 0x97, 0x98, 0x99, 0x20, + 0x20, 0xb7, 0xb8, 0xb9, 0x20, + 0x20, 0xd7, 0xd8, 0xd9, 0x20, 0}; + static const char PROGMEM lower_layer[] = { + 0x20, 0x9a, 0x9b, 0x9c, 0x20, + 0x20, 0xba, 0xbb, 0xbc, 0x20, + 0x20, 0xda, 0xdb, 0xdc, 0x20, 0}; + static const char PROGMEM adjust_layer[] = { + 0x20, 0x9d, 0x9e, 0x9f, 0x20, + 0x20, 0xbd, 0xbe, 0xbf, 0x20, + 0x20, 0xdd, 0xde, 0xdf, 0x20, 0}; + if(layer_state_is(_ADJUST)) { + oled_write_P(adjust_layer, false); + } else if(layer_state_is(_LOWER)) { + oled_write_P(lower_layer, false); + } else if(layer_state_is(_RAISE)) { + oled_write_P(raise_layer, false); + } else { + oled_write_P(default_layer, false); + } +} + +void render_status_main(void) { + render_logo(); + render_space(); + render_layer_state(); + render_space(); + render_mod_status_gui_alt(get_mods()|get_oneshot_mods()); + render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods()); +} + +void render_status_secondary(void) { + render_logo(); + render_space(); + render_layer_state(); + render_space(); + render_mod_status_gui_alt(get_mods()|get_oneshot_mods()); + render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods()); +} + +void oled_task_user(void) { + if (timer_elapsed32(oled_timer) > 30000) { + oled_off(); + return; + } +#ifndef SPLIT_KEYBOARD + else { oled_on(); } +#endif + + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_status_secondary(); + } +} + +#endif +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); +#endif + // set_timelog(); + } + static uint16_t my_colon_timer; + + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + case KC_RACL: + if (record->event.pressed) { + my_colon_timer = timer_read(); + register_code(KC_RALT); + } else { + unregister_code(KC_RALT); + if (timer_elapsed(my_colon_timer) < TAPPING_TERM) { + SEND_STRING(":"); // Change the character(s) to be sent on tap here + } + } + return false; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + #ifdef RGB_MATRIX_ENABLE + if (record->event.pressed) { + eeconfig_update_rgb_matrix_default(); + rgb_matrix_enable(); + } + #endif + break; + } + return true; +} + +#ifdef RGB_MATRIX_ENABLE + +void suspend_power_down_keymap(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_keymap(void) { + rgb_matrix_set_suspend_state(false); +} + +#endif diff --git a/keyboards/crkbd/keymaps/soundmonster/rules.mk b/keyboards/crkbd/keymaps/soundmonster/rules.mk new file mode 100644 index 0000000000..bf7a84eb1f --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 +MOUSEKEY_ENABLE = no +NKRO_ENABLE = yes +OLED_DRIVER_ENABLE = yes + diff --git a/keyboards/crkbd/keymaps/tominabox1/keymap.c b/keyboards/crkbd/keymaps/tominabox1/keymap.c new file mode 100755 index 0000000000..d58911194e --- /dev/null +++ b/keyboards/crkbd/keymaps/tominabox1/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_wrapper( + ___________________CRKBD1__________________, + ___________________CRKBD2__________________, + ___________________CRKBD3__________________, + ___________________CRKBD4__________________ + ), + + [_RAISE] = LAYOUT_wrapper( + ___________________RAISE1__________________, + ___________________RAISE2__________________, + ___________________CRKBD_RAISE3____________, + ___________________CRKBD_RAISE4____________ + ), + + [_LOWER] = LAYOUT_wrapper( + _________________LOWER_1___________________, + _________________LOWER_2___________________, + ___________________CRKBD_LOW3______________, + ___________________CRKBD_LOW4______________ + ), + + [_ADJUST] = LAYOUT_wrapper( + ___________________ADJST1__________________, + ___________________CRKBD_ADJST2____________, + ___________________CRKBD_ADJST3____________, + ___________________CRKBD_ADJST4____________ + ), + + [_ARROW] = LAYOUT_wrapper( + ___________________ARROW1__________________, + ___________________ARROW2__________________, + ___________________ARROW3__________________, + ___________________ARROW4__________________ + ), + [_FKEY] = LAYOUT_wrapper( + ___________________FKEY1___________________, + ___________________FKEY2___________________, + ___________________CRKBD_FKEY3_____________, + ___________________CRKBD_FKEY4_____________ + ) + +}; diff --git a/keyboards/crkbd/pro_micro.h b/keyboards/crkbd/pro_micro.h deleted file mode 100644 index 3666333727..0000000000 --- a/keyboards/crkbd/pro_micro.h +++ /dev/null @@ -1,358 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ -#pragma once - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md index 591fdfe0da..5de3e3ae00 100644 --- a/keyboards/crkbd/readme.md +++ b/keyboards/crkbd/readme.md @@ -1,5 +1,6 @@ -Crkbd -=== +# Corne Keyboard (CRKBD) + +Also known (incorrectly) as the `HeliDox`. ![Crkbd](https://user-images.githubusercontent.com/736191/40575636-6fba63a4-6123-11e8-9ca0-3f990f1f9f4c.jpg) @@ -13,6 +14,71 @@ Hardware Availability: [PCB & Case Data](https://github.com/foostan/crkbd) Make example for this keyboard (after setting up your build environment): - make crkbd:default +```sh +make crkbd: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). + +## RGB Matrix +The Corne Keyboard also supports using the RGB Matrix feature, in place of RGB Light. This provids a better experience when using the keyboard, as it supports a number of per key effects properly. If you're not using the in switch LEDs, then you may want to pass on doing this. + +In your keymap's `rules.mk` file, add the following: + +```make +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 +``` + +And in your `config.h` file, add the following: + +```c + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 + +/* Disable the animations you don't want/need. You will need to disable a good number of these * + * because they take up a lot of space. Disable until you can successfully compile your firmware. */ +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS +// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// # define DISABLE_RGB_MATRIX_BREATHING +// # define DISABLE_RGB_MATRIX_CYCLE_ALL +// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define DISABLE_RGB_MATRIX_DUAL_BEACON +// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON +// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define DISABLE_RGB_MATRIX_RAINDROPS +// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH +// # define DISABLE_RGB_MATRIX_SOLID_SPLASH +// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif +``` + +After this is done, you should be able to use the normal RGB keycodes, but you'll see the RGB Matrix effects in use, giving a much better experience. diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index 4ea8ff38cd..f7f278f2c0 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -23,17 +23,17 @@ along with this program. If not, see . #define PRODUCT_ID 0x3060 #define DEVICE_VER 0x0001 #define MANUFACTURER foostan -#define PRODUCT Crkbd +#define PRODUCT Corne Keyboard (crkbd) #define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 3 thumb keys /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 8 -#define MATRIX_COLS 7 +#define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D4, C6, D7, E6 } // wiring of each half -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order /* define if matrix has ghost */ diff --git a/keyboards/crkbd/rev1/matrix.c b/keyboards/crkbd/rev1/matrix.c index dd93506db1..9d86879d6c 100644 --- a/keyboards/crkbd/rev1/matrix.c +++ b/keyboards/crkbd/rev1/matrix.c @@ -133,9 +133,8 @@ void rx_led_off(void) void matrix_init(void) { - debug_enable = true; - debug_matrix = true; - debug_mouse = true; + split_keyboard_setup(); + // initialize row and col unselect_rows(); init_cols(); diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index b969b5e286..b26292af5b 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c @@ -1,11 +1,5 @@ #include "crkbd.h" - -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - #ifdef RGB_MATRIX_ENABLE // Logical Layout @@ -44,46 +38,15 @@ // 05 06 06 05 // 15 14 07 07 14 15 3 - -#ifdef RGB_MATRIX_SPLIT_RIGHT led_config_t g_led_config = { { - { 51, 50, 45, 44, 37, 36, NO_LED }, - { 52, 49, 46, 43, 38, 35, NO_LED }, - { 53, 48, 47, 42, 39, 34, NO_LED }, - { NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED }, - { 24, 23, 18, 17, 10, 9, NO_LED }, - { 25, 22, 19, 16, 11, 8, NO_LED }, - { 26, 21, 20, 15, 12, 7, NO_LED }, - { NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED } -}, { - { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, - { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, - { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, - { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 }, - { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 }, - { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 }, - { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 }, - { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 } -}, { - 2, 2, 2, 2, 2, 2, 1, - 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 1, 4, - 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, - 4, 4, 1, 1, 1 -} }; -#else -led_config_t g_led_config = { { - { 24, 23, 18, 17, 10, 9, NO_LED }, - { 25, 22, 19, 16, 11, 8, NO_LED }, - { 26, 21, 20, 15, 12, 7, NO_LED }, - { NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED }, - { 51, 50, 45, 44, 37, 36, NO_LED }, - { 52, 49, 46, 43, 38, 35, NO_LED }, - { 53, 48, 47, 42, 39, 34, NO_LED }, - { NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED } + { 24, 23, 18, 17, 10, 9 }, + { 25, 22, 19, 16, 11, 8 }, + { 26, 21, 20, 15, 12, 7 }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6 }, + { 51, 50, 45, 44, 37, 36 }, + { 52, 49, 46, 43, 38, 35 }, + { 53, 48, 47, 42, 39, 34 }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33 } }, { { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, @@ -105,21 +68,42 @@ led_config_t g_led_config = { { } }; #endif -#endif +__attribute__((weak)) +void matrix_init_user(void) {} + void matrix_init_kb(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); - #endif - - matrix_init_user(); -}; - -void shutdown_kb(void) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); - #endif +#ifdef RGB_MATRIX_ENABLE + if (!isLeftHand) { + g_led_config = (led_config_t){ { + { 51, 50, 45, 44, 37, 36 }, + { 52, 49, 46, 43, 38, 35 }, + { 53, 48, 47, 42, 39, 34 }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33 }, + { 24, 23, 18, 17, 10, 9 }, + { 25, 22, 19, 16, 11, 8 }, + { 26, 21, 20, 15, 12, 7 }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6 } + }, { + { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, + { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, + { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, + { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 }, + { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 }, + { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 }, + { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 }, + { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 } + }, { + 2, 2, 2, 2, 2, 2, 1, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 1, 4, + 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1 + } }; + } +#endif + matrix_init_user(); } diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h index cdd61d2bf9..5e90de72a3 100644 --- a/keyboards/crkbd/rev1/rev1.h +++ b/keyboards/crkbd/rev1/rev1.h @@ -1,24 +1,27 @@ #pragma once -#include "../crkbd.h" +#include "crkbd.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif + +#ifdef SSD1306OLED + #include "ssd1306.h" #endif #ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif + #include + #ifdef __AVR__ + #include + #include + #endif #endif -//void promicro_bootloader_jmp(bool program); +// clang-format off #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -48,3 +51,4 @@ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ KC_##L30, KC_##L31, KC_##L32, KC_##R30, KC_##R31, KC_##R32 \ ) +// clang-format on diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk index f12849f989..ab9bed09c0 100644 --- a/keyboards/crkbd/rev1/rules.mk +++ b/keyboards/crkbd/rev1/rules.mk @@ -1,9 +1,3 @@ -RGB_MATRIX_SPLIT_RIGHT = no # if no, order LEDs for left hand, if yes, order LEDs for right hand - -ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) - OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT -endif - -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c +SRC += matrix.c \ + split_util.c \ + split_scomm.c diff --git a/keyboards/crkbd/rev1/split_util.c b/keyboards/crkbd/rev1/split_util.c index e1ff8b4379..c0d44af294 100644 --- a/keyboards/crkbd/rev1/split_util.c +++ b/keyboards/crkbd/rev1/split_util.c @@ -7,6 +7,11 @@ #include "split_util.h" #include "matrix.h" #include "keyboard.h" +#include "wait.h" + +#ifdef EE_HANDS +# include "eeconfig.h" +#endif #ifdef USE_MATRIX_I2C # include "i2c.h" @@ -14,19 +19,59 @@ # include "split_scomm.h" #endif +#ifndef SPLIT_USB_TIMEOUT +# define SPLIT_USB_TIMEOUT 2500 +#endif + volatile bool isLeftHand = true; -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif +bool waitForUsb(void) { + for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) { + // This will return true of a USB connection has been established + if (UDADDR & _BV(ADDEN)) { + return true; + } + wait_ms(100); + } + + // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow + (USBCON &= ~(_BV(USBE) | _BV(OTGPADE))); + + return false; +} + +__attribute__((weak)) bool is_keyboard_left(void) { +#if defined(SPLIT_HAND_PIN) + // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand + setPinInput(SPLIT_HAND_PIN); + return readPin(SPLIT_HAND_PIN); +#elif defined(EE_HANDS) + return eeconfig_read_handedness(); +#elif defined(MASTER_RIGHT) + return !is_keyboard_master(); +#endif + + return is_keyboard_master(); +} + +__attribute__((weak)) bool is_keyboard_master(void) { + static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; + + // only check once, as this is called often + if (usbstate == UNKNOWN) { +#if defined(SPLIT_USB_DETECT) + usbstate = waitForUsb() ? MASTER : SLAVE; +#elif defined(__AVR__) + USBCON |= (1 << OTGPADE); // enables VBUS pad + wait_us(5); + + usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS +#else + usbstate = MASTER; +#endif + } + + return (usbstate == MASTER); } static void keyboard_master_setup(void) { @@ -47,14 +92,9 @@ static void keyboard_slave_setup(void) { #endif } -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/cu24/keymaps/default/keymap.c b/keyboards/cu24/keymaps/default/keymap.c index bbec2907ad..e6db359edf 100644 --- a/keyboards/cu24/keymaps/default/keymap.c +++ b/keyboards/cu24/keymaps/default/keymap.c @@ -35,22 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -/* Use this function to add macros */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } diff --git a/keyboards/cu24/rules.mk b/keyboards/cu24/rules.mk index 86f1a8479c..fdfba55b13 100644 --- a/keyboards/cu24/rules.mk +++ b/keyboards/cu24/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/cu75/keymaps/default/keymap.c b/keyboards/cu75/keymaps/default/keymap.c index 0040473fba..c78c5cd121 100644 --- a/keyboards/cu75/keymaps/default/keymap.c +++ b/keyboards/cu75/keymaps/default/keymap.c @@ -58,15 +58,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/cu75/keymaps/iso/keymap.c b/keyboards/cu75/keymaps/iso/keymap.c index 358a1e11e5..18bd9a59ae 100644 --- a/keyboards/cu75/keymaps/iso/keymap.c +++ b/keyboards/cu75/keymaps/iso/keymap.c @@ -57,15 +57,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/cu75/rules.mk b/keyboards/cu75/rules.mk index a84343f056..697d8d18f2 100644 --- a/keyboards/cu75/rules.mk +++ b/keyboards/cu75/rules.mk @@ -1,41 +1,14 @@ +# MCU name MCU = atmega32u4 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -SRC = ../lfkeyboards/TWIlib.c ../lfkeyboards/issi.c ../lfkeyboards/lighting.c \ No newline at end of file +SRC = ../lfkeyboards/TWIlib.c ../lfkeyboards/issi.c ../lfkeyboards/lighting.c diff --git a/keyboards/cutie_club/wraith/config.h b/keyboards/cutie_club/wraith/config.h new file mode 100644 index 0000000000..4908f7d8cd --- /dev/null +++ b/keyboards/cutie_club/wraith/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 Amber Holly + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Amber +#define PRODUCT Wraith +#define DESCRIPTION A WKL, 75% keyboard with staggered F-row. + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0, B7 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/cutie_club/wraith/info.json b/keyboards/cutie_club/wraith/info.json new file mode 100644 index 0000000000..51ca82677f --- /dev/null +++ b/keyboards/cutie_club/wraith/info.json @@ -0,0 +1,180 @@ +{ + "keyboard_name": "wraith", + "url": "", + "maintainer": "amberstarlight", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_ansi": { + "key_count": 80, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Prt Sc", "x":14, "y":0}, + {"label":"Fn", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"@", "x":2, "y":1}, + {"label":"#", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Insert", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"|", "x":13.5, "y":2, "w":1.5}, + {"label":"Delete", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"\"", "x":11.75, "y":3}, + {"label":"Enter", "x":12.75, "y":3, "w":2.25}, + {"label":"Pg Up", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":2.25}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + {"label":"Pg Dn", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.5}, + {"label":"Alt", "x":2.25, "y":5, "w":1.5}, + {"x":3.75, "y":5, "w":7}, + {"label":"Alt", "x":10.75, "y":5, "w":1.5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5} + ] + }, + "LAYOUT_iso": { + "key_count": 81, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Prt Sc", "x":14, "y":0}, + {"label":"Fn", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"\"", "x":2, "y":1}, + {"label":"\u00a3", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Insert", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"Delete", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"@", "x":11.75, "y":3}, + {"label":"~", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"Pg Up", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"|", "x":1.25, "y":4}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + {"label":"Pg Dn", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.5}, + {"label":"Alt", "x":2.25, "y":5, "w":1.5}, + {"x":3.75, "y":5, "w":7}, + {"label":"Alt", "x":10.75, "y":5, "w":1.5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5} + ] + } + } +} diff --git a/keyboards/cutie_club/wraith/keymaps/amber/config.h b/keyboards/cutie_club/wraith/keymaps/amber/config.h new file mode 100644 index 0000000000..b825835bb4 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/amber/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/cutie_club/wraith/keymaps/amber/keymap.c b/keyboards/cutie_club/wraith/keymaps/amber/keymap.c new file mode 100644 index 0000000000..f953b5e199 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/amber/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, KC_BRK, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_DEL, + 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_BSLS, KC_ENT, MO(1), + 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, KC_RGUI, + KC_CAPS, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_MPRV, _______, KC_MNXT + ) +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + // escape LED on layer 1 + if (IS_LAYER_ON(1)) { + writePinLow(B0); + } else { + writePinHigh(B0); + } +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/cutie_club/wraith/keymaps/amber/readme.md b/keyboards/cutie_club/wraith/keymaps/amber/readme.md new file mode 100644 index 0000000000..013ae7f109 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/amber/readme.md @@ -0,0 +1 @@ +# Amber's personal keymap diff --git a/keyboards/cutie_club/wraith/keymaps/default/config.h b/keyboards/cutie_club/wraith/keymaps/default/config.h new file mode 100644 index 0000000000..6f4dc6741c --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Amber + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/cutie_club/wraith/keymaps/default/keymap.c b/keyboards/cutie_club/wraith/keymaps/default/keymap.c new file mode 100644 index 0000000000..342a411ef7 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, MO(1), + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_DEL, + 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_BSLS, KC_ENT, KC_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, KC_TRNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + // escape LED on layer 1 + if (IS_LAYER_ON(1)) { + writePinLow(B0); + } else { + writePinHigh(B0); + } +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/cutie_club/wraith/keymaps/default/readme.md b/keyboards/cutie_club/wraith/keymaps/default/readme.md new file mode 100644 index 0000000000..cdf6376c2d --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Wraith diff --git a/keyboards/cutie_club/wraith/keymaps/timer/config.h b/keyboards/cutie_club/wraith/keymaps/timer/config.h new file mode 100644 index 0000000000..f6f1af659d --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/timer/config.h @@ -0,0 +1,25 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ + +#pragma once + +#define LAYER_TIMEOUT 10000 +#define TIMEOUT_WARNING 3000 +#define FLASH_PERIOD 250 +#define SPEED_SCALE 2 +#define TIMEOUT_SCALE 4 +#define LAYER_SWITCH 1 // the layer to switch to +#define GET_FLASH_PERIOD ((layer_time_remaining <= TIMEOUT_WARNING/TIMEOUT_SCALE) ? FLASH_PERIOD/SPEED_SCALE : FLASH_PERIOD) diff --git a/keyboards/cutie_club/wraith/keymaps/timer/keymap.c b/keyboards/cutie_club/wraith/keymaps/timer/keymap.c new file mode 100644 index 0000000000..e57c621038 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/timer/keymap.c @@ -0,0 +1,90 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +int layer_time_remaining; +uint16_t prev_loop_time; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + TIME_TOGGLE = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, KC_BRK, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_DEL, + 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_BSLS, KC_ENT, TIME_TOGGLE, + 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, KC_RGUI, + KC_CAPS, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MPLY, KC_MPRV, _______, KC_MNXT + ) +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + layer_time_remaining -= timer_read()-prev_loop_time; //amount of time elapsed since the start of the previous loop + prev_loop_time = timer_read(); //start counting the time to check at the next iteration + + if (layer_time_remaining <= 0) { + // once timer run out + layer_off(LAYER_SWITCH); + } + + // escape LED on layer 1 + if (IS_LAYER_ON(LAYER_SWITCH)) { + if (layer_time_remaining <= TIMEOUT_WARNING) { + if ((int)(layer_time_remaining/GET_FLASH_PERIOD % 2 == 0)) { + // if even led on + writePinLow(B0); + } else { + writePinHigh(B0); + } + } else { + writePinLow(B0); + } + } else { + writePinHigh(B0); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TIME_TOGGLE: + // get the time when time toggle pressed + layer_time_remaining = LAYER_TIMEOUT; + // set the layer + layer_on(LAYER_SWITCH); + break; + } + return true; +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/cutie_club/wraith/keymaps/timer/readme.md b/keyboards/cutie_club/wraith/keymaps/timer/readme.md new file mode 100644 index 0000000000..1e812f3aed --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/timer/readme.md @@ -0,0 +1,30 @@ +# Timed function layer keymap + +Amber's personal keymap for the Wraith, but with a custom timed function layer keycode. `config.h` contains defines that you can edit to control various aspects of this function. + +## How does it work? +We are reading QMK's software timer in `matrix_scan_user()`. + +Once the `TIME_TOGGLE` key is pressed, `layer_time_remaining` is set equal to `LAYER_TIMEOUT`, the layer defined in `LAYER_SWITCH` becomes active, and the LED on the Escape key (pin B0) will light up. + +Each time the matrix is scanned, the software timer is read, and the value of `layer_time_remaining` is decreased by `prev_loop_time` - the amount of time elapsed since the last matrix scan. + +When there are `TIMEOUT_WARNING`ms left in `LAYER_TIMEOUT`, the LED will begin to flash at intervals of `FLASH_PERIOD`ms. + +When there are `TIMEOUT_WARNING/TIMEOUT_SCALE`ms left, the LED will begin to flash at intervals of `FLASH_PERIOD/SPEED_SCALE`ms. + +When `layer_time_remaining` is equal to or less than 0, the layer defined in `LAYER_SWITCH` is removed from the layer stack. + + +## What are the defaults? +`LAYER_TIMEOUT` controls how long the layer will stay active for. The default is 10 seconds. + +`TIMEOUT_WARNING` controls how long the warning (LED flash) will occur before the layer becomes inactive. The default is 3 seconds. + +`FLASH_PERIOD` controls how long each LED flash interval is in the warning time. The default flash period is 250ms. + +`SPEED_SCALE` controls how many times faster the LED will flash in the second flash period. The default scale is 2, twice as fast. + +`TIMEOUT_SCALE` controls the length of the second flash period, relative to `TIMEOUT_WARNING`. The default scale is 4; for 750ms of the secondary flash period. + +`LAYER_SWITCH` is the layer that will be activated by the key. The default is layer 1. diff --git a/keyboards/cutie_club/wraith/readme.md b/keyboards/cutie_club/wraith/readme.md new file mode 100644 index 0000000000..66d138b005 --- /dev/null +++ b/keyboards/cutie_club/wraith/readme.md @@ -0,0 +1,15 @@ +# Wraith + +![Wraith](https://i.imgur.com/WbfRCg8.jpg) + +Custom PCB for the Wraith keyboard. + +Keyboard Maintainer: [Amber](https://github.com/amberstarlight) +Hardware Supported: Wraith PCB +Hardware Availability: private group buy + +Make example for this keyboard (after setting up your build environment): + + make cutie_club/wraith: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). diff --git a/keyboards/cutie_club/wraith/rules.mk b/keyboards/cutie_club/wraith/rules.mk new file mode 100644 index 0000000000..1737728fc3 --- /dev/null +++ b/keyboards/cutie_club/wraith/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/cutie_club/wraith/wraith.c b/keyboards/cutie_club/wraith/wraith.c new file mode 100644 index 0000000000..95265384ee --- /dev/null +++ b/keyboards/cutie_club/wraith/wraith.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include "wraith.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + setPinOutput(B3); + setPinOutput(B0); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + led_set_user(usb_led); +} diff --git a/keyboards/cutie_club/wraith/wraith.h b/keyboards/cutie_club/wraith/wraith.h new file mode 100644 index 0000000000..156937a1f5 --- /dev/null +++ b/keyboards/cutie_club/wraith/wraith.h @@ -0,0 +1,84 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K47,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K67,\ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K87,\ + KA0, KA1, KA3, KB5, KA6, KB6, KA7\ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47}, \ + { K50, K51, K52, K53, K54, K55, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, K91, K92, K93, K94, K95, K96 }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6 } \ +} + + #define LAYOUT_iso( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K47,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K67,\ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K87,\ + KA0, KA1, KA3, KB5, KA6, KB6, KA7\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47}, \ + { K50, K51, K52, K53, K54, K55, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, K91, K92, K93, K94, K95, K96 }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6 } \ +} + +#define LAYOUT_ansi( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K66, K47,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K76, K67,\ + K80, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K87,\ + KA0, KA1, KA3, KB5, KA6, KB6, KA7\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47}, \ + { K50, K51, K52, K53, K54, K55, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { KC_NO, K91, K92, K93, K94, K95, K96 }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6 } \ +} diff --git a/keyboards/daisy/keymaps/default/keymap.c b/keyboards/daisy/keymaps/default/keymap.c index 9a520ba55d..adc3298d06 100644 --- a/keyboards/daisy/keymaps/default/keymap.c +++ b/keyboards/daisy/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Layer shorthand #define _BL 0 diff --git a/keyboards/daisy/rules.mk b/keyboards/daisy/rules.mk index 8157b168e5..d2b0d7d167 100644 --- a/keyboards/daisy/rules.mk +++ b/keyboards/daisy/rules.mk @@ -1,51 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4996 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # QMK Build Options # change to "no" to disable the options, or define them in the Makefile in @@ -63,4 +27,4 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/dc01/arrow/rules.mk b/keyboards/dc01/arrow/rules.mk index 0bd090bab6..56a9cfc49c 100644 --- a/keyboards/dc01/arrow/rules.mk +++ b/keyboards/dc01/arrow/rules.mk @@ -1,55 +1,15 @@ -SRC += matrix.c \ - i2c_slave.c - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -71,4 +31,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in -CUSTOM_MATRIX = yes # Use custom matrix \ No newline at end of file +CUSTOM_MATRIX = yes # Use custom matrix +SRC += matrix.c \ + i2c_slave.c diff --git a/keyboards/dc01/left/rules.mk b/keyboards/dc01/left/rules.mk index 515b6b3dde..9e34a0a808 100644 --- a/keyboards/dc01/left/rules.mk +++ b/keyboards/dc01/left/rules.mk @@ -1,55 +1,15 @@ -SRC += matrix.c \ - i2c_master.c - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -71,3 +31,5 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes # Use custom matrix +SRC += matrix.c \ + i2c_master.c diff --git a/keyboards/dc01/numpad/rules.mk b/keyboards/dc01/numpad/rules.mk index 9def53dd51..674ef1d026 100644 --- a/keyboards/dc01/numpad/rules.mk +++ b/keyboards/dc01/numpad/rules.mk @@ -1,55 +1,15 @@ -SRC += matrix.c \ - i2c_slave.c - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -72,6 +32,8 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in CUSTOM_MATRIX = yes # Use custom matrix +SRC += matrix.c \ + i2c_slave.c # Community layouts supported LAYOUTS = numpad_5x4 ortho_5x4 diff --git a/keyboards/dc01/right/rules.mk b/keyboards/dc01/right/rules.mk index 0bd090bab6..56a9cfc49c 100644 --- a/keyboards/dc01/right/rules.mk +++ b/keyboards/dc01/right/rules.mk @@ -1,55 +1,15 @@ -SRC += matrix.c \ - i2c_slave.c - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -71,4 +31,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in -CUSTOM_MATRIX = yes # Use custom matrix \ No newline at end of file +CUSTOM_MATRIX = yes # Use custom matrix +SRC += matrix.c \ + i2c_slave.c diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c index fc34d1cec9..c13b0627c0 100644 --- a/keyboards/deltasplit75/keymaps/default/keymap.c +++ b/keyboards/deltasplit75/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk index 5c7571b9db..a976360bf1 100644 --- a/keyboards/deltasplit75/rules.mk +++ b/keyboards/deltasplit75/rules.mk @@ -1,53 +1,16 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -70,5 +33,9 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c DEFAULT_FOLDER = deltasplit75/v2 diff --git a/keyboards/deltasplit75/v2/v2.h b/keyboards/deltasplit75/v2/v2.h index 9e364f38ab..82f54c2b0d 100644 --- a/keyboards/deltasplit75/v2/v2.h +++ b/keyboards/deltasplit75/v2/v2.h @@ -3,10 +3,8 @@ #include "deltasplit75.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); //matrix is defined in a weird way here; the layout on both sides are asymmetrical, but the "matrix" is symmetrical but with empty gaps //the last column is defined as a separate row because the firmware currently doesnt support more than 8 columns (this layout has 9 columns per side) K45 and K110 are the Bs on both sides; K53 and K106 are extra keys for ISO #define LAYOUT_v2( \ @@ -59,4 +57,4 @@ { KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/dichotomy/dichotomy.h b/keyboards/dichotomy/dichotomy.h index 030209ff01..4355a1c908 100755 --- a/keyboards/dichotomy/dichotomy.h +++ b/keyboards/dichotomy/dichotomy.h @@ -1,13 +1,9 @@ #ifndef DICHOTOMY_H #define DICHOTOMY_H -#include QMK_KEYBOARD_H #include "report.h" #include "pointing_device.h" #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include #define red_led_off() PORTF |= (1<<6) #define red_led_on() PORTF &= ~(1<<6) diff --git a/keyboards/dichotomy/rules.mk b/keyboards/dichotomy/rules.mk index 4dbc999b74..9ab4d56922 100755 --- a/keyboards/dichotomy/rules.mk +++ b/keyboards/dichotomy/rules.mk @@ -1,57 +1,15 @@ - -OPT_DEFS += -DDICHOTOMY_PROMICRO -DICHOTOMY_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader - # This definition is optional, and if your keyboard supports multiple bootloaders of - # different sizes, comment this out, and the correct address will be loaded - # automatically (+60). See bootloader.mk for all options. - BOOTLOADER = caterina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -73,5 +31,12 @@ UNICODE_ENABLE = YES # Unicode USB = /dev/ttyACM0 +OPT_DEFS += -DDICHOTOMY_PROMICRO +DICHOTOMY_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c + #upload: build # $(DICHOTOMY_UPLOAD_COMMAND) diff --git a/keyboards/diverge3/.gitignore b/keyboards/diverge3/.gitignore deleted file mode 100644 index 722d5e71d9..0000000000 --- a/keyboards/diverge3/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.vscode diff --git a/keyboards/diverge3/config.h b/keyboards/diverge3/config.h index a593bca9db..96196667c0 100644 --- a/keyboards/diverge3/config.h +++ b/keyboards/diverge3/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -59,6 +58,10 @@ along with this program. If not, see . /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 3 +#endif + /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -181,5 +184,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/diverge3/keymaps/default/keymap.c b/keyboards/diverge3/keymaps/default/keymap.c index 29e5576fcd..acf262696b 100644 --- a/keyboards/diverge3/keymaps/default/keymap.c +++ b/keyboards/diverge3/keymaps/default/keymap.c @@ -84,7 +84,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; // KEYMAP -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/diverge3/rules.mk b/keyboards/diverge3/rules.mk index 36e8ccb471..42ab5224af 100644 --- a/keyboards/diverge3/rules.mk +++ b/keyboards/diverge3/rules.mk @@ -1,53 +1,15 @@ - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/divergetm2/divergetm2.h b/keyboards/divergetm2/divergetm2.h index 50144b1d2b..6de48e41c7 100644 --- a/keyboards/divergetm2/divergetm2.h +++ b/keyboards/divergetm2/divergetm2.h @@ -17,10 +17,8 @@ #pragma once -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -29,8 +27,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/divergetm2/keymaps/default/keymap.c b/keyboards/divergetm2/keymaps/default/keymap.c index 068705970c..f620cc2371 100644 --- a/keyboards/divergetm2/keymaps/default/keymap.c +++ b/keyboards/divergetm2/keymaps/default/keymap.c @@ -17,7 +17,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/divergetm2/rules.mk b/keyboards/divergetm2/rules.mk index 084a3bf63e..9a461edec9 100644 --- a/keyboards/divergetm2/rules.mk +++ b/keyboards/divergetm2/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable @@ -70,6 +31,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes - -# must specify this to enable soft-reset -BOOTLOADER = caterina diff --git a/keyboards/dk60/rules.mk b/keyboards/dk60/rules.mk index c85ed9b0a6..17ee5d9618 100644 --- a/keyboards/dk60/rules.mk +++ b/keyboards/dk60/rules.mk @@ -1,9 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) diff --git a/keyboards/do60/keymaps/default/keymap.c b/keyboards/do60/keymaps/default/keymap.c index f8e4a5e92b..8ade985b32 100644 --- a/keyboards/do60/keymaps/default/keymap.c +++ b/keyboards/do60/keymaps/default/keymap.c @@ -20,21 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// Macros -/* -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { register_code(KC_RSFT); } - else { unregister_code(KC_RSFT); } - break; - } - - return MACRO_NONE; -}; -*/ // Loop void matrix_scan_user(void) { // Empty diff --git a/keyboards/do60/keymaps/test/keymap.c b/keyboards/do60/keymaps/test/keymap.c index f145177b0f..9e81ce1eae 100644 --- a/keyboards/do60/keymaps/test/keymap.c +++ b/keyboards/do60/keymaps/test/keymap.c @@ -21,21 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// Macros -/* -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { register_code(KC_RSFT); } - else { unregister_code(KC_RSFT); } - break; - } - - return MACRO_NONE; -}; -*/ // Loop void matrix_scan_user(void) { // Empty diff --git a/keyboards/do60/rules.mk b/keyboards/do60/rules.mk index 7370a6262e..bd74db7f82 100644 --- a/keyboards/do60/rules.mk +++ b/keyboards/do60/rules.mk @@ -1,52 +1,15 @@ # MCU name MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# LUFA specific -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options AUDIO_ENABLE = no # Audio output on port C6 @@ -63,4 +26,4 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend UNICODE_ENABLE = no # Unicode -LAYOUTS = 60_ansi 60_hhkb 60_ansi_split_bs_rshift \ No newline at end of file +LAYOUTS = 60_ansi 60_hhkb 60_ansi_split_bs_rshift diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c index 7831a91f52..e9125a3e60 100644 --- a/keyboards/donutcables/budget96/budget96.c +++ b/keyboards/donutcables/budget96/budget96.c @@ -13,42 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "budget96.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c_master.h" -#include "quantum.h" - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output setPinOutput(D0); @@ -56,25 +23,25 @@ void backlight_init_ports(void) { setPinOutput(D4); setPinOutput(D6); - // turn RGB LEDs on + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); } - void backlight_set(uint8_t level) { - if (level == 0) { - // turn RGB LEDs off +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { - // turn RGB LEDs on + } else { + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } - } + } +} diff --git a/keyboards/donutcables/budget96/budget96.h b/keyboards/donutcables/budget96/budget96.h index 561d0cbfa2..05d2700ce1 100644 --- a/keyboards/donutcables/budget96/budget96.h +++ b/keyboards/donutcables/budget96/budget96.h @@ -18,7 +18,7 @@ #include "quantum.h" #define LAYOUT_all( \ - k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k78, k79, \ k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4D, k4E, k46, k47, k48, k49, \ k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2C, k2D, k26, k27, k28, k29, \ @@ -37,7 +37,7 @@ } #define LAYOUT_96_ansi( \ - k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k78, k79, \ k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4E, k46, k47, k48, k49, \ k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2D, k26, k27, k28, k29, \ diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h index 75aacb4d4f..127e542f1c 100644 --- a/keyboards/donutcables/budget96/config.h +++ b/keyboards/donutcables/budget96/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 #define MANUFACTURER DonutCables #define PRODUCT budget96 @@ -36,6 +37,5 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md index 70e4d3afba..c83040360a 100644 --- a/keyboards/donutcables/budget96/readme.md +++ b/keyboards/donutcables/budget96/readme.md @@ -37,6 +37,7 @@ macOS: brew install python3 pip3 install pyusb brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. diff --git a/keyboards/donutcables/budget96/rules.mk b/keyboards/donutcables/budget96/rules.mk index 67697ac733..54328d248d 100644 --- a/keyboards/donutcables/budget96/rules.mk +++ b/keyboards/donutcables/budget96/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,12 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -SRC = i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/donutcables/budget96/usbconfig.h b/keyboards/donutcables/budget96/usbconfig.h index 223b69bb94..03ec48972e 100644 --- a/keyboards/donutcables/budget96/usbconfig.h +++ b/keyboards/donutcables/budget96/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'D', 'o', 'n', 'u', 't', 'C', 'a', 'b', 'l', 'e', 's' diff --git a/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c index 6f97d87e1b..bb78e71313 100644 --- a/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c +++ b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c @@ -35,22 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/donutcables/scrabblepad/rules.mk b/keyboards/donutcables/scrabblepad/rules.mk index 20f532af4d..be6c7d9ac8 100644 --- a/keyboards/donutcables/scrabblepad/rules.mk +++ b/keyboards/donutcables/scrabblepad/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/doro67/multi/info.json b/keyboards/doro67/multi/info.json index 03252140dd..747c8ab7b0 100644 --- a/keyboards/doro67/multi/info.json +++ b/keyboards/doro67/multi/info.json @@ -5,14 +5,14 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT_ansi": { - "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + "LAYOUT_65_ansi_blocker": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] }, "LAYOUT_iso": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"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":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"Del", "x":15, "y":1}, {"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":1, "w":1.25, "h":2}, {"label":"PgUp", "x":15, "y":2}, {"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":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] }, "LAYOUT_multi": { - "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":"Back", "x":13, "y":0}, {"label":"F2", "x":14, "y":0}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"F1", "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":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"MO(1)", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + "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":"Ins", "x":15, "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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"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":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] } } } diff --git a/keyboards/doro67/multi/keymaps/default/keymap.c b/keyboards/doro67/multi/keymaps/default/keymap.c index dd40a6c3fa..6140aa2773 100644 --- a/keyboards/doro67/multi/keymaps/default/keymap.c +++ b/keyboards/doro67/multi/keymaps/default/keymap.c @@ -15,22 +15,46 @@ */ #include QMK_KEYBOARD_H - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_ansi( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, - 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_DEL, - 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_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_ansi( - 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_TRNS, KC_TRNS, - BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), + /* Default layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_65_ansi_blocker( + 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_INS, + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │BLTog│BLS│BL-│BL+│Rst│ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [1] = LAYOUT_65_ansi_blocker( + 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, _______, _______, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/doro67/multi/keymaps/default/readme.md b/keyboards/doro67/multi/keymaps/default/readme.md index 9b9136b344..d9cb59555e 100644 --- a/keyboards/doro67/multi/keymaps/default/readme.md +++ b/keyboards/doro67/multi/keymaps/default/readme.md @@ -10,34 +10,34 @@ If you purchased an RGB PCB, please see the 'rgb' directory. This is the default ANSI layout that comes flashed on the Doro67 multi PCB with the exception of adding backtick as it was not mapped. -Default Layer: +Default layer: ``` -,---------------------------------------------------------------. -|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins| -|---------------------------------------------------------------| -|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del| -|---------------------------------------------------------------| -|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp| -|---------------------------------------------------------------| -|Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| -|---------------------------------------------------------------| -|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt| -`---------------------------------------------------------------' +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ ``` -FN Layer: +Fn layer: ``` -,---------------------------------------------------------------. -|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | -|---------------------------------------------------------------| -|BLTog|Stp|Dec|Inc| | | | | | | | | | | | -|---------------------------------------------------------------| -| | | | | | | | | | | | | | | -|---------------------------------------------------------------| -| | | | | | | | | | | | | | | -|---------------------------------------------------------------| -| | | | | | | | | | -`---------------------------------------------------------------' +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│BLTog│BLS│BL-│BL+│Rst│ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ ``` diff --git a/keyboards/doro67/multi/keymaps/default_iso/keymap.c b/keyboards/doro67/multi/keymaps/default_iso/keymap.c index 2e8d839820..29bc19da80 100644 --- a/keyboards/doro67/multi/keymaps/default_iso/keymap.c +++ b/keyboards/doro67/multi/keymaps/default_iso/keymap.c @@ -15,22 +15,46 @@ */ #include QMK_KEYBOARD_H - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_iso( - 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_INS, - 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_ENT, KC_DEL, - 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_NUHS, KC_PGUP, - 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_LSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_iso( - 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_TRNS, KC_TRNS, - BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), + /* Default layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent ├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │NU#│ │PgU│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │LSft│NU\│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_iso( + 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_INS, + 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_DEL, + 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_NUHS, KC_ENT, KC_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │BLTog│BLS│BL-│BL+│Rst│ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [1] = LAYOUT_iso( + 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, _______, _______, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/doro67/multi/keymaps/default_iso/readme.md b/keyboards/doro67/multi/keymaps/default_iso/readme.md index 4b3d2ba4ad..e5189f75c3 100644 --- a/keyboards/doro67/multi/keymaps/default_iso/readme.md +++ b/keyboards/doro67/multi/keymaps/default_iso/readme.md @@ -10,34 +10,34 @@ If you purchased an RGB PCB, please see the 'rgb' directory. This is the default ISO layout that comes flashed on the Doro67 multi PCB with the exception of adding backtick and UK ISO specific keycodes as they were not mapped. -Default Layer: +Default layer: ``` -,---------------------------------------------------------------. -|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins| -|---------------------------------------------------------------| -|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del| -|------------------------------------------------------|Entr|---| -|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| #| |PUp| -|---------------------------------------------------------------| -|Shft| \| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| -|---------------------------------------------------------------| -|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt| -`---------------------------------------------------------------' +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │Del│ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent ├───┤ +│ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │NU#│ │PgU│ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│LSft│NU\│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ ``` -FN Layer: +Fn layer: ``` -,---------------------------------------------------------------. -|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | -|---------------------------------------------------------------| -|BLTog|Stp|Dec|Inc| | | | | | | | | | | | -|------------------------------------------------------| |---| -| | | | | | | | | | | | | | | | -|---------------------------------------------------------------| -| | | | | | | | | | | | | | | | -|---------------------------------------------------------------| -| | | | | | | | | | -`---------------------------------------------------------------' +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│BLTog│BLS│BL-│BL+│Rst│ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ ``` diff --git a/keyboards/doro67/multi/keymaps/default_multi/keymap.c b/keyboards/doro67/multi/keymaps/default_multi/keymap.c index e57dce1ea2..32af5af98e 100644 --- a/keyboards/doro67/multi/keymaps/default_multi/keymap.c +++ b/keyboards/doro67/multi/keymaps/default_multi/keymap.c @@ -15,22 +15,46 @@ */ #include QMK_KEYBOARD_H - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_multi( - 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_F2, KC_INS, - 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_DEL, - 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_PGUP, - KC_LSFT, KC_F1, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_multi( - 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_TRNS, KC_TRNS, KC_TRNS, - BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), + /* Default layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │LSft│NU\│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │Spc │ Space │RAl│Fn │RCt│ ← │ ↓ │ → │ + * └────┴────┴────┴──────────┴────┴────────┴───┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_multi( + 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_BSLS, KC_GRV, KC_INS, + 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_BSPC, KC_DEL, + 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_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │BLTog│BLS│BL-│BL+│Rst│ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴──────────┴────┴────────┴───┴───┴───┴───┴───┴───┘ + */ + [1] = LAYOUT_multi( + 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, _______, _______, _______, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/doro67/multi/keymaps/default_multi/readme.md b/keyboards/doro67/multi/keymaps/default_multi/readme.md index 5761c006bf..bfe19a9338 100644 --- a/keyboards/doro67/multi/keymaps/default_multi/readme.md +++ b/keyboards/doro67/multi/keymaps/default_multi/readme.md @@ -13,34 +13,34 @@ the exception of adding backtick as it was not mapped. This layout supports both the blocker and non-blocker layouts (2 & 4) with the difference that the blocker layout lacks the right control key. -Default Layer: +Default layer: ``` -,---------------------------------------------------------------. -|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS| F2|Ins| -|---------------------------------------------------------------| -|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del| -|---------------------------------------------------------------| -|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp| -|---------------------------------------------------------------| -|Shft| F1| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| -|---------------------------------------------------------------| -|Ctrl |GUI |Alt | Space |Space| Space |Alt|MO1|Ctl|Lft|Dwn|Rgt| -`---------------------------------------------------------------' +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │Ins│ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ +│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │Del│ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│LSft│NU\│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ +├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│LCtl│LGui│LAlt│ Space │Spc │ Space │RAl│Fn │RCt│ ← │ ↓ │ → │ +└────┴────┴────┴──────────┴────┴────────┴───┴───┴───┴───┴───┴───┘ ``` -FN Layer: +Fn layer: ``` -,---------------------------------------------------------------. -|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | -|---------------------------------------------------------------| -|BLTog|Stp|Dec|Inc| | | | | | | | | | | | -|---------------------------------------------------------------| -| | | | | | | | | | | | | | | -|---------------------------------------------------------------| -| | | | | | | | | | | | | | | | -|---------------------------------------------------------------| -| | | | | | | | | | | | | -`---------------------------------------------------------------' +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ +│BLTog│BLS│BL-│BL+│Rst│ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴──────────┴────┴────────┴───┴───┴───┴───┴───┴───┘ ``` diff --git a/keyboards/wasdat/keymaps/konstantin/config.h b/keyboards/doro67/multi/keymaps/konstantin/config.h similarity index 100% rename from keyboards/wasdat/keymaps/konstantin/config.h rename to keyboards/doro67/multi/keymaps/konstantin/config.h diff --git a/keyboards/doro67/multi/keymaps/konstantin/keymap.c b/keyboards/doro67/multi/keymaps/konstantin/keymap.c new file mode 100644 index 0000000000..2b1f06d0fb --- /dev/null +++ b/keyboards/doro67/multi/keymaps/konstantin/keymap.c @@ -0,0 +1,67 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │PSc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │FnLk│ Fn │RAlG│RCtl│ │ ← │ ↓ │ → │ + * └────┴────┴────┴──────────┴────┴────────┴────┴────┘ └───┴───┴───┘ + */ + [L_BASE] = LAYOUT_multi( + 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_BSLS, KC_GRV, KC_PSCR, + 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_BSPC, KC_DEL, + FN_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_PGUP, + KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, FNLK, FN, RAL_RGU, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│SLk│Pau│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│Mut│ │PgU│Btm│ + * ├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │DtPR│DtNA│ MW↓ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴──────────┴────┴────────┴────┴────┘ └───┴───┴───┘ + */ + [L_FN] = LAYOUT_multi( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, BOTTOM, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END + ), + + /* Numpad layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ PEnter │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴──────────┴────┴────────┴────┴────┘ └───┴───┴───┘ + */ + [L_NUMPAD] = LAYOUT_multi( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, NUMPAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, KC_PENT, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ + ), +}; diff --git a/keyboards/doro67/multi/keymaps/konstantin/rules.mk b/keyboards/doro67/multi/keymaps/konstantin/rules.mk new file mode 100644 index 0000000000..041d321145 --- /dev/null +++ b/keyboards/doro67/multi/keymaps/konstantin/rules.mk @@ -0,0 +1,10 @@ +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +SPACE_CADET_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes diff --git a/keyboards/doro67/multi/multi.h b/keyboards/doro67/multi/multi.h index 0b68aed426..8ffb673af0 100644 --- a/keyboards/doro67/multi/multi.h +++ b/keyboards/doro67/multi/multi.h @@ -1,4 +1,5 @@ /* Copyright 2019 ShadeDream + * * 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 @@ -16,44 +17,44 @@ #include "quantum.h" -#define LAYOUT_ansi( \ - 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, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \ +#define LAYOUT_65_ansi_blocker( \ + 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, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k44, k49, k4A, k4C, 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, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, 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, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, KC_NO, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E }, \ } #define LAYOUT_iso( \ - 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, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K44, K49, K4A, K4C, 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, k1C, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k44, k49, k4A, k4C, 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, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, 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, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, KC_NO, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E }, \ } #define LAYOUT_multi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K48, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K44, K45, K49, K4A, K4B, K4C, K4D, K4E \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k48, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k49, k4A, k4B, k4C, 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, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, K48, K49, K4A, K4B, K4C, 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, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, KC_NO, KC_NO, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ } diff --git a/keyboards/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk index 387ce74822..d719b7043f 100644 --- a/keyboards/doro67/multi/rules.mk +++ b/keyboards/doro67/multi/rules.mk @@ -1,9 +1,4 @@ MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -11,20 +6,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -45,3 +30,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/doro67/regular/info.json b/keyboards/doro67/regular/info.json index 68c9f5dbdf..ebdfa4db68 100644 --- a/keyboards/doro67/regular/info.json +++ b/keyboards/doro67/regular/info.json @@ -5,7 +5,7 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_65_ansi_blocker": { "key_count": 67, "layout": [ {"label":"K00", "x":0, "y":0}, diff --git a/keyboards/doro67/regular/keymaps/default/keymap.c b/keyboards/doro67/regular/keymaps/default/keymap.c index 5271d42c15..6a1e3c3d41 100644 --- a/keyboards/doro67/regular/keymaps/default/keymap.c +++ b/keyboards/doro67/regular/keymaps/default/keymap.c @@ -15,120 +15,46 @@ */ #include QMK_KEYBOARD_H - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, \ - 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_DEL, \ - 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_PGUP, KC_LSFT, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, \ - KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - [1] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [2] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [3] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [4] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [5] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [6] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [7] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [8] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [9] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [10] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [11] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [12] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [13] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [14] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [15] = LAYOUT( \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), + /* Default layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_65_ansi_blocker( + 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_INS, + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │Rst│ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [1] = LAYOUT_65_ansi_blocker( + 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, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/doro67/regular/regular.h b/keyboards/doro67/regular/regular.h index 76d606b13a..e785bba39f 100644 --- a/keyboards/doro67/regular/regular.h +++ b/keyboards/doro67/regular/regular.h @@ -17,25 +17,16 @@ #include "quantum.h" -/* This a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT( \ - 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, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K49, K4A, K4C, K4D, K4E \ +#define LAYOUT_65_ansi_blocker( \ + 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, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k49, k4A, k4C, 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, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, 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, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E }, \ } - diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk index 831bd0e616..d88f6fcfe6 100644 --- a/keyboards/doro67/regular/rules.mk +++ b/keyboards/doro67/regular/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -79,3 +31,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/doro67/rgb/info.json b/keyboards/doro67/rgb/info.json index 2d9b79a23e..a87b1d4a67 100644 --- a/keyboards/doro67/rgb/info.json +++ b/keyboards/doro67/rgb/info.json @@ -5,7 +5,7 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_65_ansi_blocker": { "key_count": 67, "layout": [ {"label":"K00", "x":0, "y":0}, diff --git a/keyboards/doro67/rgb/keymaps/default/keymap.c b/keyboards/doro67/rgb/keymaps/default/keymap.c index d02665ae76..b7742bba9c 100644 --- a/keyboards/doro67/rgb/keymaps/default/keymap.c +++ b/keyboards/doro67/rgb/keymaps/default/keymap.c @@ -17,46 +17,74 @@ // Defines the keycodes used by our macros in process_record_user enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL + QMKBEST = SAFE_RANGE, + QMKURL, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( \ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, \ - 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_DEL, \ - 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_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ - ), + /* Default layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_65_ansi_blocker( + 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_INS, + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), - [1] = LAYOUT( \ - 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_TRNS, KC_TRNS, \ - QMKBEST, QMKURL, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │BEST │URL│ │ │Rst│ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ RGB │Mo+│Hu+│Sa+│Va+│Sp+│ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │Mo-│Hu-│Sa-│Va-│Sp-│ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [1] = LAYOUT_65_ansi_blocker( + 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, _______, _______, + QMKBEST, QMKURL, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + switch (keycode) { case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; + if (record->event.pressed) { + // When keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // When keycode QMKBEST is released + } + break; + case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; + if (record->event.pressed) { + // When keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // When keycode QMKURL is released + } + break; + } + + return true; } diff --git a/keyboards/doro67/rgb/rgb.h b/keyboards/doro67/rgb/rgb.h index aafba11d0e..e785bba39f 100644 --- a/keyboards/doro67/rgb/rgb.h +++ b/keyboards/doro67/rgb/rgb.h @@ -17,25 +17,16 @@ #include "quantum.h" -/* This a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT( \ +#define LAYOUT_65_ansi_blocker( \ 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, k1C, k1D, k1E, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ - k40, k41, k42, k43, k49, k4A, k4C, 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, k1C, k1D, k1E }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ - { k40, k41, k42, k43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E }, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k49, k4A, k4C, 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, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E }, \ } diff --git a/keyboards/doro67/rgb/rules.mk b/keyboards/doro67/rgb/rules.mk index 6438868dc0..769edfb45d 100644 --- a/keyboards/doro67/rgb/rules.mk +++ b/keyboards/doro67/rgb/rules.mk @@ -1,66 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -RGB_MATRIX_ENABLE = WS2812 - - # Build Options # change yes to no to disable # @@ -81,3 +31,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +RGB_MATRIX_ENABLE = WS2812 + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/dozen0/rules.mk b/keyboards/dozen0/rules.mk index 383a3594b4..7218e1e1bf 100644 --- a/keyboards/dozen0/rules.mk +++ b/keyboards/dozen0/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h new file mode 100644 index 0000000000..7303631115 --- /dev/null +++ b/keyboards/dp60/config.h @@ -0,0 +1,88 @@ +/** + * config.h + * + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x60BE +#define PRODUCT_ID 0x00BE +#define DEVICE_VER 0x0001 +#define MANUFACTURER astro +#define PRODUCT Dumplings +#define DESCRIPTION 60% rgb keyboard with ble extension +#define LANDING_PAGE yulei.github.io/qmk_webusb_tool/60_wkl.json + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//rgb light setting +#define RGBLED_NUM 18 +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//rgb matrix setting +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 36 +#define DRIVER_2_LED_TOTAL 36 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + +// tapping setting +//#define TAPPING_TERM 200 +//#define RETRO_TAPPING +//#define PERMISSIVE_HOLD + +#if defined(WEBUSB_ENABLE) || defined(RAW_ENABLE) +#define WEBUSB_KEYCOUNT 61 +#define WEBUSB_LAYERCOUNT 2 +//VIA +#define DYNAMIC_KEYMAP_LAYER_COUNT 2 +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 391 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +#endif diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c new file mode 100644 index 0000000000..b4a07bf1cd --- /dev/null +++ b/keyboards/dp60/dp60.c @@ -0,0 +1,162 @@ +/** + * dp60.c + */ + +#include "dp60.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +// left CA + {0, C1_1, C3_2, C4_2}, + {0, C1_2, C2_2, C4_3}, + {0, C1_3, C2_3, C3_3}, + {0, C1_4, C2_4, C3_4}, + {0, C1_5, C2_5, C3_5}, + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, + + {0, C5_1, C4_1, C6_1}, + {0, C5_8, C4_8, C6_8}, + + {0, C9_1, C8_1, C7_1}, + {0, C9_2, C8_2, C7_2}, + {0, C9_3, C8_3, C7_3}, + {0, C9_4, C8_4, C7_4}, + {0, C9_5, C8_5, C7_5}, + {0, C9_6, C8_6, C7_6}, + {0, C9_7, C8_7, C6_6}, + {0, C9_8, C7_7, C6_7}, +// left CB + {0, C1_9, C3_10, C4_10}, + {0, C1_10, C2_10, C4_11}, + {0, C1_11, C2_11, C3_11}, + {0, C1_12, C2_12, C3_12}, + {0, C1_13, C2_13, C3_13}, + {0, C1_14, C2_14, C3_14}, + {0, C1_15, C2_15, C3_15}, + {0, C1_16, C2_16, C3_16}, + + {0, C5_9, C4_9, C6_9}, + {0, C5_16, C4_16, C6_16}, + + {0, C9_9, C8_9, C7_9}, + {0, C9_10, C8_10, C7_10}, + {0, C9_11, C8_11, C7_11}, + {0, C9_12, C8_12, C7_12}, + {0, C9_13, C8_13, C7_13}, + {0, C9_14, C8_14, C7_14}, + {0, C9_15, C8_15, C6_14}, + {0, C9_16, C7_15, C6_15}, + +// right CA + {1, C1_1, C3_2, C4_2}, + {1, C1_2, C2_2, C4_3}, + {1, C1_3, C2_3, C3_3}, + {1, C1_4, C2_4, C3_4}, + {1, C1_5, C2_5, C3_5}, + {1, C1_6, C2_6, C3_6}, + {1, C1_7, C2_7, C3_7}, + {1, C1_8, C2_8, C3_8}, + + {1, C5_1, C4_1, C6_1}, + {1, C5_8, C4_8, C6_8}, + + {1, C9_1, C8_1, C7_1}, + {1, C9_2, C8_2, C7_2}, + {1, C9_3, C8_3, C7_3}, + {1, C9_4, C8_4, C7_4}, + {1, C9_5, C8_5, C7_5}, + {1, C9_6, C8_6, C7_6}, + {1, C9_7, C8_7, C6_6}, + {1, C9_8, C7_7, C6_7}, +// right CB + {1, C1_9, C3_10, C4_10}, + {1, C1_10, C2_10, C4_11}, + {1, C1_11, C2_11, C3_11}, + {1, C1_12, C2_12, C3_12}, + {1, C1_13, C2_13, C3_13}, + {1, C1_14, C2_14, C3_14}, + {1, C1_15, C2_15, C3_15}, + {1, C1_16, C2_16, C3_16}, + + {1, C5_9, C4_9, C6_9}, + {1, C5_16, C4_16, C6_16}, + + {1, C9_9, C8_9, C7_9}, + {1, C9_10, C8_10, C7_10}, + {1, C9_11, C8_11, C7_11}, + {1, C9_12, C8_12, C7_12}, + {1, C9_13, C8_13, C7_13}, + {1, C9_14, C8_14, C7_14}, + {1, C9_15, C8_15, C6_14}, + {1, C9_16, C7_15, C6_15}, +}; + +led_config_t g_led_config = { + { + { 0, 1, 2, 3, 4, 5, 6, 36, 37, 38, 39, 40, 41, 42}, + { 8, 9, 10, 11, 12, 13, 7, 45, 46, 47, 48, 49, 50, 51}, + { 26,27, 18, 14, 15, 16, 17, 54, 55, 56, 57, 58, 59, 53}, + { 29,30, 31, 19, 20, 21, 22, 23, 62, 63, 64, 65, 66, 61}, + { 35,34, 33, NO_LED, NO_LED, NO_LED, 24, 44, NO_LED, NO_LED, 68, 69, 70, 71}, + }, + { + { 32, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{ 96, 64},{ 96, 64}, + { 0, 32},{ 16, 32}, + { 0, 48},{ 0, 48},{ 16, 48},{ 32, 48},{ 64, 64},{ 32, 64},{ 16, 64},{ 0, 64}, + { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, + { 0, 16},{ 16, 16}, + { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 48, 32},{ 64, 32},{ 80, 32},{ 96, 32}, + + {128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{216, 0},{224, 0}, + {112, 0},{128, 16}, + {144, 16},{160, 16},{176, 16},{192, 16},{208, 16},{224, 16},{224, 32},{216, 32}, + {128, 32},{144, 32},{160, 32},{176, 32},{192, 32},{208, 32},{208, 48},{224, 48}, + {128, 48},{144, 48}, + {160, 48},{176, 48},{192, 48},{142, 64},{160, 64},{176, 64},{208, 64},{224, 64} + }, + { + 4, 4, 4, 4, 4, 4, 4, 4, + 1, 4, + 4, 4, 1, 1, 1, 4, 4, 4, + + 1, 4, 4, 4, 4, 4, 4, 4, + 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, + 4, 4, 4, 4, 4, 1, 1, 1, + + 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, + 4, 4, 4, 4, 1, 1, 1, 1, + } +}; + +#endif + +#ifdef WEBUSB_ENABLE +#include "webusb.h" +#include "dynamic_keymap.h" + + +webusb_pos_t webusb_keymap[] = { + {0, 0}, {0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}, {0, 6}, {4, 7}, {0, 7}, {0, 8}, {0, 9}, {0, 10}, {0, 11}, {0, 13}, + + {1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {1, 7}, {1, 8}, {1, 9}, {1, 10}, {1, 11}, {1, 12}, {1, 13}, + + {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}, {2, 6}, {2, 7}, {2, 8}, {2, 9}, {2, 10}, {2, 11}, {2, 13}, + + {3, 0}, {3, 2}, {3, 3}, {3, 4}, {3, 5}, {3, 6}, {3, 7}, {3, 8}, {3, 9}, {3, 10}, {3, 11}, {3, 13}, + + {4, 0}, {4, 1}, {4, 2}, {4, 6}, {4, 10}, {4, 11}, {4, 12}, {4, 13}, +}; +#endif \ No newline at end of file diff --git a/keyboards/dp60/dp60.h b/keyboards/dp60/dp60.h new file mode 100644 index 0000000000..32bbb6dc0c --- /dev/null +++ b/keyboards/dp60/dp60.h @@ -0,0 +1,98 @@ +/** + * dp60.h + * + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + +#define LAYOUT_60_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c,\ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + +#define LAYOUT_60_wkl( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} + +#define LAYOUT_60_hhkb( \ + 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, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k42, k43, k47, k49, k4a \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ +} +#define LAYOUT_60_wkl_split_bs( \ + 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, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} +#define LAYOUT_60_ansi_split_bs_rshift( \ + 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, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} diff --git a/keyboards/dp60/info.json b/keyboards/dp60/info.json new file mode 100644 index 0000000000..9387c3f940 --- /dev/null +++ b/keyboards/dp60/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "rgb60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_wkl": { + "key_count":61, + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_ansi": { + "key_count":61, + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_hhkb": { + "key_count":60, + "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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":2.25}, {"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}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] + }, + "LAYOUT_60_iso": { + "key_count":62, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count":63, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_wkl_split_bs": { + "key_count":62, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } + } \ No newline at end of file diff --git a/keyboards/dp60/keymaps/default/keymap.c b/keyboards/dp60/keymaps/default/keymap.c new file mode 100644 index 0000000000..2e2694326c --- /dev/null +++ b/keyboards/dp60/keymaps/default/keymap.c @@ -0,0 +1,17 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_split_bs_rshift( + 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_DEL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1), KC_RCTL), + + [1] = LAYOUT_60_ansi_split_bs_rshift( + _______, 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_PSCR, + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,TG(0),_______), +}; \ No newline at end of file diff --git a/keyboards/dp60/keymaps/via/keymap.c b/keyboards/dp60/keymaps/via/keymap.c new file mode 100644 index 0000000000..2e2694326c --- /dev/null +++ b/keyboards/dp60/keymaps/via/keymap.c @@ -0,0 +1,17 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_split_bs_rshift( + 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_DEL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1), KC_RCTL), + + [1] = LAYOUT_60_ansi_split_bs_rshift( + _______, 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_PSCR, + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,TG(0),_______), +}; \ No newline at end of file diff --git a/keyboards/dp60/keymaps/via/readme.md b/keyboards/dp60/keymaps/via/readme.md new file mode 100644 index 0000000000..88851fb13c --- /dev/null +++ b/keyboards/dp60/keymaps/via/readme.md @@ -0,0 +1 @@ +At this point, September 2019, this requires a custom version of VIA in order for VIA enabled keymaps to work. \ No newline at end of file diff --git a/keyboards/dp60/keymaps/via/rules.mk b/keyboards/dp60/keymaps/via/rules.mk new file mode 100644 index 0000000000..27d6223bae --- /dev/null +++ b/keyboards/dp60/keymaps/via/rules.mk @@ -0,0 +1,47 @@ +# MCU name +MCU = atmega32u4 + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +#OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +#RGBLIGHT_ENABLE = yes # Use RGB bottom light +RGB_MATRIX_ENABLE = yes # Use RGB matrix + +RAW_ENABLE = yes +#WEBUSB_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + +CUSTOM_MATRIX = yes +SRC += matrix.c keyboards/wilba_tech/wt_main.c +#keyboards/stm60/webusb.c diff --git a/keyboards/dp60/matrix.c b/keyboards/dp60/matrix.c new file mode 100644 index 0000000000..3aa5925fe6 --- /dev/null +++ b/keyboards/dp60/matrix.c @@ -0,0 +1,245 @@ +#include "quantum.h" + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static uint8_t read_rows(void); +static void init_rows(void); +static void init_cols(void); +static void unselect_cols(void); +static void select_col(uint8_t col); + + +__attribute__ ((weak)) +void matrix_init_kb(void) +{ + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) +{ + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +void matrix_init(void) +{ + //setPinOutput(F0); + //writePinHigh(F0); + setPinOutput(B4); + writePinLow(B4); + + init_cols(); + init_rows(); + + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_col(col); + _delay_us(3); + + uint8_t rows = read_rows(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index c708593293..04d4f45695 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/duck/lightsaver/keymaps/default/keymap.c b/keyboards/duck/lightsaver/keymaps/default/keymap.c index d945ada24d..346a87e3ee 100644 --- a/keyboards/duck/lightsaver/keymaps/default/keymap.c +++ b/keyboards/duck/lightsaver/keymaps/default/keymap.c @@ -42,7 +42,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), \ }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -}; diff --git a/keyboards/duck/lightsaver/rules.mk b/keyboards/duck/lightsaver/rules.mk index bc7b901b49..b6cb462ebb 100644 --- a/keyboards/duck/lightsaver/rules.mk +++ b/keyboards/duck/lightsaver/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk index 889b93ed45..7027fb1276 100644 --- a/keyboards/duck/octagon/v1/rules.mk +++ b/keyboards/duck/octagon/v1/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/duck/octagon/v2/rules.mk b/keyboards/duck/octagon/v2/rules.mk index c403247074..cd4d2c2fec 100644 --- a/keyboards/duck/octagon/v2/rules.mk +++ b/keyboards/duck/octagon/v2/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/duck/orion/info.json b/keyboards/duck/orion/info.json new file mode 100644 index 0000000000..a1f0a5b389 --- /dev/null +++ b/keyboards/duck/orion/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Duck Orion V3", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/duck/orion/readme.md b/keyboards/duck/orion/readme.md new file mode 100644 index 0000000000..b65901de16 --- /dev/null +++ b/keyboards/duck/orion/readme.md @@ -0,0 +1,7 @@ +# Duck Orion + +Non official firmware for custom TKL Korean keyboard made by Duck. + +Newest version is the [Orion V3](http://duck0113.tistory.com/127) + +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). diff --git a/keyboards/duck/orion/rules.mk b/keyboards/duck/orion/rules.mk new file mode 100644 index 0000000000..3788e0fbfb --- /dev/null +++ b/keyboards/duck/orion/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = duck/orion/v3 diff --git a/keyboards/duck/orion/v3/config.h b/keyboards/duck/orion/v3/config.h new file mode 100644 index 0000000000..3a17d59416 --- /dev/null +++ b/keyboards/duck/orion/v3/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x444B // Duck ("DK") +#define PRODUCT_ID 0x4F52 // Orion ("OR") +#define DEVICE_VER 0x0002 +#define MANUFACTURER Duck +#define PRODUCT Orion V3 +#define DESCRIPTION TKL Korean custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN D6 +#define RGBLED_NUM 17 + +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 4 +#define BOOTMAGIC_LITE_COLUMN 10 + +#define TAPPING_TERM 200 diff --git a/keyboards/duck/orion/v3/indicator_leds.c b/keyboards/duck/orion/v3/indicator_leds.c new file mode 100644 index 0000000000..951ef462c6 --- /dev/null +++ b/keyboards/duck/orion/v3/indicator_leds.c @@ -0,0 +1,82 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#include +#include +#include "indicator_leds.h" +#include "duck_led/duck_led.h" + +#define LED_T1H 600 +#define LED_T1L 650 +#define LED_T0H 250 +#define LED_T0L 1000 + +void send_bit_d4(bool bitVal) { + if(bitVal) { + asm volatile ( + "sbi %[port], %[bit] \n\t" + ".rept %[onCycles] \n\t" + "nop \n\t" + ".endr \n\t" + "cbi %[port], %[bit] \n\t" + ".rept %[offCycles] \n\t" + "nop \n\t" + ".endr \n\t" + :: + [port] "I" (_SFR_IO_ADDR(PORTD)), + [bit] "I" (4), + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); + } else { + asm volatile ( + "sbi %[port], %[bit] \n\t" + ".rept %[onCycles] \n\t" + "nop \n\t" + ".endr \n\t" + "cbi %[port], %[bit] \n\t" + ".rept %[offCycles] \n\t" + "nop \n\t" + ".endr \n\t" + :: + [port] "I" (_SFR_IO_ADDR(PORTD)), + [bit] "I" (4), + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); + } +} + +void send_value(uint8_t byte, enum Device device) { + for(uint8_t b = 0; b < 8; b++) { + if(device == Device_STATUSLED) { + send_bit_d4(byte & 0b10000000); + byte <<= 1; + } + } +} + +// Send the LED indicators to the WS2811S chips +void indicator_leds_set(bool leds[8]) { + uint8_t led_cnt; + + cli(); + for(led_cnt = 0; led_cnt < 8; led_cnt++) + send_value(leds[led_cnt] ? 255 : 0, Device_STATUSLED); + sei(); + show(); +} + diff --git a/keyboards/duck/orion/v3/indicator_leds.h b/keyboards/duck/orion/v3/indicator_leds.h new file mode 100644 index 0000000000..fe66eef6b2 --- /dev/null +++ b/keyboards/duck/orion/v3/indicator_leds.h @@ -0,0 +1 @@ +void indicator_leds_set(bool leds[8]); diff --git a/keyboards/duck/orion/v3/keymaps/default/keymap.c b/keyboards/duck/orion/v3/keymaps/default/keymap.c new file mode 100644 index 0000000000..83fa4f9a8e --- /dev/null +++ b/keyboards/duck/orion/v3/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi(\ + KC_ESC, 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_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP, \ + 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_DEL ,KC_END ,KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT) \ +}; diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c new file mode 100644 index 0000000000..3c3240b9f4 --- /dev/null +++ b/keyboards/duck/orion/v3/matrix.c @@ -0,0 +1,272 @@ +/* +Copyright 2019 MechMerlin +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include +#include +#include "matrix.h" +#include "util.h" +#include "print.h" +#include "debug.h" + +static uint8_t debouncing = DEBOUNCE; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static uint8_t read_rows(uint8_t col); +static void init_rows(void); +static void unselect_cols(void); +static void select_col(uint8_t col); + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) +{ + DDRD |= 0b11010000; + PORTD &= ~0b01010000; + PORTD |= 0b10000000; + DDRB |= 0b00011111; + PORTB &= ~0b00001110; + PORTB |= 0b00010001; + DDRE |= 0b01000000; + PORTE &= ~0b01000000; +} + +void matrix_init(void) { + backlight_init_ports(); + unselect_cols(); + init_rows(); + + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_col(col); + _delay_us(3); + + uint8_t rows = read_rows(col); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< + * + * 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 . + */ +#include "v3.h" +#include "indicator_leds.h" + +enum BACKLIGHT_AREAS { + BACKLIGHT_ALPHAS = 0b00000010, + BACKLIGHT_MODNUM = 0b00001000 +}; + +void backlight_set(uint8_t level) { + switch(level) { + case 0: + PORTB |= BACKLIGHT_ALPHAS; + PORTB |= BACKLIGHT_MODNUM; + break; + case 1: + PORTB &= ~BACKLIGHT_ALPHAS; + PORTB |= BACKLIGHT_MODNUM; + break; + case 2: + PORTB |= BACKLIGHT_ALPHAS; + PORTB &= ~BACKLIGHT_MODNUM; + break; + case 3: + PORTB &= ~BACKLIGHT_ALPHAS; + PORTB &= ~BACKLIGHT_MODNUM; + break; + } +} + +// Port from backlight_update_state +void led_set_kb(uint8_t usb_led) { + bool status[8] = { + IS_HOST_LED_ON(USB_LED_SCROLL_LOCK), /* LED 3 */ + IS_HOST_LED_ON(USB_LED_CAPS_LOCK), /* LED 2 */ + IS_HOST_LED_ON(USB_LED_NUM_LOCK), /* LED 1 */ + + layer_state & (1<<2), /* LED 6 */ + layer_state & (1<<1), /* LED 5 */ + layer_state & (1<<0) ? 0: 1, /* LED 4 */ + + layer_state & (1<<5), /* LED 8 */ + layer_state & (1<<4) /* LED 7 */ + }; + + indicator_leds_set(status); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} diff --git a/keyboards/duck/orion/v3/v3.h b/keyboards/duck/orion/v3/v3.h new file mode 100644 index 0000000000..70591cf034 --- /dev/null +++ b/keyboards/duck/orion/v3/v3.h @@ -0,0 +1,36 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_tkl_ansi( \ + K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4R, K4O, K4P, K4Q, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1N, K1P, \ + K0A, K0B, K0C, K0F, K0I, K0K, K0M, K0N, K0O, K0P, K0Q \ +) { \ + { K5A, ___, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, ___ }, \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, ___, K4O, K4P, K4Q, K4R }, \ + { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, ___ }, \ + { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, ___, K2N, ___, ___, ___, ___ }, \ + { K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, ___, ___, K1N, ___, K1P, ___, ___ }, \ + { K0A, K0B, K0C, ___, ___, K0F, ___, ___, K0I, ___, K0K, ___, K0M, K0N, K0O, K0P, K0Q, ___ } \ +} diff --git a/keyboards/dumbpad/config.h b/keyboards/dumbpad/config.h new file mode 100644 index 0000000000..3c27a35b28 --- /dev/null +++ b/keyboards/dumbpad/config.h @@ -0,0 +1,263 @@ +/* +Copyright 2019 imchipwood + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xDEAF +#define PRODUCT_ID 0x0913 +#define DEVICE_VER 0x0001 +#define MANUFACTURER imchipwood +#define PRODUCT dumbpad +#define DESCRIPTION 4x4 macro/numpad with rotary encoder + + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 5 +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Rotary encoder */ +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D4 } + +/* LED layer indicators */ +#define LAYER_INDICATOR_LED_0 B3 +#define LAYER_INDICATOR_LED_1 B1 + +/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */ +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 0 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/dumbpad/dumbpad.c b/keyboards/dumbpad/dumbpad.c new file mode 100644 index 0000000000..d9b649c715 --- /dev/null +++ b/keyboards/dumbpad/dumbpad.c @@ -0,0 +1,83 @@ +/* Copyright 2019 Chip + * + * 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 . + */ +#include "dumbpad.h" + +void keyboard_pre_init_kb(void) { + // Set the layer LED IO as outputs + setPinOutput(LAYER_INDICATOR_LED_0); + setPinOutput(LAYER_INDICATOR_LED_1); + + keyboard_pre_init_user(); +} + +void shutdown_user() { + // Shutdown the layer LEDs + writePinLow(LAYER_INDICATOR_LED_0); + writePinLow(LAYER_INDICATOR_LED_1); +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + // Layer LEDs act as binary indication of current layer + uint8_t layer = biton32(state); + writePin(LAYER_INDICATOR_LED_0, layer & 0b1); + writePin(LAYER_INDICATOR_LED_1, (layer >> 1) & 0b1); + return layer_state_set_user(state); +} + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + for (int i = 0; i < 2; i++) { + writePin(LAYER_INDICATOR_LED_0, true); + writePin(LAYER_INDICATOR_LED_1, false); + wait_ms(100); + writePin(LAYER_INDICATOR_LED_0, true); + writePin(LAYER_INDICATOR_LED_1, true); + wait_ms(100); + writePin(LAYER_INDICATOR_LED_0, false); + writePin(LAYER_INDICATOR_LED_1, true); + wait_ms(100); + writePin(LAYER_INDICATOR_LED_0, false); + writePin(LAYER_INDICATOR_LED_1, false); + wait_ms(100); + } + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/dumbpad/dumbpad.h b/keyboards/dumbpad/dumbpad.h new file mode 100644 index 0000000000..b7c7694e30 --- /dev/null +++ b/keyboards/dumbpad/dumbpad.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Chip + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k01, k02, k03, k04, \ + k11, k12, k13, k14, \ + k21, k22, k23, k24, \ + k30, k31, k32, k33, k34 \ +) \ +{ \ + { KC_NO, k01, k02, k03, k04 }, \ + { KC_NO, k11, k12, k13, k14 }, \ + { KC_NO, k21, k22, k23, k24 }, \ + { k30, k31, k32, k33, k34 }, \ +} diff --git a/keyboards/dumbpad/info.json b/keyboards/dumbpad/info.json new file mode 100644 index 0000000000..8b6a8116e3 --- /dev/null +++ b/keyboards/dumbpad/info.json @@ -0,0 +1,30 @@ +{ + "keyboard_name": "dumbpad", + "url": "", + "maintainer": "qmk", + "width": 5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"7", "x":1, "y":0}, + {"label":"8", "x":2, "y":0}, + {"label":"9", "x":3, "y":0}, + {"label":"BSPC", "x":4, "y":0}, + {"label":"4", "x":1, "y":1}, + {"label":"5", "x":2, "y":1}, + {"label":"6", "x":3, "y":1}, + {"label":"ESC", "x":4, "y":1}, + {"label":"1", "x":1, "y":2}, + {"label":"2", "x":2, "y":2}, + {"label":"3", "x":3, "y":2}, + {"label":"TAB", "x":4, "y":2}, + {"label":"LMOUSE", "x":0, "y":3}, + {"label":"TT(2)", "x":1, "y":3}, + {"label":"0", "x":2, "y":3}, + {"label":".", "x":3, "y":3}, + {"label":"ENT", "x":4, "y":3} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/dumbpad/keymaps/default/config.h b/keyboards/dumbpad/keymaps/default/config.h new file mode 100644 index 0000000000..8380885593 --- /dev/null +++ b/keyboards/dumbpad/keymaps/default/config.h @@ -0,0 +1,2 @@ +#pragma once +#define TAPPING_TOGGLE 2 diff --git a/keyboards/dumbpad/keymaps/default/keymap.c b/keyboards/dumbpad/keymaps/default/keymap.c new file mode 100644 index 0000000000..c0d4a7c077 --- /dev/null +++ b/keyboards/dumbpad/keymaps/default/keymap.c @@ -0,0 +1,121 @@ +/* Copyright 2019 imchipwood + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _SUB 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + BASE LAYER + /-----------------------------------------------------` + | | 7 | 8 | 9 | Bkspc | + | |---------|---------|---------|---------| + | | 4 | 5 | 6 | Esc | + | |---------|---------|---------|---------| + | | 1 | 2 | 3 | Tab | + |-------------|---------|---------|---------|---------| + | Left mouse | TT(SUB) | 0 | . | Enter | + \-----------------------------------------------------' + */ + [_BASE] = LAYOUT( + KC_7, KC_8, KC_9, KC_BSPC, + KC_4, KC_5, KC_6, KC_ESC, + KC_1, KC_2, KC_3, KC_TAB, + KC_BTN1, TT(_SUB), KC_0, KC_DOT, KC_ENTER + ), + /* + SUB LAYER + /-----------------------------------------------------` + | | | | | Reset | + | |---------|---------|---------|---------| + | | | | | + | + | |---------|---------|---------|---------| + | | | | | - | + |-------------|---------|---------|---------|---------| + | LOCK | | | | = | + \-----------------------------------------------------' + */ + [_SUB] = LAYOUT( + _______, _______, _______, RESET, + _______, _______, _______, KC_KP_PLUS, + _______, _______, _______, KC_KP_MINUS, + KC_LOCK, _______, _______, _______, KC_EQL + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +/* +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif +*/ + return true; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable = true; + //debug_matrix = true; + //debug_keyboard = true; + //debug_mouse = true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +void encoder_update_user(uint8_t index, bool clockwise) { + /* Custom encoder control - handles CW/CCW turning of encoder + * Default behavior: + * main layer: + * CW: move mouse right + * CCW: move mouse left + * other layers: + * CW: = (equals/plus - increase slider in Adobe products) + * CCW: - (minus/underscore - decrease slider in adobe products) + */ + if (index == 0) { + switch (biton32(layer_state)) { + case _BASE: + // main layer - move mouse right (CW) and left (CCW) + if (clockwise) { + tap_code(KC_MS_R); + } else { + tap_code(KC_MS_L); + } + break; + + default: + // other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW) + if (clockwise) { + tap_code(KC_EQL); + } else { + tap_code(KC_MINS); + } + break; + } + } +} diff --git a/keyboards/dumbpad/keymaps/imchipwood/config.h b/keyboards/dumbpad/keymaps/imchipwood/config.h new file mode 100644 index 0000000000..8380885593 --- /dev/null +++ b/keyboards/dumbpad/keymaps/imchipwood/config.h @@ -0,0 +1,2 @@ +#pragma once +#define TAPPING_TOGGLE 2 diff --git a/keyboards/dumbpad/keymaps/imchipwood/keymap.c b/keyboards/dumbpad/keymaps/imchipwood/keymap.c new file mode 100644 index 0000000000..73a8e824ca --- /dev/null +++ b/keyboards/dumbpad/keymaps/imchipwood/keymap.c @@ -0,0 +1,163 @@ +/* Copyright 2019 imchipwood + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _SUB 1 +#define _DBG 2 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + BASE LAYER + /-----------------------------------------------------` + | | 7 | 8 | 9 | Bkspc | + | |---------|---------|---------|---------| + | | 4 | 5 | 6 | + | + | |---------|---------|---------|---------| + | | 1 | 2 | 3 | * | + |-------------|---------|---------|---------|---------| + | Play/Pause | TT(SUB) | 0 | . | Enter | + \-----------------------------------------------------' + */ + [_BASE] = LAYOUT( + KC_P7, KC_P8, KC_P9, KC_BSPC, + KC_P4, KC_P5, KC_P6, KC_KP_PLUS, + KC_P1, KC_P2, KC_P3, KC_KP_ASTERISK, + KC_MPLY, TT(_SUB), KC_P0, KC_PDOT, KC_KP_ENTER + ), + /* + SUB LAYER + /-----------------------------------------------------` + | | | | | Numlock | + | |---------|---------|---------|---------| + | | | | | - | + | |---------|---------|---------|---------| + | | | | | / | + |-------------|---------|---------|---------|---------| + | MO(_DBG) | | | | = | + \-----------------------------------------------------' + */ + [_SUB] = LAYOUT( + _______, _______, _______, KC_NLCK, + _______, _______, _______, KC_KP_MINUS, + _______, _______, _______, KC_KP_SLASH, + MO(_DBG), _______, _______, _______, KC_KP_EQUAL + ), + /* + DEBUG LAYER + /-----------------------------------------------------` + | | | | | Reset | + | |---------|---------|---------|---------| + | | | | | | + | |---------|---------|---------|---------| + | | | | | | + |-------------|---------|---------|---------|---------| + | | | | | | + \-----------------------------------------------------' + */ + [_DBG] = LAYOUT( + _______, _______, _______, RESET, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +/* +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif +*/ + return true; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable = true; + //debug_matrix = true; + //debug_keyboard = true; + //debug_mouse = true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + + +void encoder_update_user(uint8_t index, bool clockwise) { + /* Custom encoder control - handles CW/CCW turning of encoder + * Cusotom behavior: + * main layer: + * CW: volume up + * CCW: volume down + * sub layer: + * CW: next media track + * CCW: prev media track + * debug layer: + * CW: brightness up + * CCW: brightness down + */ + if (index == 0) { + switch (biton32(layer_state)) { + case _BASE: + // main layer - volume up (CW) and down (CCW) + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + + case _SUB: + // sub layer - next track (CW) and previous track (CCW) + if (clockwise) { + tap_code(KC_MNXT); + } else { + tap_code(KC_MPRV); + } + break; + + case _DBG: + // debug layer - brightness up (CW) and brightness down (CCW) + if (clockwise) { + tap_code(KC_BRIU); + } else { + tap_code(KC_BRID); + } + break; + + default: + // any other layer (shouldn't exist..) - volume up (CW) and down (CCW) + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + } +} diff --git a/keyboards/dumbpad/readme.md b/keyboards/dumbpad/readme.md new file mode 100644 index 0000000000..8f3789bcb3 --- /dev/null +++ b/keyboards/dumbpad/readme.md @@ -0,0 +1,19 @@ +# dumbpad + +![dumbpad](https://i.imgur.com/sS3fq1Z.jpg) + +A 4x4 macro/numpad with rotary encoder. + +Keyboard Maintainer: [imchipwood](https://github.com/imchipwood) + +PCB repository: https://github.com/imchipwood/dumbpad + +Make example for this keyboard (after setting up your build environment): + + make dumbpad:default + +Program with: + + make dumbpad:default:avrdude + +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). diff --git a/keyboards/dumbpad/rules.mk b/keyboards/dumbpad/rules.mk new file mode 100644 index 0000000000..a5df407da4 --- /dev/null +++ b/keyboards/dumbpad/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +ENCODER_ENABLE = yes +MOUSEKEY_ENABLE = yes +KEY_LOCK_ENABLE = yes diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index 8d66c35847..63794d0270 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -25,8 +25,9 @@ /* number of backlight levels */ #define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_LEVELS 5 - +#endif /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 @@ -35,12 +36,13 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - #define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - +#define RGBLIGHT_SLEEP #endif +#endif \ No newline at end of file diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index de18faf626..1d0c921935 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -278,6 +278,33 @@ { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \ } +/* LAYOUT_60_abnt2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │1e │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │ 3d │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ + * │40 │41 │43 │46 │4a │4b │4d │4e │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +*/ +#define LAYOUT_60_abnt2( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k43, k46, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \ +} + /* LAYOUT_60_iso_5x1u * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ @@ -305,6 +332,33 @@ { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ } +/* LAYOUT_60_iso_5x1u_split_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │1e │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │40 │41 │43 │46 │4a │4b │4c │4d │4e │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +*/ +#define LAYOUT_60_iso_5x1u_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k46, k4a, k4b, k4c, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ +} + /* LAYOUT_60_iso_split * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ @@ -521,4 +575,57 @@ { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, KC_NO, k4c, k4d, k4e } \ } +/* LAYOUT_60_iso_5x1u_split_bs_rshift_spc + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │1e │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │30 |31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │40 │41 │43 │44 │46 │48 │4a │4b │4c │4d │4e │ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───┴───┘ +*/ +#define LAYOUT_60_iso_5x1u_split_bs_rshift_spc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k44, k46, k48, k4a, k4b, k4c, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO,k3d, k3e }, \ + { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \ +} + +/* LAYOUT_60_olivierko + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───────┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │ + * ├─────┬─┴─┬─┴───┼───┴───┴───┴───┴───┴───┴───┼───┼───┼───┬───┤ + * │40 │41 │43 │46 (7u) │4b │4c │4d │4e │ + * └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘ +*/ +#define LAYOUT_olivierko( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k43, k46, k4b, k4c, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, k4c, k4d, k4e } \ +} #endif diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index 06ce362720..49efeba066 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -45,6 +45,10 @@ "key_count": 63, "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"CapsLock", "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":1, "w":1.25, "h":2}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Fn", "x":10, "y":4}, {"label":"←", "x":11, "y":4}, {"label":"↓", "x":12, "y":4}, {"label":"↑", "x":13, "y":4}, {"label":"→", "x":14, "y":4}] }, + "LAYOUT_60_iso_5x1u_split_rshift": { + "key_count": 64, + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4}, {"label":"\u2190", "x":11, "y":4}, {"label":"\u2193", "x":12, "y":4}, {"label":"\u2191", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] + }, "LAYOUT_60_iso_split": { "key_count": 64, "layout": [{"label":"¬", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"CapsLock", "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":1, "w":1.25, "h":2}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":2.25}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] @@ -76,6 +80,18 @@ "LAYOUT_60_2_function": { "key_count": 63, "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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":2.25}, {"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}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Control", "x":11.5, "y":4, "w":1.5}, {"label":"GUI", "x":13, "y":4}, {"label":"Fn2", "x":14, "y":4}] - } + }, + "LAYOUT_60_iso_5x1u_split_bs_rshift_spc": { + "key_count": 67, + "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":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "x":14, "y":0, "w":1}, {"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":"CapsLock", "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":1, "w":1.25, "h":2}, {"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":"VolUp", "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}, {"x":3.75, "y":4, "w":2.25}, {"x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"Left", "x":10, "y":4, "w":1}, {"label":"Down", "x":11, "y":4, "w":1}, {"label":"Up", "x":12, "y":4, "w":1}, {"label":"Right", "x":13, "y":4, "w":1}, {"label":"VolDown", "x":14, "y":4, "w":1}] + }, + "LAYOUT_olivierko": { + "key_count": 63, + "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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Fn", "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":2}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"↑", "x":12, "y":3}, {"label":"Shift", "x":13, "y":3, "w":2}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"←", "x":11, "y":4}, {"label":"↓", "x":12, "y":4}, {"label":"→", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, + "LAYOUT_60_abnt2": { + "key_count": 63, + "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":"\u00a8", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"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":"\u00c7", "x":10.75, "y":2}, {"label":"^", "x":11.75, "y":2}, {"label":"}", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"?", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } } } diff --git a/keyboards/dz60/keymaps/LEdiodes/keymap.c b/keyboards/dz60/keymaps/LEdiodes/keymap.c index c6a9214a01..3ac0047a31 100644 --- a/keyboards/dz60/keymaps/LEdiodes/keymap.c +++ b/keyboards/dz60/keymaps/LEdiodes/keymap.c @@ -100,11 +100,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/dz60/keymaps/LEdiodes/rules.mk b/keyboards/dz60/keymaps/LEdiodes/rules.mk index 08adc989df..38b067eb0f 100644 --- a/keyboards/dz60/keymaps/LEdiodes/rules.mk +++ b/keyboards/dz60/keymaps/LEdiodes/rules.mk @@ -1,46 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -55,4 +12,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes AUTO_SHIFT_ENABLE = yes # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted -TAP_DANCE_ENABLE = yes \ No newline at end of file +TAP_DANCE_ENABLE = yes diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c index b1c75d9036..b59040d772 100644 --- a/keyboards/dz60/keymaps/billiams/keymap.c +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -4,9 +4,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | * |-----------------------------------------------------------------------------------------+ * | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------------------------------------+ @@ -17,8 +17,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_directional( - KC_GRAVE, 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_GRAVE, 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_BSLS, + 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_BSPC, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT diff --git a/keyboards/dz60/keymaps/billiams/readme.md b/keyboards/dz60/keymaps/billiams/readme.md index 5c0431e238..0f917bf415 100644 --- a/keyboards/dz60/keymaps/billiams/readme.md +++ b/keyboards/dz60/keymaps/billiams/readme.md @@ -12,6 +12,7 @@ Settings: * RESET is available as `Fn`+ ` ESC` * Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! * vim-style arrow key bindings H J K L in layer 1 +* The `Bkspc` and `\` keys have been swapped, the reach was too great to have backspace on the top row ### Initial Installation @@ -35,16 +36,16 @@ A hex file `dz60_billiams.hex` will be created in the base qmk_firmware director 5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode 6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. -Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard. +Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard. Hope this helps! ### 0 Qwerty ``` ,-----------------------------------------------------------------------------------------. -| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | |-----------------------------------------------------------------------------------------+ -| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | |-----------------------------------------------------------------------------------------+ | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | |-----------------------------------------------------------------------------------------+ @@ -69,4 +70,3 @@ FN Layer | | | | | | | HOME | PG_DN | END | `-----------------------------------------------------------------------------------------' ``` - diff --git a/keyboards/dz60/keymaps/bingocaller/keymap.c b/keyboards/dz60/keymaps/bingocaller/keymap.c index 6b33174978..c19f673f76 100644 --- a/keyboards/dz60/keymaps/bingocaller/keymap.c +++ b/keyboards/dz60/keymaps/bingocaller/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, 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_DEL, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_BRMD, KC_BRMU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BRMD, KC_BRMU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), // TEMPLATE diff --git a/keyboards/dz60/keymaps/calbatr0ss/keymap.c b/keyboards/dz60/keymaps/calbatr0ss/keymap.c index 2852b4a207..89f4418b1d 100644 --- a/keyboards/dz60/keymaps/calbatr0ss/keymap.c +++ b/keyboards/dz60/keymaps/calbatr0ss/keymap.c @@ -11,16 +11,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ CTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ * │ SHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ SHIFT│LYR│ - * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ - * │CAPS│ OS │ ALT│ SPACE │ FN │ SPACE │ ALT│ OS │MENU│CTRL│ - * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ + * ├────┬───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │CAPS│ ALT│ OS │ SPACE │ FN │ SPACE │ OS │ ALT│MENU│CTRL│ + * └────┴────┴────┴──────────┴────┴────────┴────┴────┴────┴────┘ */ LAYOUT_60_calbatr0ss( - 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_BSLS, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), - KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL), + 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_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_RCTL), /* LAYER 1 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ @@ -31,54 +31,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ CTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ * │ SHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ SHIFT│LYR│ - * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ - * │CAPS│ ALT│ OS │ SPACE │ FN │ SPACE │ OS │ ALT│MENU│CTRL│ - * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ + * ├────┬───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │CAPS│ OS │ ALT│ SPACE │ FN │ SPACE │ ALT│ OS │MENU│CTRL│ + * └────┴────┴────┴──────────┴────┴────────┴────┴────┴────┴────┘ */ LAYOUT_60_calbatr0ss( - 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_BSLS, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), - KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_RCTL), + 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_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL), /* LAYER 2 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │ │ │ │ │ │ │PDN│ UP│PUP│ │ │ │ DEL │ + * │ │RGB│ │ │ │ │ │PDN│ UP│PUP│ │ │ │ DEL │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ * │ │ │ │ │ │ │HOM│LFT│DWN│RHT│END│ │ │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ * │ │ │ │ │ │VDN│VUP│MUT│PRV│NXT│PLY│ │ │ - * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ - * │RSET│ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ + * ├────┬───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │RSET│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴──────────┴────┴────────┴────┴────┴────┴────┘ */ LAYOUT_60_calbatr0ss( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), /* LAYER 3 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │WIN│MAC│ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │WIN│ │ │ │ │ │ │ │ │ │ │ │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ - * │ │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ + * │ │ │ │ │ │ │ │MAC│ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴──────────┴────┴────────┴────┴────┴────┴────┘ */ LAYOUT_60_calbatr0ss( - KC_TRNS, DF(0), DF(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, DF(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DF(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; diff --git a/keyboards/dz60/keymaps/chrisae9/build_flash.sh b/keyboards/dz60/keymaps/chrisae9/build_flash.sh new file mode 100644 index 0000000000..12adb8466b --- /dev/null +++ b/keyboards/dz60/keymaps/chrisae9/build_flash.sh @@ -0,0 +1,7 @@ +#OLD WAY +# dfu-programmer atmega32u4 erase --force +# dfu-programmer atmega32u4 flash /path/to/firmware.hex +# dfu-programmer atmega32u4 reset + +# run this in the qmk_firmware directory +make dz60:chrisae9:flash \ No newline at end of file diff --git a/keyboards/dz60/keymaps/chrisae9/config.h b/keyboards/dz60/keymaps/chrisae9/config.h new file mode 100644 index 0000000000..659970b72a --- /dev/null +++ b/keyboards/dz60/keymaps/chrisae9/config.h @@ -0,0 +1,17 @@ +/* chrisae9 Config */ +#pragma once + +/* Light Config */ +#undef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 1 +#undef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 8 +#undef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 16 + +/* Mouse Config */ +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_TIME_TO_MAX 10 +#define MOUSEKEY_MAX_SPEED 2.5 + diff --git a/keyboards/dz60/keymaps/chrisae9/keymap.c b/keyboards/dz60/keymaps/chrisae9/keymap.c new file mode 100644 index 0000000000..f5403ff71b --- /dev/null +++ b/keyboards/dz60/keymaps/chrisae9/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(3), KC_LEFT, KC_NO, KC_DOWN, KC_RIGHT), + LAYOUT( + KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_NO, KC_BSPC, + KC_TRNS, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, KC_EQL, KC_TRNS, + KC_GESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_NO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_UP, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(3), KC_LEFT, KC_NO, KC_DOWN, KC_RIGHT), + + LAYOUT( + 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_NO, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, TG(1), TG(1), TG(1), MO(3), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), + + LAYOUT( + KC_PWR, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_NO, KC_PSCR, + KC_TRNS, KC_PGUP, KC_MS_U, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, + KC_TRNS, KC_NO, RGB_M_P, RGB_M_B, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, RGB_SAI, RGB_TOG, + KC_TRNS, KC_TRNS, KC_MS_BTN2, KC_MS_BTN1, KC_MS_BTN1, KC_MS_BTN1, KC_TRNS, RGB_HUD, KC_NO, RGB_SAD, RGB_HUI), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + TG(4), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + +}; diff --git a/keyboards/dz60/keymaps/chrisae9/readme.md b/keyboards/dz60/keymaps/chrisae9/readme.md new file mode 100644 index 0000000000..1057b58adb --- /dev/null +++ b/keyboards/dz60/keymaps/chrisae9/readme.md @@ -0,0 +1,33 @@ +# Chris' DZ60 Layout + +This is a custom keymap for the layout of the DZ60. + +## Keyboard Picture + +![Keyboard Picture](https://i.imgur.com/AKDKAXN.png) + +## Keyboard Layout + +![Chris DZ60](https://i.imgur.com/Z8XDwiI.png) + +## Setup + +[QMK Tookbox Download](https://github.com/qmk/qmk_toolbox/releases/tag/0.0.13) + +[MYSYS2 for Windows](http://www.msys2.org/) + +``` bash +#After downloading +pacman -Syu +#Close and re-open +pacman -Su +pacman -S git + +#Clone this repo and run this command in directory +util/qmk_install.sh +``` + +``` bash +#From the qmk_firware directory run +make dz60:chrisae9:flash +``` diff --git a/keyboards/dz60/keymaps/danbee/keymap.c b/keyboards/dz60/keymaps/danbee/keymap.c new file mode 100644 index 0000000000..814be29298 --- /dev/null +++ b/keyboards/dz60/keymaps/danbee/keymap.c @@ -0,0 +1,67 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _L1, + _L2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bcksp │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ Ent │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ \ │ │ + ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + │Shft│ ` │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + │ Fn │Alt │Cmd │ Space │Cmd │Hypr│Ctrl│Fn 2│ + └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘*/ + [_QW] = LAYOUT_60_iso( /* Layer 0: Qwerty */ + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_L1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_HYPR, KC_RCTL, MO(_L2) + ), + /* 1: fn */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │ § │Br-│Br+│ │ │BL-│BL+│Pre│Pau│Nxt│Mut│Vo-│Vo+│ Del │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ Ins │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ │ │ │ │ │ │ ◀ │ ▼ │ ▲ │ ▶ │ │ │ │ │ + ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + │ │ │ │ │ │ │BL~│ │ │ │ │ │ │ + ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘*/ + [_L1] = LAYOUT_60_iso( /* Layer 1: Functions */ + KC_NUBS, KC_BRID, KC_BRIU, _______, _______, BL_DEC, BL_INC, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* 2: fn 2 */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │Pwr│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Eject │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ Caps │ │ │ │ │ │Hom│PgD│PgU│End│ │ │ │ │ + ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + │ │ │ │ │ │ │Rst│ │ │ │ │ │ │ + ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘*/ + [_L2] = LAYOUT_60_iso( /* Layer 2: Functions */ + KC_PWR, 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_EJCT, + _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, RGB_M_T, RGB_MOD, _______, _______, _______, _______, _______, _______, + KC_CAPS, RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_SW,RGB_M_G, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_K, _______, RESET , _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/dz60/keymaps/danbee/rules.mk b/keyboards/dz60/keymaps/danbee/rules.mk new file mode 100644 index 0000000000..cfd86c52ba --- /dev/null +++ b/keyboards/dz60/keymaps/danbee/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = yes diff --git a/keyboards/dz60/keymaps/default_abnt2/keymap.c b/keyboards/dz60/keymaps/default_abnt2/keymap.c new file mode 100644 index 0000000000..d6273780f1 --- /dev/null +++ b/keyboards/dz60/keymaps/default_abnt2/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2019 Luiz Correia + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "keymap_br_abnt2.h" + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * _______ can be used in place of KC_TRNS (transparent) * + * XXXXXXX can be used in place of KC_NO (No Operation) * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +enum layer_names { + _BL, + _FL, + _CL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0 (BR ABNT2 Layout shown) + * ,-----------------------------------------------------------. + * |Esc|1 !|2 @|3 #|4 $|5 %|6 ¨|7 &|8 *|9 (|0 )|- _|= +| Bksp | + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |' `|{ [|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L | Ç |^ ~|} ]| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|; :|/ ?|Shift | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Alt |GUI|Fn2|Ctrl | + * `-----------------------------------------------------------' + */ + [_BL] = LAYOUT_60_abnt2( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT, + KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), + + + [_FL] = LAYOUT_60_abnt2( + 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_DEL, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LGUI, XXXXXXX, KC_RALT, KC_RGUI, _______, KC_RCTL), + + [_CL] = LAYOUT_60_abnt2( + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX), + +}; diff --git a/keyboards/dz60/keymaps/default_abnt2/readme.md b/keyboards/dz60/keymaps/default_abnt2/readme.md new file mode 100644 index 0000000000..e1a8f82d2c --- /dev/null +++ b/keyboards/dz60/keymaps/default_abnt2/readme.md @@ -0,0 +1,15 @@ +# BR ABNT2 layout + +This is a Brazilian ABNT2 keymap for the DZ60 in a standard layout. + +The top-left sends Escape normally, but becomes a quote key when +tapped whilst either Fn or GUI are held down. + +## Layout Image + +![Layout Image](http://s2.glbimg.com/hlQMZ_E87B3DB_96rVuO_pY2Yy8=/695x0/s.glbimg.com/po/tt2/f/original/2016/06/21/900px-kb_portuguese_brazilsvg_.png) + +---- +### References + +1. [Grave Escape - QMK Firmware Documentation](https://docs.qmk.fm/#/feature_grave_esc) diff --git a/keyboards/dz60/keymaps/devinceble_wkl_tofu/keymap.c b/keyboards/dz60/keymaps/devinceble_wkl_tofu/keymap.c new file mode 100644 index 0000000000..63b86b1d27 --- /dev/null +++ b/keyboards/dz60/keymaps/devinceble_wkl_tofu/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 Devinceble AKA Vimwarrior + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_tsangan_hhkb( + 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_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LALT, KC_LCTL, KC_LGUI, KC_SPC, KC_RCTL, KC_RGUI, MO(2) + ), + [1] = LAYOUT_60_tsangan_hhkb( + KC_ESC, 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_INS, KC_DEL, \ + KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_60_tsangan_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, \ + KC_CAPS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/dz60/keymaps/devinceble_wkl_tofu/readme.md b/keyboards/dz60/keymaps/devinceble_wkl_tofu/readme.md new file mode 100644 index 0000000000..221ce8061e --- /dev/null +++ b/keyboards/dz60/keymaps/devinceble_wkl_tofu/readme.md @@ -0,0 +1,9 @@ +# Devinceble AKA Vimwarrior WKL Tofu Keymap + +Build Hex File: + + make dz60:devinceble_wkl_tofu + +Flash Keyboard + + make dz60:devinceble_wkl_tofu:flash diff --git a/keyboards/dz60/keymaps/devinceble_wkl_tofu/rules.mk b/keyboards/dz60/keymaps/devinceble_wkl_tofu/rules.mk new file mode 100644 index 0000000000..522abf46b1 --- /dev/null +++ b/keyboards/dz60/keymaps/devinceble_wkl_tofu/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/dz60/keymaps/iso_de_root/keymap.c b/keyboards/dz60/keymaps/iso_de_root/keymap.c new file mode 100644 index 0000000000..e0d781f9a3 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_root/keymap.c @@ -0,0 +1,127 @@ + +#include QMK_KEYBOARD_H + +// enable dynamic macro recording +enum root_keycodes { + FN_LAYR = SAFE_RANGE, + DYNAMIC_MACRO_RANGE, +}; + +enum { + DEF = 0, + FN1, + NUM, + DYN, +}; + +#include "dynamic_macro.h" + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); + + if (!process_record_dynamic_macro(macro_kc, record)) { + return false; + } + + return true; +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* LAYOUT_60_iso_5x1u_split_rshift + * + * DEF + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ESC│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │ß │´ │Backspc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Tab │Q │W │E │R │T │Z │U │I │O │P │Ü │+ │Enter│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │MO1 │A │S │D │F │G │H │J │K │L │Ö │Ä │# │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │LSFT│< │Y │X │C │V │B │N │M │, │. │- │RShift│MO3│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │Ctrl│Win │Alt │ Space │AGr│ ← │ ↓ │ ↑ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + * + * FN1 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │^ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Del │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │Rst│ │ │ │ │ │Prt│ScL│Pau│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ │ │ │ │TO2│ │ │Ins│Del│NuL│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │LSFT│ │ │ │MPl│MSt│MPv│MNx│Mut│Vo-│Vo+│ │RShift│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │Ctrl│Win │Alt │ Ctrl │AGr│Hom│PgD│PgU│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + * + * NUM + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │TO0│ │ │ │ │ │ │7 │8 │9 │ │ │ │Backspc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │ │ │ │4 │5 │6 │ │ │ │Enter│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ │ │ │ │1 │2 │3 │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │ │ │ │ │ │ │ │0 │0 │, │. │- │RShift│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │ │ │ │ │AGr│ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + * + * DYN + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │MSp│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │RTg│RMo│RDe│RIn│ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │HDe│HIn│SDe│SIn│ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │MSp│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │ │ │ │ │ │MS1│MS2│MP1│MP2│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +*/ + +#define MacRec1 DYN_REC_START1 +#define MacRec2 DYN_REC_START2 +#define MacPla1 DYN_MACRO_PLAY1 +#define MacPla2 DYN_MACRO_PLAY2 +#define MacStop DYN_REC_STOP + + [DEF] = LAYOUT_60_iso_5x1u_split_rshift( + 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, + MO(FN1), 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, MO(DYN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + + [FN1] = LAYOUT_60_iso_5x1u_split_rshift( + 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_DEL, + _______, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(NUM), XXXXXXX, XXXXXXX, KC_INS, KC_DEL, KC_NLCK, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, KC_RSFT, XXXXXXX, + _______, _______, _______, KC_LCTL, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + [NUM] = LAYOUT_60_iso_5x1u_split_rshift( + TO(DEF), _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, KC_P0, _______, _______, _______, _______, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [DYN] = LAYOUT_60_iso_5x1u_split_rshift( + MacStop, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MacRec1, MacRec2, MacPla1, MacPla2 + ), +}; + diff --git a/keyboards/dz60/keymaps/iso_de_root/readme.md b/keyboards/dz60/keymaps/iso_de_root/readme.md new file mode 100644 index 0000000000..b06ad09cd4 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_root/readme.md @@ -0,0 +1,4 @@ +# ISO DE layout + +This layout is ISO-DE and similar to a standard 60 ISO layout. The bottom right has 5x 1u keys. +Right shift is split to add a function key. diff --git a/keyboards/dz60/keymaps/iso_de_root/rules.mk b/keyboards/dz60/keymaps/iso_de_root/rules.mk new file mode 100644 index 0000000000..0dcfa1b71d --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_root/rules.mk @@ -0,0 +1,15 @@ +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +AUTO_SHIFT_ENABLE = no # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted +TAP_DANCE_ENABLE = no diff --git a/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/README.md b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/README.md new file mode 100644 index 0000000000..e0fbb2dfc6 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/README.md @@ -0,0 +1,3 @@ +# ISO layout with VIM style arrow cluster + +Vim arrow keys with split right shift and backspace (currently not utilised in this layout but I thought I would add it to make it easier for people to add it for their layouts). diff --git a/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c new file mode 100644 index 0000000000..8c34b606ae --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * ,-----------------------------------------------------------. + * |Esc|1 !|2 "|3 £|4 $|5 %|6 ^|7 &|8 *|9 (|0 )|- _|= +|bck|bck| + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |[ {|] }|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L |; :|' @|# ~| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|/ ?| Caps |vU | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Lft|Dwn|Up |Rht|vD | + * `-----------------------------------------------------------' + */ + LAYOUT_60_iso_5x1u_split_bs_rshift_spc( +//QWERTY Base layer: +// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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_CAPS, KC_VOLU, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_VOLD + ), + + + LAYOUT_60_iso_5x1u_split_bs_rshift_spc( +//F key layer: +// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + KC_TRNS, 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_DEL, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + LAYOUT_60_iso_5x1u_split_bs_rshift_spc( +//Reset by holding Fn1 and Fn2 and press the D key +// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk new file mode 100644 index 0000000000..3bfdaadaf7 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk @@ -0,0 +1,7 @@ +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no diff --git a/keyboards/dz60/keymaps/joooosh_hhkb/keymap.c b/keyboards/dz60/keymaps/joooosh_hhkb/keymap.c new file mode 100644 index 0000000000..05ceb27e5e --- /dev/null +++ b/keyboards/dz60/keymaps/joooosh_hhkb/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + /* BASE LAYER + * + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \| | Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | LCTRL | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | LShift | Z | X | C | V | B | N | M | , | . | / | RShift | FN1 | + * |-----------------------------------------------------------------------------------------+ + * | LGUI | LAlt | Space | RAlt | RCTRL | + * `-----------------------------------------------------------------------------------------' + */ + LAYOUT_60_hhkb( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, 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_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL), + + +/* FN1 LAYER + * + * ,--------------------------------------------------------------------------------------------------------------------- + * | KC_GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | INSERT | RESET | + * |---------------------------------------------------------------------------------------------------------------------+ + * | RGB_TOG | _ | _ | _ | _ | _ | _ | _ | PSCR | SLCK | PAUS | UP | _ | CLR | + * |---------------------------------------------------------------------------------------------------------------------+ + * | CAPS | VOLD | VOLU | MUTE | _ | _ | PAST | PSLS | HOME | PGUP | LEFT | RIGHT | RETURN | + * |---------------------------------------------------------------------------------------------------------------------+ + * | _ | _ | _ | _ | _ | _ | PPLS | PMNS | END | PGDN | DOWN | _ | _ | + * |---------------------------------------------------------------------------------------------------------------------+ + * | _ | _ | _ | APP | _ | + * `---------------------------------------------------------------------------------------------------------------------' + */ + LAYOUT_60_hhkb( + 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_INS, RESET, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_CLR, + KC_CAPS, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_RETURN, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, KC_APP, _______), +}; diff --git a/keyboards/dz60/keymaps/konstantin_b/config.h b/keyboards/dz60/keymaps/konstantin_b/config.h new file mode 100644 index 0000000000..4b511eb848 --- /dev/null +++ b/keyboards/dz60/keymaps/konstantin_b/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define LAYER_FN diff --git a/keyboards/dz60/keymaps/konstantin_b/keymap.c b/keyboards/dz60/keymaps/konstantin_b/keymap.c new file mode 100644 index 0000000000..3718669fa5 --- /dev/null +++ b/keyboards/dz60/keymaps/konstantin_b/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │RSft /│ ↑ │FnF│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAG│RCt│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_BASE] = LAYOUT_60_b_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSF_SLS, KC_UP, FN_FNLK, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, RAL_RGU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │Stp│Ply│Prv│Nxt│ Del │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│ Mute │PgU│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │DtPR│DtNA│ MW↓ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_FN] = LAYOUT_60_b_ansi( + _______, 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_PSCR, KC_INS, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_DEL, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, KC_PGUP, _______, + _______, DST_P_R, DST_N_A, XXXXXXX, KC_WH_D, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +}; diff --git a/keyboards/dz60/keymaps/konstantin_b/rules.mk b/keyboards/dz60/keymaps/konstantin_b/rules.mk new file mode 100644 index 0000000000..a6e88d49b5 --- /dev/null +++ b/keyboards/dz60/keymaps/konstantin_b/rules.mk @@ -0,0 +1,13 @@ +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SPACE_CADET_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = no + +USER_NAME = konstantin diff --git a/keyboards/dz60/keymaps/marianas/keyDefinitions.h b/keyboards/dz60/keymaps/marianas/keyDefinitions.h index d3aac3dcbf..7248c1f535 100644 --- a/keyboards/dz60/keymaps/marianas/keyDefinitions.h +++ b/keyboards/dz60/keymaps/marianas/keyDefinitions.h @@ -12,7 +12,7 @@ #define PGUP KC_PGUP #define PGDN KC_PGDN #define END_ KC_END -#define DELT KC_DELETE +#define DEL KC_DELETE #define UPUP KC_UP #define D_WN KC_DOWN #define LEFT KC_LEFT diff --git a/keyboards/dz60/keymaps/marianas/keymap.c b/keyboards/dz60/keymaps/marianas/keymap.c index f86074b9c2..a0451b5435 100644 --- a/keyboards/dz60/keymaps/marianas/keymap.c +++ b/keyboards/dz60/keymaps/marianas/keymap.c @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NAV_CLUSTER]= LAYOUT_60_ansi( _____, PSCR, SCRL, PAUS, NSRT, HOME, PGUP, NMLK, KSSH, STAR, KMIN, ____, ____, ______, - ______, ____, ____, ____, DELT, END_, PGDN, KP_7, KP_8, KP_9, PLUS, ____, ____, _____, + ______, ____, ____, ____, DEL, END_, PGDN, KP_7, KP_8, KP_9, PLUS, ____, ____, _____, _______, ____, ____, ____, ____, UPUP, UPUP, KP_4, KP_5, KP_6, PLUS, ____, ___________, ________, ____, ____, ____, LEFT, D_WN, RGHT, KP_1, KP_2, KP_3, KNTR, _________________, ____, ____, ____, /*-----------------*/KC_KP_0/*-----------------*/, KDOT, KNTR, ____, ____), diff --git a/keyboards/dz60/keymaps/olivierko/keymap.c b/keyboards/dz60/keymaps/olivierko/keymap.c new file mode 100644 index 0000000000..38d12d4d4b --- /dev/null +++ b/keyboards/dz60/keymaps/olivierko/keymap.c @@ -0,0 +1,87 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL, + _SL, + _FL, + _CL, +}; + +enum custom_keycodes { + SWE_AA = SAFE_RANGE, + SWE_AE, + SWE_OE, +}; + +char *alt_codes[][2] = { + { + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_2)SS_TAP(X_KP_2)SS_TAP(X_KP_9)), // Alt+0229 → å + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_1)SS_TAP(X_KP_9)SS_TAP(X_KP_7)), // Alt+0197 → Å + }, + { + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_2)SS_TAP(X_KP_2)SS_TAP(X_KP_8)), // Alt+0228 → ä + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_1)SS_TAP(X_KP_9)SS_TAP(X_KP_6)), // Alt+0196 → Ä + }, + { + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_2)SS_TAP(X_KP_4)SS_TAP(X_KP_6)), // Alt+0246 → ö + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_2)SS_TAP(X_KP_1)SS_TAP(X_KP_4)), // Alt+0214 → Ö + }, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT_olivierko( + 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_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RCTL), + + [_SL] = LAYOUT_olivierko( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SWE_AA, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SWE_OE, SWE_AE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_FL] = LAYOUT_olivierko( + KC_ESC, 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_PSCR, KC_PAUSE, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, + KC_NO, DF(_BL), DF(_SL), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, + KC_LSFT, KC_NO, KC_NO, KC_CAPS, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_RSFT, + KC_LCTL, MO(_CL), KC_LALT, KC_MPLY, KC_HOME, KC_PGDOWN, KC_END, KC_RCTL), + + [_CL] = LAYOUT_olivierko( + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (!record->event.pressed) + return true; + + switch (keycode) { + case SWE_AA: + case SWE_AE: + case SWE_OE: { + uint16_t index = keycode - SWE_AA; + uint8_t shift = get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); + + unregister_code(KC_LSFT); + unregister_code(KC_RSFT); + + send_string(alt_codes[index][(bool)shift]); + + if (shift & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (shift & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + + return false; + } + default: + return true; + } +} \ No newline at end of file diff --git a/keyboards/dz60/keymaps/olivierko/readme.md b/keyboards/dz60/keymaps/olivierko/readme.md new file mode 100644 index 0000000000..54ade6d78e --- /dev/null +++ b/keyboards/dz60/keymaps/olivierko/readme.md @@ -0,0 +1,21 @@ +# DZ60 +### _BL: +Base layer with american ANSI layout. + +![_BL](https://i.imgur.com/BPMn7dk.png) +### _SL: +Swedish layer with ÅÄÖ at original positions. + +![_SL](https://i.imgur.com/I8QRh24.png) +### _FL: +Function layer including various extra keys. + +![_FL](https://i.imgur.com/nCbCIrZ.png) +### _CL: +Control layer for managing RGB and flashing. + +![_CL](https://i.imgur.com/QnoMgsb.png) +### Make command: +```sh +make dz60:olivierko:flash +``` \ No newline at end of file diff --git a/keyboards/dz60/keymaps/ottodokto/config.h b/keyboards/dz60/keymaps/ottodokto/config.h new file mode 100644 index 0000000000..331b14f287 --- /dev/null +++ b/keyboards/dz60/keymaps/ottodokto/config.h @@ -0,0 +1,13 @@ +/*---defines-------------------------------------------- */ +#define TAPPING_TOGGLE 2 // toggle on layer on two taps. + +/*---RGB settings-------------------------------------------- */ +#undef RGBLIGHT_HUE_STEP +#undef RGBLIGHT_SAT_STEP +#undef RGBLIGHT_VAL_STEP +#undef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL + +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 200 \ No newline at end of file diff --git a/keyboards/dz60/keymaps/ottodokto/keymap.c b/keyboards/dz60/keymaps/ottodokto/keymap.c new file mode 100644 index 0000000000..347c6a0497 --- /dev/null +++ b/keyboards/dz60/keymaps/ottodokto/keymap.c @@ -0,0 +1,44 @@ +/* + Last updated: 3 Aug 2019 + DZ60 Layout by ottodokto + + This layout is a modification of the 60 tsangan hhkb layout, + with an additional layer to update the arrow keys and + */ + +#include QMK_KEYBOARD_H + +/*---Layers-------------------------------------------- */ +#define _base 0 // default, tsangan layout with split backspace +#define _func 1 // media controls and reset buttons + +/*---defines-------------------------------------------- */ +#define KC_CTOG LT(_func, KC_CAPS) +#define KC_TTAP TT(_func) + +#define RGB_STA RGB_M_P // rgb static +#define RGB_BRE RGB_M_B // rgb breathe +#define RGB_RAI RGB_M_R // rgb rainbow +#define RGB_SWI RGB_M_SW // rgb swirl +#define RGB_SNA RGB_M_SN // rgb snake +#define RGB_KNI RGB_M_K // rgb knight +#define RGB_GRA RGB_M_G // rgb gradient + + +/*---Layout-------------------------------------------- */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_base] = LAYOUT_60_tsangan_hhkb( + 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_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_CTOG, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TTAP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + [_func] = LAYOUT_60_tsangan_hhkb( + RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET, \ + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, RGB_SPI, RGB_HUD, RGB_VAI, RGB_HUI, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, RGB_SPD, RGB_SAD, RGB_VAD, RGB_SAI, KC_BRID, KC_BRIU, _______, \ + _______, RGB_STA, RGB_BRE, RGB_RAI, RGB_SWI, RGB_SNA, RGB_KNI, RGB_GRA, VLK_TOG, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/dz60/keymaps/ottodokto/rules.mk b/keyboards/dz60/keymaps/ottodokto/rules.mk new file mode 100644 index 0000000000..1b0f198d06 --- /dev/null +++ b/keyboards/dz60/keymaps/ottodokto/rules.mk @@ -0,0 +1 @@ +VELOCIKEY_ENABLE = yes diff --git a/keyboards/dz60/keymaps/pok3r/keymap.c b/keyboards/dz60/keymaps/pok3r/keymap.c new file mode 100644 index 0000000000..614cb0069c --- /dev/null +++ b/keyboards/dz60/keymaps/pok3r/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, MO(2), KC_RCTL), + + LAYOUT( + 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_DEL, + _______, KC_MPRV, KC_MPLY, KC_MNXT, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, + KC_CAPS, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, _______, + _______, KC_APP, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + LAYOUT( + RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, _______, RGB_RMOD, RGB_MOD, _______, _______, + _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/dz60/keymaps/tarnjotsingh/keymap.c b/keyboards/dz60/keymaps/tarnjotsingh/keymap.c new file mode 100644 index 0000000000..a6de97fdba --- /dev/null +++ b/keyboards/dz60/keymaps/tarnjotsingh/keymap.c @@ -0,0 +1,7 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_iso(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_CAPS, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LALT, KC_RCTL), + [1] = LAYOUT_60_iso(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_DEL, KC_TRNS, KC_MUTE, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS), + [2] = LAYOUT_60_iso(KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/dz60/keymaps/tarnjotsingh/layers.json b/keyboards/dz60/keymaps/tarnjotsingh/layers.json new file mode 100644 index 0000000000..7fec50a1d0 --- /dev/null +++ b/keyboards/dz60/keymaps/tarnjotsingh/layers.json @@ -0,0 +1 @@ +[["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_CAPS", "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_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "MO(1)", "KC_RGUI", "KC_LALT", "KC_RCTL"], ["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_DEL", "KC_TRNS", "KC_MUTE", "KC_VOLU", "KC_MPLY", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_UP", "KC_PSCR", "KC_SLCK", "KC_PAUS", "KC_TRNS", "KC_TRNS", "KC_VOLD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_TRNS", "KC_INS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MRWD", "KC_MFFD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGDN", "KC_HOME", "KC_END", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(2)", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_HUI", "RGB_HUD", "RGB_SAI", "RGB_SAD", "RGB_VAI", "RGB_VAD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "BL_DEC", "BL_TOGG", "BL_INC", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]] \ No newline at end of file diff --git a/keyboards/dz60/keymaps/tarnjotsingh/readme.md b/keyboards/dz60/keymaps/tarnjotsingh/readme.md new file mode 100644 index 0000000000..c544269663 --- /dev/null +++ b/keyboards/dz60/keymaps/tarnjotsingh/readme.md @@ -0,0 +1,24 @@ +# DZ60 ISO Keymap + +Custom keymap for UK ISO keyboard layouts. +This includes 3 different layers. + +- Layer 0: + - Standard ISO layout with main modifier key, for accessing layer 1, to the right of the space bar. +- Layer 1: + - Layer that gives you access to pretty much everything else like the arrow keys. +- Layer 2; + - Standalone layer only for modifying the lighting on the board. Keys for this purpose are mapped in the locations used by the default dz60 layout. + - You can access this layer by holding MO(1) (next to the space bar) followed by holding MO(2) which where the Left Alt key is positioned. + +![dz60-iso-keymap](https://i.imgur.com/UV0t6aL.png) + +Make the kaymap for this keyboard (after setting up your build environment): + + make dz60:tarnjotsingh + +Then flash it by running: + + make dz60:tarnjotsingh: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). diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index ed683dbfa2..556d9e55c7 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -55,4 +25,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_abnt2 diff --git a/keyboards/dztech/dz40rgb/config.h b/keyboards/dztech/dz40rgb/config.h deleted file mode 100644 index 5f1502f4af..0000000000 --- a/keyboards/dztech/dz40rgb/config.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1220 -#define DEVICE_VER 0x0001 -#define MANUFACTURER DZTECH -#define PRODUCT DZ40RGB -#define DESCRIPTION DZ40 ARM RGB keyboard -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -#define MATRIX_ROW_PINS { B13, B12, A2, A1 } -#define MATRIX_COL_PINS {A6, A7, B0, B1, C15, C14, C13, B9, B8, A8, B14, B15 } - -/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/ - -#define DIODE_DIRECTION COL2ROW - -#define DEBOUNCE 3 -#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -#define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. - -#define DRIVER_COUNT 2 diff --git a/keyboards/dztech/dz40rgb/dz40rgb.c b/keyboards/dztech/dz40rgb/dz40rgb.c deleted file mode 100644 index 92e4a7cad3..0000000000 --- a/keyboards/dztech/dz40rgb/dz40rgb.c +++ /dev/null @@ -1,203 +0,0 @@ -#include "dz40rgb.h" -#include "config.h" -#if defined (split_space) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - - {0, K_13, J_13, L_13}, - {0, K_14, J_14, L_14}, - - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - - {0, H_13, G_13, I_13}, - {0, H_14, G_14, I_14}, - - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - - {0, E_13, D_13, F_13}, - {0, E_14, D_14, F_14}, - - {0, B_12, A_12, C_12}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1} - -}; - -led_config_t g_led_config = { { - { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 }, - { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42 } -}, { - { 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 }, - { 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 }, - { 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 }, - { 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 }, - { 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1 -} }; - -#else -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - - {0, K_13, J_13, L_13}, - {0, K_14, J_14, L_14}, - - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - - {0, H_13, G_13, I_13}, - {0, H_14, G_14, I_14}, - - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - - {0, E_13, D_13, F_13}, - {0, E_14, D_14, F_14}, - - {0, B_12, A_12, C_12}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_13, A_13, C_13}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1} - -}; - -led_config_t g_led_config = { { - { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 }, - { 52, 51, 50, 49, 48, NO_LED, 47, 46, 45, 44, 43, 42 } -}, { - { 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 }, - { 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 }, - { 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 }, - { 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 111, 63 }, - { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 -} }; - -#endif - -void matrix_init_kb(void) { - matrix_init_user(); -} -void matrix_scan_kb(void) { - matrix_scan_user(); -} -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} diff --git a/keyboards/dztech/dz40rgb/dz40rgb.h b/keyboards/dztech/dz40rgb/dz40rgb.h deleted file mode 100644 index 5f88a6225a..0000000000 --- a/keyboards/dztech/dz40rgb/dz40rgb.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once -#include "quantum.h" -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k36, k36, k37, k38, k39, k3a, k3b } \ -} - -#define LAYOUT_SPLIT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ -} diff --git a/keyboards/dztech/dz40rgb/keymaps/default/config.h b/keyboards/dztech/dz40rgb/keymaps/default/config.h deleted file mode 100644 index 30bf11ed5d..0000000000 --- a/keyboards/dztech/dz40rgb/keymaps/default/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once -#define DRIVER_1_LED_TOTAL 53 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c deleted file mode 100644 index e4f56f5a8e..0000000000 --- a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c +++ /dev/null @@ -1,71 +0,0 @@ -#include QMK_KEYBOARD_H -#define _LAYER0 0 -#define _LAYER1 1 -#define _LAYER2 2 -#define _LAYER3 3 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT( /* Base */ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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 , - RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - ), - [_LAYER1] = LAYOUT( /* FN */ - 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_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, _______, - _______, _______, _______, _______, _______, _______, TO(3), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ), - [_LAYER2] = LAYOUT( /* FN2 */ - 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_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, _______, - RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ), - [_LAYER3] = LAYOUT( /* FN3 */ - TO(0), RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - -}; - -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color( i, red, green, blue ); - } - } -} - -void rgb_matrix_indicators_user(void) { - if (!g_suspend_state) { - switch (biton32(layer_state)) { - case _LAYER1: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; - case _LAYER2: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; - case _LAYER3: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; - } - } - -} - - - - - -void matrix_init_user(void) { - //user initialization -} - -void matrix_scan_user(void) { - //user matrix -} - - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; - } - diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/config.h b/keyboards/dztech/dz40rgb/keymaps/split_space/config.h deleted file mode 100644 index 4f35bef373..0000000000 --- a/keyboards/dztech/dz40rgb/keymaps/split_space/config.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once -#include "../../config.h" -#define split_space -#define DRIVER_1_LED_TOTAL 54 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c deleted file mode 100644 index 04c31bab1b..0000000000 --- a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c +++ /dev/null @@ -1,96 +0,0 @@ -#include QMK_KEYBOARD_H -#define _LAYER0 0 -#define _LAYER1 1 -#define _LAYER2 2 -#define _LAYER3 3 -#define _LAYER4 4 -#define _LAYER5 5 -#define _LAYER6 6 -#define _LAYER7 7 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_SPLIT( /* Base */ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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 , - RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - [_LAYER1] = LAYOUT_SPLIT( /* FN */ - 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_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), - [_LAYER2] = LAYOUT_SPLIT( /* LIGHT */ - 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_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), - [_LAYER3] = LAYOUT_SPLIT( /* NUMPAD */ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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 , - RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - [_LAYER4] = LAYOUT_SPLIT( /* MAC */ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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 , - RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - [_LAYER5] = LAYOUT_SPLIT( /* NEED TO DEFINE */ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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 , - RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - [_LAYER6] = LAYOUT_SPLIT( /* NEED TO DEFINE */ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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 , - RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - [_LAYER7] = LAYOUT_SPLIT( /* NEED TO DEFINE */ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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 , - RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - }; - - - -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color( i, red, green, blue ); - } - } -} - -void rgb_matrix_indicators_user(void) { - if (!g_suspend_state) { - switch (biton32(layer_state)) { - case _LAYER1: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; - case _LAYER2: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; - case _LAYER4: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; - case _LAYER5: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, false); break; - case _LAYER6: - rgb_matrix_layer_helper(0xFF, 0xFF, 0xFF, false); break; - } - } - -} - - - - - -void matrix_init_user(void) { - //user initialization -} - -void matrix_scan_user(void) { - //user matrix -} - - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; - } - diff --git a/keyboards/dztech/dz40rgb/rules.mk b/keyboards/dztech/dz40rgb/rules.mk deleted file mode 100644 index fc4b028d5c..0000000000 --- a/keyboards/dztech/dz40rgb/rules.mk +++ /dev/null @@ -1,14 +0,0 @@ -MCU = STM32F303 -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = no # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in66666666666666666666666666 diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index edf0982ab2..c9f6937eea 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -21,6 +21,7 @@ #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 3 +#ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES @@ -29,14 +30,10 @@ #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. #define DRIVER_COUNT 2 -#if defined (dzrgb60_ansi) || defined (dzrgb60_iso) -#define DRIVER_1_LED_TOTAL 61 -#elif defined (dzrgb60_hhkb) || defined (dzrgb60_hhkb_iso) -#define DRIVER_1_LED_TOTAL 62 -#else #define DRIVER_1_LED_TOTAL 63 -#endif #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#endif \ No newline at end of file diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 0909ace232..a8217480d0 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -1,348 +1,5 @@ #include "dz60rgb.h" -#include "config.h" -#if defined (dzrgb60_iso) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_15, G_15, I_15}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, B_14, A_14, C_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, E_15, D_15, F_15}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 28 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 14 }, - { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, - { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } -}, { - { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, - { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, - { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, - { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 1, 1, 1 -} }; - -#elif defined (dzrgb60_hhkb) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, H_15, G_15, I_15}, - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_14, G_14, I_14}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_14, A_14, C_14}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, - { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, - { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, - { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } -}, { - { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, - { 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, - { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, - { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, - { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 1, 1, 1 -} }; - -#elif defined (dzrgb60_hhkb_iso) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, H_15, G_15, I_15}, - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, K_15, J_15, L_15}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_15, D_15, F_15}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_14, A_14, C_14}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, - { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29 }, - { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 15 }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, - { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } -}, { - { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, - { 0, 0 }, { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, - { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, - { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, - { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 1, 1, 1 -} }; - -#elif defined (dzrgb60_ansi) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_14, G_14, I_14}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, E_15, D_15, F_15}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, - { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } -}, { - { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, - { 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, - { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, - { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 1, 1, 1 -} }; - -#else +#ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_14, J_14, L_14}, {0, K_13, J_13, L_13}, @@ -452,3 +109,12 @@ void suspend_wakeup_init_kb(void) rgb_matrix_set_suspend_state(false); suspend_wakeup_init_user(); } +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); + } +} + diff --git a/keyboards/dztech/dz60rgb/dz60rgb.h b/keyboards/dztech/dz60rgb/dz60rgb.h index 1884ddfb0b..a029933f1f 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.h +++ b/keyboards/dztech/dz60rgb/dz60rgb.h @@ -1,7 +1,6 @@ #pragma once #define XXX KC_NO #include "quantum.h" - #define LAYOUT( \ 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, \ @@ -15,58 +14,3 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ { K40, K41, K42, XXX, XXX, K45, XXX, XXX, K48, K49, K4A, K4B, XXX, K4D } \ } -#define LAYOUT_ISO( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ - K40, K41, K42, K45, K49, K4A, K4B, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ -} - -#define LAYOUT_HHKB( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D,\ - K40, K41, K42, K45, K4A, K4B, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D}, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ -} - -#define LAYOUT_HHKB_ISO( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,}, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ -} - -#define LAYOUT_ANSI( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ - K40, K41, K42, K45, K49, K4A, K4B, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ -} diff --git a/keyboards/dztech/dz60rgb/info.json b/keyboards/dztech/dz60rgb/info.json index d615fe53db..b82ba5d4c8 100644 --- a/keyboards/dztech/dz60rgb/info.json +++ b/keyboards/dztech/dz60rgb/info.json @@ -1,17 +1,13 @@ { - "keyboard_name": "dz60rgb", - "url": "", - "maintainer": "dztch", - "width": 14, - "height": 5, - "layouts": { + "keyboard_name": "DZ60RGB", + "url": "", + "maintainer": "dztech", + "width": 15, + "height": 5, + "layouts": { "LAYOUT": { "key_count": 63, "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"\u2191", "x":13, "y":3},{"label":"?", "x":14, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Ctrl", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] - }, - "LAYOUT_ANSI": { - "key_count": 61, - "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] } } } diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/config.h b/keyboards/dztech/dz60rgb/keymaps/ansi/config.h deleted file mode 100644 index 4bfad0df0d..0000000000 --- a/keyboards/dztech/dz60rgb/keymaps/ansi/config.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#define dzrgb60_ansi diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c deleted file mode 100644 index 8633b1836a..0000000000 --- a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c +++ /dev/null @@ -1,78 +0,0 @@ -#include QMK_KEYBOARD_H -#define _LAYER0 0 -#define _LAYER1 1 -#define _LAYER2 2 -#define _LAYER3 3 -#define _LAYER4 4 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_ANSI( /* Base */ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ - CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL), - [_LAYER1] = LAYOUT_ANSI( /* FN */ - KC_GESC, 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_DEL ,\ - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS,\ - KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ - KC_TRNS, KC_TRNS, KC_TRNS, TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_LAYER2] = LAYOUT_ANSI( /* FN2 */ - KC_TRNS, 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_DEL ,\ - KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_LAYER3] = LAYOUT_ANSI( /* FN3 */ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ - CTL_T(KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_TRNS,MO(4), KC_RALT, KC_RCTL), - [_LAYER4] = LAYOUT_ANSI( /* FN4 */ - KC_GESC, 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_DEL ,\ - KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_HOME, KC_PGUP, KC_TRNS,\ - KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ - KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - }; - -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color( i, red, green, blue ); - } - } -} - -void rgb_matrix_indicators_user(void) { - uint8_t this_led = host_keyboard_leds(); - if (!g_suspend_state) { - switch (biton32(layer_state)) { - case _LAYER1: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; - case _LAYER2: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; - case _LAYER3: - rgb_matrix_layer_helper(0x00, 0x00, 0xFF, false); break; - case _LAYER4: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; - } - } - if ( this_led & (1<", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/default/keymap.c new file mode 100644 index 0000000000..ac033f308c --- /dev/null +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_60_ansi( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL), + [_LAYER1] = LAYOUT_60_ansi( /* FN */ + KC_GESC, 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_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS,\ + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER2] = LAYOUT_60_ansi( /* FN2 */ + KC_TRNS, 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_DEL ,\ + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } diff --git a/keyboards/dztech/dz60rgb_ansi/readme.md b/keyboards/dztech/dz60rgb_ansi/readme.md new file mode 100644 index 0000000000..2fffa413b6 --- /dev/null +++ b/keyboards/dztech/dz60rgb_ansi/readme.md @@ -0,0 +1,15 @@ +# DZ60RGB + +![dz60rgb](https://cdn.shopify.com/s/files/1/0043/9140/3591/products/TIM_20190130170231_grande.jpg?v=1548839053) + +A hotswap 60% RGB keyboard. + +Keyboard Maintainer: DZtech +Hardware Supported: DZtech dz60rgb, dz60rgb-ansi +Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + +Make example for this keyboard (after setting up your build environment): + + make dztech/dz60rgb: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). diff --git a/keyboards/dztech/dz60rgb_ansi/rules.mk b/keyboards/dztech/dz60rgb_ansi/rules.mk new file mode 100644 index 0000000000..0636150529 --- /dev/null +++ b/keyboards/dztech/dz60rgb_ansi/rules.mk @@ -0,0 +1,16 @@ +# MCU name +MCU = STM32F303 + +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 60_ansi diff --git a/keyboards/dztech/dz60rgb_wkl/config.h b/keyboards/dztech/dz60rgb_wkl/config.h new file mode 100644 index 0000000000..44ff5f1570 --- /dev/null +++ b/keyboards/dztech/dz60rgb_wkl/config.h @@ -0,0 +1,39 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1219 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DZTECH + +#define PRODUCT DZ60RGB +#define DESCRIPTION DZ60 ARM RGB keyboard +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } +#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } + +/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/ + +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 3 +#ifdef RGB_MATRIX_ENABLE +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 62 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#endif \ No newline at end of file diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c new file mode 100644 index 0000000000..1c0edb7227 --- /dev/null +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c @@ -0,0 +1,116 @@ +#include "dz60rgb_wkl.h" +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, H_15, G_15, I_15}, + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; + +led_config_t g_led_config = { { + { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, + { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, + { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, + { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } +}, { + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, + { 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, + { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, + { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 4, 1, 1, 1 +} }; +#endif +void matrix_init_kb(void) { + matrix_init_user(); +} +void matrix_scan_kb(void) { + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(41, 0xFF, 0xFF, 0xFF); + } +} diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h new file mode 100644 index 0000000000..46b07fdb0d --- /dev/null +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h @@ -0,0 +1,16 @@ +#pragma once +#define XXX KC_NO +#include "quantum.h" +#define LAYOUT_HHKB( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2C,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D,\ + K40, K41, K42, K45, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ +} diff --git a/keyboards/dztech/dz60rgb_wkl/info.json b/keyboards/dztech/dz60rgb_wkl/info.json new file mode 100644 index 0000000000..4c3c3681bc --- /dev/null +++ b/keyboards/dztech/dz60rgb_wkl/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "dz60rgb_wkl", + "url": "", + "maintainer": "dztech", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_HHKB": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c new file mode 100644 index 0000000000..c7e69a5be0 --- /dev/null +++ b/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +#define _LAYER4 4 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_HHKB( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, 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_BSPC, + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_RCTL), + [_LAYER1] = LAYOUT_HHKB( /* FN */ + KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER2] = LAYOUT_HHKB( /* FN2 */ + KC_TRNS, 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_DEL ,KC_TRNS, + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } diff --git a/keyboards/dztech/dz60rgb_wkl/readme.md b/keyboards/dztech/dz60rgb_wkl/readme.md new file mode 100644 index 0000000000..2fffa413b6 --- /dev/null +++ b/keyboards/dztech/dz60rgb_wkl/readme.md @@ -0,0 +1,15 @@ +# DZ60RGB + +![dz60rgb](https://cdn.shopify.com/s/files/1/0043/9140/3591/products/TIM_20190130170231_grande.jpg?v=1548839053) + +A hotswap 60% RGB keyboard. + +Keyboard Maintainer: DZtech +Hardware Supported: DZtech dz60rgb, dz60rgb-ansi +Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + +Make example for this keyboard (after setting up your build environment): + + make dztech/dz60rgb: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). diff --git a/keyboards/dztech/dz60rgb_wkl/rules.mk b/keyboards/dztech/dz60rgb_wkl/rules.mk new file mode 100644 index 0000000000..ed30bec8b6 --- /dev/null +++ b/keyboards/dztech/dz60rgb_wkl/rules.mk @@ -0,0 +1,14 @@ +MCU = STM32F303 +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in \ No newline at end of file diff --git a/keyboards/dztech/dz65rgb/config.h b/keyboards/dztech/dz65rgb/config.h index f4c1f11149..611e57d586 100644 --- a/keyboards/dztech/dz65rgb/config.h +++ b/keyboards/dztech/dz65rgb/config.h @@ -12,18 +12,35 @@ #define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } #define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14, C15 } #define DIODE_DIRECTION COL2ROW - +#ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 - +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_BAND_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 35 #define DRIVER_2_LED_TOTAL 33 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#endif \ No newline at end of file diff --git a/keyboards/dztech/dz65rgb/dz65rgb.c b/keyboards/dztech/dz65rgb/dz65rgb.c index 932d3f68b6..8f095960d4 100644 --- a/keyboards/dztech/dz65rgb/dz65rgb.c +++ b/keyboards/dztech/dz65rgb/dz65rgb.c @@ -1,98 +1,102 @@ #include "dz65rgb.h" +#ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, C2_1, C3_1, C4_1}, // LA0 - {0, C1_1, C3_2, C4_2}, // LA1 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_8, C2_8, C3_8}, // LA8 - {0, C9_1, C8_1, C7_1}, // LA9 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_7, C8_7, C6_6}, // LA15 - {0, C9_8, C7_7, C6_7}, // LA16 + {0, C8_8, C7_8, C6_8}, // LA17 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_1, C8_1, C7_1}, // LA9 {0, C2_9, C3_9, C4_9}, // LB0 {0, C1_9, C3_10, C4_10}, // LB1 {0, C1_10, C2_10, C4_11}, // LB2 {0, C1_11, C2_11, C3_11}, // LB3 - //{0, C1_12, C2_12, C3_12}, // LB4 {0, C1_13, C2_13, C3_13}, // LB5 {0, C1_14, C2_14, C3_14}, // LB6 - {0, C1_15, C2_15, C3_15}, // LB7 - {0, C1_16, C2_16, C3_16}, // LB8 + + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C2_1, C3_1, C4_1}, // LA0 {0, C9_9, C8_9, C7_9}, // LB9 {0, C9_10, C8_10, C7_10}, // LB10 {0, C9_11, C8_11, C7_11}, // LB11 {0, C9_12, C8_12, C7_12}, // LB12 {0, C9_13, C8_13, C7_13}, // LB13 {0, C9_14, C8_14, C7_14}, // LB14 - {0, C9_15, C8_15, C6_14}, // LB15 - {0, C9_16, C7_15, C6_15}, // LB16 - {0, C8_16, C7_16, C6_16}, // LB17 - {1, C2_1, C3_1, C4_1}, // LC0 - {1, C1_1, C3_2, C4_2}, // LC1 - {1, C1_2, C2_2, C4_3}, // LC2 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_5, C2_5, C3_5}, // LC5 - //{1, C1_6, C2_6, C3_6}, // LC6 - {1, C1_7, C2_7, C3_7}, // LC7 - {1, C1_8, C2_8, C3_8}, // LC8 - {1, C9_1, C8_1, C7_1}, // LC9 - {1, C9_2, C8_2, C7_2}, // LC10 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_5, C8_5, C7_5}, // LC13 + {0, C1_15, C2_15, C3_15}, // LB7 + + {0, C1_8, C2_8, C3_8}, // LA8 {1, C9_6, C8_6, C7_6}, // LC14 - //{1, C9_7, C8_7, C6_6}, // LC15 - {1, C9_8, C7_7, C6_7}, // LC16 - {1, C8_8, C7_8, C6_8}, // LC17 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_1, C8_1, C7_1}, // LC9 {1, C2_9, C3_9, C4_9}, // LD0 {1, C1_9, C3_10, C4_10}, // LD1 {1, C1_10, C2_10, C4_11}, // LD2 {1, C1_11, C2_11, C3_11}, // LD3 {1, C1_12, C2_12, C3_12}, // LD4 {1, C1_13, C2_13, C3_13}, // LD5 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_16, C2_16, C3_16}, // LD8 + {0, C1_16, C2_16, C3_16}, // LB8 + + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_1, C3_2, C4_2}, // LC1 {1, C9_9, C8_9, C7_9}, // LD9 {1, C9_10, C8_10, C7_10}, // LD10 {1, C9_11, C8_11, C7_11}, // LD11 {1, C9_12, C8_12, C7_12}, // LD12 - //{1, C9_13, C8_13, C7_13}, // LD13 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {0, C9_15, C8_15, C6_14}, // LB15 + + {1, C8_8, C7_8, C6_8}, // LC17 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C2_1, C3_1, C4_1}, // LC0 {1, C9_14, C8_14, C7_14}, // LD14 {1, C9_15, C8_15, C6_14}, // LD15 {1, C9_16, C7_15, C6_15}, // LD16 {1, C8_16, C7_16, C6_16}, // LD17 + {0, C8_16, C7_16, C6_16}, // LB17 + {0, C9_16, C7_15, C6_15}, // LB16 + }; led_config_t g_led_config = { { - { 17, 16, 15, 14, 13, 12, 11, 10, 9, 18, 19, 20, 21, 22, 23 }, - { 7, 6, 5, 4, 3, 2, 1, 0, 26, 27, 28, 29, 30, 31, 24 }, - { 8, 48, 47, 46, 45, 44, 43, 51, 52, 53, 54, 55, NO_LED, 56, 25 }, - { 49, 40, 39, 38, 37, 36, 60, 61, 62, 63, 57, 58, NO_LED, 59, 32 }, - { 50, 42, 41, NO_LED, NO_LED, 35, NO_LED, NO_LED, 64, 65, 66, 67, NO_LED, 34, 33 } + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED,42, 43 }, + { 44, 45, 46, 47, 48, 49, 59, 51, 52, 53, 54, 55, NO_LED,56, 57 }, + { 58, 59, 60, NO_LED,NO_LED,61, NO_LED,NO_LED,62, 63, 64, 65, NO_LED,66, 67 } }, { - { 112, 16 }, { 96, 16 }, { 80, 16 }, { 64, 16 }, { 48, 16 }, { 32, 16 }, { 16, 16 }, { 0, 16 }, { 0, 32 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, - { 32, 0 }, { 16, 0 }, { 0, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 224, 0 }, { 224, 16 }, { 224, 32 }, { 128, 16 }, { 144, 16 }, { 160, 16 }, { 176, 16 }, - { 192, 16 }, { 208, 16 }, { 224, 48 }, { 224, 64 }, { 208, 64 }, { 80, 64 }, { 80, 48 }, { 64, 48 }, { 48, 48 }, { 32, 48 }, { 16, 48 }, { 32, 64 }, { 16, 64 }, { 96, 32 }, { 80, 32 }, - { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 48 }, { 0, 64 }, { 112, 32 }, { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 208, 32 }, { 160, 48 }, { 176, 48 }, { 208, 48 }, - { 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 } + {0,0}, {15,0}, {30,0}, {45,0}, {60,0}, {75,0}, {90,0}, {105,0}, {120,0}, {135,0}, {150,0}, {165,0}, {180,0}, {203,0},{224,0}, + {4,16},{23,16},{38,16},{53,16},{68,16}, {83,16}, {98,16}, {113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, + {6,32},{26,32},{41,32},{56,32},{71,32}, {86,32}, {101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, + {9,48},{34,48},{49,48},{64,48},{79,48}, {94,48}, {109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, + {2,64},{21,64},{39,64},{96,64},{150,64},{165,64},{180,64},{195,64},{210,64},{224,64} }, { - 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, - 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 1, 1, 4, 4, - 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 1, 1, 1, 1 + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 } }; +#endif void matrix_init_kb(void) { matrix_init_user(); @@ -114,3 +118,12 @@ void suspend_wakeup_init_kb(void) rgb_matrix_set_suspend_state(false); suspend_wakeup_init_user(); } + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); + } +} diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h new file mode 100644 index 0000000000..f57ac64041 --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h @@ -0,0 +1,3 @@ +#define LEADER_TIMEOUT 300 +#define FORCE_NKRO +#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC \ No newline at end of file diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c new file mode 100644 index 0000000000..597f6530d8 --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c @@ -0,0 +1,242 @@ +#include QMK_KEYBOARD_H + +// Config +const uint8_t MAIN_COLOR[3] = {0xFF, 0x00, 0x00}; + +// layers, ordering is important! +enum layers { + _MAIN, + _INDEX, + _FN, + _MULTIMEDIA, + _EMOJI, + _EXT1, + _EXT2, + _EXT3, + _EXT4, + _EXT5, + _EXT6, + _RGB, + _CONFIG, +} + +const layers_leds_map[] = { + [_MAIN] = 17, + [_INDEX] = 16, + [_FN] = 15, + [_MULTIMEDIA] = 14, + [_EMOJI] = 13, + [_EXT1] = 12, + [_EXT2] = 11, + [_EXT3] = 10, + [_EXT4] = 9, + [_EXT5] = 18, + [_EXT6] = 19, + [_RGB] = 20, + [_CONFIG] = 21, +}; + +enum unicode_names { + UC_GRINNING_FACE, // 😃 + UC_BEAMING_FACE, // 😁 + UC_GRINNING_FACE_WITH_SWEAT, // 😅 + UC_ROLLING_LAUGHING, // 🤣 + UC_FACE_TEARS_JOY, // 😂 + UC_WINKING_FACE, // 😉 + UC_SMILING_FACE_HALO, // 😇 + UC_SMILING_FACE_HEARTS, // 🥰 + UC_SMILING_FACE_HEART_EYES, // 😍 + UC_FACE_BLOWING_KISS, // 😘 + UC_FACE_SAVORING_FOOD, // 😋 + UC_ZANY_FACE, // 🤪 + UC_HUGGING_FACE, // 🤗 + UC_SHUSHING_FACE, // 🤫 + UC_THINKING_FACE, // 🤔 + UC_FACE_RAISED_EYEBROW, // 🤨 + UC_NEUTRAL_FACE, // 😐 + UC_SMIRKING_FACE, // 😏 + UC_FACE_ROLLING_EYES, // 🙄 + UC_PENSIVE_FACE, // 😔 + UC_FACE_VOMITING, // 🤮 + UC_WOOZY_FACE, // 🥴 + UC_PLEADING_FACE, // 🥺 + UC_LOUDLY_CRYING_FACE, // 😭 + UC_DISAPPOINTED_FACE, // 😞 + UC_FACE_SYMBOLS_MOUTH, // 🤬 + UC_SMILING_FACE_HORNS, // 😈 + UC_SKULL, // 💀 + UC_PILE_POO, // 💩 + UC_GHOST, // 👻 + UC_ALIEN_MONSTER, // 👾 + UC_RED_HEART, // ❤ + UC_BOMB, // 💣 + UC_WAVING_HAND, // 👋 + UC_OK_HAND, // 👌 + UC_CLAPPING_HANDS, // 👏 + UC_EYES, // 👀 + UC_MAN_FACEPALMING, // 🤦 + UC_TURTLE, // 🐢 + UC_SNAKE, // 🐍 + UC_SPOUTING_WHALE, // 🐳 + UC_DRAGON, // 🐉 + UC_TREX, // 🦖 + UC_ARGENTINA_A, // 🇦 + UC_ARGENTINA_R, // 🇷 + UC_THUMBSDOWN, // 👍 + UC_THUMBSUP, // 👎 +}; + +const uint32_t PROGMEM unicode_map[] = { + [UC_GRINNING_FACE] = 0x1F603, + [UC_BEAMING_FACE] = 0x1F601, + [UC_GRINNING_FACE_WITH_SWEAT] = 0x1F605, + [UC_ROLLING_LAUGHING] = 0x1F923, + [UC_FACE_TEARS_JOY] = 0x1F602, + [UC_WINKING_FACE] = 0x1F609, + [UC_SMILING_FACE_HALO] = 0x1F607, + [UC_SMILING_FACE_HEARTS] = 0x1F970, + [UC_SMILING_FACE_HEART_EYES] = 0x1F60D, + [UC_FACE_BLOWING_KISS] = 0x1F618, + [UC_FACE_SAVORING_FOOD] = 0x1F60B, + [UC_ZANY_FACE] = 0x1F92A, + [UC_HUGGING_FACE] = 0x1F917, + [UC_SHUSHING_FACE] = 0x1F92B, + [UC_THINKING_FACE] = 0x1F914, + [UC_FACE_RAISED_EYEBROW] = 0x1F928, + [UC_NEUTRAL_FACE] = 0x1F610, + [UC_SMIRKING_FACE] = 0x1F60F, + [UC_FACE_ROLLING_EYES] = 0x1F644, + [UC_PENSIVE_FACE] = 0x1F614, + [UC_FACE_VOMITING] = 0x1F92E, + [UC_WOOZY_FACE] = 0x1F974, + [UC_PLEADING_FACE] = 0x1F97A, + [UC_LOUDLY_CRYING_FACE] = 0x1F62D, + [UC_DISAPPOINTED_FACE] = 0x1F61E, + [UC_FACE_SYMBOLS_MOUTH] = 0x1F92C, + [UC_SMILING_FACE_HORNS] = 0x1F608, + [UC_SKULL] = 0x1F480, + [UC_PILE_POO] = 0x1F4A9, + [UC_GHOST] = 0x1F47B, + [UC_ALIEN_MONSTER] = 0x1F47E, + [UC_RED_HEART] = 0x2764, + [UC_BOMB] = 0x1F4A3, + [UC_WAVING_HAND] = 0x1F44B, + [UC_OK_HAND] = 0x1F44C, + [UC_CLAPPING_HANDS] = 0x1F44F, + [UC_EYES] = 0x1F440, + [UC_MAN_FACEPALMING] = 0x1F926, + [UC_TURTLE] = 0x1F422, + [UC_SNAKE] = 0x1F40D, + [UC_SPOUTING_WHALE] = 0x1F433, + [UC_DRAGON] = 0x1F409, + [UC_TREX] = 0x1F996, + [UC_ARGENTINA_A] = 0x1F1E6, + [UC_ARGENTINA_R] = 0x1F1F7, + [UC_THUMBSDOWN] = 0x1F44E, + [UC_THUMBSUP] = 0x1F44D, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT_65_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + 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_END, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_APP), KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LEAD, TO(_INDEX), MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_INDEX] = LAYOUT_65_ansi( + TO(_MAIN), TO(_INDEX), TO(_FN), TO(_MULTIMEDIA), TO(_EMOJI), TO(_EXT1), TO(_EXT2), TO(_EXT3), TO(_EXT4), TO(_EXT5), TO(_EXT6), TO(_RGB), TO(_CONFIG), TO(_MAIN), KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), TO(_FN), KC_NO, KC_NO, KC_NO + ), + [_FN] = LAYOUT_65_ansi( + 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_DEL, KC_PSCR, + KC_TAB, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_INS, KC_SLCK, + KC_APP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PAUS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, TO(_INDEX), KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R + ), + [_MULTIMEDIA] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPLY, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_VOLU, KC_MUTE, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_MPRV, KC_VOLD, KC_MNXT + ), + [_EMOJI] = LAYOUT_65_ansi( + TO(_MAIN), X(UC_GRINNING_FACE), X(UC_BEAMING_FACE), X(UC_GRINNING_FACE_WITH_SWEAT), X(UC_ROLLING_LAUGHING), X(UC_FACE_TEARS_JOY), X(UC_WINKING_FACE), X(UC_SMILING_FACE_HALO), X(UC_SMILING_FACE_HEARTS), X(UC_SMILING_FACE_HEART_EYES), X(UC_FACE_BLOWING_KISS), X(UC_FACE_SAVORING_FOOD), X(UC_ZANY_FACE), KC_BSPC, KC_HOME, + KC_TAB, X(UC_HUGGING_FACE), X(UC_SHUSHING_FACE), X(UC_THINKING_FACE), X(UC_FACE_RAISED_EYEBROW), X(UC_NEUTRAL_FACE), X(UC_SMIRKING_FACE), X(UC_FACE_ROLLING_EYES), X(UC_PENSIVE_FACE), X(UC_FACE_VOMITING), X(UC_WOOZY_FACE), X(UC_PLEADING_FACE), X(UC_LOUDLY_CRYING_FACE), X(UC_THUMBSUP), KC_END, + KC_APP, X(UC_DISAPPOINTED_FACE), X(UC_FACE_SYMBOLS_MOUTH), X(UC_SMILING_FACE_HORNS), X(UC_SKULL), X(UC_PILE_POO), X(UC_GHOST), X(UC_ALIEN_MONSTER), X(UC_RED_HEART), X(UC_BOMB), X(UC_WAVING_HAND), X(UC_OK_HAND), KC_ENT, KC_PGUP, + KC_LSFT, X(UC_CLAPPING_HANDS), X(UC_EYES), X(UC_MAN_FACEPALMING), X(UC_TURTLE), X(UC_SNAKE), X(UC_SPOUTING_WHALE), X(UC_DRAGON), X(UC_TREX), X(UC_ARGENTINA_A), X(UC_ARGENTINA_R), X(UC_THUMBSDOWN), KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LEAD, TO(_INDEX), TO(_MAIN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_EXT1] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT2] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT3] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT4] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT5] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT6] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_RGB] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_NO, + KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_CONFIG] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ACL2, + KC_NO, KC_PWR, KC_SLEP, KC_WAKE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, DEBUG, EEP_RST, KC_NO, KC_ACL1, + KC_NO, UC_RMOD, UC_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ACL0, + KC_NO, MAGIC_TOGGLE_NKRO, MAGIC_UNHOST_NKRO, MAGIC_HOST_NKRO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + +void rgb_matrix_indicators_user(void) { + + // CapsLock Light + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(8, MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); + } + + // Show Selected Layer + rgb_matrix_set_color(layers_leds_map[biton32(layer_state)], MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); +} \ No newline at end of file diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk new file mode 100644 index 0000000000..1bd58cf79c --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk @@ -0,0 +1,2 @@ +LEADER_ENABLE = yes +UNICODEMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/dztech/dz65rgb/keymaps/chocol8/config.h b/keyboards/dztech/dz65rgb/keymaps/chocol8/config.h new file mode 100644 index 0000000000..1c801d7e3c --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/chocol8/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define FORCE_NKRO diff --git a/keyboards/dztech/dz65rgb/keymaps/chocol8/keymap.c b/keyboards/dztech/dz65rgb/keymaps/chocol8/keymap.c new file mode 100644 index 0000000000..6afa734cd6 --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/chocol8/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +enum tofu68_layers { + _QWERTY, + _FNM +}; + +#define FNM MO(_FNM) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_65_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + KC_GRV, 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_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LALT, KC_LCMD, KC_SPC, FNM, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [_FNM] = LAYOUT_65_ansi( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_MUTE, KC_VOLU, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI ,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, AG_TOGG, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R \ + ) +}; diff --git a/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk b/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk new file mode 100644 index 0000000000..626329f811 --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk @@ -0,0 +1,6 @@ +NKRO_ENABLE = yes # USB Nkey Rollover +VELOCIKEY_ENABLE = yes +# AUTO_SHIFT_ENABLE = yes # Auto Shift + +LINK_TIME_OPTIMIZATION_ENABLE = yes + diff --git a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c index dae08a48c6..7f1416f1e7 100644 --- a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c @@ -12,18 +12,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GESC, 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_DEL, KC_HOME,\ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,\ CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN,\ - KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,\ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), }; -void rgb_matrix_indicators_user(void) -{ - if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) - { - rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF); - } -} - void matrix_init_user(void) { //user initialization diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h new file mode 100644 index 0000000000..a56af01656 --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h @@ -0,0 +1,68 @@ +#pragma once + +#define FORCE_NKRO + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 150 + +#define TAP_HOLD_CAPS_DELAY 0 +#undef RGB_MATRIX_STARTUP_MODE +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS + +// #define DISABLE_RGB_MATRIX_SOLID_COLOR +// #define DISABLE_RGB_MATRIX_ALPHAS_MODS +// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define DISABLE_RGB_MATRIX_BREATHING +#define DISABLE_RGB_MATRIX_BAND_SAT +// #define DISABLE_RGB_MATRIX_BAND_VAL +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define DISABLE_RGB_MATRIX_CYCLE_ALL +#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +#define DISABLE_RGB_MATRIX_DUAL_BEACON +#define DISABLE_RGB_MATRIX_RAINBOW_BEACON +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define DISABLE_RGB_MATRIX_RAINDROPS +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define DISABLE_RGB_MATRIX_SPLASH +// #define DISABLE_RGB_MATRIX_MULTISPLASH +// #define DISABLE_RGB_MATRIX_SOLID_SPLASH +// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + +#define QMK_KEYS_PER_SCAN 4 + +// #define RGB_MATRIX_KEYRELEASES + +// some speed shit + +#ifndef NO_DEBUG +#define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) +#define NO_PRINT +#endif // !NO_PRINT + +#define NO_ACTION_ONESHOT +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +// #include "config_led.h" +// #include "dz60rgb.h" diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c new file mode 100644 index 0000000000..00915a9b4f --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c @@ -0,0 +1,323 @@ +#include QMK_KEYBOARD_H + +enum dz65rgb_layers { + _QWERTY, + _FNM, + _NAV, + _FNC +}; + +enum dz65rgb_keycodes { + REBOOT = SAFE_RANGE, + REEPROM, + MAS_CRM, + MAS_PRP, + MAS_RED, + MAS_GRN, + MAS_BLU, + MAS_CYN, + MAS_MGT, + MAS_YEL, + MAS_KEY, + MAS_WHT, +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO +#define _V_V_V_ KC_TRNS +#define LT_CAPS LT(_NAV, KC_CAPS) +extern bool autoshift_enabled; +#define MT_APP RALT_T(KC_APP) +#define LM_LALT LM(_FNM, MOD_LALT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_65_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_PGUP, \ + LT_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_PGDN, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, LM_LALT, KC_SPC, KC_RALT, MO(_FNC), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [_FNM] = LAYOUT_65_ansi( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _V_V_V_, _______, _______, _______, _______, _______, _______, _______ \ + ), + [_NAV] = LAYOUT_65_ansi( + KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PMNS, KC_PPLS, _______, _______, \ + _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, KC_P4, KC_P5, KC_P6, KC_PSLS, KC_PSCR, KC_SLCK, KC_INS, KC_PMNS, \ + _V_V_V_, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, KC_PENT, KC_PPLS, \ + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_P0, KC_PDOT, KC_PSLS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [_FNC] = LAYOUT_65_ansi( + _______, 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_ASTG, \ + _______, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, MAS_MGT, MAS_BLU, MAS_WHT, RGB_RMOD, RGB_MOD, _______, KC_MPRV, \ + _______, RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, MAS_RED, MAS_KEY, MAS_CYN, MAS_PRP, _______, EEP_RST, KC_MNXT, \ + _______, RGB_TOG, _______, _______, REEPROM, REBOOT, TG_NKRO, MAS_YEL, MAS_GRN, MAS_CRM, _______, _______, KC_VOLU, KC_MUTE, \ + _______, _______, _______, _______, _______, _V_V_V_, _______, RGB_SPD, KC_VOLD, RGB_SPI \ + ), + /* + [_LEDS] = LAYOUT_65_ansi( + 17, 16, 15, 14, 13, 12, 11, 10, 9, 18, 19, 20, 21, 22, 23, \ + 7, 6, 5, 4, 3, 2, 1, 0, 26, 27, 28, 29, 30, 31, 24, \ + 8, 48, 47, 46, 45, 44, 43, 51, 52, 53, 54, 55, 56, 25, \ + 49, 40, 39, 38, 37, 36, 60, 61, 62, 63, 57, 58, 59, 32, \ + 50, 42, 41, 35, 64, 65, 66, 67, 34, 33 \ + ), + */ +}; + +/* +17, 16, 15, 14, 13, 12, 11, 10, 9, 18, 19, 20, 21, 22, 23 + 7, 6, 5, 4, 3, 2, 1, 0, 26, 27, 28, 29, 30, 31, 24 + 8, 48, 47, 46, 45, 44, 43, 51, 52, 53, 54, 55, 56, 25 +49, 40, 39, 38, 37, 36, 60, 61, 62, 63, 57, 58, 59, 32 +50, 42, 41, 35, 64, 65, 66, 67, 34, 33 + +ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, BCK, DEL +TAB, Q, W, E, R, T, Y, U, I, O, P, [, ], \, - +CPS, A, S, D, F, G, H, J, K, L, COL, QOT, RETURN, + +SFT, Z, X, C, V, B, N, M, COM, DOT, SLS, SHIFT, UP, 0 +CTL, GUI, ALT, SPACEBAR, ALT, FN, CTL, LFT, DWN, RIT +*/ +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF); + } + + uint8_t this_led = host_keyboard_leds(); + + if (!g_suspend_state && rgb_matrix_config.enable) { + switch (biton32(layer_state)) { + case _NAV: + if (IS_LED_ON(this_led, USB_LED_NUM_LOCK)) { + rgb_matrix_set_color(17, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00); + } else { + rgb_matrix_set_color(17, 0x00, 0x00, 0x00); + rgb_matrix_set_color(26, 0xFF, 0x00, 0x00); + } + + rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF); // layer indicator + // ESDF + rgb_matrix_set_color(4, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(47, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(46, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(45, 0xFF, 0x00, 0x00); + // home/end + rgb_matrix_set_color(5, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(3, 0x00, 0xFF, 0x00); + // pgup/dn + rgb_matrix_set_color(6, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(48, 0x00, 0x00, 0xFF); + // numpad + rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(18, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(0, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(27, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(53, 0xFF, 0xFF, 0x00); + // zero + rgb_matrix_set_color(60, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(61, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(62, 0xFF, 0x00, 0x00); + // dot + rgb_matrix_set_color(63, 0x00, 0x00, 0xFF); + // math shit + rgb_matrix_set_color(19, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(20, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(21, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(28, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(24, 0x00, 0x00, 0xFF); // macro minus + rgb_matrix_set_color(25, 0x00, 0x00, 0xFF); // macro plus + // other + rgb_matrix_set_color(29, 0xFF, 0xFF, 0xFF); + rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); + rgb_matrix_set_color(31, 0xFF, 0xFF, 0xFF); + break; + + case _FNC: { + HSV hsv = { rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v }; + HSV hui = hsv; + HSV hud = hsv; + HSV sai = hsv; + HSV sad = hsv; + HSV vai = hsv; + HSV vad = hsv; + hui.h = hsv.h + 8; + hud.h = hsv.h - 8; + sai.s = hsv.s + 16 > 255 ? 255u : hsv.s + 16; + sad.s = hsv.s - 16 < 0 ? 0 : hsv.s - 16; + vai.v = hsv.v + 16 > 255 ? 255 : hsv.v + 16; + vad.v = hsv.v - 16 < 0 ? 0 : hsv.v - 16; + RGB rgb = hsv_to_rgb(hsv); + RGB rgbHUI = hsv_to_rgb(hui); + RGB rgbHUD = hsv_to_rgb(hud); + RGB rgbSAI = hsv_to_rgb(sai); + RGB rgbSAD = hsv_to_rgb(sad); + RGB rgbVAI = hsv_to_rgb(vai); + RGB rgbVAD = hsv_to_rgb(vad); + rgb_matrix_set_color(65, 0xFF, 0xFF, 0xFF); // layer indicator + rgb_matrix_set_color(36, 0xFF, 0x00, 0x00); // MASBOOT + rgb_matrix_set_color(37, 0xFF, 0x00, 0x40); // REEPROM + rgb_matrix_set_color(37, 0xFF, 0x00, 0x40); // 60 + rgb_matrix_set_color(59, 0x00, 0x80, 0xFF); // KC_VOLU + rgb_matrix_set_color(34, 0x00, 0x80, 0xFF); + rgb_matrix_set_color(32, 0xFF, 0x00, 0x00); // KC_MUTE + rgb_matrix_set_color(24, 0xFF, 0x40, 0x00); // KC_MPRV + rgb_matrix_set_color(25, 0xFF, 0x40, 0x00); + + if (this_led & (1 << !autoshift_enabled)) { + rgb_matrix_set_color(15, 0xFF, 0x00, 0x00); // KC_ASTG + } else { + rgb_matrix_set_color(15, 0xFF, 0xFF, 0x00); + } + + rgb_matrix_set_color(6, 0xFF, 0x80, 0x00); //RGB_MOD + rgb_matrix_set_color(48, 0xFF, 0x80, 0x00); + rgb_matrix_set_color(29, 0xFF, 0x80, 0x00); //RGB_MOD + rgb_matrix_set_color(30, 0xFF, 0x80, 0x00); + rgb_matrix_set_color(40, 0xFF, 0x40, 0x00); //RGB_TOG + rgb_matrix_set_color(4, rgbHUI.r, rgbHUI.g, rgbHUI.b); //RGB_HUI + rgb_matrix_set_color(46, rgbHUD.r, rgbHUD.g, rgbHUD.b); + rgb_matrix_set_color(3, rgbSAI.r, rgbSAI.g, rgbSAI.b); //RGB_SAI + rgb_matrix_set_color(45, rgbSAD.r, rgbSAD.g, rgbSAD.b); + rgb_matrix_set_color(2, rgbVAI.r, rgbVAI.g, rgbVAI.b); //RGB_VAI + rgb_matrix_set_color(44, rgbVAD.r, rgbVAD.g, rgbVAD.b); + rgb_matrix_set_color(35, rgb.r, rgb.g, rgb.b); // config display + rgb_matrix_set_color(5, 0x80, 0x80, 0x80); //RGB_SPI + rgb_matrix_set_color(47, 0x80, 0x80, 0x80); + rgb_matrix_set_color(67, 0x80, 0x80, 0x80); //RGB_SPI + rgb_matrix_set_color(33, 0x80, 0x80, 0x80); + rgb_matrix_set_color(26, 0xF0, 0x00, 0xFF); //MAS_MGT + rgb_matrix_set_color(27, 0x00, 0x02, 0xFF); //MAS_BLU + rgb_matrix_set_color(51, 0xFF, 0x00, 0x00); //MAS_RED + rgb_matrix_set_color(52, 0x00, 0x00, 0x00); //MAS_KEY + rgb_matrix_set_color(53, 0x00, 0xFF, 0xF7); //MAS_CYN + rgb_matrix_set_color(61, 0xFF, 0xDA, 0x00); //MAS_YEL + rgb_matrix_set_color(62, 0x00, 0xFF, 0x01); //MAS_GRN + rgb_matrix_set_color(63, 0xFF, 0xA5, 0x18); //MAS_CRM + rgb_matrix_set_color(54, 0x81, 0x3C, 0xFF); //MAS_PRP + rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); //MAS_WHT + } + break; + } + } +} + +void matrix_init_user(void) +{ + //user initialization +} + +void matrix_scan_user(void) +{ + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) +{ + static uint32_t key_timer; + + switch (keycode) { + case REBOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + + return false; + + case REEPROM: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + eeconfig_init(); + } + } + + return false; + + case MAS_CRM: + if (record->event.pressed) { + rgb_matrix_sethsv(32, 160, 255); + } + + return false; + + case MAS_PRP: + if (record->event.pressed) { + rgb_matrix_sethsv(192, 112, 255); + } + + return false; + + case MAS_RED: + if (record->event.pressed) { + rgb_matrix_sethsv(0, 255, 255); + } + + return false; + + case MAS_GRN: + if (record->event.pressed) { + rgb_matrix_sethsv(88, 255, 255); + } + + return false; + + case MAS_BLU: + if (record->event.pressed) { + rgb_matrix_sethsv(168, 255, 255); + } + + return false; + + case MAS_CYN: + if (record->event.pressed) { + rgb_matrix_sethsv(128, 255, 255); + } + + return false; + + case MAS_MGT: + if (record->event.pressed) { + rgb_matrix_sethsv(216, 255, 255); + } + + return false; + + case MAS_YEL: + if (record->event.pressed) { + rgb_matrix_sethsv(40, 255, 255); + } + + return false; + + case MAS_KEY: + if (record->event.pressed) { + rgb_matrix_sethsv(0, 0, 0); + } + + return false; + + case MAS_WHT: + if (record->event.pressed) { + rgb_matrix_sethsv(128, 0, 255); + } + + return false; + + default: + return true; + } +} diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk new file mode 100644 index 0000000000..9a75bb29dc --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk @@ -0,0 +1,6 @@ +NKRO_ENABLE = yes # USB Nkey Rollover +AUTO_SHIFT_ENABLE = yes # Auto Shift +# VELOCIKEY_ENABLE = yes + +LINK_TIME_OPTIMIZATION_ENABLE = yes + diff --git a/keyboards/dztech/dz65rgb/rules.mk b/keyboards/dztech/dz65rgb/rules.mk index bf392b4faa..6e80abf472 100644 --- a/keyboards/dztech/dz65rgb/rules.mk +++ b/keyboards/dztech/dz65rgb/rules.mk @@ -1,6 +1,6 @@ -MCU = STM32F303 -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 +# MCU name +MCU = STM32F303 + BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/eco/keymaps/default/keymap.c b/keyboards/eco/keymaps/default/keymap.c index ede68d59da..58951ce32a 100644 --- a/keyboards/eco/keymaps/default/keymap.c +++ b/keyboards/eco/keymaps/default/keymap.c @@ -4,7 +4,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c index 395a014acb..5a1974336a 100644 --- a/keyboards/eco/keymaps/xyverz/keymap.c +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -1,36 +1,13 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - -// Default ECO Layout -// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 - #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT -}; - -// Aliases to make reading the keymap easier -#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +// Aliases to keep the keymap tidy +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -143,53 +120,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void matrix_init_user(void) { +#ifdef BOOTLOADER_CATERINA + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); +#endif +}; + +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } - return true; -} - + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/eco/rev1/rev1.h b/keyboards/eco/rev1/rev1.h index ba00615d34..132760fbe8 100644 --- a/keyboards/eco/rev1/rev1.h +++ b/keyboards/eco/rev1/rev1.h @@ -3,11 +3,8 @@ #include "../eco.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ diff --git a/keyboards/eco/rev2/rev2.h b/keyboards/eco/rev2/rev2.h index adc2c6d402..881bcc77b9 100644 --- a/keyboards/eco/rev2/rev2.h +++ b/keyboards/eco/rev2/rev2.h @@ -3,11 +3,8 @@ #include "../eco.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk index 35ee906b1e..4fe5ec1b92 100644 --- a/keyboards/eco/rules.mk +++ b/keyboards/eco/rules.mk @@ -1,48 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -64,4 +32,4 @@ API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -DEFAULT_FOLDER = eco/rev2 \ No newline at end of file +DEFAULT_FOLDER = eco/rev2 diff --git a/keyboards/efreet/config.h b/keyboards/efreet/config.h new file mode 100644 index 0000000000..2a420b248e --- /dev/null +++ b/keyboards/efreet/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Amber Holly + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Soran +#define PRODUCT Efreet +#define DESCRIPTION A 40% ortholinear keyboard. + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, D6, D5, D4, D3, D2, D1, C2 } +#define MATRIX_COL_PINS { B3, B4, B5, B6, B7, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN D0 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/efreet/efreet.c b/keyboards/efreet/efreet.c new file mode 100644 index 0000000000..a05db74a52 --- /dev/null +++ b/keyboards/efreet/efreet.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include "efreet.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/efreet/efreet.h b/keyboards/efreet/efreet.h new file mode 100644 index 0000000000..7ad717f3de --- /dev/null +++ b/keyboards/efreet/efreet.h @@ -0,0 +1,59 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + + #define LAYOUT_ortho_4x12( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75\ + ) { \ + { K10, K11, K12, K13, K14, K15 }, \ + { K00, K01, K02, K03, K04, K05 }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K20, K21, K22, K23, K24, K25 }, \ + { K50, K51, K52, K53, K54, K55 }, \ + { K40, K41, K42, K43, K44, K45 }, \ + { K70, K71, K72, K73, K74, K75 }, \ + { K60, K61, K62, K63, K64, K65 } \ + } + + #define LAYOUT_planck_mit( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55,\ + K60, K70, K61, K71, K62, K72, K73, K64, K74, K65, K75\ + ) { \ + { K10, K11, K12, K13, K14, K15 }, \ + { K00, K01, K02, K03, K04, K05 }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K20, K21, K22, K23, K24, K25 }, \ + { K50, K51, K52, K53, K54, K55 }, \ + { K40, K41, K42, K43, K44, K45 }, \ + { K70, K71, K72, K73, K74, K75 }, \ + { K60, K61, K62, KC_NO, K64, K65 } \ + } diff --git a/keyboards/efreet/info.json b/keyboards/efreet/info.json new file mode 100644 index 0000000000..25b627d8ce --- /dev/null +++ b/keyboards/efreet/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "efreet", + "url": "", + "maintainer": "amberstarlight", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_mit": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3, "w":2}, {"label":"⇑", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}] + }, + "LAYOUT_ortho_4x12": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"label":"⇑", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}] + } + } +} diff --git a/keyboards/efreet/keymaps/default/config.h b/keyboards/efreet/keymaps/default/config.h new file mode 100644 index 0000000000..b825835bb4 --- /dev/null +++ b/keyboards/efreet/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/efreet/keymaps/default/keymap.c b/keyboards/efreet/keymaps/default/keymap.c new file mode 100644 index 0000000000..72443411b3 --- /dev/null +++ b/keyboards/efreet/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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 , + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [1] = LAYOUT_ortho_4x12( + 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_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 + ), + [2] = LAYOUT_ortho_4x12( + 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_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 + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/efreet/keymaps/default/readme.md b/keyboards/efreet/keymaps/default/readme.md new file mode 100644 index 0000000000..d714acd942 --- /dev/null +++ b/keyboards/efreet/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for efreet \ No newline at end of file diff --git a/keyboards/efreet/readme.md b/keyboards/efreet/readme.md new file mode 100644 index 0000000000..9310dacf7b --- /dev/null +++ b/keyboards/efreet/readme.md @@ -0,0 +1,15 @@ +# Efreet + +![efreet](https://i.imgur.com/Lh6WLuI.jpg) + +Custom PCB for the Efreet (as4x) keyboard. + +Keyboard Maintainer: [Amber Holly](https://github.com/amberstarlight) +Hardware Supported: Efreet PCB +Hardware Availability: private group buy + +Make example for this keyboard (after setting up your build environment): + + make efreet: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). diff --git a/keyboards/efreet/rules.mk b/keyboards/efreet/rules.mk new file mode 100644 index 0000000000..f3c51f7a6a --- /dev/null +++ b/keyboards/efreet/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/emptystring/NQG/rules.mk b/keyboards/emptystring/NQG/rules.mk index 9a46bb8544..8ebed340ad 100644 --- a/keyboards/emptystring/NQG/rules.mk +++ b/keyboards/emptystring/NQG/rules.mk @@ -1,50 +1,15 @@ # MCU name - MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/ep/40/rules.mk b/keyboards/ep/40/rules.mk index 9ddf9717e9..7e69544cf4 100644 --- a/keyboards/ep/40/rules.mk +++ b/keyboards/ep/40/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ep/96/rules.mk b/keyboards/ep/96/rules.mk index 407135de2e..7e69544cf4 100644 --- a/keyboards/ep/96/rules.mk +++ b/keyboards/ep/96/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ep/comsn/hs68/rules.mk b/keyboards/ep/comsn/hs68/rules.mk index b7d3b9b528..2aa5671557 100644 --- a/keyboards/ep/comsn/hs68/rules.mk +++ b/keyboards/ep/comsn/hs68/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ep/comsn/mollydooker/rules.mk b/keyboards/ep/comsn/mollydooker/rules.mk index db4f2edc0b..4ef5023dfb 100644 --- a/keyboards/ep/comsn/mollydooker/rules.mk +++ b/keyboards/ep/comsn/mollydooker/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ep/comsn/tf_longeboye/rules.mk b/keyboards/ep/comsn/tf_longeboye/rules.mk index 195c9e5023..5360459cf7 100644 --- a/keyboards/ep/comsn/tf_longeboye/rules.mk +++ b/keyboards/ep/comsn/tf_longeboye/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ergo42/keymaps/biacco-biacco/keymap.c b/keyboards/ergo42/keymaps/biacco-biacco/keymap.c index 9eaba22099..7cf40fa9a0 100644 --- a/keyboards/ergo42/keymaps/biacco-biacco/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-biacco/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, TG(BIAC),LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, TG(BIAC),LT(SYMB, KC_ESC), RCTL_T(KC_SPC),SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DEL, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ ), /* META @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DEL, KC_PSCR, _______, _______, KC_JYEN \ ), /* BIAC @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_SCLN,KC_COMM, KC_DOT, KC_P, KC_Q, KC_RBRC, KC_BSLS, KC_Y, KC_G, KC_D, KC_M, KC_F, KC_LBRC, \ KC_LALT, KC_A, KC_O, KC_E, KC_I, KC_U, S(KC_8), S(KC_9), KC_B, KC_N, KC_T, KC_R, KC_S, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_W, S(KC_RBRC), S(KC_BSLS), KC_H, KC_J, KC_K, KC_L, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, _______, LT(BSYMB, KC_ESC),RCTL_T(KC_SPC),SFT_T(KC_TAB), KC_BSPC, LT(BMETA, KC_ENT),KC_DELT, KC_PSCR, XXXXXXX, XXXXXXX, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, _______, LT(BSYMB, KC_ESC),RCTL_T(KC_SPC),SFT_T(KC_TAB), KC_BSPC, LT(BMETA, KC_ENT),KC_DEL, KC_PSCR, XXXXXXX, XXXXXXX, KC_JYEN \ ), /* META diff --git a/keyboards/ergo42/keymaps/biacco-macOS/keymap.c b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c index 8299eb7011..bc6a8557e8 100644 --- a/keyboards/ergo42/keymaps/biacco-macOS/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), GUI_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), GUI_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DEL, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ ), /* META @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DEL, KC_PSCR, _______, _______, KC_JYEN \ ) }; diff --git a/keyboards/ergo42/keymaps/biacco-underglow/keymap.c b/keyboards/ergo42/keymaps/biacco-underglow/keymap.c index 3449192802..5b7fb7e66c 100644 --- a/keyboards/ergo42/keymaps/biacco-underglow/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-underglow/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(RGB), KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC),SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DEL, KC_PSCR, TG(GAME), TG(RGB), KC_JYEN \ ), /* META @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DEL, KC_PSCR, _______, _______, KC_JYEN \ ), /* RGB diff --git a/keyboards/ergo42/keymaps/biacco-winjp/keymap.c b/keyboards/ergo42/keymaps/biacco-winjp/keymap.c index 5dbca3bfc5..9d8284dbd2 100644 --- a/keyboards/ergo42/keymaps/biacco-winjp/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-winjp/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC),SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DEL, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ ), /* META @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DEL, KC_PSCR, _______, _______, KC_JYEN \ ) }; diff --git a/keyboards/ergo42/keymaps/biacco/keymap.c b/keyboards/ergo42/keymaps/biacco/keymap.c index a6cc610529..12e55b75f1 100644 --- a/keyboards/ergo42/keymaps/biacco/keymap.c +++ b/keyboards/ergo42/keymaps/biacco/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC),SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DEL, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ ), /* META @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DEL, KC_PSCR, _______, _______, KC_JYEN \ ) }; diff --git a/keyboards/ergo42/keymaps/default-illustrator/keymap.c b/keyboards/ergo42/keymaps/default-illustrator/keymap.c index 62af6b2ab1..3c57f7fc93 100644 --- a/keyboards/ergo42/keymaps/default-illustrator/keymap.c +++ b/keyboards/ergo42/keymaps/default-illustrator/keymap.c @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, TG(ILLUST), LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(ILLUST), KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, TG(ILLUST), LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DEL, KC_PSCR, TG(GAME), TG(ILLUST), KC_JYEN \ ), /* META @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, XXXXXXX, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, XXXXXXX, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, XXXXXXX, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DEL, KC_PSCR, _______, XXXXXXX, KC_JYEN \ ), /* ILLUST @@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_H, KC_G, KC_I, KC_P, LCTL(KC_J), LCTL(KC_BSLS), _______, _______, _______, _______, _______, _______, _______, \ KC_LALT, KC_R, KC_S, KC_A, KC_V, S(KC_W), LCTL(KC_RBRC), _______, _______, _______, _______, _______, _______, _______, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F, _______, _______, _______, _______, _______, _______, _______, \ - KC_LCTRL, KC_LGUI, KC_APP, _______, KC_ESC, KC_RCTL, KC_DELT, _______, _______, _______, _______, XXXXXXX, _______, _______ \ + KC_LCTRL, KC_LGUI, KC_APP, _______, KC_ESC, KC_RCTL, KC_DEL, _______, _______, _______, _______, XXXXXXX, _______, _______ \ ) }; diff --git a/keyboards/ergo42/keymaps/default-underglow/keymap.c b/keyboards/ergo42/keymaps/default-underglow/keymap.c index 212d9138df..d4e8f11087 100644 --- a/keyboards/ergo42/keymaps/default-underglow/keymap.c +++ b/keyboards/ergo42/keymaps/default-underglow/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT( \ KC_ESC, 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_BSPC, \ - KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RBRC, KC_ENT, \ + KC_DEL, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RBRC, KC_ENT, \ MO(RGB), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ KC_LGUI, KC_LCTL, KC_GRV, KC_BSLS, KC_LALT, MO(META), KC_SPC, KC_SPC, KC_QUOT, KC_MINS, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT \ ), diff --git a/keyboards/ergo42/keymaps/default/keymap.c b/keyboards/ergo42/keymaps/default/keymap.c index f99ec5fb66..afe748aa64 100644 --- a/keyboards/ergo42/keymaps/default/keymap.c +++ b/keyboards/ergo42/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define BASE 0 #define META 1 @@ -22,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT( \ KC_ESC, 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_BSPC, \ - KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RBRC, KC_ENT, \ + KC_DEL, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RBRC, KC_ENT, \ MO(SYMB), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ KC_LGUI, KC_LCTL, KC_GRV, KC_BSLS, KC_LALT, MO(META), KC_SPC, KC_SPC, KC_QUOT, KC_MINS, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT \ ), @@ -64,4 +63,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - diff --git a/keyboards/ergo42/keymaps/koba/keymap.c b/keyboards/ergo42/keymaps/koba/keymap.c index 9bc504207f..091d7fb9af 100644 --- a/keyboards/ergo42/keymaps/koba/keymap.c +++ b/keyboards/ergo42/keymaps/koba/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------' `------------------------------------------------' */ [_WIN] = LAYOUT( \ - KC_ESC, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ + KC_ESC, KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ KC_TAB, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ KC_ZKHK, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ FN, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, LOWER, KC_SPC, KC_SPC, RAISE, KC_HENK, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT \ @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------' `------------------------------------------------' */ [_MACOS] = LAYOUT( \ - KC_ESC, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ + KC_ESC, KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ KC_TAB, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ FN, KC_LCTL, KC_LALT, KC_LGUI, KC_EISU, LOWER, KC_SPC, KC_SPC, RAISE, KC_KNA, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT \ diff --git a/keyboards/ergo42/keymaps/yshrsmz/keymap.c b/keyboards/ergo42/keymaps/yshrsmz/keymap.c index 55fe30e89b..6239876bb1 100644 --- a/keyboards/ergo42/keymaps/yshrsmz/keymap.c +++ b/keyboards/ergo42/keymaps/yshrsmz/keymap.c @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DEL, KC_PSCR, _______, _______, KC_JYEN \ ) }; diff --git a/keyboards/ergo42/rev1/config.h b/keyboards/ergo42/rev1/config.h index 68a5e2bbe5..f8fae93cf4 100644 --- a/keyboards/ergo42/rev1/config.h +++ b/keyboards/ergo42/rev1/config.h @@ -40,8 +40,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order -#define CATERINA_BOOTLOADER - /* define tapping term */ #define TAPPING_TERM 100 diff --git a/keyboards/ergo42/rev1/rev1.h b/keyboards/ergo42/rev1/rev1.h index 64773c911b..724ec38970 100644 --- a/keyboards/ergo42/rev1/rev1.h +++ b/keyboards/ergo42/rev1/rev1.h @@ -3,10 +3,8 @@ #include "ergo42.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -15,8 +13,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/ergo42/rules.mk b/keyboards/ergo42/rules.mk index cdc9da9084..a02e3ca74e 100644 --- a/keyboards/ergo42/rules.mk +++ b/keyboards/ergo42/rules.mk @@ -1,56 +1,15 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c \ - ssd1306.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in @@ -74,6 +33,11 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c \ + ssd1306.c LAYOUTS = ortho_4x14 diff --git a/keyboards/ergodash/mini/keymaps/default/keymap.c b/keyboards/ergodash/mini/keymaps/default/keymap.c index 35cbd87a36..18ba519841 100644 --- a/keyboards/ergodash/mini/keymaps/default/keymap.c +++ b/keyboards/ergodash/mini/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/ergodash/mini/mini.h b/keyboards/ergodash/mini/mini.h index 74e5741706..d565c6168f 100644 --- a/keyboards/ergodash/mini/mini.h +++ b/keyboards/ergodash/mini/mini.h @@ -3,10 +3,8 @@ #include "ergodash.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -15,8 +13,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/ergodash/rev1/info.json b/keyboards/ergodash/rev1/info.json index bcfbda6d33..de8b0c070e 100644 --- a/keyboards/ergodash/rev1/info.json +++ b/keyboards/ergodash/rev1/info.json @@ -1,13 +1,366 @@ { - "keyboard_name": "ErgoDash rev2", - "url": "", - "maintainer": "qmk", - "width": 18, - "height": 6.25, - "layouts": { - "LAYOUT": { - "key_count": 70, - "layout": [{"label":"L00", "x":0, "y":0.375}, {"label":"L01", "x":1, "y":0.375}, {"label":"L02", "x":2, "y":0.125}, {"label":"L03", "x":3, "y":0}, {"label":"L04", "x":4, "y":0.125}, {"label":"L05", "x":5, "y":0.25}, {"label":"L06", "x":6, "y":0.75}, {"label":"R00", "x":11, "y":0.75}, {"label":"R01", "x":12, "y":0.25}, {"label":"R02", "x":13, "y":0.125}, {"label":"R03", "x":14, "y":0}, {"label":"R04", "x":15, "y":0.125}, {"label":"R05", "x":16, "y":0.375}, {"label":"R06", "x":17, "y":0.375}, {"label":"L10", "x":0, "y":1.375}, {"label":"L11", "x":1, "y":1.375}, {"label":"L12", "x":2, "y":1.125}, {"label":"L13", "x":3, "y":1}, {"label":"L14", "x":4, "y":1.125}, {"label":"L15", "x":5, "y":1.25}, {"label":"L16", "x":6, "y":1.75}, {"label":"R10", "x":11, "y":1.75}, {"label":"R11", "x":12, "y":1.25}, {"label":"R12", "x":13, "y":1.125}, {"label":"R13", "x":14, "y":1}, {"label":"R14", "x":15, "y":1.125}, {"label":"R15", "x":16, "y":1.375}, {"label":"R16", "x":17, "y":1.375}, {"label":"L20", "x":0, "y":2.375}, {"label":"L21", "x":1, "y":2.375}, {"label":"L22", "x":2, "y":2.125}, {"label":"L23", "x":3, "y":2}, {"label":"L24", "x":4, "y":2.125}, {"label":"L25", "x":5, "y":2.25}, {"label":"L26", "x":6, "y":2.75}, {"label":"R20", "x":11, "y":2.75}, {"label":"R21", "x":12, "y":2.25}, {"label":"R22", "x":13, "y":2.125}, {"label":"R23", "x":14, "y":2}, {"label":"R24", "x":15, "y":2.125}, {"label":"R25", "x":16, "y":2.375}, {"label":"R26", "x":17, "y":2.375}, {"label":"L30", "x":0, "y":3.375}, {"label":"L31", "x":1, "y":3.375}, {"label":"L32", "x":2, "y":3.125}, {"label":"L33", "x":3, "y":3}, {"label":"L34", "x":4, "y":3.125}, {"label":"L35", "x":5, "y":3.25}, {"label":"L36", "x":6.5, "y":4.25}, {"label":"R30", "x":10.5, "y":4.25}, {"label":"R31", "x":12, "y":3.25}, {"label":"R32", "x":13, "y":3.125}, {"label":"R33", "x":14, "y":3}, {"label":"R34", "x":15, "y":3.125}, {"label":"R35", "x":16, "y":3.375}, {"label":"R36", "x":17, "y":3.375}, {"label":"L40", "x":0, "y":4.375}, {"label":"L41", "x":1, "y":4.375}, {"label":"L42", "x":2, "y":4.125}, {"label":"L43", "x":3, "y":4}, {"label":"L44", "x":5.5, "y":5.25}, {"label":"L45", "x":6.5, "y":5.25}, {"label":"L46", "x":7.5, "y":4.25, "h":2}, {"label":"R40", "x":9.5, "y":4.25, "h":2}, {"label":"R41", "x":10.5, "y":5.25}, {"label":"R42", "x":11.5, "y":5.25}, {"label":"R43", "x":14, "y":4}, {"label":"R44", "x":15, "y":4.125}, {"label":"R45", "x":16, "y":4.375}, {"label":"R46", "x":17, "y":4.375}] + "keyboard_name": "ErgoDash rev1.2", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 8.375, + "layouts": { + "LAYOUT_4key": { + "layout": [ + {"y": 0.375, "x": 0.5, "label": "L00"}, + {"y": 0.375, "x": 1.5, "label": "L01"}, + {"y": 0.125, "x": 2.5, "label": "L02"}, + {"y": 0, "x": 3.5, "label": "L03"}, + {"y": 0.125, "x": 4.5, "label": "L04"}, + {"y": 0.25, "x": 5.5, "label": "L05"}, + {"y": 0.75, "x": 6.5, "label": "L06"}, + {"y": 0.75, "x": 12, "label": "R00"}, + {"y": 0.25, "x": 13, "label": "R01"}, + {"y": 0.125, "x": 14, "label": "R02"}, + {"y": 0, "x": 15, "label": "R03"}, + {"y": 0.125, "x": 16, "label": "R04"}, + {"y": 0.375, "x": 17, "label": "R05"}, + {"y": 0.375, "x": 18, "label": "R06"}, + {"y": 1.375, "x": 0.5, "label": "L10"}, + {"y": 1.375, "x": 1.5, "label": "L11"}, + {"y": 1.125, "x": 2.5, "label": "L12"}, + {"y": 1, "x": 3.5, "label": "L13"}, + {"y": 1.125, "x": 4.5, "label": "L14"}, + {"y": 1.25, "x": 5.5, "label": "L15"}, + {"y": 1.75, "x": 6.5, "label": "L16"}, + {"y": 1.75, "x": 12, "label": "R10"}, + {"y": 1.25, "x": 13, "label": "R11"}, + {"y": 1.125, "x": 14, "label": "R12"}, + {"y": 1, "x": 15, "label": "R13"}, + {"y": 1.125, "x": 16, "label": "R14"}, + {"y": 1.375, "x": 17, "label": "R15"}, + {"y": 1.375, "x": 18, "label": "R16"}, + {"y": 2.375, "x": 0.5, "label": "L20"}, + {"y": 2.375, "x": 1.5, "label": "L21"}, + {"y": 2.125, "x": 2.5, "label": "L22"}, + {"y": 2, "x": 3.5, "label": "L23"}, + {"y": 2.125, "x": 4.5, "label": "L24"}, + {"y": 2.25, "x": 5.5, "label": "L25"}, + {"y": 2.75, "x": 6.5, "label": "L26"}, + {"y": 2.75, "x": 12, "label": "R20"}, + {"y": 2.25, "x": 13, "label": "R21"}, + {"y": 2.125, "x": 14, "label": "R22"}, + {"y": 2, "x": 15, "label": "R23"}, + {"y": 2.125, "x": 16, "label": "R24"}, + {"y": 2.375, "x": 17, "label": "R25"}, + {"y": 2.375, "x": 18, "label": "R26"}, + {"y": 3.375, "x": 0.5, "label": "L30"}, + {"y": 3.375, "x": 1.5, "label": "L31"}, + {"y": 3.125, "x": 2.5, "label": "L32"}, + {"y": 3, "x": 3.5, "label": "L33"}, + {"y": 3.125, "x": 4.5, "label": "L34"}, + {"y": 3.25, "x": 5.5, "label": "L35"}, + {"y": 4, "x": 6.5, "label": "L36"}, + {"y": 4, "x": 12, "label": "R30"}, + {"y": 3.25, "x": 13, "label": "R31"}, + {"y": 3.125, "x": 14, "label": "R32"}, + {"y": 3, "x": 15, "label": "R33"}, + {"y": 3.125, "x": 16, "label": "R34"}, + {"y": 3.375, "x": 17, "label": "R35"}, + {"y": 3.375, "x": 18, "label": "R36"}, + {"y": 4.375, "x": 0.5, "label": "L40"}, + {"y": 4.375, "x": 1.5, "label": "L41"}, + {"y": 4.125, "x": 2.5, "label": "L42"}, + {"y": 4, "x": 3.5, "label": "L43"}, + {"y": 5, "x": 5.5, "label": "L44"}, + {"y": 5, "x": 6.5, "label": "L45"}, + {"h": 2, "y": 4, "x": 7.5, "label": "L46"}, + {"h": 2, "y": 4, "x": 11, "label": "R40"}, + {"y": 5, "x": 12, "label": "R41"}, + {"y": 5, "x": 13, "label": "R42"}, + {"y": 4, "x": 15, "label": "R43"}, + {"y": 4.125, "x": 16, "label": "R44"}, + {"y": 4.375, "x": 17, "label": "R45"}, + {"y": 4.375, "x": 18, "label": "R46"}] + }, + "LAYOUT_4key_2u_inner": { + "layout": [ + {"y": 0.375, "x": 0.5, "label": "L00"}, + {"y": 0.375, "x": 1.5, "label": "L01"}, + {"y": 0.125, "x": 2.5, "label": "L02"}, + {"y": 0, "x": 3.5, "label": "L03"}, + {"y": 0.125, "x": 4.5, "label": "L04"}, + {"y": 0.25, "x": 5.5, "label": "L05"}, + {"y": 0.75, "x": 6.5, "label": "L06"}, + {"y": 0.75, "x": 12, "label": "R00"}, + {"y": 0.25, "x": 13, "label": "R01"}, + {"y": 0.125, "x": 14, "label": "R02"}, + {"y": 0, "x": 15, "label": "R03"}, + {"y": 0.125, "x": 16, "label": "R04"}, + {"y": 0.375, "x": 17, "label": "R05"}, + {"y": 0.375, "x": 18, "label": "R06"}, + {"y": 1.375, "x": 0.5, "label": "L10"}, + {"y": 1.375, "x": 1.5, "label": "L11"}, + {"y": 1.125, "x": 2.5, "label": "L12"}, + {"y": 1, "x": 3.5, "label": "L13"}, + {"y": 1.125, "x": 4.5, "label": "L14"}, + {"y": 1.25, "x": 5.5, "label": "L15"}, + {"y": 1.75, "x": 6.5, "label": "L16"}, + {"y": 1.75, "x": 12, "label": "R10"}, + {"y": 1.25, "x": 13, "label": "R11"}, + {"y": 1.125, "x": 14, "label": "R12"}, + {"y": 1, "x": 15, "label": "R13"}, + {"y": 1.125, "x": 16, "label": "R14"}, + {"y": 1.375, "x": 17, "label": "R15"}, + {"y": 1.375, "x": 18, "label": "R16"}, + {"y": 2.375, "x": 0.5, "label": "L20"}, + {"y": 2.375, "x": 1.5, "label": "L21"}, + {"y": 2.125, "x": 2.5, "label": "L22"}, + {"y": 2, "x": 3.5, "label": "L23"}, + {"y": 2.125, "x": 4.5, "label": "L24"}, + {"y": 2.25, "x": 5.5, "label": "L25"}, + {"y": 2.75, "x": 6.5, "label": "L26"}, + {"y": 2.75, "x": 12, "label": "R20"}, + {"y": 2.25, "x": 13, "label": "R21"}, + {"y": 2.125, "x": 14, "label": "R22"}, + {"y": 2, "x": 15, "label": "R23"}, + {"y": 2.125, "x": 16, "label": "R24"}, + {"y": 2.375, "x": 17, "label": "R25"}, + {"y": 2.375, "x": 18, "label": "R26"}, + {"y": 3.375, "x": 0.5, "label": "L30"}, + {"y": 3.375, "x": 1.5, "label": "L31"}, + {"y": 3.125, "x": 2.5, "label": "L32"}, + {"y": 3, "x": 3.5, "label": "L33"}, + {"y": 3.125, "x": 4.5, "label": "L34"}, + {"y": 3.25, "x": 5.5, "label": "L35"}, + {"y": 4, "x": 7.5, "label": "L36"}, + {"y": 4, "x": 11, "label": "R30"}, + {"y": 3.25, "x": 13, "label": "R31"}, + {"y": 3.125, "x": 14, "label": "R32"}, + {"y": 3, "x": 15, "label": "R33"}, + {"y": 3.125, "x": 16, "label": "R34"}, + {"y": 3.375, "x": 17, "label": "R35"}, + {"y": 3.375, "x": 18, "label": "R36"}, + {"y": 4.375, "x": 0.5, "label": "L40"}, + {"y": 4.375, "x": 1.5, "label": "L41"}, + {"y": 4.125, "x": 2.5, "label": "L42"}, + {"y": 4, "x": 3.5, "label": "L43"}, + {"y": 5, "x": 5.5, "label": "L44"}, + {"h": 2, "y": 4, "x": 6.5, "label": "L45"}, + {"y": 5, "x": 7.5, "label": "L46"}, + {"y": 5, "x": 11, "label": "R40"}, + {"h": 2, "y": 4, "x": 12, "label": "R41"}, + {"y": 5, "x": 13, "label": "R42"}, + {"y": 4, "x": 15, "label": "R43"}, + {"y": 4.125, "x": 16, "label": "R44"}, + {"y": 4.375, "x": 17, "label": "R45"}, + {"y": 4.375, "x": 18, "label": "R46"}] + }, + "LAYOUT_3key_2us": { + "layout": [ + {"y": 0.375, "x": 0.5, "label": "L00"}, + {"y": 0.375, "x": 1.5, "label": "L01"}, + {"y": 0.125, "x": 2.5, "label": "L02"}, + {"y": 0, "x": 3.5, "label": "L03"}, + {"y": 0.125, "x": 4.5, "label": "L04"}, + {"y": 0.25, "x": 5.5, "label": "L05"}, + {"y": 0.75, "x": 6.5, "label": "L06"}, + {"y": 0.75, "x": 12, "label": "R00"}, + {"y": 0.25, "x": 13, "label": "R01"}, + {"y": 0.125, "x": 14, "label": "R02"}, + {"y": 0, "x": 15, "label": "R03"}, + {"y": 0.125, "x": 16, "label": "R04"}, + {"y": 0.375, "x": 17, "label": "R05"}, + {"y": 0.375, "x": 18, "label": "R06"}, + {"y": 1.375, "x": 0.5, "label": "L10"}, + {"y": 1.375, "x": 1.5, "label": "L11"}, + {"y": 1.125, "x": 2.5, "label": "L12"}, + {"y": 1, "x": 3.5, "label": "L13"}, + {"y": 1.125, "x": 4.5, "label": "L14"}, + {"y": 1.25, "x": 5.5, "label": "L15"}, + {"y": 1.75, "x": 6.5, "label": "L16"}, + {"y": 1.75, "x": 12, "label": "R10"}, + {"y": 1.25, "x": 13, "label": "R11"}, + {"y": 1.125, "x": 14, "label": "R12"}, + {"y": 1, "x": 15, "label": "R13"}, + {"y": 1.125, "x": 16, "label": "R14"}, + {"y": 1.375, "x": 17, "label": "R15"}, + {"y": 1.375, "x": 18, "label": "R16"}, + {"y": 2.375, "x": 0.5, "label": "L20"}, + {"y": 2.375, "x": 1.5, "label": "L21"}, + {"y": 2.125, "x": 2.5, "label": "L22"}, + {"y": 2, "x": 3.5, "label": "L23"}, + {"y": 2.125, "x": 4.5, "label": "L24"}, + {"y": 2.25, "x": 5.5, "label": "L25"}, + {"y": 2.75, "x": 6.5, "label": "L26"}, + {"y": 2.75, "x": 12, "label": "R20"}, + {"y": 2.25, "x": 13, "label": "R21"}, + {"y": 2.125, "x": 14, "label": "R22"}, + {"y": 2, "x": 15, "label": "R23"}, + {"y": 2.125, "x": 16, "label": "R24"}, + {"y": 2.375, "x": 17, "label": "R25"}, + {"y": 2.375, "x": 18, "label": "R26"}, + {"y": 3.375, "x": 0.5, "label": "L30"}, + {"y": 3.375, "x": 1.5, "label": "L31"}, + {"y": 3.125, "x": 2.5, "label": "L32"}, + {"y": 3, "x": 3.5, "label": "L33"}, + {"y": 3.125, "x": 4.5, "label": "L34"}, + {"y": 3.25, "x": 5.5, "label": "L35"}, + {"y": 3.25, "x": 13, "label": "R31"}, + {"y": 3.125, "x": 14, "label": "R32"}, + {"y": 3, "x": 15, "label": "R33"}, + {"y": 3.125, "x": 16, "label": "R34"}, + {"y": 3.375, "x": 17, "label": "R35"}, + {"y": 3.375, "x": 18, "label": "R36"}, + {"y": 4.375, "x": 0.5, "label": "L40"}, + {"y": 4.375, "x": 1.5, "label": "L41"}, + {"y": 4.125, "x": 2.5, "label": "L42"}, + {"y": 4, "x": 3.5, "label": "L43"}, + {"y": 5, "x": 5.5, "label": "L44"}, + {"h": 2, "y": 4, "x": 6.5, "label": "L45"}, + {"h": 2, "y": 4, "x": 7.5, "label": "L46"}, + {"h": 2, "y": 4, "x": 11, "label": "R40"}, + {"h": 2, "y": 4, "x": 12, "label": "R41"}, + {"y": 5, "x": 13, "label": "R42"}, + {"y": 4, "x": 15, "label": "R43"}, + {"y": 4.125, "x": 16, "label": "R44"}, + {"y": 4.375, "x": 17, "label": "R45"}, + {"y": 4.375, "x": 18, "label": "R46"}] + }, + "LAYOUT_3key_1us": { + "layout": [ + {"y": 0.375, "x": 0.5, "label": "L00"}, + {"y": 0.375, "x": 1.5, "label": "L01"}, + {"y": 0.125, "x": 2.5, "label": "L02"}, + {"y": 0, "x": 3.5, "label": "L03"}, + {"y": 0.125, "x": 4.5, "label": "L04"}, + {"y": 0.25, "x": 5.5, "label": "L05"}, + {"y": 0.75, "x": 6.5, "label": "L06"}, + {"y": 0.75, "x": 12, "label": "R00"}, + {"y": 0.25, "x": 13, "label": "R01"}, + {"y": 0.125, "x": 14, "label": "R02"}, + {"y": 0, "x": 15, "label": "R03"}, + {"y": 0.125, "x": 16, "label": "R04"}, + {"y": 0.375, "x": 17, "label": "R05"}, + {"y": 0.375, "x": 18, "label": "R06"}, + {"y": 1.375, "x": 0.5, "label": "L10"}, + {"y": 1.375, "x": 1.5, "label": "L11"}, + {"y": 1.125, "x": 2.5, "label": "L12"}, + {"y": 1, "x": 3.5, "label": "L13"}, + {"y": 1.125, "x": 4.5, "label": "L14"}, + {"y": 1.25, "x": 5.5, "label": "L15"}, + {"y": 1.75, "x": 6.5, "label": "L16"}, + {"y": 1.75, "x": 12, "label": "R10"}, + {"y": 1.25, "x": 13, "label": "R11"}, + {"y": 1.125, "x": 14, "label": "R12"}, + {"y": 1, "x": 15, "label": "R13"}, + {"y": 1.125, "x": 16, "label": "R14"}, + {"y": 1.375, "x": 17, "label": "R15"}, + {"y": 1.375, "x": 18, "label": "R16"}, + {"y": 2.375, "x": 0.5, "label": "L20"}, + {"y": 2.375, "x": 1.5, "label": "L21"}, + {"y": 2.125, "x": 2.5, "label": "L22"}, + {"y": 2, "x": 3.5, "label": "L23"}, + {"y": 2.125, "x": 4.5, "label": "L24"}, + {"y": 2.25, "x": 5.5, "label": "L25"}, + {"y": 2.75, "x": 6.5, "label": "L26"}, + {"y": 2.75, "x": 12, "label": "R20"}, + {"y": 2.25, "x": 13, "label": "R21"}, + {"y": 2.125, "x": 14, "label": "R22"}, + {"y": 2, "x": 15, "label": "R23"}, + {"y": 2.125, "x": 16, "label": "R24"}, + {"y": 2.375, "x": 17, "label": "R25"}, + {"y": 2.375, "x": 18, "label": "R26"}, + {"y": 3.375, "x": 0.5, "label": "L30"}, + {"y": 3.375, "x": 1.5, "label": "L31"}, + {"y": 3.125, "x": 2.5, "label": "L32"}, + {"y": 3, "x": 3.5, "label": "L33"}, + {"y": 3.125, "x": 4.5, "label": "L34"}, + {"y": 3.25, "x": 5.5, "label": "L35"}, + {"y": 4, "x": 6.5, "label": "L36"}, + {"y": 4, "x": 12, "label": "R30"}, + {"y": 3.25, "x": 13, "label": "R31"}, + {"y": 3.125, "x": 14, "label": "R32"}, + {"y": 3, "x": 15, "label": "R33"}, + {"y": 3.125, "x": 16, "label": "R34"}, + {"y": 3.375, "x": 17, "label": "R35"}, + {"y": 3.375, "x": 18, "label": "R36"}, + {"y": 4.375, "x": 0.5, "label": "L40"}, + {"y": 4.375, "x": 1.5, "label": "L41"}, + {"y": 4.125, "x": 2.5, "label": "L42"}, + {"y": 4, "x": 3.5, "label": "L43"}, + {"y": 5, "x": 5.5, "label": "L44"}, + {"y": 5, "x": 6.5, "label": "L45"}, + {"y": 5, "x": 12, "label": "R41"}, + {"y": 5, "x": 13, "label": "R42"}, + {"y": 4, "x": 15, "label": "R43"}, + {"y": 4.125, "x": 16, "label": "R44"}, + {"y": 4.375, "x": 17, "label": "R45"}, + {"y": 4.375, "x": 18, "label": "R46"}] + }, + "LAYOUT_2key": { + "layout": [ + {"y": 0.375, "x": 0.5, "label": "L00"}, + {"y": 0.375, "x": 1.5, "label": "L01"}, + {"y": 0.125, "x": 2.5, "label": "L02"}, + {"y": 0, "x": 3.5, "label": "L03"}, + {"y": 0.125, "x": 4.5, "label": "L04"}, + {"y": 0.25, "x": 5.5, "label": "L05"}, + {"y": 0.75, "x": 6.5, "label": "L06"}, + {"y": 0.75, "x": 12, "label": "R00"}, + {"y": 0.25, "x": 13, "label": "R01"}, + {"y": 0.125, "x": 14, "label": "R02"}, + {"y": 0, "x": 15, "label": "R03"}, + {"y": 0.125, "x": 16, "label": "R04"}, + {"y": 0.375, "x": 17, "label": "R05"}, + {"y": 0.375, "x": 18, "label": "R06"}, + {"y": 1.375, "x": 0.5, "label": "L10"}, + {"y": 1.375, "x": 1.5, "label": "L11"}, + {"y": 1.125, "x": 2.5, "label": "L12"}, + {"y": 1, "x": 3.5, "label": "L13"}, + {"y": 1.125, "x": 4.5, "label": "L14"}, + {"y": 1.25, "x": 5.5, "label": "L15"}, + {"y": 1.75, "x": 6.5, "label": "L16"}, + {"y": 1.75, "x": 12, "label": "R10"}, + {"y": 1.25, "x": 13, "label": "R11"}, + {"y": 1.125, "x": 14, "label": "R12"}, + {"y": 1, "x": 15, "label": "R13"}, + {"y": 1.125, "x": 16, "label": "R14"}, + {"y": 1.375, "x": 17, "label": "R15"}, + {"y": 1.375, "x": 18, "label": "R16"}, + {"y": 2.375, "x": 0.5, "label": "L20"}, + {"y": 2.375, "x": 1.5, "label": "L21"}, + {"y": 2.125, "x": 2.5, "label": "L22"}, + {"y": 2, "x": 3.5, "label": "L23"}, + {"y": 2.125, "x": 4.5, "label": "L24"}, + {"y": 2.25, "x": 5.5, "label": "L25"}, + {"y": 2.75, "x": 6.5, "label": "L26"}, + {"y": 2.75, "x": 12, "label": "R20"}, + {"y": 2.25, "x": 13, "label": "R21"}, + {"y": 2.125, "x": 14, "label": "R22"}, + {"y": 2, "x": 15, "label": "R23"}, + {"y": 2.125, "x": 16, "label": "R24"}, + {"y": 2.375, "x": 17, "label": "R25"}, + {"y": 2.375, "x": 18, "label": "R26"}, + {"y": 3.375, "x": 0.5, "label": "L30"}, + {"y": 3.375, "x": 1.5, "label": "L31"}, + {"y": 3.125, "x": 2.5, "label": "L32"}, + {"y": 3, "x": 3.5, "label": "L33"}, + {"y": 3.125, "x": 4.5, "label": "L34"}, + {"y": 3.25, "x": 5.5, "label": "L35"}, + {"y": 3.25, "x": 13, "label": "R31"}, + {"y": 3.125, "x": 14, "label": "R32"}, + {"y": 3, "x": 15, "label": "R33"}, + {"y": 3.125, "x": 16, "label": "R34"}, + {"y": 3.375, "x": 17, "label": "R35"}, + {"y": 3.375, "x": 18, "label": "R36"}, + {"y": 4.375, "x": 0.5, "label": "L40"}, + {"y": 4.375, "x": 1.5, "label": "L41"}, + {"y": 4.125, "x": 2.5, "label": "L42"}, + {"y": 4, "x": 3.5, "label": "L43"}, + {"y": 5, "x": 5.5, "label": "L44"}, + {"h": 2, "y": 4, "x": 6.5, "label": "L45"}, + {"h": 2, "y": 4, "x": 12, "label": "R41"}, + {"y": 5, "x": 13, "label": "R42"}, + {"y": 4, "x": 15, "label": "R43"}, + {"y": 4.125, "x": 16, "label": "R44"}, + {"y": 4.375, "x": 17, "label": "R45"}, + {"y": 4.375, "x": 18, "label": "R46"}] + } } - } } diff --git a/keyboards/ergodash/rev1/keymaps/default/keymap.c b/keyboards/ergodash/rev1/keymaps/default/keymap.c index 6153998748..0c9159497a 100644 --- a/keyboards/ergodash/rev1/keymaps/default/keymap.c +++ b/keyboards/ergodash/rev1/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keymap.c b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keymap.c index 7a7985f75f..ea79ae194b 100644 --- a/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keymap.c +++ b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keymap.c @@ -1,17 +1,15 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 16 - enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, + LOWER = SAFE_RANGE, RAISE, - ADJUST, +}; + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -29,12 +27,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | \ | ALt | Ctrl |||||||| Lower| Space| LGui|||||||| Enter| Space| Raise|||||||| Left | Down | Up | Right| * ,----------------------------------------------------------------------------------------------------------------------. */ - [_QWERTY] = LAYOUT( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \ - RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, 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_DEL, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_GRV,KC_BSLS, KC_LALT, KC_LCTL, LOWER, KC_SPC,KC_LGUI, KC_ENT ,KC_SPC , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, + RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, 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_DEL, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_GRV,KC_BSLS, KC_LALT, KC_LCTL, LOWER, KC_SPC,KC_LGUI, KC_ENT ,KC_SPC , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -51,11 +49,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,----------------------------------------------------------------------------------------------------------------------. */ [_LOWER] = LAYOUT( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \ - XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ - XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), /* Raise @@ -72,11 +70,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,----------------------------------------------------------------------------------------------------------------------. */ [_RAISE] = LAYOUT( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RAISE, KC_HOME,KC_PGDOWN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ - XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RAISE, KC_HOME,KC_PGDOWN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), /* Adjust (Both Raise and Lower Together) @@ -93,11 +91,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,----------------------------------------------------------------------------------------------------------------------. */ [_ADJUST] = LAYOUT( - RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ - XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ) }; @@ -112,7 +110,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } return false; - break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); @@ -122,15 +119,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; } return true; } diff --git a/keyboards/ergodash/rev1/keymaps/m47ch4n/config.h b/keyboards/ergodash/rev1/keymaps/m47ch4n/config.h new file mode 100644 index 0000000000..df04873a97 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/m47ch4n/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c b/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c new file mode 100644 index 0000000000..4d1d0131f5 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c @@ -0,0 +1,219 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +// clang-format off +enum layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +enum custom_keycodes { JP = SAFE_RANGE, US, SHIFT, LOWER, RAISE, ADJUST, + CSTM_0, CSTM_1, CSTM_2, CSTM_3, CSTM_4, CSTM_5, CSTM_6, CSTM_7, CSTM_8, CSTM_9, + CIRC, AT, LBRC, RBRC, BSLS, AMPR, QUOT, LPRN, RPRN, EQL, TILD, PIPE, GRV, LCBR, + PLUS, ASTR, RCBR, UNDS, MINS, SCLN, COMM, DOT, SLSH, EXLM, HASH, DLR, PERC, DEL }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,----------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | ZKHK | | ZKHK | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | MHEN | |HENKAN| Y | U | I | O | P | \ | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | CTRL | A | S | D | F | G | EISU | <- ONLY FOR MAC -> | KANA | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | SHIFT| Z | X | C | V | B | SHIFT| | SHIFT| N | M | , | . | / | SHIFT| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | SHIFT|ADJUST| ALT | GUI |||||||| LOWER| SPACE| |||||||| | ENTER| RAISE|||||||| GUI | ALT |ADJUST| SHIFT| + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_QWERTY] = LAYOUT( \ + KC_ESC, CSTM_1, CSTM_2, CSTM_3, CSTM_4, CSTM_5, JP_KANA, JP_KANA, CSTM_6, CSTM_7, CSTM_8, CSTM_9, CSTM_0, GRV , \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, JP_MHEN, JP_HENK, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS , \ + KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, JP_MEISU, JP_MKANA,KC_H, KC_J, KC_K, KC_L, SCLN, QUOT , \ + SHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SHIFT , SHIFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFT , \ + SHIFT, ADJUST, KC_LALT, KC_LCTL, LOWER, KC_SPC ,XXXXXXX, XXXXXXX,KC_ENT , RAISE, KC_LCTL, KC_LALT, ADJUST, SHIFT \ + ), + + /* Lower + * ,----------------------------------------------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | |||||||||||||||||||||| - | _ | | | | + | = | [ | ] |||||||| | + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| | ESC | |||||||| | BKSP | |||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_LOWER] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + TILD, EXLM, AT, HASH, DLR, PERC, _______, _______, CIRC, AMPR, ASTR, LPRN, RPRN, PIPE , \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0 , _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, MINS, UNDS, _______, _______, PLUS, EQL, LBRC, RBRC, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, KC_ESC ,_______, _______,KC_BSPC, _______, _______, _______, _______, _______ \ + ), + + /* Raise + * ,----------------------------------------------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | |||||||| [ | ] | - | _ | | | | + | = |||||||||||||||||||||| | + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| | ESC | |||||||| | BKSP | |||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_RAISE] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + TILD, EXLM, AT, HASH, DLR, PERC, _______, _______, CIRC, AMPR, ASTR, LPRN, RPRN, PIPE , \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0 , _______, \ + _______, XXXXXXX, LBRC, RBRC, MINS, UNDS, _______, _______, PLUS, EQL, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, KC_ESC ,_______, _______,KC_BSPC, _______, _______, _______, _______, _______ \ + ), + + /* Adjust + * ,----------------------------------------------------------------------------------------------------------------------. + * | | | | | | | US | | JP | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | HOME |PAGEDN|PAGEUP| END |||||||| | | | LEFT | DOWN | UP | RIGHT|||||||| | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | | | { | } | | | | | | | | { | } | | | + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| | | |||||||| | | |||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, US , JP, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, \ + _______, _______, LCBR, RCBR, _______, _______, _______, _______, _______, _______, LCBR, RCBR, _______, _______, \ + _______, _______, _______, _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, _______ \ + )}; +// clang-format on + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +#define JP_LAYOUT true +#define US_LAYOUT false + +#ifdef MASTER_LEFT +bool LAYOUT_STATUS = US_LAYOUT; +#else +bool LAYOUT_STATUS = JP_LAYOUT; +#endif + +bool SHIFT_PRESSED = false; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +#define SEND_STRING_RESTORE(STR) (SHIFT_PRESSED ? SEND_STRING(STR SS_DOWN(X_LSHIFT)) : SEND_STRING(STR SS_UP(X_LSHIFT))) + +#define KEY(CODE) (record->event.pressed ? SEND_STRING(SS_DOWN(X_##CODE)) : SEND_STRING_RESTORE(SS_UP(X_##CODE))) + +#define KEY_SHIFT(CODE) (record->event.pressed ? SEND_STRING(SS_DOWN(X_LSHIFT) SS_DOWN(X_##CODE)) : SEND_STRING_RESTORE(SS_UP(X_##CODE))) + +#define KEY_UPSHIFT(CODE) (record->event.pressed ? SEND_STRING(SS_UP(X_LSHIFT) SS_DOWN(X_##CODE)) : SEND_STRING_RESTORE(SS_UP(X_##CODE))) + +#define SHIFT_DU(CODE_DOWN, CODE_UP) (SHIFT_PRESSED ? CODE_DOWN : CODE_UP) +#define CASE_US(CODE, US, JP) \ + case CODE: \ + (LAYOUT_STATUS == JP_LAYOUT ? JP : US); \ + return false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + CASE_US(CSTM_0, KEY(0), SHIFT_DU(KEY_SHIFT(9), KEY(0))); + CASE_US(CSTM_1, KEY(1), KEY(1)); + CASE_US(CSTM_2, KEY(2), SHIFT_DU(KEY_UPSHIFT(LBRACKET), KEY(2))); + CASE_US(CSTM_3, KEY(3), KEY(3)); + CASE_US(CSTM_4, KEY(4), KEY(4)); + CASE_US(CSTM_5, KEY(5), KEY(5)); + CASE_US(CSTM_6, KEY(6), SHIFT_DU(KEY_UPSHIFT(EQUAL), KEY(6))); + CASE_US(CSTM_7, KEY(7), SHIFT_DU(KEY_SHIFT(6), KEY(7))); + CASE_US(CSTM_8, KEY(8), SHIFT_DU(KEY_SHIFT(QUOTE), KEY(8))); + CASE_US(CSTM_9, KEY(9), SHIFT_DU(KEY_SHIFT(8), KEY(9))); + CASE_US(DEL, KEY(DELETE), KEY_UPSHIFT(BSPACE)); + CASE_US(TILD, KEY_SHIFT(GRAVE), KEY_SHIFT(EQUAL)); + CASE_US(EXLM, KEY_SHIFT(1), KEY_SHIFT(1)); + CASE_US(AT, KEY_SHIFT(2), KEY(LBRACKET)); + CASE_US(HASH, KEY_SHIFT(3), KEY_SHIFT(3)); + CASE_US(DLR, KEY_SHIFT(4), KEY_SHIFT(4)); + CASE_US(PERC, KEY_SHIFT(5), KEY_SHIFT(5)); + CASE_US(CIRC, KEY_SHIFT(6), KEY(EQUAL)); + CASE_US(AMPR, KEY_SHIFT(7), KEY_SHIFT(6)); + CASE_US(ASTR, KEY_SHIFT(8), KEY_SHIFT(QUOTE)); + CASE_US(LPRN, KEY_SHIFT(9), KEY_SHIFT(8)); + CASE_US(RPRN, KEY_SHIFT(0), KEY_SHIFT(9)); + CASE_US(LBRC, KEY(LBRACKET), SHIFT_DU(KEY_SHIFT(RBRACKET), KEY(RBRACKET))); + CASE_US(RBRC, KEY(RBRACKET), SHIFT_DU(KEY_SHIFT(NONUS_HASH), KEY(NONUS_HASH))); + CASE_US(LCBR, KEY_SHIFT(LBRACKET), KEY_SHIFT(RBRACKET)); + CASE_US(RCBR, KEY_SHIFT(RBRACKET), KEY_SHIFT(NONUS_HASH)); + CASE_US(GRV, KEY(GRAVE), SHIFT_DU(KEY_SHIFT(EQUAL), KEY_SHIFT(LBRACKET))); + CASE_US(BSLS, KEY(BSLASH), SHIFT_DU(KEY_SHIFT(INT3), KEY(INT3))); + CASE_US(PIPE, KEY_SHIFT(BSLASH), KEY_SHIFT(INT3)); + CASE_US(MINS, KEY(MINUS), SHIFT_DU(KEY_SHIFT(INT1), KEY(MINUS))); + CASE_US(UNDS, KEY_SHIFT(MINUS), KEY_SHIFT(INT1)); + CASE_US(EQL, KEY(EQUAL), SHIFT_DU(KEY_SHIFT(SCOLON), KEY_SHIFT(MINUS))); + CASE_US(PLUS, KEY_SHIFT(EQUAL), KEY_SHIFT(SCOLON)); + CASE_US(SCLN, KEY(SCOLON), SHIFT_DU(KEY_UPSHIFT(QUOTE), KEY(SCOLON))); + CASE_US(QUOT, KEY(QUOTE), SHIFT_DU(KEY_SHIFT(2), KEY_SHIFT(7))); + case JP: + if (record->event.pressed) { + LAYOUT_STATUS = JP_LAYOUT; + } + return false; + break; + case US: + if (record->event.pressed) { + LAYOUT_STATUS = US_LAYOUT; + } + return false; + break; + case SHIFT: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LSHIFT)); + SHIFT_PRESSED = true; + } else { + SEND_STRING(SS_UP(X_LSHIFT)); + SHIFT_PRESSED = false; + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/ergodash/rev1/keymaps/m47ch4n/m47ch4ns_keymap.json b/keyboards/ergodash/rev1/keymaps/m47ch4n/m47ch4ns_keymap.json new file mode 100644 index 0000000000..1f5eee6014 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/m47ch4n/m47ch4ns_keymap.json @@ -0,0 +1 @@ +{"keyboard":"ergodash/rev1","keymap":"m47ch4ns_keymap","layout":"LAYOUT_3key_1us","layers":[["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_NO","KC_NO","KC_6","KC_7","KC_8","KC_9","KC_0","KC_GRV","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_NO","KC_NO","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSLS","KC_LCTL","KC_A","KC_S","KC_D","KC_F","KC_G","KC_NO","KC_NO","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_LSFT","KC_RSFT","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","KC_LSFT","ANY(ADJUST)","KC_LALT","KC_LGUI","ANY(LOWER)","KC_SPC","KC_ENT","ANY(RAISE)","KC_RGUI","KC_RALT","ANY(ADJUST)","KC_RSFT"],["KC_F11","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_TRNS","KC_TRNS","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F12","KC_TRNS","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_TRNS","KC_TRNS","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_PIPE","KC_TRNS","KC_1","KC_2","KC_3","KC_4","KC_5","KC_TRNS","KC_TRNS","KC_6","KC_7","KC_8","KC_9","KC_0","KC_TRNS","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_MINS","KC_UNDS","KC_TRNS","KC_TRNS","KC_PLUS","KC_EQL","KC_LBRC","KC_RBRC","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_ESC","KC_BSPC","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],["KC_F11","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_TRNS","KC_TRNS","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F12","KC_TRNS","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_TRNS","KC_TRNS","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_PIPE","KC_TRNS","KC_1","KC_2","KC_3","KC_4","KC_5","KC_TRNS","KC_TRNS","KC_6","KC_7","KC_8","KC_9","KC_0","KC_TRNS","KC_TRNS","KC_NO","KC_LBRC","KC_RBRC","KC_MINS","KC_UNDS","KC_TRNS","KC_TRNS","KC_PLUS","KC_EQL","KC_NO","KC_NO","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_ESC","KC_BSPC","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_HOME","KC_PGDN","KC_PGUP","KC_END","KC_TRNS","KC_TRNS","KC_TRNS","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LCBR","KC_RCBR","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"]],"author":"","notes":""} \ No newline at end of file diff --git a/keyboards/ergodash/rev1/keymaps/m47ch4n/readme.md b/keyboards/ergodash/rev1/keymaps/m47ch4n/readme.md new file mode 100644 index 0000000000..598f258e1c --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/m47ch4n/readme.md @@ -0,0 +1,73 @@ +# m47ch4n's keymap for Ergodash rev1 + +This is the m47ch4n's keymap configuration for Ergodash rev1. +There are four layers, QWERTY(default), LOWER, RAISE and ADJSUT. + +## Layers + +### Qwerty + +``` +,----------------------------------------------------------------------------------------------------------------------. +| ESC | 1 | 2 | 3 | 4 | 5 | ZKHK | | ZKHK | 6 | 7 | 8 | 9 | 0 | ` | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| TAB | Q | W | E | R | T | MHEN | |HENKAN| Y | U | I | O | P | \ | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| CTRL | A | S | D | F | G | EISU |<-- ONLY FOR MAC -->| KANA | H | J | K | L | ; | ' | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| SHIFT| Z | X | C | V | B | SHIFT| | SHIFT| N | M | , | . | / | SHIFT| +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| SHIFT|ADJUST| ALT | GUI |||||||| LOWER| SPACE| |||||||| | ENTER| RAISE|||||||| GUI | ALT |ADJUST| SHIFT| +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Lower + +``` +,----------------------------------------------------------------------------------------------------------------------. +| F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| |||||||||||||||||||||| - | _ | | | | + | = | [ | ] |||||||| | +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| | | | |||||||| | ESC | |||||||| | BKSP | |||||||| | | | | +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Raise + +``` +,----------------------------------------------------------------------------------------------------------------------. +| F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| |||||||| [ | ] | - | _ | | | | + | = |||||||||||||||||||||| | +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| | | | |||||||| | ESC | |||||||| | BKSP | |||||||| | | | | +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Adjust + +``` +,----------------------------------------------------------------------------------------------------------------------. +| | | | | | | US | | JP | | | | | | | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | | | | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| | HOME |PAGEDN|PAGEUP| END |||||||| | | | LEFT | DOWN | UP | RIGHT|||||||| | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| | | { | } | | | | | | | | { | } | | | +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| | | | |||||||| | | |||||||| | | |||||||| | | | | +,----------------------------------------------------------------------------------------------------------------------. +``` + +If your pc connect this keyboard with JIS(JP) layout, you should press JP MODE key. + diff --git a/keyboards/ergodash/rev1/keymaps/m47ch4n/rules.mk b/keyboards/ergodash/rev1/keymaps/m47ch4n/rules.mk new file mode 100644 index 0000000000..bb9e33b082 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/m47ch4n/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h b/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h new file mode 100644 index 0000000000..1005c48046 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h @@ -0,0 +1,67 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +//#define MASTER_LEFT +#define MASTER_RIGHT /* Cable connected to the right split keyboard */ +// #define EE_HANDS + +#define AUTO_SHIFT_TIMEOUT 210 + +#define TAPPING_TERM_PER_KEY + +// https://beta.docs.qmk.fm/features/feature_leader_key +//#define LEADER_PER_KEY_TIMING +//#define LEADER_TIMEOUT 280 + +// https://docs.qmk.fm/#/feature_mouse_keys +#define MK_3_SPEED // Constant Speed Mode + +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MK_C_OFFSET_0 4 +#define MK_C_INTERVAL_0 28 +#define MK_C_OFFSET_1 8 +#define MK_C_INTERVAL_1 16 +#define MK_C_OFFSET_2 20 +#define MK_C_INTERVAL_2 16 + +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#define MK_W_OFFSET_0 1 +#define MK_W_INTERVAL_0 120 +#define MK_W_OFFSET_1 1 +#define MK_W_INTERVAL_1 100 +#define MK_W_OFFSET_2 1 +#define MK_W_INTERVAL_2 60 + +//#define STARTUP_RESET_EEPROM // EMERGENCY + diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c b/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c new file mode 100644 index 0000000000..1d51227ccf --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c @@ -0,0 +1,157 @@ +#include QMK_KEYBOARD_H +#include "yet-another-developer.h" + +#ifndef UNICODE_ENABLE +# define UC(x) KC_NO +#endif + +extern keymap_config_t keymap_config; + +#define EISU LALT(KC_GRV) + +#define LAYOUT_ergodash_pretty_wrapper(...) LAYOUT_ergodash_pretty(__VA_ARGS__) + + /* Keymap: BASE layer + * + * ,----------------------------------------------------. ,----------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | Pscree | + * |--------+--------+------+------+------+-------------| |------+------+------+------+------+--------+--------| + * | ` | K01 | K02 | K03 | K04 | K05 | - | | = | K06 | K07 | K08 | K09 | K0A | \ | + * |--------+--------+------+------+------+------|------| |------|------+------+------+------+--------+--------| + * | Tab | K11 | K12 | K13 | K14 | K15 | { | | } | K16 | K17 | K18 | K19 | K1A | " | + * |--------+--------+------+------+------+------|------' `------|------+------+------+------+--------+--------| + * | LShift | K21 | K22 | K23 | K24 | K25 | | K26 | K27 | K28 | K29 | K2A | RShift | + * |--------+--------+------+------+------+------' `------+------+------+------+--------+--------| + * | LCtrl | GUI | Alt | Alt | | LEFT | DOWN | UP | RIGHT | + * `-------------------------------' `-------------------------------' + * ,--------------. ,--------------. + * | Lower| | | | Raise | + * ,-------| / | Del | | Bksp + / +-------. + * |CMD/Spc| Space| | | | Enter |CMD/Spc| + * `----------------------' `----------------------' + */ +#define LAYOUT_ergodash_pretty_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_ergodash_pretty_wrapper( \ + KC_ESC, ________________NUMBER_LEFT________________, KC_LBRC, KC_RBRC, ________________NUMBER_RIGHT_______________, KC_PSCR, \ + KC_GRV, K01, K02, K03, K04, K05, KC_MINS, KC_EQL, K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_TAB, K11, K12, K13, K14, K15, KC_LCBR, KC_RCBR, K16, K17, K18, K19, K1A, KC_QUOT, \ + OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \ + LT(_LOWER, KC_SPC), LT(_RAISE, KC_ENT), \ + OS_LGUI,LT(_LOWER, KC_SPC),KC_DEL, KC_BSPC, LT(_RAISE, KC_ENT), OS_RGUI \ + ) + +#define LAYOUT_ergodash_pretty_base_wrapper(...) LAYOUT_ergodash_pretty_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_ergodash_pretty_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + +/* Keymap: COLEMAK layer + * + * ,----------------------------------------------------. ,----------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | - | + * |--------+--------+------+------+------+-------------| |------+------+------+------+------+--------+--------| + * | ` | Q | W | F | P | G | - | | = | J | L | U | Y | ; | \ | + * |--------+--------+------+------+------+------|------| |------|------+------+------+------+--------+--------| + * | Tab | A | R | S | T | D | Del | | Bksp | H | N | E | I | O | ' | + * |--------+--------+------+------+------+------|------' `------|------+------+------+------+--------+--------| + * | LShift | Z | X | C | V | B | | K | M | , < | . > | / | RShift | + * |--------+--------+------+------+------+------' `------+------+------+------+--------+--------| + * | Ctrl | GUI | Alt | EISU | | LEFT | DOWN | UP | RIGHT | + * `-------------------------------' `-------------------------------' + * ,--------------. ,--------------. + * | Lower| | | | Raise | + * ,-------| / | Del | | Bksp + / +-------. + * |CMD/Spc| Space| | | | Enter |CMD/Spc| + * `----------------------' `----------------------' + */ + + +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* + [_COLEMAK] = LAYOUT_ergodash_pretty_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_ergodash_pretty_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_ergodash_pretty_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + +#ifdef UNICODEMAP_ENABLE + [_UNICODE] = LAYOUT_ergodash_pretty_base_wrapper( + _______________UNICODE_L1__________________, _______________UNICODE_R1__________________, + _______________UNICODE_L2__________________, _______________UNICODE_R2__________________, + _______________UNICODE_L3__________________, _______________UNICODE_R3__________________ + ), +#endif + + [_LOWER] = LAYOUT_ergodash_pretty_wrapper( + KC_F11, _________________FUNC_LEFT_________________, KC_RST , KC_RST , _________________FUNC_RIGHT________________, KC_F12, + KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE, + _______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_DQUO, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, KC_PAUS, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_ergodash_pretty_wrapper( + KC_F12, _________________FUNC_LEFT_________________, KC_RST, KC_RST , _________________FUNC_RIGHT________________, KC_F11, + KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS, + _______, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_QUOT, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, KC_PSCR, + _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_ergodash_pretty_wrapper( + KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, KC_RST, + VRSN, _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, EEP_RST, + _______, _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, _______, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} +void matrix_init_keymap(void) { +#ifdef STARTUP_RESET_EEPROM + eeconfig_init(); +#endif +} + +// diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk b/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk new file mode 100644 index 0000000000..6ba6c5b221 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk @@ -0,0 +1,23 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) + +# Device +AUDIO_ENABLE = no + +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no +INDICATOR_LIGHTS = no + +# QMK Features +AUTO_SHIFT_ENABLE = no +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +LEADER_ENABLE = yes # default is yes +TAP_DANCE_ENABLE = no #(+1254) +UNICODE_ENABLE = no #(+1134) +UNICODEMAP_ENABLE = no +NKRO_ENABLE = no +MACROS_ENABLED = no + +# User Defined Features +NO_SECRETS = no diff --git a/keyboards/ergodash/rev1/rev1.h b/keyboards/ergodash/rev1/rev1.h index 55135adca6..eaabf7cc5f 100644 --- a/keyboards/ergodash/rev1/rev1.h +++ b/keyboards/ergodash/rev1/rev1.h @@ -3,64 +3,145 @@ #include "ergodash.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, R30 }, \ - { R46, R45, R44, R43, R42, R41, R40 } \ - } +#define LAYOUT_4key( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } + +// Just defined for configurator support, the matrix is identical to LAYOUT_4key +#define LAYOUT_4key_2u_inner( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } + +#define LAYOUT_3key_2us( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, KC_NO }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } + + +#define LAYOUT_3key_1us( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, KC_NO }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, KC_NO } \ + } + +#define LAYOUT_2key( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, KC_NO }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, KC_NO }, \ + { R46, R45, R44, R43, R42, R41, KC_NO } \ + } + +#define LAYOUT LAYOUT_4key + #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) #define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - { R40, R41, R42, R43, R44, R45, R46 } \ - } + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ + } #endif #endif diff --git a/keyboards/ergodash/rules.mk b/keyboards/ergodash/rules.mk index 8be059d969..d57e4ce13a 100644 --- a/keyboards/ergodash/rules.mk +++ b/keyboards/ergodash/rules.mk @@ -1,21 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -F_CPU = 16000000 - -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/ergodone/keymaps/default/keymap.c b/keyboards/ergodone/keymaps/default/keymap.c index 7f13f3d672..2fc5344011 100644 --- a/keyboards/ergodone/keymaps/default/keymap.c +++ b/keyboards/ergodone/keymaps/default/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, @@ -141,24 +141,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } - return MACRO_NONE; -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { // dynamically generate these. diff --git a/keyboards/ergodone/keymaps/eozaki/keymap.c b/keyboards/ergodone/keymaps/eozaki/keymap.c index d29f4b7631..917790124f 100644 --- a/keyboards/ergodone/keymaps/eozaki/keymap.c +++ b/keyboards/ergodone/keymaps/eozaki/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_GRV), - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, LT(SYMB, KC_F2), KC_F4, KC_F5, KC_F6, KC_F11, diff --git a/keyboards/ergodone/keymaps/vega/keymap.c b/keyboards/ergodone/keymaps/vega/keymap.c index 9e5229528d..ee6c56bf95 100644 --- a/keyboards/ergodone/keymaps/vega/keymap.c +++ b/keyboards/ergodone/keymaps/vega/keymap.c @@ -426,8 +426,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [FNLR] = LAYOUT_ergodox( // left hand - KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, - KC_NO,KC_F11, KC_F12, KC_F13,KC_F14, KC_F15, KC_NO, + UC_M_LN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, + UC_M_WC,KC_F11, KC_F12, KC_F13,KC_F14, KC_F15, KC_NO, KC_NO,KC_F21, KC_F22, KC_F23,KC_F24, KC_NO, KC_NO,KC_PAUSE,KC_PSCR,KC_SLCK,KC_NO,KC_NO,KC_NO, EEP_RST,TO(BASE),TO(BASE),TO(BASE),TO(BASE), diff --git a/keyboards/ergodone/matrix.c b/keyboards/ergodone/matrix.c index 2eb8f24ba8..456f73c954 100644 --- a/keyboards/ergodone/matrix.c +++ b/keyboards/ergodone/matrix.c @@ -9,9 +9,6 @@ #include "matrix.h" #include "ergodone.h" #include "expander.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif /* * This constant define not debouncing time in msecs, but amount of matrix @@ -41,12 +38,6 @@ static void init_cols(void); static void unselect_rows(void); static void select_row(uint8_t row); -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -77,10 +68,6 @@ uint8_t matrix_cols(void) void matrix_init(void) { - // disable JTAG - MCUCR = (1<1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - matrix_print(); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); wait_us(30); // without this wait read unstable value. diff --git a/keyboards/ergodone/rules.mk b/keyboards/ergodone/rules.mk index 6acfaf92e9..4c2fcf1595 100644 --- a/keyboards/ergodone/rules.mk +++ b/keyboards/ergodone/rules.mk @@ -1,71 +1,15 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = \ - twimaster.c \ - matrix.c \ - expander.c \ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -92,4 +36,10 @@ SWAP_HANDS_ENABLE = no # Disable Onehand RGBLIGHT_ENABLE = no MIDI_ENABLE = no +# project specific files +SRC = \ + twimaster.c \ + matrix.c \ + expander.c \ + LAYOUTS = ergodox diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index d22836bd86..e60101e5e2 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -40,6 +40,8 @@ along with this program. If not, see . #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 +#define DEBOUNCE 30 + #define TAPPING_TOGGLE 1 /* define if matrix has ghost */ @@ -73,17 +75,23 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D7 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 15 // Number of LEDs #define RGBLIGHT_HUE_STEP 12 #define RGBLIGHT_SAT_STEP 255 #define RGBLIGHT_VAL_STEP 12 +// Pick one of the modes +// Defaults to 15 mirror, for legacy behavior + +// #define ERGODOX_LED_15 // Addresses 15 LEDs, but same position on both halves +// #define ERGODOX_LED_15_MIRROR // Addresses 15 LEDs, but are mirrored +// #define ERGODOX_LED_30 // Addresses all 30 LED individually + /* fix space cadet rollover issue */ #define DISABLE_SPACE_CADET_ROLLOVER -#define RGBW_BB_TWI +#define RGBW -#define RGBW 1 +#define RGBLIGHT_SLEEP /* * The debounce filtering reports a key/switch change directly, @@ -109,6 +117,11 @@ along with this program. If not, see . #define DRIVER_2_LED_TOTAL 24 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_PROCESS_LIMIT 5 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 + +#define RGB_DISABLE_WHEN_USB_SUSPENDED true + // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ /* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */ diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 947a173e36..d313f7d5d9 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -22,6 +22,8 @@ extern inline void ergodox_right_led_set(uint8_t led, uint8_t n); extern inline void ergodox_led_all_set(uint8_t n); +keyboard_config_t keyboard_config; + bool i2c_initialized = 0; i2c_status_t mcp23018_status = 0x20; @@ -43,6 +45,16 @@ void matrix_init_kb(void) { PORTD |= (1<<5 | 1<<4); PORTE |= (1<<6); + keyboard_config.raw = eeconfig_read_kb(); + ergodox_led_all_set((uint8_t)keyboard_config.led_level * 255 / 4 ); +#ifdef RGB_MATRIX_ENABLE + if (keyboard_config.rgb_matrix_enable) { + rgb_matrix_set_flags(LED_FLAG_ALL); + } else { + rgb_matrix_set_flags(LED_FLAG_NONE); + } +#endif + ergodox_blink_all_leds(); matrix_init_user(); @@ -305,6 +317,7 @@ led_config_t g_led_config = { { } }; void suspend_power_down_kb(void) { + rgb_matrix_set_color_all(0, 0, 0); rgb_matrix_set_suspend_state(true); suspend_power_down_user(); } @@ -314,4 +327,65 @@ void suspend_power_down_kb(void) { suspend_wakeup_init_user(); } +#ifdef ORYX_CONFIGURATOR +void keyboard_post_init_kb(void) { + rgb_matrix_enable_noeeprom(); + keyboard_post_init_user(); +} #endif +#endif + +#ifdef ORYX_CONFIGURATOR +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LED_LEVEL: + if (record->event.pressed) { + keyboard_config.led_level++; + if (keyboard_config.led_level > 4) { + keyboard_config.led_level = 0; + } + ergodox_led_all_set((uint8_t)keyboard_config.led_level * 255 / 4 ); + eeconfig_update_kb(keyboard_config.raw); + layer_state_set_kb(layer_state); + } + break; +#ifdef RGB_MATRIX_ENABLE + case TOGGLE_LAYER_COLOR: + if (record->event.pressed) { + keyboard_config.disable_layer_led ^= 1; + if (keyboard_config.disable_layer_led) + rgb_matrix_set_color_all(0, 0, 0); + eeconfig_update_kb(keyboard_config.raw); + } + break; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + keyboard_config.rgb_matrix_enable = false; + rgb_matrix_set_color_all(0, 0, 0); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + keyboard_config.rgb_matrix_enable = true; + } + break; + } + eeconfig_update_kb(keyboard_config.raw); + } + return false; +#endif + } + return process_record_user(keycode, record); +} +#endif + +void eeconfig_init_kb(void) { // EEPROM is getting reset! + keyboard_config.raw = 0; + keyboard_config.led_level = 4; + keyboard_config.rgb_matrix_enable = true; + eeconfig_update_kb(keyboard_config.raw); + eeconfig_init_user(); +} diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index 383702b957..7ff62d38a1 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -107,6 +107,25 @@ inline void ergodox_led_all_set(uint8_t n) ergodox_right_led_3_set(n); } +#ifdef ORYX_CONFIGURATOR +enum ergodox_ez_keycodes { + LED_LEVEL = SAFE_RANGE, + TOGGLE_LAYER_COLOR, + EZ_SAFE_RANGE, +}; +#endif + +typedef union { + uint32_t raw; + struct { + uint8_t led_level :3; + bool disable_layer_led :1; + bool rgb_matrix_enable :1; + }; +} keyboard_config_t; + +extern keyboard_config_t keyboard_config; + /* * LEFT HAND: LINES 115-122 * RIGHT HAND: LINES 124-131 diff --git a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c index 8facc6e925..28f45bc3c2 100644 --- a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c +++ b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DEV), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DEV), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, diff --git a/keyboards/ergodox_ez/keymaps/colemak_es_osx/config.h b/keyboards/ergodox_ez/keymaps/colemak_es_osx/config.h new file mode 100644 index 0000000000..a1e4d79768 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/colemak_es_osx/config.h @@ -0,0 +1,20 @@ +#pragma once + +// Sets good default for the speed of the mouse. +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_MAX_SPEED + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#undef MOUSEKEY_WHEEL_DELAY + +#define MOUSEKEY_WHEEL_MAX_SPEED 5 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 +#define MOUSEKEY_WHEEL_DELAY 100 \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c b/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c new file mode 100644 index 0000000000..0abd028a01 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c @@ -0,0 +1,397 @@ +/* + Copyright 2019 Mario Arias + + 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 . +*/ + +#include QMK_KEYBOARD_H +#include "version.h" + +#include "keymap_spanish.h" + +enum layers { + BASE = 0, //Colemak + QWERTY, //Qwerty + FN, //Colemak but FN1 to FN12 instead of numbers + NUM, //Numpad + MOUSE, //Mouse and media controls + IDEA //Shortcuts for IDEA / Other tools +}; + +//Special paste +#define S_PASTE LSFT(LGUI(KC_V)) +//tmux prefix +#define T_PREFIX LCTL(KC_B) +// Column mode +#define I_COLUMN ALGR(LCTL(LGUI(ES_MINS))) +// Terminal +#define I_TERM ALGR(KC_F12) +// Line comment +#define I_LN_COM LCTL(LGUI(KC_7)) +// Block comment +#define I_BK_COM LCTL(LGUI(KC_8)) +// Reformat code +#define I_REFORM LALT(LGUI(KC_L)) +// Rename +#define I_RENAME LSFT(KC_F6) +// Find usages +#define I_FUSAGE LALT(KC_F7) +// Code for Packt +#define P_CODE LCTL(ALGR(KC_X)) +// Search +#define I_SEARCH LCTL(LSFT(KC_F)) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Colemak MacOS Spanish layer + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 ! | 2 " | 3 · | 4 $ | 5 % | º \ | | ¡ ¿ | 6 & | 7 / | 8 ( | 9 ) | 0 = | Backsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | F | P | G | Home | | End | J | L | U | Y | Ñ | ' ? | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CAPS | A | R | S | T | D |------| |------| H | N | E | I | O | ENT | + * |--------+------+------+------+------+------| <> | | -_ |------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | K | M | , ; | . : | UP | Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Del | PgUp |Ctl/PD|Alt/[ |Cmd/] | |Cmd/{ |Alt/} | LEFT | DOWN | RIGHT| + * `----------------------------------' `----------------------------------' + * ,--------------. ,--------------. + * | Num | Mouse | | Qwer | Ctrl | + * ,------|------|-------| |------+-------+------. + * | | | FN | |SPaste| | | + * |LShift|Backsp|-------| |------| ENT |Space | + * | | | IDEA | | T-pre| | | + * `---------------------' `---------------------' + */ +[BASE] = LAYOUT_ergodox( +// left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, ES_LESS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_HOME, + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, + KC_DEL, KC_PGUP, CTL_T(KC_PGDN), ALT_T(ES_GRV), GUI_T(ES_PLUS), + + DF(NUM), DF(MOUSE), + DF(FN), + KC_LSFT, KC_BSPC, MO(IDEA), + +// right hand + ES_IEXL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_END, KC_J, KC_L, KC_U, KC_Y, ES_NTIL, ES_APOS, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + ES_MINS, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + GUI_T(ES_ACUT), ALT_T(KC_BSLS), KC_LEFT, KC_DOWN, KC_RIGHT, + + DF(QWERTY), KC_RCTL, + S_PASTE, + T_PREFIX, KC_ENT, KC_SPC +), +/* Keymap 1: Spanish QWERTY layer (games) //Will probably change it for a Linux/Windows Colemak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | S | D | F | G |------| |------| H | J | K | L | Ñ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Z | X | C | V | B | | | | N | M | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | Base | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[QWERTY] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______, + +// right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, + _______, KC_N, KC_M, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + DF(BASE), _______, + _______, + _______, _______, _______ +), +/* Keymap 2: Function Layer +* +* ,--------------------------------------------------. ,--------------------------------------------------. +* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | +* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +* | | | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +* | | | | | | |------| |------| | | | | | | +* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | | | +* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' +* | | | | | | | | | | | | +* `----------------------------------' `----------------------------------' +* ,-------------. ,-------------. +* | | | | | | +* ,------|------|------| |------+------+------. +* | | | Base | | | | | +* | | |------| |------| | | +* | | | | | | | | +* `--------------------' `--------------------' +*/ +[FN] = LAYOUT_ergodox( + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + DF(BASE), + _______, _______, _______, + +// right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______ +), +/* Mouse and media controls + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | | | | | | Play | | Vol+ | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | Ms U | | | | | | | | Wh U | | | | + * |--------+------+------+------+------+------| Rwd | | Vol- |------+------+------+------+------+--------| + * | | | Ms L | Ms D | Ms R | |------| |------| | Wh L | Wh D | Wh R | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | Acc0 | Acc1 | Acc2 | | Fwd | | Mute | | Btn1 | Btn2 | Btn3 | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Num | Base | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[MOUSE] = LAYOUT_ergodox( +// left hand + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, + XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, KC_MRWD, + XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, + XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, KC_MFFD, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + DF(NUM), DF(BASE), + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + +// right hand + KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_VOLD, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_R, XXXXXXX, XXXXXXX, + KC_MUTE, XXXXXXX, KC_BTN1, KC_BTN2, KC_BTN3, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX +), +/* Num pad + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | ( | ) | = | / | * | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | Up | | | | | | | 7 | 8 | 9 | - | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | Left | Down |Right | |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 |Enter | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | , |Enter | . | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Base | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUM] = LAYOUT_ergodox( +// left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + DF(BASE), _______, + _______, + _______, _______, _______, + +// right hand + _______, LSFT(KC_8), LSFT(KC_9), KC_PEQL, KC_PSLS, KC_PAST, _______, + _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_DOT, + + _______, _______, + _______, + _______, _______, _______ +), +/* IDEA + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | Renm | | Usag | | LnCm | BkCm | | Term | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | |Search| | | | | | | Refm | | | | | + * |--------+------+------+------+------+------| | | Col |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | Code | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[IDEA] = LAYOUT_ergodox( + +//Left hand + _______, _______, _______, _______, _______, _______, I_RENAME, + _______, _______, _______, I_SEARCH, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, P_CODE, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, DF(BASE), + _______, + _______, _______, _______, + +// right hand + I_FUSAGE, _______, I_LN_COM, I_BK_COM, _______, I_TERM, _______, + I_COLUMN, _______, I_REFORM, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______ +) +}; + + +void led_1_off(void) { + ergodox_right_led_1_off(); +} + +void led_2_off(void) { + ergodox_right_led_2_off(); +} + +void led_3_off(void) { + ergodox_right_led_3_off(); +} + +//Runs just one time when the keyboard initializes +void matrix_init_use(void) { + led_1_off(); + led_2_off(); + led_3_off(); +} + +// Value to use to switch LEDs on. The default value of 255 is far too bright. +static const uint8_t max_led_value = 20; + + +void led_1_on(void) { + ergodox_right_led_1_on(); + ergodox_right_led_1_set(max_led_value); +} + +void led_2_on(void) { + ergodox_right_led_2_on(); + ergodox_right_led_2_set(max_led_value); +} + +void led_3_on(void) { + ergodox_right_led_3_on(); + ergodox_right_led_3_set(max_led_value); +} + +uint32_t layer_state_set_user(uint32_t state) { + + if(layer_state_cmp(state ,IDEA)) { + led_1_on(); + led_3_on(); + } else { + led_1_off(); + led_3_off(); + } + + return state; +}; + +void matrix_scan_user(void) { + + ergodox_board_led_off(); + led_1_off(); + led_2_off(); + led_3_off(); + + if(layer_state_cmp(default_layer_state, QWERTY)) { + led_3_on(); + } + + if(layer_state_cmp(default_layer_state, FN)) { + led_2_on(); + } + + if(layer_state_cmp(default_layer_state, NUM)) { + led_2_on(); + led_3_on(); + } + + if(layer_state_cmp(default_layer_state, MOUSE)) { + led_1_on(); + } +}; diff --git a/keyboards/ergodox_ez/keymaps/colemak_es_osx/readme.md b/keyboards/ergodox_ez/keymaps/colemak_es_osx/readme.md new file mode 100644 index 0000000000..b17ae015aa --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/colemak_es_osx/readme.md @@ -0,0 +1,67 @@ +# ErgoDox EZ Spanish Colemak configuration + +## Description + +A Colemak keymap adapted for Spanish. + +### Base Layer - Spanish Colemak + +The Base Layer is a Colemak keymap with an additional "ñ" next to the "y" key. The arrow cluster has a proper T inverted shape. + +It includes almost all Spanish Symbols from a normal 100% keyboard thanks to the use of tap keys + + +| Pressed | Tap | Shift | Alt | +|---|---|---|---| +|Left Ctrl|PgDn||| +|Left Alt|`|ˆ|[| +|Left Cmd|+|*|]| +|Right Cmd|´|¨|{| +|Right Alt|ç|Ç|}| + +For example, if you want to type ```[]```, you keep pressing the "Left Alt" (To modify) and tap "Right Alt" and "Right Cmd" to send "[" and "]" + +### Qwerty Layer + +A Qwerty layer for gaming and maybe some VIM commands. It just modifies the few keys that are different between Colemak and Qwerty and keep all the others keys + +### Fn Layer + +A layer to change the number row including "º" and "¡" for "Fn1" to "Fn12". The rest is just the same as the Base layer + +### Mouse and media controls + +Mouse movement on the left hand, wheel and buttons on the right hand. "Play/Pause", "Rewind", "Forward" in the Left inner column. "Volume Up", "Volume Down" and "Mute" in the Right inner column + +### Numpad + +A complete numpad in the right hand, plus and Arrow cluster on the left hand + +### IDEA (JetBrains IDEs) + +A momentary layer for IDEA shortcuts that require more than two fingers or any Fn key + +## How to build it + +If you already have all the dependencies (Check QMK's documentation), you can run the command: + +```bash +make ergodox_ez:colemak_es_osx +``` + +On MacOS, if you're using MacPorts you can install the following dependencies: + +```bash +port install avr-binutils +port install avr-gcc +port install avr-libc +``` + +This isn't an exhaustive list and maybe there other dependencies that are technically necessary + +## Changelog + +* Jul 2019: + * Initial version for the new QMK version + +![](https://imgur.com/AyWNGlL.png) \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c index 40d0a1eaf0..4936ab42c3 100644 --- a/keyboards/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -6,7 +6,11 @@ #define MDIA 2 // media keys enum custom_keycodes { +#ifdef ORYX_CONFIGURATOR + EPRM = EZ_SAFE_RANGE, +#else EPRM = SAFE_RANGE, +#endif VRSN, RGB_SLD }; @@ -36,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, @@ -164,7 +168,7 @@ void matrix_init_user(void) { }; // Runs whenever there is a layer state change. -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); diff --git a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c index 864c62a470..3f52528f8b 100644 --- a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, @@ -138,21 +138,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index c342b90769..dc18edac8f 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -15,6 +15,12 @@ // pushing dev branch // git push origin dev:dev +// debounce settings +// remove these after getting a new keyboard +// #define DEBOUNCE 50 +// #define QMK_KEYS_PER_SCAN 4 + + enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -43,7 +49,7 @@ enum custom_keycodes { SHELL_EXPAND_OE_LOGPATTERN, SHELL_EXPAND_OE_TRANPATTERN, - + // Cloud9 macros CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, @@ -52,6 +58,9 @@ enum custom_keycodes { CLOUD9_GOTO_LINE, CLOUD9_NAVIGATE, + // Windows 10 macros, + WINDOWS10_WORKSPACE_LEFT, + WINDOWS10_WORKSPACE_RIGHT, }; @@ -61,7 +70,7 @@ enum custom_keycodes { #define KEYSEL 3 // arrow navigation + shift (allow text selection) #define SHELL_NAV 4 // bash shortcuts #define SHELL_SCREEN 5 // linux screen shortcuts -#define SCREEN_NAV 6 // navigate between linux screen tabs +#define SCREEN_NAV 6 // navigate between linux screen tabs #define BROWSER_CONTROL 7 // control browser and mouse #define COMBINED 8 // combined numbers and symbols layer #define ANDROID_STUDIO 9 @@ -161,7 +170,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), // left thumb cluster - MEH(KC_4), MEH(KC_5), + WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, MEH(KC_6), MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT), @@ -176,7 +185,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE ), - + // alternate base layout [BASE_ALTERNATE] = LAYOUT_ergodox( // left hand @@ -201,7 +210,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), + ), [KEYNAV] = LAYOUT_ergodox( // left hand @@ -381,8 +390,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS), - - + + [BROWSER_CONTROL] = LAYOUT_ergodox( // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -493,19 +502,19 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { return MACRO( D(LCTL), T(A), U(LCTL), T(RBRC), END); } - break; + break; case DEL_TO_HOME: if (record->event.pressed) { - return MACRO( + return MACRO( // delete to the beginning of the line D(LSFT), T(HOME), U(LSFT), T(DELETE), END); - } - break; + } + break; + - } return MACRO_NONE; }; @@ -599,21 +608,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case SHELL_HTCSTATUS: SEND_STRING("htcStatus -j "); return true; - break; + break; case SHELL_HTCBOUNCE: SEND_STRING("htcBounce -j "); return true; - break; + break; case SHELL_EXPAND_OE_LOGPATTERN: SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.log"SS_LCTRL("x")SS_LSFT("8")); - break; + break; case SHELL_EXPAND_OE_TRANPATTERN: SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.tran"SS_LCTRL("x")SS_LSFT("8")); - break; + break; case SHELL_DUMPTLOG: SEND_STRING(" | dumptlog - "); return true; - break; + break; // Cloud9 macros case CLOUD9_TAB_LEFT: SEND_STRING(SS_LCTRL("[")); @@ -639,6 +648,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(SS_LCTRL("e")); return true; break; + case WINDOWS10_WORKSPACE_LEFT: + SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_LEFT)))); + return true; + break; + case WINDOWS10_WORKSPACE_RIGHT: + SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_RIGHT)))); + break; } } diff --git a/keyboards/ergodox_ez/keymaps/kou/keymap.c b/keyboards/ergodox_ez/keymaps/kou/keymap.c index 98fafe8ce6..5e49dca252 100644 --- a/keyboards/ergodox_ez/keymaps/kou/keymap.c +++ b/keyboards/ergodox_ez/keymaps/kou/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DELT, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, LT(NPAD, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_ESC, MO(SYMB), KC_LALT, KC_LGUI, MO(SYMB), KC_SPC, diff --git a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c index 29505b641e..85455fa9d9 100644 --- a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c +++ b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox_80( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c index 384d7d0945..2c90c02a6b 100644 --- a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c +++ b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/keyboards/ergodox_ez/keymaps/rishka/config.h b/keyboards/ergodox_ez/keymaps/rishka/config.h new file mode 100644 index 0000000000..c8f8180bcc --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/config.h @@ -0,0 +1,17 @@ +#pragma once + +#define PERMISSIVE_HOLD + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX + +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 + +#define MK_C_OFFSET_1 20 +#define MK_C_OFFSET_2 30 + +#undef MK_MOMENTARY_ACCEL diff --git a/keyboards/ergodox_ez/keymaps/rishka/keymap.c b/keyboards/ergodox_ez/keymaps/rishka/keymap.c new file mode 100644 index 0000000000..102803e512 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/keymap.c @@ -0,0 +1,210 @@ + +#include QMK_KEYBOARD_H +#include "version.h" +#include "rishka.h" +enum layers { + BASE, // default layer + WIN, // Switch keys that are needed in windows + SYMB, // symbols + MDIA, // media keys + GAME, // Gamepad setup + FIRMWARE // Layer to trigger reset/refresh +}; +enum custom_keycodes { + VRSN = SAFE_RANGE, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = LAYOUT_ergodox_pretty_wrapper( + KC_EQL, ________________NUMBERS_L__________________, TG(WIN), OSX_LOCK, ________________NUMBERS_R__________________, KC_MINS, + KC_DELT, _________________QWERTY_L1_________________, TG(SYMB), TG(SYMB), _________________QWERTY_R1_________________, KC_BSLS, + KC_BSPC, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, LT(MDIA, KC_QUOT), + OS_LSFT, _________________QWERTY_L3_________________, ALL_T(KC_NO), TG(MDIA), _________________QWERTY_R3_________________, OS_RSFT, + LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, OSL(SYMB), + ALT_T(KC_APP), TG(GAME), KC_LALT, CTL_T(KC_ESC), + LT(FIRMWARE, KC_HOME), KC_PGUP, + KC_SPC, GUI_T(KC_BSPC), ALT_T(KC_END), GUI_T(KC_PGDN), CTL_T(KC_TAB), ALT_T(KC_ENT) +), + +[WIN] = LAYOUT_ergodox_pretty_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F1, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _________________QWERTY_L2_________________, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, + _______, KC_ESC, _______, _______, + _______, _______, + _______, KC_BSPC, KC_LALT, KC_PGDN, CTL_T(KC_TAB), _______ +), + +[SYMB] = LAYOUT_ergodox_pretty_wrapper( +VRSN, ______________________F_L__________________, KC_F11, KC_F12 , ______________________F_R__________________, KC_NLCK, +_______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______, +_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, +_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, +_______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PSLS, _______, + RGB_MOD, RGB_VAI, RGB_HUI, RGB_SLD, + RGB_VAD, RGB_HUD, + _______, _______, _______, RGB_TOG, _______, _______ +), + +[MDIA] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, KC_WH_U, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, KC_BTN5, + KC_BTN4, + KC_BTN1, KC_BTN2, KC_BTN3, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_WH_U, _______, _______, _______, + _______, KC_WH_L, KC_WH_D, KC_WH_R, _______, KC_MPLY, + _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, + KC_ACL2, KC_ACL1, KC_ACL0 +), + +[GAME] = LAYOUT_ergodox( + // left hand + KC_ESCAPE, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_F1, KC_Y, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_LSHIFT, KC_A, KC_S, KC_D, KC_F, + KC_LCTRL, KC_B, KC_Z, KC_X, KC_C, KC_V, KC_G, + LT(BASE, KC_L), KC_J, KC_I, KC_O, KC_M, + KC_ESCAPE, _______, + KC_ENTER, + KC_SPACE, KC_LCTRL, KC_LALT, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), + MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN, KC_TAB, KC_ENT +), + +[FIRMWARE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + RESET, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, EEP_RST +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case VRSN: + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + #ifdef RGBLIGHT_ENABLE + case RGB_SLD: + rgblight_mode(1); + return false; + #endif + } + } + return true; +} + +// Runs just one time when the keyboard initializes. +void keyboard_post_init_user(void) { +#ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); +#endif +}; + +// Runs whenever there is a layer state change. +uint32_t layer_state_set_user(layer_state_t state) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + uint8_t layer = get_highest_layer(state); + switch (layer) { + case 0: + #ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); + #else + #ifdef RGBLIGHT_ENABLE + rgblight_init(); + #endif + #endif + break; + case 1: + ergodox_right_led_1_on(); + #ifdef RGBLIGHT_COLOR_LAYER_1 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); + #endif + break; + case 2: + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_2 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); + #endif + break; + case 3: + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_3 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); + #endif + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_4 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); + #endif + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_5 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); + #endif + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_6 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); + #endif + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_7 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); + #endif + break; + default: + break; + } + + return state; +}; diff --git a/keyboards/ergodox_ez/keymaps/rishka/rules.mk b/keyboards/ergodox_ez/keymaps/rishka/rules.mk new file mode 100644 index 0000000000..c867f89718 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/rules.mk @@ -0,0 +1,2 @@ +# TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index 6f9a577f7e..a9be5d55c4 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -27,6 +27,9 @@ #define MDIA 2 // media keys #define ARRW 3 // arrow + soon mouse +#define SE_LT SE_LESS +#define SE_GT LSFT(SE_LESS) + enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -38,8 +41,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ½ | ! | " | # | # | % | Ins | | L1 | & | / | ( | ) | = | ? | - * | § | 1 | 2 @ | 3 £ | 4 $ | 5 | | | | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | + * | Esc | ! | " | # | # | % | Ins | | L1 | & | / | ( | ) | = | ? | + * | | 1 | 2 @ | 3 £ | 4 $ | 5 | | | | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | Å | * | | | | | | | | | | | | | | | | @@ -66,22 +69,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox_80( // layer 0 : default // left hand - NO_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_INS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_INS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_WBAK, - CTL_T(NO_APOS), NO_ACUT, KC_LALT, KC_BSPC, KC_SPC, - NO_LESS, KC_END, + CTL_T(SE_APOS), SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, + SE_LESS, KC_END, KC_LEFT, KC_RIGHT, KC_PGDN, CTL_T(KC_ENT), ALT_T(KC_ESC), KC_LGUI, // right hand - TO(ARRW), KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), LT(SYMB, NO_AE), - KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSPC, - KC_SPC, KC_BSPC, KC_ALGR, NO_ASTR, CTL_T(NO_TILD), - KC_HOME, NO_CIRC, + TO(ARRW), KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_OSLH), LT(SYMB, SE_AE), + KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSPC, + KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, CTL_T(SE_TILD), + KC_HOME, SE_CIRC, KC_PGUP, KC_UP, KC_DOWN, KC_LGUI, ALT_T(KC_ESC), CTL_T(KC_ENT) ), @@ -96,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | - | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | + * | | | | < | > | | | . | 0 | = | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -110,19 +113,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = LAYOUT_ergodox_80( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, - _______,KC_EXLM,NO_AT, NO_LCBR,NO_RCBR,NO_PIPE,_______, - _______,KC_HASH,NO_DLR, NO_LPRN,NO_RPRN,NO_GRV, - _______,KC_PERC,NO_CIRC,NO_LBRC,NO_RBRC,NO_TILD,_______, - EPRM,_______,_______,_______,_______, + _______,KC_EXLM,SE_AT, SE_LCBR,SE_RCBR,SE_PIPE,_______, + _______,KC_HASH,SE_DLR, SE_LPRN,SE_RPRN,SE_GRV, + _______,KC_PERC,SE_CIRC,SE_LBRC,SE_RBRC,SE_TILD,_______, + EPRM, _______, _______, SE_LT , SE_GT, _______,_______, _______,_______,_______, _______,_______,_______, // right hand _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_UP, KC_7, KC_8, KC_9, NO_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, NO_PLUS, _______, - _______, NO_AMPR, KC_1, KC_2, KC_3, NO_MINS, _______, - _______,KC_DOT, KC_0, NO_EQL, _______, + _______, KC_UP, KC_7, KC_8, KC_9, SE_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, SE_PLUS, _______, + _______, SE_AMPR, KC_1, KC_2, KC_3, SE_MINS, _______, + _______,KC_DOT, KC_0, SE_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -171,7 +174,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Keymap: Ducky Style arrows [ARRW] = LAYOUT_ergodox_80( - _______, _______, _______, _______, _______, _______, _______, + SE_HALF, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/ergodox_ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c index 45fc9f8ba9..080d3f6cef 100644 --- a/keyboards/ergodox_ez/keymaps/steno/keymap.c +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/keyboards/ergodox_ez/keymaps/testing/keymap.c b/keyboards/ergodox_ez/keymaps/testing/keymap.c index 2fdd122363..a90458cefe 100644 --- a/keyboards/ergodox_ez/keymaps/testing/keymap.c +++ b/keyboards/ergodox_ez/keymaps/testing/keymap.c @@ -28,19 +28,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// leaving this in place for compatibilty with old keymaps cloned and re-compiled. -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - } - return MACRO_NONE; -}; - void matrix_init_user(void) { #ifdef RGBLIGHT_COLOR_LAYER_0 rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); diff --git a/keyboards/ergodox_ez/led_i2c.c b/keyboards/ergodox_ez/led_i2c.c new file mode 100644 index 0000000000..3e75a8cd08 --- /dev/null +++ b/keyboards/ergodox_ez/led_i2c.c @@ -0,0 +1,86 @@ +/* + * light weight WS2812 lib V2.0b + * + * Controls WS2811/WS2812/WS2812B RGB-LEDs + * Author: Tim (cpldcpu@gmail.com) + * + * Jan 18th, 2014 v2.0b Initial Version + * Nov 29th, 2015 v2.3 Added SK6812RGBW support + * + * 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 . + */ +#ifdef RGBLIGHT_ENABLE + +# include "ws2812.c" +# include "ergodox_ez.h" + +extern rgblight_config_t rgblight_config; + +/* + * Forward declare internal functions + * + * The functions take a byte-array and send to the data output as WS2812 bitstream. + * The length is the number of bytes to send - three per LED. + */ + +void ws2812_sendarray(uint8_t *array, uint16_t length); +void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask); + + + + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; +#ifdef RGBW + led[i].w = 0; +#endif + } + } + + + uint8_t led_num = RGBLED_NUM; + i2c_init(); + i2c_start(0x84, ERGODOX_EZ_I2C_TIMEOUT); + int i = 0; +# if defined(ERGODOX_LED_30) + // prevent right-half code from trying to bitbang all 30 + // so with 30 LEDs, we count from 29 to 15 here, and the + // other half does 0 to 14. + led_num = RGBLED_NUM / 2; + for (i = led_num + led_num - 1; i >= led_num; --i) +# elif defined(ERGODOX_LED_15_MIRROR) + for (i = 0; i < led_num; ++i) +# else // ERGDOX_LED_15 non-mirrored + for (i = led_num - 1; i >= 0; --i) +# endif + { + uint8_t *data = (uint8_t *)(led + i); + i2c_write(*data++, ERGODOX_EZ_I2C_TIMEOUT); + i2c_write(*data++, ERGODOX_EZ_I2C_TIMEOUT); + i2c_write(*data++, ERGODOX_EZ_I2C_TIMEOUT); +#ifdef RGBW + i2c_write(*data++, ERGODOX_EZ_I2C_TIMEOUT); +#endif + } + i2c_stop(); + + ws2812_setleds(led, RGBLED_NUM); +} + + +#endif // RGBLIGHT_ENABLE diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 2bfe27b9a3..4f11a0ad52 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -31,9 +31,6 @@ along with this program. If not, see . #include "matrix.h" #include "debounce.h" #include QMK_KEYBOARD_H -#ifdef DEBUG_MATRIX_SCAN_RATE -# include "timer.h" -#endif /* * This constant define not debouncing time in msecs, assuming eager_pr. @@ -47,10 +44,6 @@ along with this program. If not, see . * that comment was written.) */ -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - /* matrix state(1:on, 0:off) */ static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values static matrix_row_t matrix[MATRIX_ROWS]; // debounced values @@ -63,11 +56,6 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - __attribute__((weak)) void matrix_init_user(void) {} __attribute__((weak)) void matrix_scan_user(void) {} @@ -94,10 +82,6 @@ void matrix_init(void) { raw_matrix[i] = 0; } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif debounce_init(MATRIX_ROWS); matrix_init_quantum(); } @@ -112,11 +96,6 @@ void matrix_power_up(void) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif } // Reads and stores a row, returning @@ -147,20 +126,6 @@ uint8_t matrix_scan(void) { } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - #ifdef LEFT_LEDS mcp23018_status = ergodox_left_leds_update(); #endif // LEFT_LEDS diff --git a/keyboards/ergodox_ez/post_config.h b/keyboards/ergodox_ez/post_config.h new file mode 100644 index 0000000000..526cc8c417 --- /dev/null +++ b/keyboards/ergodox_ez/post_config.h @@ -0,0 +1,20 @@ +#pragma once + +#if !defined(ERGODOX_LED_15) && !defined(ERGODOX_LED_30) +// if no value is defined, assume previous behavior +// # define ERGODOX_LED_15 +// # define ERGODOX_LED_30 +# define ERGODOX_LED_15_MIRROR +#endif + +#if (defined(ERGODOX_LED_30) + defined(ERGODOX_LED_15) + defined(ERGODOX_LED_15_MIRROR)) != 1 +# error "You must only define one of the ERGODOX_LED options." +#endif + +#ifdef ERGODOX_LED_30 +// If using 30 LEDs, then define that many +# define RGBLED_NUM 30 // Number of LEDs +#else +// If not, then only define 15 +# define RGBLED_NUM 15 // Number of LEDs +#endif diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index 2882072a62..fd8f5722d3 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -1,68 +1,16 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC += matrix.c -QUANTUM_LIB_SRC += i2c_master.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # If you have Left LEDs (see # https://geekhack.org/index.php?topic=22780.msg873819#msg873819 for # details), include the following define: @@ -83,7 +31,14 @@ SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + RGB_MATRIX_ENABLE = no # enable later DEBOUNCE_TYPE = eager_pr +# project specific files +SRC += matrix.c \ + led_i2c.c +QUANTUM_LIB_SRC += i2c_master.c + LAYOUTS = ergodox diff --git a/keyboards/ergodox_ez/util/compile_keymap.py b/keyboards/ergodox_ez/util/compile_keymap.py old mode 100644 new mode 100755 diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/Dockerfile b/keyboards/ergodox_ez/util/keymap_beautifier/Dockerfile new file mode 100644 index 0000000000..fbee1d0df8 --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.7.4-alpine3.10 + +WORKDIR /usr/src/app +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt +COPY ./KeymapBeautifier.py ./KeymapBeautifier.py + +CMD [ "python", "./KeymapBeautifier.py", "-h" ] diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/KeymapBeautifier.py b/keyboards/ergodox_ez/util/keymap_beautifier/KeymapBeautifier.py new file mode 100755 index 0000000000..b96e4c96cd --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/KeymapBeautifier.py @@ -0,0 +1,399 @@ +#!/usr/bin/env python + +import argparse +import pycparser +import re + +class KeymapBeautifier: + justify_toward_center = False + filename_in = None + filename_out = None + output_layout = None + output = None + + column_max_widths = {} + + KEY_ALIASES = { + "KC_TRANSPARENT": "_______", + "KC_TRNS": "_______", + "KC_NO": "XXXXXXX", + } + KEYMAP_START = 'const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n' + KEYMAP_END = '};\n' + KEYMAP_START_REPLACEMENT = "const int keymaps[]={\n" + KEY_CHART = """ + /* + * ,--------------------------------------------------. ,--------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | | 38 | 39 | 40 | 41 | 42 | 43 | 44 | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 45 | 46 | 47 | 48 | 49 | 50 | 51 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | 14 | 15 | 16 | 17 | 18 | 19 |------| |------| 52 | 53 | 54 | 55 | 56 | 57 | + * |--------+------+------+------+------+------| 26 | | 58 |------+------+------+------+------+--------| + * | 20 | 21 | 22 | 23 | 24 | 25 | | | | 59 | 60 | 61 | 62 | 63 | 64 | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | 27 | 28 | 29 | 30 | 31 | | 65 | 66 | 67 | 68 | 69 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | 32 | 33 | | 70 | 71 | + * ,------+------+------| |------+------+------. + * | | | 34 | | 72 | | | + * | 35 | 36 |------| |------| 74 | 75 | + * | | | 37 | | 73 | | | + * `--------------------' `--------------------' + */ +""" + KEY_COORDINATES = { + 'LAYOUT_ergodox': [ + # left hand + (0,0), (0,1), (0,2), (0,3), (0,4), (0,5), (0,6), + (1,0), (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), + (2,0), (2,1), (2,2), (2,3), (2,4), (2,5), + (3,0), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), + (4,0), (4,1), (4,2), (4,3), (4,4), + # left thumb + (5,5), (5,6), + (6,6), + (7,4), (7,5), (7,6), + # right hand + (8,0), (8,1), (8,2), (8,3), (8,4), (8,5), (8,6), + (9,0), (9,1), (9,2), (9,3), (9,4), (9,5), (9,6), + (10,1), (10,2), (10,3), (10,4), (10,5), (10,6), + (11,0), (11,1), (11,2), (11,3), (11,4), (11,5), (11,6), + (12,2), (12,3), (12,4), (12,5), (12,6), + # right thumb + (13,0), (13,1), + (14,0), + (15,0), (15,1), (15,2) + ], + 'LAYOUT_ergodox_pretty': [ + # left hand and right hand + (0,0), (0,1), (0,2), (0,3), (0,4), (0,5), (0,6), (0,7), (0,8), (0,9), (0,10), (0,11), (0,12), (0,13), + (1,0), (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (1,7), (1,8), (1,9), (1,10), (1,11), (1,12), (1,13), + (2,0), (2,1), (2,2), (2,3), (2,4), (2,5), (2,8), (2,9), (2,10), (2,11), (2,12), (2,13), + (3,0), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), (3,7), (3,8), (3,9), (3,10), (3,11), (3,12), (3,13), + (4,0), (4,1), (4,2), (4,3), (4,4), (4,9), (4,10), (4,11), (4,12), (4,13), + + # left thumb and right thumb + (5,5), (5,6), (5,7), (5,8), + (6,6), (6,7), + (7,4), (7,5), (7,6), (7,7), (7,8), (7,9) + ], + } + current_converted_KEY_COORDINATES = [] + + # each column is aligned within each group (tuples of row indexes are inclusive) + KEY_ROW_GROUPS = { + 'LAYOUT_ergodox': [(0,4),(5,7),(8,12),(13,15)], + 'LAYOUT_ergodox_pretty': [(0,7)], + #'LAYOUT_ergodox_pretty': [(0,5),(6,7)], + #'LAYOUT_ergodox_pretty': [(0,3),(4,4),(5,7)], + #'LAYOUT_ergodox_pretty': [(0,4),(5,7)], + } + + + INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox = [ + 0, 1, 2, 3, 4, 5, 6, 38,39,40,41,42,43,44, + 7, 8, 9,10,11,12,13, 45,46,47,48,49,50,51, + 14,15,16,17,18,19, 52,53,54,55,56,57, + 20,21,22,23,24,25,26, 58,59,60,61,62,63,64, + 27,28,29,30,31, 65,66,67,68,69, + 32,33, 70,71, + 34, 72, + 35,36,37, 73,74,75, + ] + + + def index_conversion_map_reversed(self, conversion_map): + return [conversion_map.index(i) for i in range(len(conversion_map))] + + + def __init__(self, source_code = "", output_layout="LAYOUT_ergodox", justify_toward_center = False): + self.output_layout = output_layout + self.justify_toward_center = justify_toward_center + # determine the conversion map + #if input_layout == self.output_layout: + # conversion_map = [i for i in range(len(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox))] + #conversion_map = self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox + if self.output_layout == "LAYOUT_ergodox_pretty": + index_conversion_map = self.index_conversion_map_reversed(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox) + else: + index_conversion_map = list(range(len(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox))) + self.current_converted_KEY_COORDINATES = [ + self.KEY_COORDINATES[self.output_layout][index_conversion_map[i]] + for i in range(len(self.KEY_COORDINATES[self.output_layout])) + ] + + self.output = self.beautify_source_code(source_code) + + def beautify_source_code(self, source_code): + # to keep it simple for the parser, we only use the parser to parse the key definition part + src = { + "before": [], + "keys": [], + "after": [], + } + + current_section = "before" + for line in source_code.splitlines(True): + if current_section == 'before' and line == self.KEYMAP_START: + src[current_section].append("\n") + current_section = 'keys' + src[current_section].append(self.KEYMAP_START_REPLACEMENT) + continue + elif current_section == 'keys' and line == self.KEYMAP_END: + src[current_section].append(self.KEYMAP_END) + current_section = 'after' + continue + src[current_section].append(line) + output_lines = src['before'] + self.beautify_keys_section("".join(src['keys'])) + src['after'] + return "".join(output_lines) + + def beautify_keys_section(self, src): + parsed = self.parser(src) + layer_output = [] + + keymap = parsed.children()[0] + layers = keymap[1] + for layer in layers.init.exprs: + input_layout = layer.expr.name.name + + key_symbols = self.layer_expr(layer) + # re-order keys from input_layout to regular layout + if input_layout == "LAYOUT_ergodox_pretty": + key_symbols = [key_symbols[i] for i in self.index_conversion_map_reversed(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox)] + + padded_key_symbols = self.pad_key_symbols(key_symbols, input_layout) + current_pretty_output_layer = self.pretty_output_layer(layer.name[0].value, padded_key_symbols) + # strip trailing spaces from padding + layer_output.append(re.sub(r" +\n", "\n", current_pretty_output_layer)) + + return [self.KEYMAP_START + "\n", + self.KEY_CHART + "\n", + ",\n\n".join(layer_output) + "\n", + self.KEYMAP_END + "\n"] + + def get_row_group(self, row): + for low, high in self.KEY_ROW_GROUPS[self.output_layout]: + if low <= row <= high: + return (low, high) + raise Exception("Cannot find row groups in KEY_ROW_GROUPS") + + + def calculate_column_max_widths(self, key_symbols): + # calculate the max width for each column + self.column_max_widths = {} + for i in range(len(key_symbols)): + row_index, column_index = self.current_converted_KEY_COORDINATES[i] + row_group = self.get_row_group(row_index) + if (row_group, column_index) in self.column_max_widths: + self.column_max_widths[(row_group, column_index)] = max(self.column_max_widths[(row_group, column_index)], len(key_symbols[i])) + else: + self.column_max_widths[(row_group, column_index)] = len(key_symbols[i]) + + + def pad_key_symbols(self, key_symbols, input_layout, just='left'): + self.calculate_column_max_widths(key_symbols) + + padded_key_symbols = [] + # pad each key symbol + for i in range(len(key_symbols)): + key = key_symbols[i] + # look up column coordinate to determine number of spaces to pad + row_index, column_index = self.current_converted_KEY_COORDINATES[i] + row_group = self.get_row_group(row_index) + if just == 'left': + padded_key_symbols.append(key.ljust(self.column_max_widths[(row_group, column_index)])) + else: + padded_key_symbols.append(key.rjust(self.column_max_widths[(row_group, column_index)])) + return padded_key_symbols + + + layer_keys_pointer = 0 + layer_keys = None + def grab_next_n_columns(self, n_columns, input_layout, layer_keys = None, from_beginning = False): + if layer_keys: + self.layer_keys = layer_keys + if from_beginning: + self.layer_keys_pointer = 0 + + begin = self.layer_keys_pointer + end = begin + n_columns + return self.layer_keys[self.layer_keys_pointer-n_keys:self.layer_keys_pointer] + + key_coordinates_counter = 0 + def get_padded_line(self, source_keys, key_from, key_to, just="left"): + if just == "right": + keys = [k.strip().rjust(len(k)) for k in source_keys[key_from:key_to]] + else: + keys = [k for k in source_keys[key_from:key_to]] + + from_row, from_column = self.KEY_COORDINATES[self.output_layout][self.key_coordinates_counter] + row_group = self.get_row_group(from_row) + self.key_coordinates_counter += key_to - key_from + columns_before_key_from = sorted([col for row, col in self.KEY_COORDINATES[self.output_layout] if row == from_row and col < from_column]) + # figure out which columns in this row needs padding; only pad empty columns to the right of an existing column + columns_to_pad = { c: True for c in range(from_column) } + if columns_before_key_from: + for c in range(max(columns_before_key_from)+1): + columns_to_pad[c] = False + + # for rows with fewer columns that don't start with column 0, we need to insert leading spaces + spaces = 0 + for c, v in columns_to_pad.items(): + if not v: + continue + if (row_group,c) in self.column_max_widths: + spaces += self.column_max_widths[(row_group,c)] + len(", ") + else: + spaces += 0 + return " " * spaces + ", ".join(keys) + "," + + def pretty_output_layer(self, layer, keys): + self.key_coordinates_counter = 0 + if self.output_layout == "LAYOUT_ergodox": + formatted_key_symbols = """ +// left hand + +{} +{} +{} +{} +{} + +// left thumb + +{} +{} +{} + +// right hand + +{} +{} +{} +{} +{} + +// right thumb + +{} +{} +{} +""".format( + # left hand + self.get_padded_line(keys, 0, 7, just="left"), + self.get_padded_line(keys, 7, 14, just="left"), + self.get_padded_line(keys, 14, 20, just="left"), + self.get_padded_line(keys, 20, 27, just="left"), + self.get_padded_line(keys, 27, 32, just="left"), + # left thumb + self.get_padded_line(keys, 32, 34, just="left"), + self.get_padded_line(keys, 34, 35, just="left"), + self.get_padded_line(keys, 35, 38, just="left"), + # right hand + self.get_padded_line(keys, 38, 45, just="left"), + self.get_padded_line(keys, 45, 52, just="left"), + self.get_padded_line(keys, 52, 58, just="left"), + self.get_padded_line(keys, 58, 65, just="left"), + self.get_padded_line(keys, 65, 70, just="left"), + # right thumb + self.get_padded_line(keys, 70, 72, just="left"), + self.get_padded_line(keys, 72, 73, just="left"), + self.get_padded_line(keys, 73, 76, just="left"), + ) + elif self.output_layout == "LAYOUT_ergodox_pretty": + left_half_justification = "right" if self.justify_toward_center else "left" + formatted_key_symbols = """ +{} {} +{} {} +{} {} +{} {} +{} {} + +{} {} +{} {} +{} {} +""".format( + self.get_padded_line(keys, 0, 7, just=left_half_justification), self.get_padded_line(keys, 38, 45, just="left"), + self.get_padded_line(keys, 7, 14, just=left_half_justification), self.get_padded_line(keys, 45, 52, just="left"), + self.get_padded_line(keys, 14, 20, just=left_half_justification), self.get_padded_line(keys, 52, 58, just="left"), + self.get_padded_line(keys, 20, 27, just=left_half_justification), self.get_padded_line(keys, 58, 65, just="left"), + self.get_padded_line(keys, 27, 32, just=left_half_justification), self.get_padded_line(keys, 65, 70, just="left"), + + self.get_padded_line(keys, 32, 34, just=left_half_justification), self.get_padded_line(keys, 70, 72, just="left"), + self.get_padded_line(keys, 34, 35, just=left_half_justification), self.get_padded_line(keys, 72, 73, just="left"), + self.get_padded_line(keys, 35, 38, just=left_half_justification), self.get_padded_line(keys, 73, 76, just="left"), + + ) + else: + formatted_key_symbols = "" + + # rid of the trailing comma + formatted_key_symbols = formatted_key_symbols[0:len(formatted_key_symbols)-2] + "\n" + s = "[{}] = {}({})".format(layer, self.output_layout, formatted_key_symbols) + return s + + # helper functions for pycparser + def parser(self, src): + src = self.comment_remover(src) + return pycparser.CParser().parse(src) + def comment_remover(self, text): + # remove comments since pycparser cannot deal with them + # credit: https://stackoverflow.com/a/241506 + def replacer(match): + s = match.group(0) + if s.startswith('/'): + return " " # note: a space and not an empty string + else: + return s + pattern = re.compile( + r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', + re.DOTALL | re.MULTILINE + ) + return re.sub(pattern, replacer, text) + + def function_expr(self, f): + name = f.name.name + args = [] + for arg in f.args.exprs: + if type(arg) is pycparser.c_ast.Constant: + args.append(arg.value) + elif type(arg) is pycparser.c_ast.ID: + args.append(arg.name) + return "{}({})".format(name, ",".join(args)) + + def key_expr(self, raw): + if type(raw) is pycparser.c_ast.ID: + if raw.name in self.KEY_ALIASES: + return self.KEY_ALIASES[raw.name] + return raw.name + elif type(raw) is pycparser.c_ast.FuncCall: + return self.function_expr(raw) + + def layer_expr(self, layer): + transformed = [self.key_expr(k) for k in layer.expr.args.exprs] + return transformed + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser(description="Beautify keymap.c downloaded from ErgoDox-Ez Configurator for easier customization.") + parser.add_argument("input_filename", help="input file: c source code file that has the layer keymaps") + parser.add_argument("-o", "--output-filename", help="output file: beautified c filename. If not given, output to STDOUT.") + parser.add_argument("-p", "--pretty-output-layout", action="store_true", help="use LAYOUT_ergodox_pretty for output instead of LAYOUT_ergodox") + parser.add_argument("-c", "--justify-toward-center", action="store_true", help="for LAYOUT_ergodox_pretty, align right for the left half, and align left for the right half. Default is align left for both halves.") + args = parser.parse_args() + if args.pretty_output_layout: + output_layout="LAYOUT_ergodox_pretty" + else: + output_layout="LAYOUT_ergodox" + with open(args.input_filename) as f: + source_code = f.read() + result = KeymapBeautifier(source_code, output_layout=output_layout, justify_toward_center=args.justify_toward_center).output + if args.output_filename: + with open(args.output_filename, "w") as f: + f.write(result) + else: + print(result) + diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/README.md b/keyboards/ergodox_ez/util/keymap_beautifier/README.md new file mode 100644 index 0000000000..bd3d125a6d --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/README.md @@ -0,0 +1,139 @@ +# keymap_beautifier.py + +## About +This Python 3 script, by [Tsan-Kuang Lee](https://github.com/tsankuanglee) takes the keymap.c downloaded from [ErgoDox EZ Configurator](https://configure.ergodox-ez.com/) and beautifies it for easier customization, allowing one to quickly draft a layout to build upon. + +## Features +For example, the original `keymap.c` looks like + +``` +[0] = LAYOUT_ergodox(KC_EQUAL,KC_1,KC_2,KC_3,KC_4,KC_5,LCTL(KC_MINUS),KC_DELETE,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_LBRACKET,KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSPO,CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,ALL_T(KC_NO),LT(1,KC_GRAVE),KC_QUOTE,LALT(KC_LSHIFT),KC_LEFT,KC_RIGHT,ALT_T(KC_APPLICATION),KC_LGUI,KC_HOME,KC_SPACE,KC_UNDS,KC_END,LCTL(KC_EQUAL),KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINUS,KC_RBRACKET,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSLASH,KC_H,ALT_T(KC_J),KC_K,KC_L,LT(2,KC_SCOLON),GUI_T(KC_QUOTE),MEH_T(KC_NO),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),KC_RSPC,KC_UP,KC_DOWN,KC_LBRACKET,KC_RBRACKET,TT(1),KC_LALT,CTL_T(KC_ESCAPE),KC_PGUP,KC_PGDOWN,LT(1,KC_TAB),KC_ENTER), +``` + +The beautifier parses it and outputs: + +``` +[0] = LAYOUT_ergodox( +// left hand + +KC_EQUAL , KC_1 , KC_2 , KC_3 , KC_4 , KC_5, LCTL(KC_MINUS), +KC_DELETE , KC_Q , KC_W , KC_E , KC_R , KC_T, KC_LBRACKET , +KC_BSPACE , KC_A , KC_S , KC_D , KC_F , KC_G, +KC_LSPO , CTL_T(KC_Z), KC_X , KC_C , KC_V , KC_B, ALL_T(KC_NO) , +LT(1,KC_GRAVE), KC_QUOTE , LALT(KC_LSHIFT), KC_LEFT, KC_RIGHT, + +// left thumb + + ALT_T(KC_APPLICATION), KC_LGUI, + KC_HOME, +KC_SPACE, KC_UNDS , KC_END , + +// right hand + +LCTL(KC_EQUAL), KC_6, KC_7 , KC_8 , KC_9 , KC_0 , KC_MINUS , +KC_RBRACKET , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_BSLASH , + KC_H, ALT_T(KC_J), KC_K , KC_L , LT(2,KC_SCOLON), GUI_T(KC_QUOTE), +MEH_T(KC_NO) , KC_N, KC_M , KC_COMMA, KC_DOT , CTL_T(KC_SLASH), KC_RSPC , + KC_UP , KC_DOWN , KC_LBRACKET, KC_RBRACKET , TT(1) , + +// right thumb + +KC_LALT , CTL_T(KC_ESCAPE), +KC_PGUP , +KC_PGDOWN, LT(1,KC_TAB) , KC_ENTER +) +``` + +Optionally, it can also render [LAYOUT_ergodox_pretty](https://github.com/qmk/qmk_firmware/blob/ee700b2e831067bdb7584425569b61bc6329247b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c#L49-L57): +``` +[0] = LAYOUT_ergodox_pretty( + KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEAD, KC_LEAD, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPACE , + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HYPR, KC_HYPR, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSLASH , + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H , KC_J , KC_K , KC_L , KC_SCOLON , KC_QUOTE , + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SH_MON, SH_MON , KC_N , KC_M , KC_COMMA , KC_DOT , KC_SLASH , KC_RSHIFT , +LT(6,KC_NO), LT(7,KC_NO), KC_LCTRL, KC_LGUI, KC_LALT, ALGR_T(KC_MINUS), RGUI_T(KC_EQUAL), RCTL_T(KC_LBRACKET), LT(10,KC_RBRACKET), LT(6,KC_APPLICATION), + + LT(6,KC_GRAVE), MEH_T(KC_NO), KC_LEFT, KC_RIGHT , + LT(10,KC_DELETE), KC_UP , + KC_SPACE, LT(8,KC_ENTER), LT(7,KC_BSPACE), KC_DOWN, LT(7,KC_SPACE), LT(8,KC_ENTER) +) +``` + +We can also align everythng t othe left (easier editing in my opinon): +``` +[0] = LAYOUT_ergodox_pretty( +KC_ESCAPE , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_LEAD , KC_LEAD, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPACE , +KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_HYPR , KC_HYPR, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSLASH , +KC_LCTRL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCOLON , KC_QUOTE , +KC_LSHIFT , KC_Z , KC_X , KC_C , KC_V , KC_B , SH_MON , SH_MON , KC_N , KC_M , KC_COMMA , KC_DOT , KC_SLASH , KC_RSHIFT , +LT(6,KC_NO), LT(7,KC_NO), KC_LCTRL, KC_LGUI, KC_LALT , ALGR_T(KC_MINUS), RGUI_T(KC_EQUAL), RCTL_T(KC_LBRACKET), LT(10,KC_RBRACKET), LT(6,KC_APPLICATION), + + LT(6,KC_GRAVE), MEH_T(KC_NO) , KC_LEFT, KC_RIGHT , + LT(10,KC_DELETE), KC_UP , + KC_SPACE, LT(8,KC_ENTER), LT(7,KC_BSPACE) , KC_DOWN, LT(7,KC_SPACE), LT(8,KC_ENTER) +) +``` + +## Usage + +### With docker +This is the cleaner way. `Docker` is the only requirement. The program executes within a container that has all dependencies installed. + +First build the images. (Run once) +``` +cd QMK_GIT_REPO_dir/keyboards/ergodox_ez/util/keymap_beautifier +docker build -t keymapbeautifier:1.0 . +``` +Run it +``` +cd QMK_GIT_REPO_dir/keyboards/ergodox_ez/util/keymap_beautifier +cp PATH_TO_YOUR_C_SOURCE_FILE.c input.c +./docker_run.sh input.c -p -c -o output.c +``` +The prettified file is written to `output.c`. See the section Tweaks for non-default settings. + +### Without docker +Requirements: +* python3 (tested on 3.7.4) +* python module `pycparser` installed (with `pip install pycparser`) + +To run: +``` +cd QMK_GIT_REPO_dir/keyboards/ergodox_ez/util/keymap_beautifier +cp PATH_TO_YOUR_C_SOURCE_FILE.c input.c +./KeymapBeautifier.py input.c -p -c -o output.c +``` +The prettified file is written to `output.c`. See the section Tweaks for non-default settings. + +## Tweaks +``` +usage: KeymapBeautifier.py [-h] [-o OUTPUT_FILENAME] [-p] [-c] input_filename + +Beautify keymap.c downloaded from ErgoDox-Ez Configurator for easier +customization. + +positional arguments: + input_filename input file: c source code file that has the layer + keymaps + +optional arguments: + -h, --help show this help message and exit + -o OUTPUT_FILENAME, --output-filename OUTPUT_FILENAME + output file: beautified c filename. If not given, + output to STDOUT. + -p, --pretty-output-layout + use LAYOUT_ergodox_pretty for output instead of + LAYOUT_ergodox + -c, --justify-toward-center + for LAYOUT_ergodox_pretty, align right for the left + half, and align left for the right half. Default is + align left for both halves. +``` +For example, +``` +./docker_run.sh input.c -p -c -o output.c +# or if you don't want to use docker: +#./KeymapBeautifier.py input.c -p -c -o output.c +``` +will read `input.c`, and produce `output.c` with LAYOUT_ergodox_pretty, and have the key symbols gravitating toward the center. + diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/docker_run.sh b/keyboards/ergodox_ez/util/keymap_beautifier/docker_run.sh new file mode 100755 index 0000000000..1ce43a6dde --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/docker_run.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +docker run --mount type=bind,source="${PWD}",target=/usr/src/app --name keymapbeautifier --rm keymapbeautifier:1.0 ./KeymapBeautifier.py $* diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/requirements.txt b/keyboards/ergodox_ez/util/keymap_beautifier/requirements.txt new file mode 100644 index 0000000000..dc1c9e101a --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/requirements.txt @@ -0,0 +1 @@ +pycparser diff --git a/keyboards/ergodox_ez/util/readme.md b/keyboards/ergodox_ez/util/readme.md index 26c5e5d99c..deb0cad5db 100644 --- a/keyboards/ergodox_ez/util/readme.md +++ b/keyboards/ergodox_ez/util/readme.md @@ -1,3 +1,11 @@ # ErgoDox EZ Utilities +## compile_keymap.py + The Python script in this directory, by [mbarkhau](https://github.com/mbarkhau) allows you to write out a basic ErgoDox EZ keymap using Markdown notation, and then transpile it to C, which you can then compile. It's experimental, but if you're not comfortable using C, it's a nice option. + +## keymap_beautifier.py + +This Python 3 script, by [Tsan-Kuang Lee](https://github.com/tsankuanglee) takes the keymap.c downloaded from [ErgoDox EZ Configurator](https://configure.ergodox-ez.com/) and beautifies it for easier customization, allowing one to quickly draft a layout to build upon. + +See [README.md](./keymap_beautifier/README.md) for this utility for more details. diff --git a/keyboards/ergodox_infinity/keymaps/default/keymap.c b/keyboards/ergodox_infinity/keymaps/default/keymap.c index 7f13f3d672..2fc5344011 100644 --- a/keyboards/ergodox_infinity/keymaps/default/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/default/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, @@ -141,24 +141,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } - return MACRO_NONE; -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { // dynamically generate these. diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c index cf0b452bdf..26de392f9a 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c @@ -1,20 +1,6 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #include "version.h" - -enum custom_layers { - _QWERTY, - _WORKMAN, - _DVORAK, - _COLEMAK, - _LOWER, - _RAISE, - _ADJUST, - _GAME, - _MOUSE, - _NUM, -}; +#include "layers.h" enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -39,41 +25,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | Q | W | E | R | T | [{ | | ]} | Y | U | I | O | P | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' * ,------------. ,------------. - * |Play |Mouse | | Num |Mouse| - * ,----|-----|------| |------+-----+-----. - * | | | Alt | | Alt | | | - * |BSPC|LOWER|------| |------|RAISE|Space| - * | | | LGUI | | LGUI | | | - * `-----------------' `------------------' + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' */ [_QWERTY] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRACKET, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, _______, KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_SPACE, LOWER, KC_LGUI, // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, - KC_FN1, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + _______, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TT(_NUM), TG(_MOUSE), + _______, KC_MPLY, KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Keymap 0: Basic Workman layer @@ -84,41 +70,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | ' | - * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' * ,------------. ,------------. - * |Play |Mouse | | Num |Mouse| - * ,----|-----|------| |------+-----+-----. - * | | | Alt | | Alt | | | - * |BSPC|LOWER|------| |------|RAISE|Space| - * | | | LGUI | | LGUI | | | - * `-----------------' `------------------' + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' */ [_WORKMAN] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET, KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, - KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_FN1, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, _______, TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, _______, KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_SPACE, LOWER, KC_LGUI, // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE, - KC_FN1, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + _______, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TT(_NUM), TG(_MOUSE), + _______, KC_MPLY, KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Keymap 0: Basic Dvorak layer @@ -129,41 +115,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | ' | , | . | P | Y | [{ | | ]} | F | G | C | R | L | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | / | - * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' * ,------------. ,------------. - * |Play |Mouse | | Num |Mouse| - * ,----|-----|------| |------+-----+-----. - * | | | Alt | | Alt | | | - * |BSPC|LOWER|------| |------|RAISE|Space| - * | | | LGUI | | LGUI | | | - * `-----------------' `------------------' + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' */ [_DVORAK] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRACKET, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_FN1, + KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, _______, TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, _______, KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_SPACE, LOWER, KC_LGUI, // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE, KC_D, KC_H, KC_T, KC_N, KC_S, LT(MOUSE, KC_SLSH), - KC_FN1, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT), + _______, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TT(_NUM), TG(_MOUSE), + _______, KC_MPLY, KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Keymap 0: Basic Colemak layer @@ -174,41 +160,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | Q | W | F | P | G | [{ | | ]} | J | L | U | Y | ; | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | ESC | A | R | S | T | D |------| |------| H | N | E | I | O | ' | - * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' * ,------------. ,------------. - * |Play |Mouse | | Num |Mouse| - * ,----|-----|------| |------+-----+-----. - * | | | Alt | | Alt | | | - * |BSPC|LOWER|------| |------|RAISE|Space| - * | | | LGUI | | LGUI | | | - * `-----------------' `------------------' + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' */ [_COLEMAK] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRACKET, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, _______, KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_SPACE, LOWER, KC_LGUI, // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_J, KC_L, KC_U, KC_Y, KC_SCOLON, KC_BSPACE, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, - KC_FN1, KC_K, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + _______, KC_K, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TT(_NUM), TG(_MOUSE), + _______, KC_MPLY, KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Lower @@ -216,19 +202,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,---------------------------------------------------. ,--------------------------------------------------. * | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | + * | ~ | ! | @ | # | $ | % | F6 | | F5 | ^ | & | * | ( | ) | | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | _ | + | { | } | | | - * |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| + * |---------+------+------+------+------+------| F12 | | F11 |------+------+------+------+------+--------| * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | Home | End | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * |Animat| | |Toggle|Solid | + * | | | | | | * ,------|------|------| |------+------+------. - * |Bright|Bright| | | |Hue- |Hue+ | - * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' */ @@ -261,10 +247,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,---------------------------------------------------. ,--------------------------------------------------. * | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * | ` | 1 | 2 | 3 | 4 | 5 | F6 | | F5 | 6 | 7 | 8 | 9 | 0 | | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | - | = | [ | ] | \ | - * |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| + * |---------+------+------+------+------+------| F12 | | F11 |------+------+------+------+------+--------| * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | Play | Vol- | Vol+ | Next | @@ -308,7 +294,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | |Reset |Debug | | | | | | | |TRM on|TRMoff| | | Del | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | CPSLCK | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak| | | + * | CPSLCK | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak|Colmak| | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -325,7 +311,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ergodox( // left hand VRSN, _______, _______, _______, _______, _______, _______, - _______, RESET, DEBUG, _______, _______, _______, _______, + _______, RESET, DEBUG, BL_TOGG, BL_STEP, _______, _______, KC_CAPS, _______, _______, _______, _______, AG_NORM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -502,6 +488,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; +void matrix_init_user() { + backlight_enable(); + backlight_level(BACKLIGHT_LEVELS); +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: @@ -576,34 +567,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -/** - * Runs just one time when the keyboard initializes. - */ -void matrix_init_user(void) { - -}; - -/** - * Runs constantly in the background, in a loop. - */ -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_led_lower_off(); - ergodox_led_raise_off(); - ergodox_led_adjust_off(); - - switch (layer) { - case _LOWER: - ergodox_led_lower_on(); - break; - case _RAISE: - ergodox_led_raise_on(); - break; - case _ADJUST: - ergodox_led_adjust_on(); - break; - } -}; diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/layers.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/layers.h new file mode 100644 index 0000000000..d852fe9803 --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/layers.h @@ -0,0 +1,14 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _WORKMAN, + _DVORAK, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST, + _GAME, + _MOUSE, + _NUM, +}; diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h new file mode 100644 index 0000000000..9213e99f42 --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h @@ -0,0 +1,123 @@ +/* Copyright 2017 Fred Sundvik + * + * 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 . + */ + +#ifndef KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ +#define KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ + +// Currently we are assuming that both the backlight and LCD are enabled +// But it's entirely possible to write a custom visualizer that use only +// one of them +#ifndef LCD_BACKLIGHT_ENABLE +#error This visualizer needs that LCD backlight is enabled +#endif + +#ifndef LCD_ENABLE +#error This visualizer needs that LCD is enabled +#endif + +#include "visualizer.h" +#include "visualizer_keyframes.h" +#include "lcd_keyframes.h" +#include "lcd_backlight_keyframes.h" +#include "system/serial_link.h" +#include "led.h" +#include "default_animations.h" + +static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); +static const uint32_t initial_color = LCD_COLOR(0, 0, 0); + +static bool initial_update = true; + +// Feel free to modify the animations below, or even add new ones if needed + +static keyframe_animation_t lcd_layer_display = { + .num_frames = 1, + .loop = false, + .frame_lengths = {gfxMillisecondsToTicks(0)}, + .frame_functions = {lcd_keyframe_display_layer_and_led_states} +}; + +// The color animation animates the LCD color when you change layers +static keyframe_animation_t color_animation = { + .num_frames = 2, + .loop = false, + // Note that there's a 200 ms no-operation frame, + // this prevents the color from changing when activating the layer + // momentarily + .frame_lengths = {gfxMillisecondsToTicks(1), gfxMillisecondsToTicks(5)}, + .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, +}; + +void initialize_user_visualizer(visualizer_state_t* state) { + // The brightness will be dynamically adjustable in the future + // But for now, change it here. + lcd_backlight_brightness(130); + state->current_lcd_color = initial_color; + state->target_lcd_color = logo_background_color; + initial_update = true; + start_keyframe_animation(&default_startup_animation); +} + + +// This function should be implemented by the keymap visualizer +// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing +// that the simple_visualizer assumes that you are updating +// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is +// stopped. This can be done by either double buffering it or by using constant strings +static void get_visualizer_layer_and_color(visualizer_state_t* state); + +void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { + // Add more tests, change the colors and layer texts here + // Usually you want to check the high bits (higher layers first) + // because that's the order layers are processed for keypresses + // You can for check for example: + // state->status.layer + // state->status.default_layer + // state->status.leds (see led.h for available statuses) + + uint32_t prev_color = state->target_lcd_color; + const char* prev_layer_text = state->layer_text; + + get_visualizer_layer_and_color(state); + + if (initial_update || prev_color != state->target_lcd_color) { + start_keyframe_animation(&color_animation); + } + + if (initial_update || prev_layer_text != state->layer_text) { + start_keyframe_animation(&lcd_layer_display); + } + // You can also stop existing animations, and start your custom ones here + // remember that you should normally have only one animation for the LCD + // and one for the background. But you can also combine them if you want. +} + +void user_visualizer_suspend(visualizer_state_t* state) { + state->layer_text = "Suspending..."; + uint8_t hue = LCD_HUE(state->current_lcd_color); + uint8_t sat = LCD_SAT(state->current_lcd_color); + state->target_lcd_color = LCD_COLOR(hue, sat, 0); + start_keyframe_animation(&default_suspend_animation); +} + +void user_visualizer_resume(visualizer_state_t* state) { + state->current_lcd_color = initial_color; + state->target_lcd_color = logo_background_color; + initial_update = true; + start_keyframe_animation(&default_startup_animation); +} + +#endif /* KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c index d339ecc970..54fc2363c7 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c @@ -1,5 +1,5 @@ /* -Copyright 2016 Fred Sundvik +Copyright 2017 Fred Sundvik 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 @@ -15,331 +15,65 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/** - * Currently we are assuming that both the backlight and LCD are enabled - * But it's entirely possible to write a custom visualizer that use only - * one of them - */ -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif +#include "./simple_visualizer.h" +#include "util.h" +#include "layers.h" -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "./visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0, 0, 255); -static const uint32_t initial_color = LCD_COLOR(84, 255, 255); - -static const uint32_t led_emulation_colors[4] = { - LCD_COLOR(0, 0, 255), - LCD_COLOR(141, 255, 255), - LCD_COLOR(18, 255, 255), - LCD_COLOR(194, 255, 255), -}; - -static uint32_t next_led_target_color = 0; - -typedef enum { - LCD_STATE_INITIAL, - LCD_STATE_LAYER_BITMAP, - LCD_STATE_BITMAP_AND_LEDS, -} lcd_state_t; - -static lcd_state_t lcd_state = LCD_STATE_INITIAL; - -typedef struct { - uint8_t led_on; - uint8_t led1; - uint8_t led2; - uint8_t led3; -} visualizer_user_data_t; - -/** - * Don't access from visualization function, use the visualizer state instead - */ -static visualizer_user_data_t user_data_keyboard = { - .led_on = 0, - .led1 = LED_BRIGHTNESS_HI, - .led2 = LED_BRIGHTNESS_HI, - .led3 = LED_BRIGHTNESS_HI, -}; - -_Static_assert(sizeof(visualizer_user_data_t) <= VISUALIZER_USER_DATA_SIZE, - "Please increase the VISUALIZER_USER_DATA_SIZE"); - -// Feel free to modify the animations below, or even add new ones if needed - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t one_led_color = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_backlight_keyframe_set_color}, -}; - -bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) { - uint32_t temp = next_led_target_color; - next_led_target_color = state->target_lcd_color; - state->target_lcd_color = temp; - return false; -} - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t two_led_colors = { - .num_frames = 2, - .loop = true, - .frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_backlight_keyframe_set_color, swap_led_target_color}, -}; - -/** - * The LCD animation alternates between the layer name display and a - * bitmap that displays all active layers - */ -static keyframe_animation_t lcd_bitmap_animation = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_bitmap}, -}; - -static keyframe_animation_t lcd_bitmap_leds_animation = { - .num_frames = 2, - .loop = true, - .frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)}, - .frame_functions = {lcd_keyframe_display_layer_bitmap, lcd_keyframe_display_led_states}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - /** - * The brightness will be dynamically adjustable in the future - * But for now, change it here. - */ - lcd_backlight_brightness(180); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - lcd_state = LCD_STATE_INITIAL; - start_keyframe_animation(&default_startup_animation); -} - -static inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) { - return user_data->led_on & (1u << num); -} - -static uint8_t get_led_index_master(visualizer_user_data_t* user_data) { - for (int i=0; i < 4; i++) { - if (is_led_on(user_data, i)) { - return i + 1; - } - } - return 0; -} - -static uint8_t get_led_index_slave(visualizer_user_data_t* user_data) { - uint8_t master_index = get_led_index_master(user_data); - if (master_index!=0) { - for (int i=master_index; i < 4; i++) { - if (is_led_on(user_data, i)) { - return i + 1; - } - } +// This function should be implemented by the keymap visualizer +// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing +// that the simple_visualizer assumes that you are updating +// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is +// stopped. This can be done by either double buffering it or by using constant strings +static void get_visualizer_layer_and_color(visualizer_state_t* state) { + switch(biton32(default_layer_state)) { + case _QWERTY: + state->layer_text = "QWERTY"; + state->target_lcd_color = LCD_COLOR(0, 255, 128); + break; + case _WORKMAN: + state->layer_text = "Workman"; + state->target_lcd_color = LCD_COLOR(80, 255, 128); + break; + case _DVORAK: + state->layer_text = "Dvorak"; + state->target_lcd_color = LCD_COLOR(194, 255, 128); + break; + case _COLEMAK: + state->layer_text = "Colemak"; + state->target_lcd_color = LCD_COLOR(18, 255, 128); + break; } - return 0; -} - -static uint8_t get_secondary_led_index(visualizer_user_data_t* user_data) { - if ( - is_led_on(user_data, 0) && - is_led_on(user_data, 1) && - is_led_on(user_data, 2) - ) { - return 3; - } - return 0; -} - -static uint8_t get_brightness(visualizer_user_data_t* user_data, uint8_t index) { - switch (index) { - case 1: - return user_data->led1; - case 2: - return user_data->led2; - case 3: - return user_data->led3; - } - return 0; -} - -static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - visualizer_user_data_t* user_data_new = (visualizer_user_data_t*)state->status.user_data; - visualizer_user_data_t* user_data_old = (visualizer_user_data_t*)prev_status->user_data; - - uint8_t new_index; - uint8_t old_index; - - if (true || is_serial_link_master()) { - new_index = get_led_index_master(user_data_new); - old_index = get_led_index_master(user_data_old); - } else { - new_index = get_led_index_slave(user_data_new); - old_index = get_led_index_slave(user_data_old); - } - - uint8_t new_secondary_index = get_secondary_led_index(user_data_new); - uint8_t old_secondary_index = get_secondary_led_index(user_data_old); - - uint8_t new_brightness = get_brightness(user_data_new, new_index); - uint8_t old_brightness = get_brightness(user_data_old, old_index); - - uint8_t new_secondary_brightness = get_brightness(user_data_new, new_secondary_index); - uint8_t old_secondary_brightness = get_brightness(user_data_old, old_secondary_index); - - if ( - lcd_state == LCD_STATE_INITIAL || - new_index != old_index || - new_secondary_index != old_secondary_index || - new_brightness != old_brightness || - new_secondary_brightness != old_secondary_brightness - ) { - if (new_secondary_index != 0) { - state->target_lcd_color = change_lcd_color_intensity( - led_emulation_colors[new_index], new_brightness); - next_led_target_color = change_lcd_color_intensity( - led_emulation_colors[new_secondary_index], new_secondary_brightness); - - stop_keyframe_animation(&one_led_color); - start_keyframe_animation(&two_led_colors); - } else { - state->target_lcd_color = change_lcd_color_intensity( - led_emulation_colors[new_index], new_brightness); - - stop_keyframe_animation(&two_led_colors); - start_keyframe_animation(&one_led_color); - } + switch(biton32(state->status.layer)) { + case _LOWER: + state->layer_text = "Lower"; + state->target_lcd_color = LCD_COLOR(141, 255, 255); + break; + case _RAISE: + state->layer_text = "Raise"; + state->target_lcd_color = LCD_COLOR(18, 255, 255); + break; + case _ADJUST: + state->layer_text = "Adjust"; + state->target_lcd_color = LCD_COLOR(194, 255, 255); + break; + case _NUM: + state->layer_text = "Numpad"; + state->target_lcd_color = LCD_COLOR(80, 255, 255); + break; + case _MOUSE: + state->layer_text = "Mouse"; + state->target_lcd_color = LCD_COLOR(300, 255, 255); + break; + case _GAME: + state->layer_text = "Game"; + state->target_lcd_color = LCD_COLOR(300, 255, 255); + break; + case _QWERTY: case _WORKMAN: case _DVORAK: case _COLEMAK: + break; + default: + state->layer_text = "NONE"; + state->target_lcd_color = LCD_COLOR(0, 255, 255); + break; } } - -static void update_lcd_text(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - if (state->status.leds) { - if ( - lcd_state != LCD_STATE_BITMAP_AND_LEDS || - state->status.leds != prev_status->leds || - state->status.layer != prev_status->layer || - state->status.default_layer != prev_status->default_layer - ) { - // NOTE: that it doesn't matter if the animation isn't playing, stop will do nothing in that case - stop_keyframe_animation(&lcd_bitmap_animation); - - lcd_state = LCD_STATE_BITMAP_AND_LEDS; - /** - * For information: - * The logic in this function makes sure that this doesn't happen, but if you call start on an - * animation that is already playing it will be restarted. - */ - start_keyframe_animation(&lcd_bitmap_leds_animation); - } - } else { - if ( - lcd_state != LCD_STATE_LAYER_BITMAP || - state->status.layer != prev_status->layer || - state->status.default_layer != prev_status->default_layer - ) { - stop_keyframe_animation(&lcd_bitmap_leds_animation); - - lcd_state = LCD_STATE_LAYER_BITMAP; - start_keyframe_animation(&lcd_bitmap_animation); - } - } -} - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - /** - * Check the status here to start and stop animations - * You might have to save some state, like the current animation here so that you can start the right - * This function is called every time the status changes - * - * NOTE that this is called from the visualizer thread, so don't access anything else outside the status - * This is also important because the slave won't have access to the active layer for example outside the - * status. - */ - - update_emulated_leds(state, prev_status); - update_lcd_text(state, prev_status); -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - lcd_state = LCD_STATE_INITIAL; - start_keyframe_animation(&default_startup_animation); -} - -void ergodox_board_led_on(void){ - // No board led support -} - -void ergodox_led_lower_on(void){ - user_data_keyboard.led_on |= (1u << 0); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_raise_on(void){ - user_data_keyboard.led_on |= (1u << 1); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_adjust_on(void){ - user_data_keyboard.led_on |= (1u << 2); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_board_led_off(void){ - // No board led support -} - -void ergodox_led_lower_off(void){ - user_data_keyboard.led_on &= ~(1u << 0); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_raise_off(void){ - user_data_keyboard.led_on &= ~(1u << 1); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_adjust_off(void){ - user_data_keyboard.led_on &= ~(1u << 2); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_lower_set(uint8_t n) { - user_data_keyboard.led1 = n; - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_raise_set(uint8_t n) { - user_data_keyboard.led2 = n; - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_adjust_set(uint8_t n) { - user_data_keyboard.led3 = n; - visualizer_set_user_data(&user_data_keyboard); -} diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/rules.mk b/keyboards/ergodox_infinity/keymaps/halfkeyboard/rules.mk index 2d3597ceb9..43a3185295 100644 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/rules.mk +++ b/keyboards/ergodox_infinity/keymaps/halfkeyboard/rules.mk @@ -54,6 +54,8 @@ ARMV = 7 # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000 +BOOTLOADER = dfu + # Build Options # comment out to disable the options. # diff --git a/keyboards/ergodox_infinity/keymaps/input_club/keymap.c b/keyboards/ergodox_infinity/keymaps/input_club/keymap.c index 064c01c551..2aa74c4195 100644 --- a/keyboards/ergodox_infinity/keymaps/input_club/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/input_club/keymap.c @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, KC_GRV, KC_BSLS, KC_LEFT, KC_RGHT, KC_LCTL, KC_LALT, KC_HOME, - KC_BSPC, KC_DELT, KC_END, + KC_BSPC, KC_DEL, KC_END, /* right hand * +-----+-----+-----+-----+-----+-----+-------+ * |LCK-2| 6 | 7 | 8 | 9 | 0 | - | diff --git a/keyboards/ergodox_infinity/keymaps/narze/config.h b/keyboards/ergodox_infinity/keymaps/narze/config.h index 551327a126..d5ed0a8e9e 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/config.h +++ b/keyboards/ergodox_infinity/keymaps/narze/config.h @@ -1,15 +1,10 @@ -#ifndef CONFIG_H_ -#define CONFIG_H_ - -#include "../../config.h" +#pragma once #undef TAPPING_TERM #define TAPPING_TERM 150 -// Combos not working yet -// #define COMBO_TERM 20 -// #define COMBO_COUNT 1 -// #define COMBO_ALLOW_ACTION_KEYS +#define COMBO_TERM 20 +#define COMBO_COUNT 1 #define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD @@ -17,4 +12,4 @@ #undef MOUSEKEY_DELAY #define MOUSEKEY_DELAY 100 -#endif +#define USB_POLLING_INTERVAL_MS 1 diff --git a/keyboards/ergodox_infinity/keymaps/narze/keymap.c b/keyboards/ergodox_infinity/keymaps/narze/keymap.c index d562c4a9de..4a4e8ab941 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/narze/keymap.c @@ -1,93 +1,56 @@ #include QMK_KEYBOARD_H -// #include "debug.h" -#include "action_layer.h" +#include "narze.h" #include "version.h" -#include "eeconfig.h" -#include "eeprom.h" #include "keymap_colemak.h" extern keymap_config_t keymap_config; enum ergodox_layers { - _QWERTY, - _COLEMAK, - _QWOC, - _LOWER, - _RAISE, - _PLOVER, -// Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet) - _SUPER, - _DUPER, - _SUPERDUPER, - _MOUSE, - _ADJUST, - _MDIA, - _SYMB, + _QWERTY, + _COLEMAK, + _QWOC, + _LOWER, + _RAISE, + _PLOVER, + // Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet) + _SUPERDUPER, + _DEV, + _MOUSE, + _ADJUST, + _MDIA, + _SYMB, }; enum ergodox_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - QWOC, - PLOVER, - SUPER, - DUPER, - SUPERDUPER, - MOUSE, - LOWER, - RAISE, - BACKLIT, - EXT_PLV, - SDTOGG, // Toggle SuperDuper - EPRM, - VRSN, - RGB_SLD + QWERTY = SAFE_RANGE, + COLEMAK, + QWOC, + LOWER, + RAISE, + PLOVER, + SUPERDUPER, + DEV, + MOUSE, + BACKLIT, + EXT_PLV, + SDTOGG, // Toggle SuperDuper + EPRM, + VRSN, + RGB_SLD, + GUI_UNDS, + LSFT_LPRN, + RSFT_RPRN, }; -enum functions { - M_GUI_UNDS, // Simulate GUI_T(KC_UNDS) - M_SFT_PO, // SFT_T(KC_LPRN) - M_SFT_PC, // SFT_T(KC_RPRN) -}; - -// Timer for custom mod tap -static uint16_t m_gui_unds_timer; -static uint16_t m_sft_po_timer; -static uint16_t m_sft_pc_timer; - // Narze : Custom Macros #define HPR_ESC ALL_T(KC_ESC) #define SFT_ENT SFT_T(KC_ENT) -#define SFT_PO F(M_SFT_PO) -#define SFT_PC F(M_SFT_PC) -#define GUI_MINS GUI_T(KC_MINS) -#define GUI_UNDS F(M_GUI_UNDS) +#define SFT_PO LSFT_LPRN +#define SFT_PC RSFT_RPRN -// Combo : SuperDuper layer from S+D (R+S in Colemak) -// #define COMBO_COUNT 1 -// #define SUPERDUPER_COMBO_COUNT 3 -// #define EECONFIG_SUPERDUPER_INDEX (uint8_t *) 19 - -// enum process_combo_event { -// CB_SUPERDUPER, -// }; - -// const uint16_t PROGMEM superduper_combos[SUPERDUPER_COMBO_COUNT][3] = { -// [_QWERTY] = {KC_S, KC_D, COMBO_END}, -// [_COLEMAK] = {KC_R, KC_S, COMBO_END}, -// [_QWOC] = {CM_S, CM_D, COMBO_END}, -// }; - -// combo_t PROGMEM key_combos[COMBO_COUNT] = { -// [CB_SUPERDUPER] = COMBO_ACTION(superduper_combos[_QWERTY]), -// }; - -// volatile bool superduper_enabled = true; - -// const uint16_t empty_combo[] = {COMBO_END}; - -// void set_superduper_key_combos(void); -// void clear_superduper_key_combos(void); +enum process_combo_event { + CB_SUPERDUPER, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -99,9 +62,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Hp/Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | Sft/( | Z/Mo | X | C | V | B | | | | N | M | , | . | SD-/ | Sft/) | + * | Sft/( | Z/Dv | X | C | V | B | | | | N | M | , | . | SD-/ | Sft/) | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse | GUI/-| Alt | Ctrl | Low/] | + * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse/B| Bksp | Alt | Ctrl | Low/] | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Enter| LGui | | Alt |Ctrl/Esc| @@ -115,8 +78,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, LT(_SYMB, KC_NO), - HPR_ESC, KC_A, LT(_SUPER, KC_S), LT(_DUPER, KC_D), KC_F, KC_G, - SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + SFT_PO, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_ENT, KC_LGUI, KC_HOME, @@ -126,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(_SYMB, KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, - RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + RAISE, KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_BSPC, KC_ENT @@ -140,9 +103,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Hp/Esc | A | R | S | T | D |------| |------| H | N | E | I | O | ' | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | Sft/( | Z/Mo | X | C | V | B | | | | K | M | , | . | SD-/ | Sft/) | + * | Sft/( | Z/Dv | X | C | V | B | | | | K | M | , | . | SD-/ | Sft/) | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse | GUI/-| Alt | Ctrl | Low/] | + * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse/B| Bksp | Alt | Ctrl | Low/] | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Enter| LGui | | Alt |Ctrl/Esc| @@ -156,8 +119,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, LT(_SYMB, KC_NO), - HPR_ESC, KC_A, LT(_SUPER,KC_R), LT(_DUPER,KC_S), KC_T, KC_D, - SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + HPR_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, + SFT_PO, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_ENT, KC_LGUI, KC_HOME, @@ -167,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(_SYMB, KC_NO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, MEH_T(KC_NO),KC_K, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, - RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + RAISE, KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_BSPC, KC_ENT @@ -177,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), KC_TAB, CM_Q, CM_W, CM_E, CM_R, CM_T, LT(_SYMB, KC_NO), - HPR_ESC, CM_A, LT(_SUPER,CM_S), LT(_DUPER,CM_D), CM_F, CM_G, + HPR_ESC, CM_A, CM_S, CM_D, CM_F, CM_G, SFT_PO, LT(_MOUSE, CM_Z), CM_X, CM_C, CM_V, CM_B, ALL_T(KC_NO), LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_ENT, KC_LGUI, @@ -188,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(_SYMB, KC_NO), CM_Y, CM_U, CM_I, CM_O, CM_P, KC_BSLS, CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT, MEH_T(KC_NO),CM_N, CM_M, CM_COMM,CM_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, - RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + RAISE, KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_BSPC, KC_ENT @@ -357,12 +320,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______,_______, KC_LSFT ), -// Intermediate keymaps for SuperDuper (Combo keys does not work on Infinity yet) -[_SUPER] = LAYOUT_ergodox( + +/* Dev Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | - | + | ( | ) | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| _ | [ | ] | { | } | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | = | | | < | > | ? | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[_DEV] = LAYOUT_ergodox( // left hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, DUPER, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -370,29 +354,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, // right hand _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______,_______, _______ - ), -[_DUPER] = LAYOUT_ergodox( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, SUPER, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______,_______,_______, - // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MINS, S(KC_EQL), S(KC_9), S(KC_0), _______, + S(KC_MINS), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), _______, + _______, KC_EQL, S(KC_BSLASH), S(KC_COMM), S(KC_DOT), S(KC_SLSH), _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -452,7 +416,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | |SDTogg| | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | + * | | | | | | | | | | | BACKLIT| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -477,7 +441,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, KC_DEL, AG_SWAP, QWERTY, COLEMAK, QWOC, PLOVER, _______, _______, SDTOGG, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, + _______, _______, _______, _______, BACKLIT, _______, _______, _______, _______,_______, _______ @@ -569,146 +533,123 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QWERTY); + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); - // key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWERTY]; - // eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_COLEMAK); + set_superduper_key_combo_layer(_QWERTY); + } + return false; - // key_combos[CB_SUPERDUPER].keys = superduper_combos[_COLEMAK]; - // eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _COLEMAK); - } - return false; - break; - case QWOC: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QWOC); + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); - // key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWOC]; - // eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWOC); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case SUPER: - if (record->event.pressed) { - layer_on(_SUPER); - update_tri_layer(_SUPER, _DUPER, _SUPERDUPER); - } else { - layer_off(_SUPER); - update_tri_layer(_SUPER, _DUPER, _SUPERDUPER); - } - return false; - break; - case DUPER: - if (record->event.pressed) { - layer_on(_DUPER); - update_tri_layer(_SUPER, _DUPER, _SUPERDUPER); - } else { - layer_off(_DUPER); - update_tri_layer(_SUPER, _DUPER, _SUPERDUPER); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - case PLOVER: - if (record->event.pressed) { - layer_off(_RAISE); - layer_off(_LOWER); - layer_off(_ADJUST); - layer_on(_PLOVER); - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - keymap_config.raw = eeconfig_read_keymap(); - keymap_config.nkro = 1; - eeconfig_update_keymap(keymap_config.raw); - } - return false; - break; - case EXT_PLV: - if (record->event.pressed) { - layer_off(_PLOVER); - } - return false; - break; - case SDTOGG: - if (record->event.pressed) { - // superduper_enabled = !superduper_enabled; + set_superduper_key_combo_layer(_COLEMAK); + } + return false; - // if (superduper_enabled) { - // set_superduper_key_combos(); - // } else { - // clear_superduper_key_combos(); - // } - } - return false; - break; - case EPRM: - if (record->event.pressed) { - eeconfig_init(); - } - return false; - break; - case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; - break; - } - return true; + case QWOC: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWOC); + + set_superduper_key_combo_layer(_QWOC); + } + return false; + + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + + case PLOVER: + if (record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + + case EXT_PLV: + if (record->event.pressed) { + layer_off(_PLOVER); + } + return false; + + case SDTOGG: + if (record->event.pressed) { + toggle_superduper_mode(); + } + return false; + + case VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + + // Macros + + // 1. Hold for LGUI, tap for Underscore + case GUI_UNDS: + perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + return false; + + // 2. Hold for LSHIFT, tap for Parens open + case LSFT_LPRN: + perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + return false; + + // 3. Hold for RSHIFT, tap for Parens close + case RSFT_RPRN: + perform_space_cadet(record, KC_RSFT, KC_RSFT, KC_0); + return false; + + } + return true; } void matrix_init_user(void) { @@ -716,25 +657,9 @@ void matrix_init_user(void) { } void matrix_setup(void) { - // set_superduper_key_combos(); + set_superduper_key_combos(); } -// void set_superduper_key_combos(void) { -// uint8_t layer = eeprom_read_byte(EECONFIG_SUPERDUPER_INDEX); - -// switch (layer) { -// case _QWERTY: -// case _COLEMAK: -// case _QWOC: -// key_combos[CB_SUPERDUPER].keys = superduper_combos[layer]; -// break; -// } -// } - -// void clear_superduper_key_combos(void) { -// key_combos[CB_SUPERDUPER].keys = empty_combo; -// } - void matrix_scan_user(void) { // uint8_t layer = biton32(layer_state); @@ -758,91 +683,17 @@ void matrix_scan_user(void) { // Combos -// void process_combo_event(uint8_t combo_index, bool pressed) { -// if (pressed) { -// switch(combo_index) { -// case CB_SUPERDUPER: -// layer_on(_SUPERDUPER); -// ergodox_board_led_on(); -// break; -// } -// } else { -// layer_off(_SUPERDUPER); -// ergodox_board_led_off(); -// unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them -// } -// } - -// Macros - -const uint16_t PROGMEM fn_actions[] = { - [M_GUI_UNDS] = ACTION_MACRO_TAP(M_GUI_UNDS), - [M_SFT_PO] = ACTION_MACRO_TAP(M_SFT_PO), - [M_SFT_PC] = ACTION_MACRO_TAP(M_SFT_PC), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - bool tap_not_interrupted = record->tap.count > 0 && !record->tap.interrupted; - - switch(id) { - // Hold for LGUI, tap for Underscore - case M_GUI_UNDS: - if (record->event.pressed) { - m_gui_unds_timer = timer_read(); - - if (!tap_not_interrupted) { - register_mods(MOD_BIT(KC_LGUI)); +void process_combo_event(uint8_t combo_index, bool pressed) { + if (pressed) { + switch(combo_index) { + case CB_SUPERDUPER: + layer_on(_SUPERDUPER); + ergodox_board_led_on(); + break; } - } else { - if (tap_not_interrupted && timer_elapsed(m_gui_unds_timer) < TAPPING_TERM) { - - add_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - register_code(KC_MINS); - unregister_code(KC_MINS); - del_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - record->tap.count = 0; // ad hoc: cancel tap - } else { - unregister_mods(MOD_BIT(KC_LGUI)); - } - } - break; - // Hold for LSHIFT, tap for Parens open - case M_SFT_PO: - if (record->event.pressed) { - m_sft_po_timer = timer_read(); - - if (!tap_not_interrupted) { - register_mods(MOD_BIT(KC_LSFT)); - } - } else { - if (tap_not_interrupted && timer_elapsed(m_sft_po_timer) < TAPPING_TERM) { - record->tap.count = 0; - return MACRO(D(RSFT), T(9), U(RSFT), END); - } else { - unregister_mods(MOD_BIT(KC_LSFT)); - } - } - break; - // Hold for RSHIFT, tap for Parens close - case M_SFT_PC: - if (record->event.pressed) { - m_sft_pc_timer = timer_read(); - - if (!tap_not_interrupted) { - register_mods(MOD_BIT(KC_RSFT)); - } - } else { - if (tap_not_interrupted && timer_elapsed(m_sft_pc_timer) < TAPPING_TERM) { - record->tap.count = 0; - return MACRO(D(LSFT), T(0), U(LSFT), END); - } else { - unregister_mods(MOD_BIT(KC_RSFT)); - } - } - break; - } - return MACRO_NONE; -}; + } else { + layer_off(_SUPERDUPER); + ergodox_board_led_off(); + unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them + } +} diff --git a/keyboards/ergodox_infinity/keymaps/narze/readme.md b/keyboards/ergodox_infinity/keymaps/narze/readme.md index 03a72f1ac3..f24fc05fe0 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/readme.md +++ b/keyboards/ergodox_infinity/keymaps/narze/readme.md @@ -25,21 +25,22 @@ Press `S+D` simultaneously and hold, then... - It can be activated by holding `/` as well, but it's slower since `LT()` uses `TAPPING_TERM` of 200ms but `S+D` uses `COMBO_TERM` of only 20ms (Can be changed within config.h) ## Build instructions -- `cd /path/to/qmk_firmware` +If your environment is ready to build with `make`, don't use docker since it takes 5m+ to compile. +Use the instructions in Ergodox Infinity's readme. -#### Left side - ``` -docker run -e keymap=narze -e subproject=infinity -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware +#### Left side (Docker) +``` +cd /path/to/qmk_firmware +util/docker_build.sh ergodox_infinity:narze avr-objcopy -Iihex -Obinary .build/ergodox_infinity_narze.hex .build/ergodox_infinity_narze_left.bin dfu-util --device 1c11:b007 -D .build/ergodox_infinity_narze_left.bin ``` -#### Right side +#### Right side (Docker) +You have to override `usb_args` in order to pass `MASTER=right` to docker using provided build script. ``` -docker run -e keymap=narze -e subproject=infinity -e keyboard=ergodox -e MASTER=right --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware +cd /path/to/qmk_firmware +usb_args="-e MASTER=right" util/docker_build.sh ergodox_infinity:narze avr-objcopy -Iihex -Obinary .build/ergodox_infinity_narze.hex .build/ergodox_infinity_narze_right.bin dfu-util --device 1c11:b007 -D .build/ergodox_infinity_narze_right.bin ``` - -## TODO -- [ ] Make SuperDuper mode fully-compatible in Windows by swapping GUI with Ctrl diff --git a/keyboards/ergodox_infinity/keymaps/narze/rules.mk b/keyboards/ergodox_infinity/keymaps/narze/rules.mk index bd89bb9d98..4bfa4fde26 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/rules.mk +++ b/keyboards/ergodox_infinity/keymaps/narze/rules.mk @@ -15,10 +15,9 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# Combos not working yet -COMBO_ENABLE = no +COMBO_ENABLE = yes diff --git a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c index 156fd2f198..be96f0db08 100644 --- a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c @@ -1,29 +1,25 @@ // Nordic layout for Ergodox infinity - #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #include "version.h" #include "keymap_nordic.h" #include "keymap_german.h" -// Layer names -#define BASE 0 // default layer -#define FUNCL 1 // function layer -#define SYMB 2 // symbol layer -#define MDIA 3 // media keys +enum layer_names { + BASE, + FUNCL, + SYMB, + MDIA +}; enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - EPRM, - VRSN, + VRSN = SAFE_RANGE, RGB_SLD }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * - * + * * * ,--------------------------------------------------. ,--------------------------------------------------. * | Esc | 1 | 2 | 3 | 4 | 5 | §½ | | PRSC | 6 | 7 | 8 | 9 | 0 | - | @@ -34,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | - | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | Ctrl | ¨^ | <|> | Alt | LGui| | Ctrl | Alt | ´` | + | RGui | + * | Ctrl | ¨^ | <|> | LGui | Alt | | Ctrl | Alt | ´` | + | RGui | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | LEFT |RIGHT | | DOWN | UP | @@ -46,69 +42,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // layer 0 : default - // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(2), - KC_LCTRL, KC_RBRC, KC_NONUS_BSLASH, KC_LALT, KC_LGUI, - KC_LEFT, KC_RIGHT, - KC_HOME, - KC_SPC,KC_DELT,KC_END, - // right hand - KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - MO(2), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_RCTRL, KC_RALT, KC_BSLS, KC_EQL, KC_RGUI, - KC_DOWN, KC_UP, - KC_PGUP, - KC_PGDN, KC_ENT, KC_BSPC - ), + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(2), + KC_LCTRL, MO(3), KC_EQL, KC_LGUI, KC_LALT, + KC_NLCK, KC_SLCK, + KC_HOME, + KC_SPC, KC_DEL, KC_END, + // right hand + KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + MO(2), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_NONUS_BSLASH, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RBRC, + KC_RGUI, KC_RALT, + KC_PGUP, + KC_PGDN, KC_ENT, KC_BSPC +), /* Keymap 1: Basic layer with functions * - * + * * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | 0 | - | + * | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | 0 | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Å | + * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Caps | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä | - * |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | - | RShift | + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | Ctrl | ¨^ | <|> | Alt | LGui| | Ctrl | Alt | ´` | + | RGui | + * | | ¨ | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LEFT |RIGHT | | DOWN | UP | + * | | | | | | * ,------+------+------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Del |------| |------| Enter | Bkspc| - * | | | End | | PgDn | | | + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | * `--------------------' `----------------------' */ [FUNCL] = LAYOUT_ergodox( // layer 1 : functions - // left hand - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______,_______,_______, - // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______ + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ ), /* Keymap 2: Symbol Layer @@ -134,24 +130,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // SYMBOLS [SYMB] = LAYOUT_ergodox( - // left hand - KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS, - KC_TRNS,DE_HASH,DE_DLR, DE_LPRN,DE_RPRN,DE_GRV, - KC_TRNS,DE_PERC,DE_CIRC,DE_LBRC,DE_RBRC,DE_TILD,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - RGB_MOD,BL_TOGG, - BL_INC, - RGB_VAD,RGB_VAI,BL_DEC, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, DE_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, KC_TRNS, - KC_TRNS, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, KC_TRNS, - KC_TRNS,KC_DOT, KC_0, DE_EQL, KC_TRNS, - RGB_TOG, RGB_SLD, - KC_TRNS, - KC_TRNS, RGB_HUD, RGB_HUI + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, DE_EXLM, DE_AT, DE_LCBR, DE_RCBR, DE_PIPE, _______, + _______, DE_HASH, DE_DLR, DE_LPRN, DE_RPRN, DE_GRV, + _______, DE_PERC, DE_CIRC, DE_LBRC, DE_RBRC, DE_TILD, _______, + _______, _______, _______, _______, _______, + RGB_MOD, BL_TOGG, + BL_INC, + RGB_VAD, RGB_VAI, BL_DEC, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_UP, KC_7, KC_8, KC_9, DE_ASTR, _______, + KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, _______, + _______, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, _______, + _______, KC_DOT, KC_0, DE_EQL, _______, + RGB_TOG, RGB_SLD, + _______, + _______, RGB_HUD, RGB_HUI ), /* Keymap 3: Media and mouse keys @@ -175,82 +171,75 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ + // MEDIA AND MOUSE [MDIA] = LAYOUT_ergodox( - RESET, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS, - KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, - KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, - KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, KC_TRNS, - KC_TRNS, KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_BTN1, KC_BTN2, KC_TRNS, - // right hand - KC_TRNS, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11, - KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_F12, - KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, - KC_TRNS, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_WBAK, KC_WFWD + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, + _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, + _______, _______, + _______, + KC_BTN1, KC_BTN2, _______, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, + _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, + _______, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, KC_WBAK, KC_WFWD ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + // MACRODOWN only works in this function + switch (id) { case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } return MACRO_NONE; }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. - case EPRM: - if (record->event.pressed) { - eeconfig_init(); - } - return false; - break; - case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; - break; - } - return true; -} + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(1); +#endif + } + return false; + break; + } + return true; +} // Runs just one time when the keyboard initializes. -void matrix_init_user(void) { +void matrix_init_user(void){ }; // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); @@ -262,8 +251,10 @@ void matrix_scan_user(void) { case 2: ergodox_right_led_2_on(); break; - default: - // none + case 3: + ergodox_right_led_3_on(); break; - } + default: + break; + } }; diff --git a/keyboards/ergodox_infinity/keymaps/trulyergonomic/keymap.c b/keyboards/ergodox_infinity/keymaps/trulyergonomic/keymap.c index 882f2b3c0d..b288bd5577 100644 --- a/keyboards/ergodox_infinity/keymaps/trulyergonomic/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/trulyergonomic/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DELT, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_LALT, KC_HOME, KC_PGUP, KC_PGDN, KC_END, diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index af8e9ef200..b55c9bc8c0 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -54,6 +54,8 @@ ARMV = 7 # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000 +BOOTLOADER = dfu + # Build Options # comment out to disable the options. # diff --git a/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.c b/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.c new file mode 100644 index 0000000000..d953d6a135 --- /dev/null +++ b/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.c @@ -0,0 +1,51 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { + AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + +} diff --git a/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.h b/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.h new file mode 100644 index 0000000000..307a17e388 --- /dev/null +++ b/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.h @@ -0,0 +1,142 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Board identifier. + */ +#define BOARD_JM60 +#define BOARD_NAME "ErgoDox STM32 Keyboard" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 0 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + * + * Only xB (128KB Flash) is defined, but it's identical to the + * x8 version (64KB Flash) except for the Flash region size in the + * linker script. For x8 parts use xB here and change to the x8 linker + * script in the project Makefile. + */ +#define STM32F103xB + +/* + * IO pins assignments + * + * numbering is sorted by onboard/connectors, as from the schematics in + * http://www.vcc-gnd.com/read.php?tid=369 + */ + +/* on-board */ +#define GPIOA_USBDM 11 // pin 8 +#define GPIOA_USBDP 12 // pin 9 + +#define GPIOC_OSC32_IN 14 +#define GPIOC_OSC32_OUT 15 + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOACRL 0x88888888 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x88888888 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888888 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88888888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +#define usb_lld_connect_bus(usbp) /* always connected */ + +/* + * USB bus de-activation macro, required by the USB driver. + */ +#define usb_lld_disconnect_bus(usbp) /* always connected */ + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.mk b/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.mk new file mode 100644 index 0000000000..85ff835ef4 --- /dev/null +++ b/keyboards/ergodox_stm32/boards/ERGODOX_STM32_BOARD/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ERGODOX_STM32_BOARD/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ERGODOX_STM32_BOARD diff --git a/keyboards/ergodox_stm32/chconf.h b/keyboards/ergodox_stm32/chconf.h new file mode 100644 index 0000000000..d9114ec858 --- /dev/null +++ b/keyboards/ergodox_stm32/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 20 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/ergodox_stm32/config.h b/keyboards/ergodox_stm32/config.h new file mode 100644 index 0000000000..e1b3d7b14e --- /dev/null +++ b/keyboards/ergodox_stm32/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2019 Yaotian Feng(Codetector) + +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 . +*/ +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1308 +#define DEVICE_VER 0x101 +#define MANUFACTURER ErgoDox +#define PRODUCT ErgoDox STM +#define DESCRIPTION ErgoDox STM32 Keyboard + +#define MATRIX_ROWS 14 +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS 6 +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +// i2c_master driver config +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 diff --git a/keyboards/ergodox_stm32/ergodox_stm32.c b/keyboards/ergodox_stm32/ergodox_stm32.c new file mode 100644 index 0000000000..176fb3f43a --- /dev/null +++ b/keyboards/ergodox_stm32/ergodox_stm32.c @@ -0,0 +1,65 @@ +#include "i2c_master.h" +#include QMK_KEYBOARD_H + +extern inline void ergodox_board_led_1_on(void); +extern inline void ergodox_board_led_2_on(void); +extern inline void ergodox_board_led_3_on(void); +extern inline void ergodox_board_led_1_off(void); +extern inline void ergodox_board_led_2_off(void); +extern inline void ergodox_board_led_3_off(void); +extern inline void ergodox_led_all_off(void); + +volatile int mcp23017_status = 0x20; +uint8_t i2c_initializied = 0; + +void matrix_init_kb(void) +{ + // Init LED Ports + palSetPadMode(GPIOA, 10, PAL_MODE_OUTPUT_PUSHPULL); // LED 1 + palSetPadMode(GPIOA, 9, PAL_MODE_OUTPUT_PUSHPULL); // LED 2 + palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); // LED 3 + + ergodox_blink_all_leds(); + + matrix_init_user(); +} + +void ergodox_blink_all_leds(void) +{ + ergodox_led_all_off(); + // ergodox_led_all_set(LED_BRIGHTNESS_DEFAULT); + ergodox_board_led_1_on(); + wait_ms(50); + ergodox_board_led_2_on(); + wait_ms(50); + ergodox_board_led_3_on(); + wait_ms(50); + ergodox_board_led_1_off(); + wait_ms(50); + ergodox_board_led_2_off(); + wait_ms(50); + ergodox_board_led_3_off(); +} + +uint8_t init_mcp23017(void) { + if (!i2c_initializied) { + i2c_init(); + i2c_initializied = 1; + } + + uint8_t data[2]; + data[0] = 0x0; + data[1] = 0b00111111; + mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_IODIRA, data, 2, 50000); + if (mcp23017_status) goto out; + data[0] = 0xFFU; + mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_GPIOA, data, 1, 5000); + if (mcp23017_status) goto out; + mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_GPPUB, data+1, 1, 2); + if (mcp23017_status) goto out; + + out: + return mcp23017_status; + // i2c_readReg(I2C_ADDR, ); +} + diff --git a/keyboards/ergodox_stm32/ergodox_stm32.h b/keyboards/ergodox_stm32/ergodox_stm32.h new file mode 100644 index 0000000000..be1c2e9c3b --- /dev/null +++ b/keyboards/ergodox_stm32/ergodox_stm32.h @@ -0,0 +1,114 @@ +#pragma once + +#include "quantum.h" +#include "action_layer.h" +#include +#include +#include "hal.h" + +// #define I2C_ADDR 0b01000000 +#define I2C_ADDR 0b01000000 +#define I2C_IODIRA 0x0 +#define I2C_IODIRB 0x1 +#define I2C_GPIOA 0x12 +#define I2C_GPIOB 0x13 +#define I2C_OLATA 0x14 +#define I2C_OLATB 0x15 +#define I2C_GPPUA 0x0C +#define I2C_GPPUB 0x0D + +inline void ergodox_board_led_1_on(void) { palSetPad(GPIOA, 10); } +inline void ergodox_board_led_2_on(void) { palSetPad(GPIOA, 9); } +inline void ergodox_board_led_3_on(void) { palSetPad(GPIOA, 8); } +inline void ergodox_board_led_1_off(void) { palClearPad(GPIOA, 10); } +inline void ergodox_board_led_2_off(void) { palClearPad(GPIOA, 9); } +inline void ergodox_board_led_3_off(void) { palClearPad(GPIOA, 8); } +inline void ergodox_led_all_off(void) +{ + palClearPad(GPIOA, 10); + palClearPad(GPIOA, 9); + palClearPad(GPIOA, 8); +} + +extern volatile int mcp23017_status; + +uint8_t init_mcp23017(void); + +void ergodox_blink_all_leds(void); + +/* + * LEFT HAND: LINES 115-122 + * RIGHT HAND: LINES 124-131 + */ +#define LAYOUT_ergodox( \ + \ + k00, k01, k02, k03, k04, k05, k06, \ + k10, k11, k12, k13, k14, k15, k16, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, k36, \ + k40, k41, k42, k43, k44, \ + k55, k56, \ + k54, \ + k53, k52, k51, \ + \ + k07, k08, k09, k0A, k0B, k0C, k0D, \ + k17, k18, k19, k1A, k1B, k1C, k1D, \ + k28, k29, k2A, k2B, k2C, k2D, \ + k37, k38, k39, k3A, k3B, k3C, k3D, \ + k49, k4A, k4B, k4C, k4D, \ + k57, k58, \ + k59, \ + k5C, k5B, k5A) \ + \ + /* matrix positions */ \ + { \ + {k00, k10, k20, k30, k40, KC_NO}, \ + {k01, k11, k21, k31, k41, k51}, \ + {k02, k12, k22, k32, k42, k52}, \ + {k03, k13, k23, k33, k43, k53}, \ + {k04, k14, k24, k34, k44, k54}, \ + {k05, k15, k25, k35, KC_NO, k55}, \ + {k06, k16, KC_NO, k36, KC_NO, k56}, \ + \ + {k07, k17, KC_NO, k37, KC_NO, k57}, \ + {k08, k18, k28, k38, KC_NO, k58}, \ + {k09, k19, k29, k39, k49, k59}, \ + {k0A, k1A, k2A, k3A, k4A, k5A}, \ + {k0B, k1B, k2B, k3B, k4B, k5B}, \ + {k0C, k1C, k2C, k3C, k4C, k5C}, \ + { \ + k0D, k1D, k2D, k3D, k4D, KC_NO \ + } \ + } + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_ergodox_pretty( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, R42, R43, R44, R45, R46, \ + L55, L56, R50, R51, \ + L54, R52, \ + L53, L52, L51, R55, R54, R53) \ + \ + /* matrix positions */ \ + { \ + {L00, L10, L20, L30, L40, KC_NO}, \ + {L01, L11, L21, L31, L41, L51}, \ + {L02, L12, L22, L32, L42, L52}, \ + {L03, L13, L23, L33, L43, L53}, \ + {L04, L14, L24, L34, L44, L54}, \ + {L05, L15, L25, L35, KC_NO, L55}, \ + {L06, L16, KC_NO, L36, KC_NO, L56}, \ + \ + {R00, R10, KC_NO, R30, KC_NO, R50}, \ + {R01, R11, R21, R31, KC_NO, R51}, \ + {R02, R12, R22, R32, R42, R52}, \ + {R03, R13, R23, R33, R43, R53}, \ + {R04, R14, R24, R34, R44, R54}, \ + {R05, R15, R25, R35, R45, R55}, \ + { \ + R06, R16, R26, R36, R46, KC_NO \ + } \ + } diff --git a/keyboards/ergodox_stm32/halconf.h b/keyboards/ergodox_stm32/halconf.h new file mode 100644 index 0000000000..b87b0635c4 --- /dev/null +++ b/keyboards/ergodox_stm32/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/ergodox_stm32/info.json b/keyboards/ergodox_stm32/info.json new file mode 100644 index 0000000000..627b300fe7 --- /dev/null +++ b/keyboards/ergodox_stm32/info.json @@ -0,0 +1,104 @@ +{ + "keyboard_name": "ErgoDox STM32", + "url": "github.com/codetector1374", + "maintainer": "codetector1374", + "width": 19.5, + "height": 9.375, + + "layouts": { + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_80": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + }, + "LAYOUT_ergodox_pretty_80": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + } + } +} diff --git a/keyboards/ergodox_stm32/keymaps/default/keymap.c b/keyboards/ergodox_stm32/keymaps/default/keymap.c new file mode 100644 index 0000000000..d3d4b57228 --- /dev/null +++ b/keyboards/ergodox_stm32/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ergodox(KC_GRAVE,KC_1,KC_2,KC_3,KC_4,KC_5,KC_MINUS,KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_LPRN,KC_ESCAPE,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSHIFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_RPRN,KC_LCTRL,KC_LGUI,KC_LALT,KC_LGUI,KC_LALT,KC_INSERT,MO(1),KC_HOME,KC_SPACE,KC_DELETE,KC_END,KC_EQUAL,KC_6,KC_7,KC_8,KC_9,KC_0,KC_BSPACE,KC_LBRACKET,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSLASH,KC_H,KC_J,KC_K,KC_L,KC_SCOLON,KC_QUOTE,KC_RBRACKET,KC_N,KC_M,KC_COMMA,KC_DOT,KC_SLASH,KC_RSHIFT,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,KC_RCTRL,MO(1),TG(2),KC_PGUP,KC_PGDOWN,KC_BSPACE,KC_ENTER), + + [1] = LAYOUT_ergodox(KC_TILD,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_GRAVE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_CAPSLOCK,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PLAY_PAUSE,KC_TRANSPARENT,KC_TRANSPARENT,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,LCTL(LGUI(KC_Q)),KC_MEDIA_PREV_TRACK,KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP), + + [2] = LAYOUT_ergodox(KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_NUMLOCK,KC_KP_SLASH,KC_KP_ASTERISK,KC_KP_MINUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_KP_7,KC_KP_8,KC_KP_9,KC_KP_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_KP_4,KC_KP_5,KC_KP_6,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_KP_1,KC_KP_2,KC_KP_3,KC_ENTER,KC_TRANSPARENT,KC_KP_DOT,KC_KP_0,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = TT(1) +}; + +uint32_t layer_state_set_user(uint32_t state) { + + uint8_t layer = biton32(state); + + ergodox_led_all_off(); + ergodox_board_led_1_off(); + ergodox_board_led_2_off(); + ergodox_board_led_3_off(); + switch (layer) { + case 1: + ergodox_board_led_1_on(); + break; + case 2: + ergodox_board_led_2_on(); + break; + case 3: + ergodox_board_led_2_on(); + break; + case 4: + ergodox_board_led_1_on(); + ergodox_board_led_2_on(); + break; + case 5: + ergodox_board_led_1_on(); + ergodox_board_led_3_on(); + break; + case 6: + ergodox_board_led_2_on(); + ergodox_board_led_3_on(); + break; + case 7: + ergodox_board_led_1_on(); + ergodox_board_led_2_on(); + ergodox_board_led_3_on(); + break; + default: + break; + } + return state; + +}; diff --git a/keyboards/ergodox_stm32/ld/stm32f103_bootloader.ld b/keyboards/ergodox_stm32/ld/stm32f103_bootloader.ld new file mode 100644 index 0000000000..77100fce38 --- /dev/null +++ b/keyboards/ergodox_stm32/ld/stm32f103_bootloader.ld @@ -0,0 +1,85 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * ST32F103xB memory setup for use with the originaljm60 bootloader. + */ +MEMORY +{ + flash0 : org = 0x08000000, len = 64k /* TODO */ + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/ergodox_stm32/matrix.c b/keyboards/ergodox_stm32/matrix.c new file mode 100644 index 0000000000..383bf9790a --- /dev/null +++ b/keyboards/ergodox_stm32/matrix.c @@ -0,0 +1,189 @@ +#include +#include +#include +#include +#include "timer.h" +#include "wait.h" +#include "print.h" +#include "matrix.h" +#include "i2c_master.h" +#include QMK_KEYBOARD_H + +#ifndef DEBOUNCE +#define DEBOUNCE 10 +#endif + +static uint8_t mcp23017_reset_loop = 0; + +volatile matrix_row_t matrix[MATRIX_ROWS]; +volatile matrix_row_t raw_matrix[MATRIX_ROWS]; +volatile uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); + +static void init_cols(void); + +static void unselect_rows(void); + +static void select_row(uint8_t row); + +static void init_rows(void); + +__attribute__((weak)) void matrix_init_user(void) {} + +__attribute__((weak)) void matrix_scan_user(void) {} + +__attribute__((weak)) void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__((weak)) void matrix_scan_kb(void) { + matrix_scan_user(); +} + +void matrix_init(void) { + mcp23017_status = init_mcp23017(); + (void) mcp23017_reset_loop; + init_rows(); + unselect_rows(); + init_cols(); + + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + for (uint8_t j = 0; j < MATRIX_COLS; ++j) { + debounce_matrix[i * MATRIX_COLS + j] = 0; + } + } + matrix_init_quantum(); +} + +void matrix_power_up(void) { + mcp23017_status = init_mcp23017(); + + init_rows(); + unselect_rows(); + init_cols(); + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } +} + +matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { + matrix_row_t result = 0; + matrix_row_t change = rawcols ^raw_matrix[row]; + raw_matrix[row] = rawcols; + for (uint8_t i = 0; i < MATRIX_COLS; ++i) { + if (debounce_matrix[row * MATRIX_COLS + i]) { + --debounce_matrix[row * MATRIX_COLS + i]; + } else { + result |= (1 << i); + } + if (change & (1 << i)) { + debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; + } + } + return result; +} + +matrix_row_t debounce_read_cols(uint8_t row) { + // Read the row without debouncing filtering and store it for later usage. + matrix_row_t cols = read_cols(row); + // Get the Debounce mask. + matrix_row_t mask = debounce_mask(cols, row); + // debounce the row and return the result. + return (cols & mask) | (matrix[row] & ~mask);; +} + +uint8_t matrix_scan(void) { + if (mcp23017_status) { + if (++mcp23017_reset_loop == 0) { + mcp23017_status = init_mcp23017(); + if (!mcp23017_status) { + ergodox_blink_all_leds(); + } + } + } + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + select_row(i); + select_row(i + MATRIX_ROWS_PER_SIDE); + + matrix[i] = debounce_read_cols(i); + matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE); + + unselect_rows(); + } + matrix_scan_quantum(); + return 0; +} + +bool matrix_is_modified(void) { + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & (1 << col)); +} + +inline +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} + +static matrix_row_t read_cols(uint8_t row) { + if (row < MATRIX_ROWS_PER_SIDE) { + uint8_t data = 0xFF; + if (!mcp23017_status) { + uint8_t regAddr = I2C_GPIOB; + mcp23017_status = i2c_readReg(I2C_ADDR, regAddr, &data, 1, 10); + } + if (mcp23017_status) { + return 0; + } + return (~data) & 0x3F; + } else { + uint8_t data_p = (GPIOB -> IDR); + uint8_t data = data_p; + return ((~data) & 0x3f); + } +} + +static void init_cols(void) { + palSetPadMode(GPIOB, 0, PAL_MODE_INPUT_PULLUP); + palSetPadMode(GPIOB, 1, PAL_MODE_INPUT_PULLUP); + palSetPadMode(GPIOB, 2, PAL_MODE_INPUT_PULLUP); + palSetPadMode(GPIOB, 3, PAL_MODE_INPUT_PULLUP); + palSetPadMode(GPIOB, 4, PAL_MODE_INPUT_PULLUP); + palSetPadMode(GPIOB, 5, PAL_MODE_INPUT_PULLUP); +} + +static void init_rows(void) { + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 13, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); +} + +static void unselect_rows(void) { + GPIOB->BSRR = 0b1111111 << 8; +} + +static void select_row(uint8_t row) { + if (row < MATRIX_ROWS_PER_SIDE) { + if (!mcp23017_status) { + uint8_t data = (0xFF & ~(1 << row)); + mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_GPIOA, &data, 1, 10); + } + } else { + GPIOB->BRR = 0x1 << (row+1); + } +} diff --git a/keyboards/ergodox_stm32/mcuconf.h b/keyboards/ergodox_stm32/mcuconf.h new file mode 100644 index 0000000000..0494526e5e --- /dev/null +++ b/keyboards/ergodox_stm32/mcuconf.h @@ -0,0 +1,209 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/ergodox_stm32/rules.mk b/keyboards/ergodox_stm32/rules.mk new file mode 100644 index 0000000000..1bf1a742ab --- /dev/null +++ b/keyboards/ergodox_stm32/rules.mk @@ -0,0 +1,32 @@ +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c + +CFLAGS += "-Wno-error=deprecated" + +MCU_FAMILY = STM32 +MCU_SERIES = STM32F1xx + +MCU_LDSCRIPT = stm32f103_bootloader + +MCU_STARTUP = stm32f1xx + +BOARD = ERGODOX_STM32_BOARD + +MCU = cortex-m3 + +ARMV = 7 + +OPT_DEFS = + +EXTRAFLAGS=-O0 -g + +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = yes # Custom matrix file +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/ergoinu/matrix.c b/keyboards/ergoinu/matrix.c index 92c95e335e..00914a2575 100644 --- a/keyboards/ergoinu/matrix.c +++ b/keyboards/ergoinu/matrix.c @@ -174,18 +174,12 @@ uint8_t matrix_scan(void) { }else{ matrix_slave_scan(); -// if(serial_slave_DATA_CORRUPT()){ -// TXLED0; int offset = (isLeftHand) ? ROWS_PER_HAND : 0; for (int i = 0; i < ROWS_PER_HAND; ++i) { matrix[offset+i] = serial_master_buffer[i]; } -// }else{ -// TXLED1; -// } - matrix_scan_quantum(); } return 1; diff --git a/keyboards/ergoinu/rules.mk b/keyboards/ergoinu/rules.mk index de4bcad526..5c600bcd2e 100644 --- a/keyboards/ergoinu/rules.mk +++ b/keyboards/ergoinu/rules.mk @@ -1,50 +1,16 @@ -SRC += matrix.c serial.c split_util.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -67,6 +33,7 @@ USE_I2C = no # i2c is not supported SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c serial.c split_util.c DEFAULT_FOLDER = ergoinu diff --git a/keyboards/ergotaco/keymaps/default/rules.mk b/keyboards/ergotaco/keymaps/default/rules.mk index e394fbf1e6..870d047dc9 100644 --- a/keyboards/ergotaco/keymaps/default/rules.mk +++ b/keyboards/ergotaco/keymaps/default/rules.mk @@ -1,9 +1,3 @@ -#---------------------------------------------------------------------------- -# make ergotaco:default:dfu -# Make sure you have dfu-programmer installed! -#---------------------------------------------------------------------------- -# Firmware options - #Debug options VERBOSE = yes DEBUG_MATRIX_SCAN_RATE = no diff --git a/keyboards/ergotaco/matrix.c b/keyboards/ergotaco/matrix.c index f7ceb194ad..e28f754e67 100644 --- a/keyboards/ergotaco/matrix.c +++ b/keyboards/ergotaco/matrix.c @@ -26,9 +26,6 @@ along with this program. If not, see . #include "debug.h" #include "util.h" #include QMK_KEYBOARD_H -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -70,12 +67,6 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -121,10 +112,6 @@ void matrix_init(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif matrix_init_quantum(); } @@ -138,12 +125,6 @@ void matrix_power_up(void) { for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - } // Returns a matrix_row_t whose bits are set if the corresponding key should be @@ -192,18 +173,6 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { select_row(i); // and select on left hand diff --git a/keyboards/ergotaco/rules.mk b/keyboards/ergotaco/rules.mk index 0af3e34740..cd8ebc58f0 100644 --- a/keyboards/ergotaco/rules.mk +++ b/keyboards/ergotaco/rules.mk @@ -1,15 +1,15 @@ -#---------------------------------------------------------------------------- -# make ergotaco:default:dfu -# Make sure you have dfu-programmer installed! -# Do not edit this file! Make a copy of keymaps/default and modify that! -#---------------------------------------------------------------------------- - -# Hardware info +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -F_USB = $(F_CPU) CUSTOM_MATRIX = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/ergotravel/keymaps/default/keymap.c b/keyboards/ergotravel/keymaps/default/keymap.c index 370ee2092f..71971d391b 100644 --- a/keyboards/ergotravel/keymaps/default/keymap.c +++ b/keyboards/ergotravel/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/ergotravel/keymaps/jarred/keymap.c b/keyboards/ergotravel/keymaps/jarred/keymap.c index 33031f931b..adedebe6ef 100644 --- a/keyboards/ergotravel/keymaps/jarred/keymap.c +++ b/keyboards/ergotravel/keymaps/jarred/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2018 Jarred Steenvoorden +/* Copyright 2018 Jarred Steenvoorden * * 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 diff --git a/keyboards/ergotravel/keymaps/rs/keymap.c b/keyboards/ergotravel/keymaps/rs/keymap.c index 1ac0a94d93..0cf1cb3622 100644 --- a/keyboards/ergotravel/keymaps/rs/keymap.c +++ b/keyboards/ergotravel/keymaps/rs/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H #include "rs.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergotravel/rev1/rev1.h b/keyboards/ergotravel/rev1/rev1.h index c4599fc016..5907617ef3 100644 --- a/keyboards/ergotravel/rev1/rev1.h +++ b/keyboards/ergotravel/rev1/rev1.h @@ -3,10 +3,8 @@ #include "ergotravel.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -15,8 +13,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ diff --git a/keyboards/ergotravel/rules.mk b/keyboards/ergotravel/rules.mk index 55155b5a3e..be7c8d990f 100644 --- a/keyboards/ergotravel/rules.mk +++ b/keyboards/ergotravel/rules.mk @@ -1,49 +1,16 @@ - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/espectro/keymaps/mikethetiger/keymap.c b/keyboards/espectro/keymaps/mikethetiger/keymap.c index e594184ca5..30688ab5c4 100644 --- a/keyboards/espectro/keymaps/mikethetiger/keymap.c +++ b/keyboards/espectro/keymaps/mikethetiger/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2018 @TurboMech /u/TurboMech @A9entOran9e#6134 +/* Copyright 2018 @TurboMech /u/TurboMech @A9entOran9e#6134 * * 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 diff --git a/keyboards/espectro/rules.mk b/keyboards/espectro/rules.mk index 2c28fe8504..2d1c1eed09 100755 --- a/keyboards/espectro/rules.mk +++ b/keyboards/espectro/rules.mk @@ -1,51 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* - - # Build Options # comment out to disable the options. # diff --git a/keyboards/eve/meteor/config.h b/keyboards/eve/meteor/config.h new file mode 100644 index 0000000000..b23bc877fe --- /dev/null +++ b/keyboards/eve/meteor/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 +#define MANUFACTURER EVE +#define PRODUCT Meteor + +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B5, B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0, D7} +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_LEVELS 1 diff --git a/keyboards/eve/meteor/info.json b/keyboards/eve/meteor/info.json new file mode 100644 index 0000000000..e75b1b02c2 --- /dev/null +++ b/keyboards/eve/meteor/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "EVE Meteor", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5}, {"x":14, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5}, {"x":11, "y":5.5}, {"x":12, "y":5.5}, {"x":13, "y":5.5}, {"x":14, "y":5.5}] + }, + + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5, "w":1.75}, {"x":13, "y":4.5}, {"x":14, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5}, {"x":11, "y":5.5}, {"x":12, "y":5.5}, {"x":13, "y":5.5}, {"x":14, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/eve/meteor/keymaps/default/keymap.c b/keyboards/eve/meteor/keymaps/default/keymap.c new file mode 100644 index 0000000000..d9638e3e84 --- /dev/null +++ b/keyboards/eve/meteor/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/eve/meteor/meteor.c b/keyboards/eve/meteor/meteor.c new file mode 100644 index 0000000000..f5ecbad025 --- /dev/null +++ b/keyboards/eve/meteor/meteor.c @@ -0,0 +1,47 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "meteor.h" + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/eve/meteor/meteor.h b/keyboards/eve/meteor/meteor.h new file mode 100644 index 0000000000..f8f8ee4ff3 --- /dev/null +++ b/keyboards/eve/meteor/meteor.h @@ -0,0 +1,54 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_all( \ + k00, 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, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k53, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, \ + k50, k51, k52, k55, k59, k5A, k5B, k5C, k5D \ +){ \ + { k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, KC_NO, k4D, KC_NO }, \ + { k50, k51, k52, k53, KC_NO, k55, KC_NO, KC_NO, KC_NO, k59, k5A, k5B, k5C, k5D, KC_NO }, \ +} + +#define LAYOUT( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, \ + k50, k51, k52, k55, k59, k5A, k5B, k5C, k5D \ +){ \ + { k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, KC_NO, k4D, KC_NO }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, KC_NO, k59, k5A, k5B, k5C, k5D, KC_NO }, \ +} diff --git a/keyboards/eve/meteor/readme.md b/keyboards/eve/meteor/readme.md new file mode 100644 index 0000000000..8e933c09d1 --- /dev/null +++ b/keyboards/eve/meteor/readme.md @@ -0,0 +1,51 @@ +# EVE Meteor + +60% PCB with Function Row + + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: EVE Meteor +Hardware Availability: [zFrontier](https://en.zfrontier.com/products/eve-meteor) + + +Make example for this keyboard (after setting up your build environment): + + make eve/meteor:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Short the two holes labeled `FW_JP` underneath the PCB, beside the Tab key while plugging in the keyboard. + +Do not confuse this with the LED holes of the switch in the `Tab` position. `FW_JP` is not reachable from the top as the plate blocks access to it. + +It is recommended to program a `RESET` key in your keymap. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). diff --git a/keyboards/eve/meteor/rules.mk b/keyboards/eve/meteor/rules.mk new file mode 100644 index 0000000000..e57c21c856 --- /dev/null +++ b/keyboards/eve/meteor/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no +WS2812_DRIVER = i2c + +OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/eve/meteor/usbconfig.h b/keyboards/eve/meteor/usbconfig.h new file mode 100644 index 0000000000..9b045607f1 --- /dev/null +++ b/keyboards/eve/meteor/usbconfig.h @@ -0,0 +1,373 @@ +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/evil80/rules.mk b/keyboards/evil80/rules.mk index 1067b43445..683f892460 100644 --- a/keyboards/evil80/rules.mk +++ b/keyboards/evil80/rules.mk @@ -1,50 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/exclusive/e65/config.h b/keyboards/exclusive/e65/config.h new file mode 100644 index 0000000000..fdcb3ad495 --- /dev/null +++ b/keyboards/exclusive/e65/config.h @@ -0,0 +1,65 @@ +/* Copyright 2019 Brice Figureau + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Exclusive / E-Team +#define PRODUCT E6.5 +#define DESCRIPTION E6.5 QMK PCB(LED) + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS \ + { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS \ + { C6, C7, D0, D1, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +# define BACKLIGHT_LEVELS 6 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 20 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/exclusive/e65/e65.c b/keyboards/exclusive/e65/e65.c new file mode 100644 index 0000000000..e01a0614c5 --- /dev/null +++ b/keyboards/exclusive/e65/e65.c @@ -0,0 +1,38 @@ +/* Copyright 2019 Brice Figureau + * + * 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 . + */ + +#include "e65.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B6); + writePinHigh(B6); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B6, !led_state.caps_lock); + } + + return true; +} diff --git a/keyboards/exclusive/e65/e65.h b/keyboards/exclusive/e65/e65.h new file mode 100644 index 0000000000..4b9fff75c5 --- /dev/null +++ b/keyboards/exclusive/e65/e65.h @@ -0,0 +1,367 @@ +#pragma once + +#include "quantum.h" + +// clang-format off + +// layout with all the switches supported by the PCB +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K411, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ +} + +// Ansi layout with bottom row 1.25,1.25,1,25,6.25,1.5,1.5,<-,v,-> +#define LAYOUT_65_all_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} + +#define LAYOUT_65_ansi_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K412, K413, K414, K415 \ +) LAYOUT_65_all_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K412, K413, K414, K415 \ +) + +#define LAYOUT_65_ansi_noblocker_splitbs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K412, K413, K414, K415 \ +) LAYOUT_65_all_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K412, K413, K414, K415 \ +) + +#define LAYOUT_65_iso_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K412, K413, K414, K415 \ +) LAYOUT_65_all_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K412, K413, K414, K415 \ +) + +// Ansi layout with bottom row 1.25,1.25,1,25,6.25,1.25,1.25 blocker <-,v,-> +#define LAYOUT_65_all_blocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K411, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \ +} + +#define LAYOUT_65_ansi_blocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K411, K413, K414, K415 \ +) LAYOUT_65_all_blocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K411, K413, K414, K415 \ +) + +#define LAYOUT_65_ansi_blocker_splitbs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K411, K413, K414, K415 \ +) LAYOUT_65_all_blocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K411, K413, K414, K415 \ +) + +#define LAYOUT_65_iso_blocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K411, K413, K414, K415 \ +) LAYOUT_65_all_blocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K410, K411, K413, K414, K415 \ +) + + +// ANSI layout with bottom row 1.5,1.5,7,1.5,1.5,<-,v,-> +#define LAYOUT_65_all_7u_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} + +#define LAYOUT_65_ansi_7u_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K412, K413, K414, K415 \ +) LAYOUT_65_all_7u_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K412, K413, K414, K415 \ +) + +#define LAYOUT_65_ansi_7u_noblocker_splitbs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K412, K413, K414, K415 \ +) LAYOUT_65_all_7u_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K412, K413, K414, K415 \ +) + +#define LAYOUT_65_iso_7u_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K412, K413, K414, K415 \ +) LAYOUT_65_all_7u_noblocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K412, K413, K414, K415 \ +) + + +// ANSI layout with bottom row 1.5,1,1.5,7,1.5, blocker, <-,v,-> +#define LAYOUT_65_all_7u_wk( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K411, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \ +} + +#define LAYOUT_65_ansi_7u_wk( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_wk( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K411, K413, K414, K415 \ +) + +#define LAYOUT_65_ansi_7u_wk_splitbs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_wk( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K411, K413, K414, K415 \ +) + +#define LAYOUT_65_iso_7u_wk( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_wk( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K403, K406, K411, K413, K414, K415 \ +) + +// layout with bottom row 1.5,blocker,1.5,7,1.5, blocker, <-,v,-> +#define LAYOUT_65_all_7u_wkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K402, K406, K411, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, KC_NO, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \ +} + +#define LAYOUT_65_ansi_7u_wkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K402, K406, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_wkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K402, K406, K411, K413, K414, K415 \ +) + +#define LAYOUT_65_ansi_7u_wkl_splitbs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K402, K406, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_wkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K402, K406, K411, K413, K414, K415 \ +) + +#define LAYOUT_65_iso_7u_wkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K402, K406, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_wkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K402, K406, K411, K413, K414, K415 \ +) + + +// layout with bottom row blocker,1,1.5,7,1.5,1, blocker, <-,v,-> +#define LAYOUT_65_all_7u_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K411, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \ +} + +#define LAYOUT_65_ansi_7u_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K411, K413, K414, K415 \ +) + +#define LAYOUT_65_ansi_7u_hhkb_splitbs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K411, K413, K414, K415 \ +) + +#define LAYOUT_65_iso_7u_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K411, K413, K414, K415 \ +) LAYOUT_65_all_7u_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K400, K401, K406, K410, K411, K413, K414, K415 \ +) + +// clang-format on diff --git a/keyboards/exclusive/e65/info.json b/keyboards/exclusive/e65/info.json new file mode 100644 index 0000000000..19b8139d30 --- /dev/null +++ b/keyboards/exclusive/e65/info.json @@ -0,0 +1,66 @@ +{ + "keyboard_name": "E6.5", + "url": "", + "maintainer": "masterzen", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"x":12, "y":4}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_noblocker": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_noblocker_splitbs": { + "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":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_iso_noblocker": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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}, {"x":12.75, "y":2}, {"label":"enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_blocker": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_blocker_splitbs": { + "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":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_iso_blocker": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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}, {"x":12.75, "y":2}, {"label":"enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_7u_noblocker": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_7u_noblocker_splitbs": { + "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":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_iso_7u_noblocker": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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}, {"x":12.75, "y":2}, {"label":"enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_7u_wk": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_7u_wk_splitbs": { + "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":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_iso_7u_wk": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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}, {"x":12.75, "y":2}, {"label":"enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_7u_wkl": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_7u_wkl_splitbs": { + "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":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_iso_7u_wkl": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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}, {"x":12.75, "y":2}, {"label":"enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_7u_hhkb": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0.5, "y":4}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_7u_hhkb_splitbs": { + "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":"Ins", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0.5, "y":4}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + }, + "LAYOUT_65_iso_7u_hhkb": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "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":"Page up", "x":15, "y":1}, {"label":"Ctrl", "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}, {"x":12.75, "y":2}, {"label":"enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Page down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"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":"↑", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0.5, "y":4}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Fn", "x":11.5, "y":4}, {"label":"←", "x":13, "y":4}, {"label":"↓", "x":14, "y":4}, {"label":"→", "x":15, "y":4}] + } + } +} diff --git a/keyboards/exclusive/e65/keymaps/crd/keymap.c b/keyboards/exclusive/e65/keymaps/crd/keymap.c new file mode 100644 index 0000000000..38a1944ef9 --- /dev/null +++ b/keyboards/exclusive/e65/keymaps/crd/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _LL // Lights layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT_65_ansi_7u_wk_splitbs( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_HOME, + 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_BSPC, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LT(_FL, KC_UP), KC_DEL, + MO(_LL), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + + [_FL] = LAYOUT_65_ansi_7u_wk_splitbs( + _______, 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_INS, KC_DEL, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + + [_LL] = LAYOUT_65_ansi_7u_wk_splitbs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAD, + _______, _______, _______, _______, _______, RGB_RMOD, RGB_HUD, RGB_MOD), +}; \ No newline at end of file diff --git a/keyboards/exclusive/e65/keymaps/crd/readme.md b/keyboards/exclusive/e65/keymaps/crd/readme.md new file mode 100644 index 0000000000..ac58f84249 --- /dev/null +++ b/keyboards/exclusive/e65/keymaps/crd/readme.md @@ -0,0 +1,7 @@ +# crd's Keymap + +Difference from base layout: + * split backspace + * blocker bottom row + * HHKB Fn layer on Up key when held + * lights layer on left Ctrl diff --git a/keyboards/exclusive/e65/keymaps/default/keymap.c b/keyboards/exclusive/e65/keymaps/default/keymap.c new file mode 100644 index 0000000000..34fcb75d25 --- /dev/null +++ b/keyboards/exclusive/e65/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H + +/* + * ,---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace| INS | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ |PgUp| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter | PgDn| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |Up| Del| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn | Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_noblocker( + 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_INS, + 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_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_65_ansi_noblocker( + 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_DEL, RESET, + BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,_______, + _______, _______, _______, _______, _______, MO(1), RGB_SAI, RGB_VAD, RGB_SAD), +}; diff --git a/keyboards/exclusive/e65/keymaps/default/readme.md b/keyboards/exclusive/e65/keymaps/default/readme.md new file mode 100644 index 0000000000..f4ed2896e8 --- /dev/null +++ b/keyboards/exclusive/e65/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default Keymap + +Default ANSI keymap with full bottom row with a base layer and an adjust layer. + +Keymap Maintainer: [masterzen](https://github.com/masterzen) diff --git a/keyboards/exclusive/e65/keymaps/default_iso/keymap.c b/keyboards/exclusive/e65/keymaps/default_iso/keymap.c new file mode 100644 index 0000000000..815d6af545 --- /dev/null +++ b/keyboards/exclusive/e65/keymaps/default_iso/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + +/* + * ,---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace|Ins | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | |PgUp| + * |------------------------------------------------------- | |-----| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | | Enter | PgDn| + * |---------------------------------------------------------------------| + * |Shft | / |Z |X |C |V |B |N |M |, |. |/ |Shift | Up | Del| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn |Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_noblocker( + 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_INS, + + 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_PGUP, + + 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_NUHS, KC_ENT, KC_PGDN, + + 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, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_65_iso_noblocker( + 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_DEL, RESET, + BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,_______, _______, + _______, _______, _______, _______, _______, MO(1), RGB_SAI, RGB_VAD, RGB_SAD), +}; diff --git a/keyboards/exclusive/e65/keymaps/masterzen/keymap.c b/keyboards/exclusive/e65/keymaps/masterzen/keymap.c new file mode 100644 index 0000000000..32ed88d668 --- /dev/null +++ b/keyboards/exclusive/e65/keymaps/masterzen/keymap.c @@ -0,0 +1,118 @@ +#include QMK_KEYBOARD_H + +enum layers { + BASE, // qwerty linux + OSX, // qwerty osx + + _ADJUST, // function key layer +}; + +enum keycodes { + // default layout switcher + LAY_LIN = SAFE_RANGE, + LAY_OSX +}; + +// clang-format off + +/* + * ,---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |\ |Esc | Ins | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | BSpc| PgUp| + * |---------------------------------------------------------------------| + * |LCTRL |A |S |D |F |G |H |J |K |L |; |' | Enter | PgDn | + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ | Shift | Up |Del | + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt| Ctrl|▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT_65_ansi_blocker_splitbs( + 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_BSLS, KC_GRV, LT(_ADJUST,KC_INS), + 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_BSPC, KC_PGUP, + + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTRL, KC_LEFT, KC_DOWN,KC_RGHT), + + [OSX] = LAYOUT_65_ansi_blocker_splitbs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LGUI, KC_RALT, _______, _______, _______), + + [_ADJUST] = LAYOUT_65_ansi_blocker_splitbs( + RESET, LAY_LIN, LAY_OSX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(_ADJUST), + BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_HUD), + + +}; + +// clang-format on + +extern rgblight_config_t rgblight_config; + +bool edit = false; +rgblight_config_t temp_config; + +void keyboard_post_init_user(void) { temp_config.raw = rgblight_config.raw; } + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + /* layout switcher */ + case LAY_LIN: + if (record->event.pressed) { + set_single_persistent_default_layer(BASE); + } + return false; + break; + case LAY_OSX: + if (record->event.pressed) { + set_single_persistent_default_layer(OSX); + } + return false; + break; + case RGB_MOD: + // allows to set the rgb mode while in the ADJUST layer which uses + // its own mode + if (record->event.pressed) { + rgblight_mode(temp_config.mode); + rgblight_step(); + temp_config.mode = rgblight_config.mode; + } + return false; + break; + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state) { + if (state == BASE && edit == true) { + temp_config.hue = rgblight_get_hue(); + temp_config.sat = rgblight_get_sat(); + temp_config.val = rgblight_get_val(); + edit = false; + } + + switch (biton32(state)) { + case _ADJUST: + temp_config.mode = rgblight_get_mode(); + rgblight_mode_noeeprom(1); + rgblight_setrgb(0xD3, 0x7F, 0xED); + edit = true; + break; + default: + rgblight_mode(temp_config.mode); + rgblight_sethsv(temp_config.hue, temp_config.sat, temp_config.val); + break; + } + return state; +} diff --git a/keyboards/exclusive/e65/keymaps/masterzen/readme.md b/keyboards/exclusive/e65/keymaps/masterzen/readme.md new file mode 100644 index 0000000000..5e1909ff1b --- /dev/null +++ b/keyboards/exclusive/e65/keymaps/masterzen/readme.md @@ -0,0 +1,13 @@ +# masterzen's Keymap + +![masterzen keymap Layout Image](https://imgur.com/a/cJpZQBn) + +Keymap Maintainer: [masterzen](https://github.com/masterzen) + +Difference from base layout: + * split backspace + * blocker bottom row + * Fn is on the Ins key when hold + * supports both a windows/linux keymap and osx keymap + * layer change is reflected in the underglow rgb leds + diff --git a/keyboards/exclusive/e65/readme.md b/keyboards/exclusive/e65/readme.md new file mode 100644 index 0000000000..87507ea8ae --- /dev/null +++ b/keyboards/exclusive/e65/readme.md @@ -0,0 +1,15 @@ +# E6.5 + +![E6.5](https://i.imgur.com/WiDtvPN.jpg) + +A 65% keyboard made by Exclusive and run in a Geekhack group buy. + +Keyboard Maintainer: [masterzen](https://github.com/masterzen) +Hardware Supported: E6.5 QMK PCB LED +Hardware Availability: [https://geekhack.org/index.php?topic=99655.msg2730615#msg2730615](https://geekhack.org/index.php?topic=99655.msg2730615#msg2730615) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e65: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). diff --git a/keyboards/exclusive/e65/rules.mk b/keyboards/exclusive/e65/rules.mk new file mode 100644 index 0000000000..0b994a279b --- /dev/null +++ b/keyboards/exclusive/e65/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +LAYOUTS = 65_ansi_blocker \ No newline at end of file diff --git a/keyboards/exclusive/e6_rgb/rules.mk b/keyboards/exclusive/e6_rgb/rules.mk index 9e4e0f58f5..4695f64760 100644 --- a/keyboards/exclusive/e6_rgb/rules.mk +++ b/keyboards/exclusive/e6_rgb/rules.mk @@ -1,53 +1,15 @@ # MCU name MCU = atmega32u4 -# project specific files -#SRC = - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Do not put the microcontroller into power saving mode # when we get USB suspend event. We want it to keep updating diff --git a/keyboards/exclusive/e6v2/le/rules.mk b/keyboards/exclusive/e6v2/le/rules.mk index 7d28042d85..e6cad94033 100644 --- a/keyboards/exclusive/e6v2/le/rules.mk +++ b/keyboards/exclusive/e6v2/le/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -67,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = 60_ansi \ No newline at end of file +LAYOUTS = 60_ansi diff --git a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c index 5f7ef25b22..e3b81c81ba 100644 --- a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c +++ b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c @@ -13,49 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "le_bmc.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } -} \ No newline at end of file + } +} diff --git a/keyboards/exclusive/e6v2/le_bmc/rules.mk b/keyboards/exclusive/e6v2/le_bmc/rules.mk index a9156adeb5..106044ba72 100644 --- a/keyboards/exclusive/e6v2/le_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/le_bmc/rules.mk @@ -1,46 +1,5 @@ # MCU name MCU = atmega32a -PROTOCOL = VUSB - -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 12000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -# ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -# F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS = -DDEBUG_LEVEL=0 - # Bootloader selection # Teensy halfkay @@ -48,20 +7,10 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -75,7 +24,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode @@ -84,6 +33,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -SRC += i2c_master.c - -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/exclusive/e6v2/le_bmc/usbconfig.h b/keyboards/exclusive/e6v2/le_bmc/usbconfig.h index f22f2b631d..7a1471a06f 100644 --- a/keyboards/exclusive/e6v2/le_bmc/usbconfig.h +++ b/keyboards/exclusive/e6v2/le_bmc/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'E', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e' diff --git a/keyboards/exclusive/e6v2/oe/rules.mk b/keyboards/exclusive/e6v2/oe/rules.mk index 7d28042d85..e6cad94033 100644 --- a/keyboards/exclusive/e6v2/oe/rules.mk +++ b/keyboards/exclusive/e6v2/oe/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -67,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = 60_ansi \ No newline at end of file +LAYOUTS = 60_ansi diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c index 5357550ae1..97d354653f 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c @@ -13,57 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "oe_bmc.h" -#include "rgblight.h" -#include "i2c_master.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,7 +23,7 @@ void backlight_init_ports(void) { setPinOutput(D4); setPinOutput(D6); - // turn RGB LEDs on + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); @@ -80,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { - // turn RGB LEDs off + if (level == 0) { + // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { - // turn RGB LEDs on + } else { + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/exclusive/e6v2/oe_bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk index 885bce2453..106044ba72 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/oe_bmc/rules.mk @@ -1,47 +1,5 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32a -PROTOCOL = VUSB - -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 12000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -# ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -# F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS = -DDEBUG_LEVEL=0 - # Bootloader selection # Teensy halfkay @@ -49,20 +7,10 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -76,7 +24,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode @@ -85,6 +33,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -SRC += i2c_master.c - -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h index f22f2b631d..7a1471a06f 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h +++ b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'E', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e' diff --git a/keyboards/exclusive/e7v1/rules.mk b/keyboards/exclusive/e7v1/rules.mk index f903df7de5..335e228bba 100644 --- a/keyboards/exclusive/e7v1/rules.mk +++ b/keyboards/exclusive/e7v1/rules.mk @@ -1,42 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/exclusive/readme.md b/keyboards/exclusive/readme.md index 85409c9236..486e07d99b 100644 --- a/keyboards/exclusive/readme.md +++ b/keyboards/exclusive/readme.md @@ -7,3 +7,4 @@ All files related to firmware of keyboards designed by Exclusive. * [e6_rgb](./e6_rgb/): maintainer [astro](https://github.com/yulei) * [e6-v2](./e6v2/): maintainers [MechMerlin](https://github.com/mechmerlin), [amnesia0287](https://github.com/amnesia0287) * [e7-v1](./e7v1): maintainer [masterzen](https://github.com/masterzen) +* [e6.5](./e65): maintainer [masterzen](https://github.com/masterzen) diff --git a/keyboards/exent/config.h b/keyboards/exent/config.h new file mode 100644 index 0000000000..08d241f653 --- /dev/null +++ b/keyboards/exent/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2019 mechmerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Quadcube +#define PRODUCT Exent +#define DESCRIPTION 65% Keyboard + +#define RGBLED_NUM 18 + +#define MATRIX_ROWS 7 +#define MATRIX_COLS 14 + +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6 } +#define MATRIX_COL_PINS { D7, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A1, A0 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/exent/exent.c b/keyboards/exent/exent.c new file mode 100644 index 0000000000..82066f7e85 --- /dev/null +++ b/keyboards/exent/exent.c @@ -0,0 +1,17 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "exent.h" diff --git a/keyboards/exent/exent.h b/keyboards/exent/exent.h new file mode 100644 index 0000000000..256457c5ce --- /dev/null +++ b/keyboards/exent/exent.h @@ -0,0 +1,68 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k6d, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k52, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k51, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k50, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4b, k4c, k4d \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ + { k40, k41, k42, ___, k44, k45, k46, k47, k48, k49, ___, k4b, k4c, k4d }, \ + { k50, k51, k52, k53, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k6d } \ +} + +#define LAYOUT_65_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k52, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k51, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k50, \ + k40, k41, k42, k45, k47, k48, k49, k4b, k4c, k4d \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___, k2d }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ + { k40, k41, k42, ___, ___, k45, ___, k47, k48, k49, ___, k4b, k4c, k4d }, \ + { k50, k51, k52, k53, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} + +#define LAYOUT_65_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k52, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k51, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k50, \ + k40, k41, k42, k45, k47, k48, k49, k4b, k4c, k4d \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, ___ }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ + { k40, k41, k42, ___, ___, k45, ___, k47, k48, k49, ___, k4b, k4c, k4d }, \ + { k50, k51, k52, k53, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} diff --git a/keyboards/exent/info.json b/keyboards/exent/info.json new file mode 100644 index 0000000000..920a9ffe3d --- /dev/null +++ b/keyboards/exent/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Exent", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_iso": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/exent/keymaps/default/config.h b/keyboards/exent/keymaps/default/config.h new file mode 100644 index 0000000000..60dd02a9d0 --- /dev/null +++ b/keyboards/exent/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/exent/keymaps/default/keymap.c b/keyboards/exent/keymaps/default/keymap.c new file mode 100644 index 0000000000..943b1133e7 --- /dev/null +++ b/keyboards/exent/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_65_ansi( + 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_DEL, KC_TRNS, + BL_TOGG, BL_STEP, BL_INC, BL_DEC, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; diff --git a/keyboards/exent/keymaps/default/readme.md b/keyboards/exent/keymaps/default/readme.md new file mode 100644 index 0000000000..9d596e699f --- /dev/null +++ b/keyboards/exent/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for exent diff --git a/keyboards/exent/readme.md b/keyboards/exent/readme.md new file mode 100644 index 0000000000..08807eda55 --- /dev/null +++ b/keyboards/exent/readme.md @@ -0,0 +1,19 @@ +# exent + +65% custom keyboard with large bezels. + +Keyboard Maintainer: [mechmerlin](https://github.com/mechmerlin) +Hardware Supported: Exent PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=87213.0) + +Make example for this keyboard (after setting up your build environment): + + make exent:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](flashing_bootloadhid.md)) + + make exent:default:flash + +**Reset Key**: Hold down the key located at `k0d`, commonly programmed as Backspace while plugging in the keyboard. + +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). diff --git a/keyboards/exent/rules.mk b/keyboards/exent/rules.mk new file mode 100644 index 0000000000..10442b31ba --- /dev/null +++ b/keyboards/exent/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c + +OPT_DEFS = -DDEBUG_LEVEL=0 + +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/exent/usbconfig.h b/keyboards/exent/usbconfig.h new file mode 100644 index 0000000000..83ad06544d --- /dev/null +++ b/keyboards/exent/usbconfig.h @@ -0,0 +1,373 @@ +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU / 1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index 239783f8ba..9a31f92783 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 #define MANUFACTURER NotActuallyWinkeyless #define PRODUCT facew @@ -36,6 +37,5 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c index 7ec56548b1..fa58f0cf79 100644 --- a/keyboards/facew/facew.c +++ b/keyboards/facew/facew.c @@ -16,51 +16,31 @@ along with this program. If not, see . */ #include "facew.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk index b939b0fd24..c4117d15d7 100644 --- a/keyboards/facew/rules.mk +++ b/keyboards/facew/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,14 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -SRC = i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - LAYOUTS = 60_ansi diff --git a/keyboards/facew/usbconfig.h b/keyboards/facew/usbconfig.h index f3d663f8a6..47755fa8c1 100644 --- a/keyboards/facew/usbconfig.h +++ b/keyboards/facew/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'S', 'p', 'r', 'i', 't' diff --git a/keyboards/fc660c/keymaps/siroleo/README.md b/keyboards/fc660c/keymaps/siroleo/README.md index 91dd9ed3b1..f174c7f3eb 100644 --- a/keyboards/fc660c/keymaps/siroleo/README.md +++ b/keyboards/fc660c/keymaps/siroleo/README.md @@ -6,3 +6,4 @@ Emulates original keymap with modifications for: - Grave key(s) - Reset on the function layer - Mouse keys ala Tada68 +- A layer for playing with Colemak diff --git a/keyboards/fc660c/keymaps/siroleo/keymap.c b/keyboards/fc660c/keymaps/siroleo/keymap.c index a2d859f152..3711336713 100644 --- a/keyboards/fc660c/keymaps/siroleo/keymap.c +++ b/keyboards/fc660c/keymaps/siroleo/keymap.c @@ -16,6 +16,21 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H +enum siroleo_layers +{ + _QWERTY, + _COLEMAK, + _FNM +}; + +enum siroleo_keycodes +{ + QWERTY = SAFE_RANGE, + COLEMAK +}; + +#define FNM MO(_FNM) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE layer: Default Layer * ,--------------------------------------------------------------------------------------------------. @@ -30,12 +45,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Space | Fn | Ctrl | Alt | Left| Down|Right| * `--------------------------------------------------------------------------------------------------´ */ - [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, - KC_GRV ,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, - KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, - KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, MO(1),KC_RCTL,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, + KC_GRV , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT,KC_SLSH,KC_RSFT, KC_UP, + KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, FNM,KC_RCTL,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT + ), + /* Colemak Layer + * ,--------------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | | ` | + * |-----------------------------------------------------------------------------------------+ +-----+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | | Del | + * |-----------------------------------------------------------------------------------------+ +-----+ + * | ` | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |--------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | + * +--------------------------------------------------------------------------------------------+-----+ + * | Ctrl | Alt | Gui | Space | Fn | Ctrl | Alt | Left| Down|Right| + * `--------------------------------------------------------------------------------------------------´ + */ + [_COLEMAK] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, + KC_GRV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O ,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT,KC_SLSH,KC_RSFT, KC_UP, + KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, FNM,KC_RCTL,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT ), /* FN layer * ,--------------------------------------------------------------------------------------------------. @@ -50,11 +85,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Reset | | | | | | MsL | MsD | MsR | * `--------------------------------------------------------------------------------------------------´ */ - [1] = LAYOUT( + [_FNM] = LAYOUT( 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_MUTE, KC_VOLU, - _______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, KC_VOLD, - _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGUP,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______, RESET, KC_VOLD, + _______,_______,_______, QWERTY,COLEMAK,_______,_______,_______,KC_HOME,KC_PGUP,_______,_______, _______, _______,_______,_______,_______,_______,_______,_______,_______,KC_END, KC_PGDN,_______,KC_BTN1, KC_MS_U, - _______, RESET,_______, _______, MO(1), _______,_______, KC_MS_L,KC_MS_D,KC_MS_R + _______,_______,_______, _______, _______,_______,_______, KC_MS_L,KC_MS_D,KC_MS_R ) }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + } + return true; +} \ No newline at end of file diff --git a/keyboards/fc660c/rules.mk b/keyboards/fc660c/rules.mk index c947947f80..b817b404fd 100644 --- a/keyboards/fc660c/rules.mk +++ b/keyboards/fc660c/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - - -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/fc980c/rules.mk b/keyboards/fc980c/rules.mk index 261bb41c8f..596b96f1f4 100644 --- a/keyboards/fc980c/rules.mk +++ b/keyboards/fc980c/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - - -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/felix/rules.mk b/keyboards/felix/rules.mk index b33785b64a..7371e3b1a0 100644 --- a/keyboards/felix/rules.mk +++ b/keyboards/felix/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/fleuron/rules.mk b/keyboards/fleuron/rules.mk index c295dc55db..5695e68856 100644 --- a/keyboards/fleuron/rules.mk +++ b/keyboards/fleuron/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -68,4 +31,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RGBLIGHT_ENABLE = yes -LAYOUTS = ortho_6x16 \ No newline at end of file +LAYOUTS = ortho_6x16 diff --git a/keyboards/flx/virgo/config.h b/keyboards/flx/virgo/config.h new file mode 100644 index 0000000000..3a631dcac3 --- /dev/null +++ b/keyboards/flx/virgo/config.h @@ -0,0 +1,76 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4658 //FX +#define PRODUCT_ID 0x5647 //VG +#define DEVICE_VER 0x0001 +#define MANUFACTURER FLX +#define PRODUCT Virgo +#define DESCRIPTION A QMK-powered custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B0, B1 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN B3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 0 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + // #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + // #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST + #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/flx/virgo/info.json b/keyboards/flx/virgo/info.json new file mode 100644 index 0000000000..91fe3bc341 --- /dev/null +++ b/keyboards/flx/virgo/info.json @@ -0,0 +1,106 @@ +{ + "keyboard_name": "flx-virgo-default", + "url": "", + "maintainer": "qmk", + "width": 20.25, + "height": 6.25, + "layouts": { + "LAYOUT": { + "key_count": 91, + "layout": [ + {"label":"K00 (C6,F0)", "x":0, "y":0}, + {"label":"K01 (C6,F1)", "x":1.5, "y":0}, + {"label":"K11 (B6,F1)", "x":2.5, "y":0}, + {"label":"K02 (C6,F4)", "x":3.5, "y":0}, + {"label":"K12 (B6,F4)", "x":4.5, "y":0}, + {"label":"K03 (C6,F5)", "x":6, "y":0}, + {"label":"K13 (B6,F5)", "x":9, "y":0}, + {"label":"K04 (C6,F6)", "x":10, "y":0}, + {"label":"K14 (B6,F6)", "x":11, "y":0}, + {"label":"K05 (C6,F7)", "x":12.5, "y":0}, + {"label":"K15 (B6,F7)", "x":13.5, "y":0}, + {"label":"K06 (C6,C7)", "x":14.5, "y":0}, + {"label":"K16 (B6,C7)", "x":15.5, "y":0}, + {"label":"K07 (C6,B0)", "x":17.25, "y":0}, + {"label":"K17 (B6,B0)", "x":18.25, "y":0}, + {"label":"K08 (C6,B1)", "x":19.25, "y":0}, + {"label":"K20 (B5,F0)", "x":0, "y":1.25}, + {"label":"K30 (B4,F0)", "x":1, "y":1.25}, + {"label":"K21 (B5,F1)", "x":2, "y":1.25}, + {"label":"K31 (B4,F1)", "x":3, "y":1.25}, + {"label":"K22 (B5,F4)", "x":4, "y":1.25}, + {"label":"K32 (B4,F4)", "x":5, "y":1.25}, + {"label":"K23 (B5,F5)", "x":6, "y":1.25}, + {"label":"K33 (B4,F5)", "x":9, "y":1.25}, + {"label":"K24 (B5,F6)", "x":10, "y":1.25}, + {"label":"K34 (B4,F6)", "x":11, "y":1.25}, + {"label":"K25 (B5,F7)", "x":12, "y":1.25}, + {"label":"K35 (B4,F7)", "x":13, "y":1.25}, + {"label":"K26 (B5,C7)", "x":14, "y":1.25}, + {"label":"K36 (B4,C7)", "x":15, "y":1.25}, + {"label":"K66 (D4,C7)", "x":16, "y":1.25}, + {"label":"K27 (B5,B0)", "x":17.25, "y":1.25}, + {"label":"K37 (B4,B0)", "x":18.25, "y":1.25}, + {"label":"K28 (B5,B1)", "x":19.25, "y":1.25}, + {"label":"K40 (D7,F0)", "x":0, "y":2.25, "w":1.5}, + {"label":"K50 (D6,F0)", "x":1.5, "y":2.25}, + {"label":"K41 (D7,F1)", "x":2.5, "y":2.25}, + {"label":"K51 (D6,F1)", "x":3.5, "y":2.25}, + {"label":"K42 (D7,F4)", "x":4.5, "y":2.25}, + {"label":"K52 (D6,F4)", "x":5.5, "y":2.25}, + {"label":"K43 (D7,F5)", "x":8.5, "y":2.25}, + {"label":"K53 (D6,F5)", "x":9.5, "y":2.25}, + {"label":"K44 (D7,F6)", "x":10.5, "y":2.25}, + {"label":"K54 (D6,F6)", "x":11.5, "y":2.25}, + {"label":"K45 (D7,F7)", "x":12.5, "y":2.25}, + {"label":"K55 (D6,F7)", "x":13.5, "y":2.25}, + {"label":"K46 (D7,C7)", "x":14.5, "y":2.25}, + {"label":"K56 (D6,C7)", "x":15.5, "y":2.25, "w":1.5}, + {"label":"K47 (D7,B0)", "x":17.25, "y":2.25}, + {"label":"K57 (D6,B0)", "x":18.25, "y":2.25}, + {"label":"K48 (D7,B1)", "x":19.25, "y":2.25}, + {"label":"K60 (D4,F0)", "x":0, "y":3.25, "w":1.75}, + {"label":"K70 (D5,F0)", "x":1.75, "y":3.25}, + {"label":"K61 (D4,F1)", "x":2.75, "y":3.25}, + {"label":"K71 (D5,F1)", "x":3.75, "y":3.25}, + {"label":"K62 (D4,F4)", "x":4.75, "y":3.25}, + {"label":"K72 (D5,F4)", "x":5.75, "y":3.25}, + {"label":"K63 (D4,F5)", "x":8.75, "y":3.25}, + {"label":"K73 (D5,F5)", "x":9.75, "y":3.25}, + {"label":"K64 (D4,F6)", "x":10.75, "y":3.25}, + {"label":"K74 (D5,F6)", "x":11.75, "y":3.25}, + {"label":"K65 (D4,F7)", "x":12.75, "y":3.25}, + {"label":"K75 (D5,F7)", "x":13.75, "y":3.25}, + {"label":"K76 (D5,C7)", "x":14.75, "y":3.25, "w":2.25}, + {"label":"K80 (D3,F0)", "x":0, "y":4.25, "w":1.25}, + {"label":"K90 (D2,F0)", "x":1.25, "y":4.25}, + {"label":"K81 (D3,F1)", "x":2.25, "y":4.25}, + {"label":"K91 (D2,F1)", "x":3.25, "y":4.25}, + {"label":"K82 (D3,F4)", "x":4.25, "y":4.25}, + {"label":"K92 (D2,F4)", "x":5.25, "y":4.25}, + {"label":"K83 (D3,F5)", "x":6.25, "y":4.25}, + {"label":"KA3 (D1,F5)", "x":8.25, "y":4.25}, + {"label":"K93 (D2,F5)", "x":9.25, "y":4.25}, + {"label":"K84 (D3,F6)", "x":10.25, "y":4.25}, + {"label":"K94 (D2,F6)", "x":11.25, "y":4.25}, + {"label":"K85 (D3,F7)", "x":12.25, "y":4.25}, + {"label":"K95 (D2,F7)", "x":13.25, "y":4.25}, + {"label":"K86 (D3,C7)", "x":14.25, "y":4.25, "w":1.75}, + {"label":"K96 (D2,C7)", "x":16, "y":4.25}, + {"label":"K97 (D2,B0)", "x":18.25, "y":4.25}, + {"label":"KA0 (D1,F0)", "x":0, "y":5.25, "w":1.5}, + {"label":"KB0 (D0,F0)", "x":2.5, "y":5.25, "w":1.5}, + {"label":"KA1 (D1,F1)", "x":4, "y":5.25}, + {"label":"KB2 (D0,F4)", "x":5, "y":5.25, "w":2.25}, + {"label":"KB4 (D0,F6)", "x":8.25, "y":5.25, "w":2.75}, + {"label":"KB5 (D0,F7)", "x":11, "y":5.25}, + {"label":"KA6 (D1,C7)", "x":12, "y":5.25, "w":1.5}, + {"label":"KB6 (D0,C7)", "x":14.5, "y":5.25, "w":1.5}, + {"label":"KA7 (D1,B0)", "x":17.25, "y":5.25}, + {"label":"KB7 (D0,B0)", "x":18.25, "y":5.25}, + {"label":"KA8 (D1,B1)", "x":19.25, "y":5.25} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} \ No newline at end of file diff --git a/keyboards/flx/virgo/keymaps/default/config.h b/keyboards/flx/virgo/keymaps/default/config.h new file mode 100644 index 0000000000..26c6d6ade1 --- /dev/null +++ b/keyboards/flx/virgo/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/flx/virgo/keymaps/default/keymap.c b/keyboards/flx/virgo/keymaps/default/keymap.c new file mode 100644 index 0000000000..789c369dbd --- /dev/null +++ b/keyboards/flx/virgo/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + 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_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_LALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_0, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; \ No newline at end of file diff --git a/keyboards/flx/virgo/keymaps/default/readme.md b/keyboards/flx/virgo/keymaps/default/readme.md new file mode 100644 index 0000000000..e22e64c954 --- /dev/null +++ b/keyboards/flx/virgo/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for virgo diff --git a/keyboards/flx/virgo/readme.md b/keyboards/flx/virgo/readme.md new file mode 100644 index 0000000000..1edfeaf830 --- /dev/null +++ b/keyboards/flx/virgo/readme.md @@ -0,0 +1,15 @@ +# virgo + +![virgo](https://i.imgur.com/WlWwDLC.jpg) + +Custom Split TKL + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: Virgo PCB +* Hardware Availability: GB TBD + +Make example for this keyboard (after setting up your build environment): + + make flx/virgo: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). diff --git a/keyboards/flx/virgo/rules.mk b/keyboards/flx/virgo/rules.mk new file mode 100644 index 0000000000..b9bb2915f1 --- /dev/null +++ b/keyboards/flx/virgo/rules.mk @@ -0,0 +1,36 @@ +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +LINK_TIME_OPTIMIZATION_ENABLE = yes + +# generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/flx/virgo/virgo.c b/keyboards/flx/virgo/virgo.c new file mode 100644 index 0000000000..102d91a709 --- /dev/null +++ b/keyboards/flx/virgo/virgo.c @@ -0,0 +1,47 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "virgo.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(E6); + setPinOutput(B2); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(E6, !led_state.caps_lock); + writePin(B2, !led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/flx/virgo/virgo.h b/keyboards/flx/virgo/virgo.h new file mode 100644 index 0000000000..015585c4e1 --- /dev/null +++ b/keyboards/flx/virgo/virgo.h @@ -0,0 +1,43 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, K08, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K66, K27, K37, K28, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, K47, K57, K48, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K76, \ + K80, K90, K81, K91, K82, K92, K83, KA3, K93, K84, K94, K85, K95, K86, K96, K97, \ + KA0, KB0, KA1, KB2, KB4, KB5, KA6, KB6, KA7, KB7, KA8 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { KC_NO, K11, K12, K13, K14, K15, K16, K17, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, KC_NO, KC_NO }, \ + { K70, K71, K72, K73, K74, K75, K76, KC_NO, KC_NO }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO, KC_NO }, \ + { K90, K91, K92, K93, K94, K95, K96, K97, KC_NO }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7, KA8 }, \ + { KB0, KC_NO, KB2, KC_NO, KB4, KB5, KB6, KB7, KC_NO }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/fortitude60/keymaps/default/keymap.c b/keyboards/fortitude60/keymaps/default/keymap.c index d20ca40fbb..1c96424f6e 100644 --- a/keyboards/fortitude60/keymaps/default/keymap.c +++ b/keyboards/fortitude60/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/fortitude60/rev1/rev1.h b/keyboards/fortitude60/rev1/rev1.h index 5b35720bc3..bb133b3d89 100644 --- a/keyboards/fortitude60/rev1/rev1.h +++ b/keyboards/fortitude60/rev1/rev1.h @@ -3,10 +3,8 @@ #include "fortitude60.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -15,8 +13,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) #define LAYOUT( \ diff --git a/keyboards/fortitude60/rules.mk b/keyboards/fortitude60/rules.mk index 3d1745c6f7..1fdbfb0163 100644 --- a/keyboards/fortitude60/rules.mk +++ b/keyboards/fortitude60/rules.mk @@ -1,52 +1,16 @@ -SRC += matrix.c \ - split_util.c \ - serial.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -68,5 +32,8 @@ USE_SERIAL = yes # Serial support only on fortitude60 SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + split_util.c \ + serial.c DEFAULT_FOLDER = fortitude60/rev1 diff --git a/keyboards/fortitude60/serial.c b/keyboards/fortitude60/serial.c index 6006ebf1bd..674c42d593 100644 --- a/keyboards/fortitude60/serial.c +++ b/keyboards/fortitude60/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/four_banger/rules.mk b/keyboards/four_banger/rules.mk index 212e74059e..d37439a0f7 100644 --- a/keyboards/four_banger/rules.mk +++ b/keyboards/four_banger/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/foxlab/leaf60/hotswap/rules.mk b/keyboards/foxlab/leaf60/hotswap/rules.mk index 75ee00a1a9..6c1ec4525c 100644 --- a/keyboards/foxlab/leaf60/hotswap/rules.mk +++ b/keyboards/foxlab/leaf60/hotswap/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/foxlab/leaf60/universal/keymaps/jarred/keymap.c b/keyboards/foxlab/leaf60/universal/keymaps/jarred/keymap.c new file mode 100644 index 0000000000..5590ff8416 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/jarred/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 Jarred Steenvoorden + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "jarred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT_60_hhkb( + 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_BSLS, KC_GRV , + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSPC, + NAVI , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_ENT , + KC_LCTL, KC_LGUI, KC_SPC , KC_RALT, KC_RCTL + ), + + [_NV] = LAYOUT_60_hhkb( + 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_DEL , KC_BSPC, _______, KC_HOME, KC_UP , KC_END , KC_INS , _______, _______, _______, + _______, _______, _______, KC_LSFT, KC_LCTL, KC_ENT , _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL , KC_DEL , _______, + _______ , _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, _______, _______, + _______, _______, ALT_TAB , _______, RESET + ), + +}; diff --git a/keyboards/foxlab/leaf60/universal/keymaps/jarred/readme.md b/keyboards/foxlab/leaf60/universal/keymaps/jarred/readme.md new file mode 100644 index 0000000000..6b0a57a1e6 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/jarred/readme.md @@ -0,0 +1,9 @@ +# Jarred's Leaf60 Layout + +Check out [user space readme](../../../../../../users/jarred/readme.md) for more info + +# Flash + +``` +make foxlab/leaf60/universal:jarred:dfu +``` diff --git a/keyboards/foxlab/leaf60/universal/keymaps/mguterl/config.h b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/config.h new file mode 100644 index 0000000000..d8f6533c6b --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/foxlab/leaf60/universal/keymaps/mguterl/keymap.c b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/keymap.c new file mode 100644 index 0000000000..158bdde89c --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "mguterl.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_all( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + HPR_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_BSPC, + ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(UTIL), + KC_LALT, KC_LALT, KC_LGUI, SPC_UTL, SPC_UTL, SPC_UTL, KC_RALT, MO(1), KC_RGUI, KC_RCTL), + + [_GAMING] = LAYOUT_all( + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______), + + [_UTIL] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + TG_GAME, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + + +}; diff --git a/keyboards/foxlab/leaf60/universal/keymaps/mguterl/readme.md b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/readme.md new file mode 100644 index 0000000000..7f1d982bce --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/readme.md @@ -0,0 +1,11 @@ +# Michael Guterl's Leaf60 WKL Layout + +Check out my [userspace](/users/mguterl) for the custom keycodes that are used +in keymap.c. + +This is a pretty standard 60% WKL layout. I add a couple of layers to add +some conveniences and add vimkeys for navigation. + +```sh +make foxlab/leaf60/universal:mguterl:flash +``` diff --git a/keyboards/foxlab/leaf60/universal/rules.mk b/keyboards/foxlab/leaf60/universal/rules.mk index a865410333..1fcd0aa22d 100644 --- a/keyboards/foxlab/leaf60/universal/rules.mk +++ b/keyboards/foxlab/leaf60/universal/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/foxlab/leaf60/universal/universal.h b/keyboards/foxlab/leaf60/universal/universal.h index ab3f388a49..8d8f836185 100644 --- a/keyboards/foxlab/leaf60/universal/universal.h +++ b/keyboards/foxlab/leaf60/universal/universal.h @@ -40,13 +40,13 @@ } #define LAYOUT_60_ansi( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ K400, K401, K402, K406, K410, K411, K412, K413 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO }, \ diff --git a/keyboards/fractal/rules.mk b/keyboards/fractal/rules.mk index 0de2a7d39f..4894f1f4d8 100755 --- a/keyboards/fractal/rules.mk +++ b/keyboards/fractal/rules.mk @@ -1,46 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/freyr/config.h b/keyboards/freyr/config.h new file mode 100644 index 0000000000..ce30fd5344 --- /dev/null +++ b/keyboards/freyr/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2019 HnahKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0002 +#define MANUFACTURER HnahKB +#define PRODUCT Freyr +#define DESCRIPTION Custom PCB TKL keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, B2, B1, B0, E6, F0, D2, D5, F4, F1 } +#define MATRIX_COL_PINS { B4, D7, D6, D4, B5, C7, C6, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/freyr/freyr.c b/keyboards/freyr/freyr.c new file mode 100644 index 0000000000..68c26294f5 --- /dev/null +++ b/keyboards/freyr/freyr.c @@ -0,0 +1,45 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include "freyr.h" + + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +}; + +void led_init_ports(void) { + setPinOutput(B3); + setPinOutput(B7); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Turn Caps Lock LED on + writePinLow(B3); + } else { + // Turn Caps Lock LED off + writePinHigh(B3); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + // Turn Scroll Lock LED on + writePinLow(B7); + } else { + // Turn Scroll Lock LED off + writePinHigh(B7); + } + led_set_user(usb_led); +} diff --git a/keyboards/freyr/freyr.h b/keyboards/freyr/freyr.h new file mode 100644 index 0000000000..f18e74432f --- /dev/null +++ b/keyboards/freyr/freyr.h @@ -0,0 +1,72 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k74, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k85, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) { \ + { k00, k01, k02, k03, k04, KC_NO, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49}, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79 }, \ + { k80, k81, k82, k83, k84, k85, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { k90, k91, k92, k93, k94, k95, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_tkl_ansi( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k84, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, KC_NO, k84, \ + k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) + +#define LAYOUT_tkl_iso( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, KC_NO, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) + diff --git a/keyboards/freyr/info.json b/keyboards/freyr/info.json new file mode 100644 index 0000000000..22fc96fa24 --- /dev/null +++ b/keyboards/freyr/info.json @@ -0,0 +1,290 @@ +{ + "keyboard_name": "freyr", + "url": "", + "maintainer": "vuhopkep", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "key_count": 91, + "layout": [ + {"label":"Esc (k00)", "x":0, "y":0}, + {"label":"F1 (k01)", "x":2, "y":0}, + {"label":"F2 (k02)", "x":3, "y":0}, + {"label":"F3 (k03)", "x":4, "y":0}, + {"label":"F4 (k04)", "x":5, "y":0}, + {"label":"F5 (k06)", "x":6.5, "y":0}, + {"label":"F6 (k07)", "x":7.5, "y":0}, + {"label":"F7 (k08)", "x":8.5, "y":0}, + {"label":"F8 (k09)", "x":9.5, "y":0}, + {"label":"F9 (k60)", "x":11, "y":0}, + {"label":"F10 (k61)", "x":12, "y":0}, + {"label":"F11 (k62)", "x":13, "y":0}, + {"label":"F12 (k63)", "x":14, "y":0}, + {"label":"PrtSc (k64)", "x":15.25, "y":0}, + {"label":"Scroll Lock (k65)", "x":16.25, "y":0}, + {"label":"Pause (k66)", "x":17.25, "y":0}, + {"label":"~ (k10)", "x":0, "y":1.25}, + {"label":"! (k11)", "x":1, "y":1.25}, + {"label":"@ (k12)", "x":2, "y":1.25}, + {"label":"# (k13)", "x":3, "y":1.25}, + {"label":"$ (k14)", "x":4, "y":1.25}, + {"label":"% (k15)", "x":5, "y":1.25}, + {"label":"^ (k16)", "x":6, "y":1.25}, + {"label":"& (k17)", "x":7, "y":1.25}, + {"label":"* (k18)", "x":8, "y":1.25}, + {"label":"( (k19)", "x":9, "y":1.25}, + {"label":") (k70)", "x":10, "y":1.25}, + {"label":"_ (k71)", "x":11, "y":1.25}, + {"label":"+ (k72)", "x":12, "y":1.25}, + {"label":"Backspace (k73)", "x":13, "y":1.25}, + {"label":"Backspace2 (k74)", "x":14, "y":1.25}, + {"label":"Insert (k75)", "x":15.25, "y":1.25}, + {"label":"Home (k76)", "x":16.25, "y":1.25}, + {"label":"PgUp (k67)", "x":17.25, "y":1.25}, + {"label":"Tab (k20)", "x":0, "y":2.25, "w":1.5}, + {"label":"Q (k21)", "x":1.5, "y":2.25}, + {"label":"W (k22)", "x":2.5, "y":2.25}, + {"label":"E (k23)", "x":3.5, "y":2.25}, + {"label":"R (k24)", "x":4.5, "y":2.25}, + {"label":"T (k25)", "x":5.5, "y":2.25}, + {"label":"Y (k26)", "x":6.5, "y":2.25}, + {"label":"U (k27)", "x":7.5, "y":2.25}, + {"label":"I (k28)", "x":8.5, "y":2.25}, + {"label":"O (k29)", "x":9.5, "y":2.25}, + {"label":"P (k80)", "x":10.5, "y":2.25}, + {"label":"{ (k81)", "x":11.5, "y":2.25}, + {"label":"} (k82)", "x":12.5, "y":2.25}, + {"label":"| (k83)", "x":13.5, "y":2.25, "w":1.5}, + {"label":"Delete (k78)", "x":15.25, "y":2.25}, + {"label":"End (k77)", "x":16.25, "y":2.25}, + {"label":"PgDn (k68)", "x":17.25, "y":2.25}, + {"label":"Caps Lock (k30)", "x":0, "y":3.25, "w":1.75}, + {"label":"A (k31)", "x":1.75, "y":3.25}, + {"label":"S (k32)", "x":2.75, "y":3.25}, + {"label":"D (k33)", "x":3.75, "y":3.25}, + {"label":"F (k34)", "x":4.75, "y":3.25}, + {"label":"G (k35)", "x":5.75, "y":3.25}, + {"label":"H (k36)", "x":6.75, "y":3.25}, + {"label":"J (k37)", "x":7.75, "y":3.25}, + {"label":"K (k38)", "x":8.75, "y":3.25}, + {"label":"L (k39)", "x":9.75, "y":3.25}, + {"label":": (k90)", "x":10.75, "y":3.25}, + {"label":"\" (k91)", "x":11.75, "y":3.25}, + {"label":"~ (k92)", "x":12.75, "y":3.25}, + {"label":"Enter (k84)", "x":13.75, "y":3.25, "w":1.25}, + {"label":"Shift (k40)", "x":0, "y":4.25, "w":1.25}, + {"label":"| (k41)", "x":1.25, "y":4.25}, + {"label":"Z (k42)", "x":2.25, "y":4.25}, + {"label":"X (k43)", "x":3.25, "y":4.25}, + {"label":"C (k44)", "x":4.25, "y":4.25}, + {"label":"V (k45)", "x":5.25, "y":4.25}, + {"label":"B (k46)", "x":6.25, "y":4.25}, + {"label":"N (k47)", "x":7.25, "y":4.25}, + {"label":"M (k48)", "x":8.25, "y":4.25}, + {"label":"< (k49)", "x":9.25, "y":4.25}, + {"label":"> (k95)", "x":10.25, "y":4.25}, + {"label":"? (k94)", "x":11.25, "y":4.25}, + {"label":"JP Ro (k85)", "x":12.25, "y":4.25}, + {"label":"Shift (k93)", "x":13.25, "y":4.25, "w":1.75}, + {"label":"Up (k79)", "x":16.25, "y":4.25}, + {"label":"Ctrl (k50)", "x":0, "y":5.25, "w":1.25}, + {"label":"Win (k51)", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt (k52)", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Space (k53)", "x":3.75, "y":5.25, "w":6.25}, + {"label":"Alt (k54)", "x":10, "y":5.25, "w":1.25}, + {"label":"Win (k55)", "x":11.25, "y":5.25, "w":1.25}, + {"label":"Menu (k56)", "x":12.5, "y":5.25, "w":1.25}, + {"label":"Ctrl (k57)", "x":13.75, "y":5.25, "w":1.25}, + {"label":"Left (k58)", "x":15.25, "y":5.25}, + {"label":"Down (k59)", "x":16.25, "y":5.25}, + {"label":"Right (k69)", "x":17.25, "y":5.25} + ] + }, + "LAYOUT_tkl_ansi": { + "key_count": 87, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.25}, + {"label":"!", "x":1, "y":1.25}, + {"label":"@", "x":2, "y":1.25}, + {"label":"#", "x":3, "y":1.25}, + {"label":"$", "x":4, "y":1.25}, + {"label":"%", "x":5, "y":1.25}, + {"label":"^", "x":6, "y":1.25}, + {"label":"&", "x":7, "y":1.25}, + {"label":"*", "x":8, "y":1.25}, + {"label":"(", "x":9, "y":1.25}, + {"label":")", "x":10, "y":1.25}, + {"label":"_", "x":11, "y":1.25}, + {"label":"+", "x":12, "y":1.25}, + {"label":"Backspace", "x":13, "y":1.25, "w":2}, + {"label":"Insert", "x":15.25, "y":1.25}, + {"label":"Home", "x":16.25, "y":1.25}, + {"label":"PgUp", "x":17.25, "y":1.25}, + {"label":"Tab", "x":0, "y":2.25, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.25}, + {"label":"W", "x":2.5, "y":2.25}, + {"label":"E", "x":3.5, "y":2.25}, + {"label":"R", "x":4.5, "y":2.25}, + {"label":"T", "x":5.5, "y":2.25}, + {"label":"Y", "x":6.5, "y":2.25}, + {"label":"U", "x":7.5, "y":2.25}, + {"label":"I", "x":8.5, "y":2.25}, + {"label":"O", "x":9.5, "y":2.25}, + {"label":"P", "x":10.5, "y":2.25}, + {"label":"{", "x":11.5, "y":2.25}, + {"label":"}", "x":12.5, "y":2.25}, + {"label":"|", "x":13.5, "y":2.25, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.25}, + {"label":"End", "x":16.25, "y":2.25}, + {"label":"PgDn", "x":17.25, "y":2.25}, + {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, + {"label":"A", "x":1.75, "y":3.25}, + {"label":"S", "x":2.75, "y":3.25}, + {"label":"D", "x":3.75, "y":3.25}, + {"label":"F", "x":4.75, "y":3.25}, + {"label":"G", "x":5.75, "y":3.25}, + {"label":"H", "x":6.75, "y":3.25}, + {"label":"J", "x":7.75, "y":3.25}, + {"label":"K", "x":8.75, "y":3.25}, + {"label":"L", "x":9.75, "y":3.25}, + {"label":":", "x":10.75, "y":3.25}, + {"label":"\"", "x":11.75, "y":3.25}, + {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, + {"label":"Shift", "x":0, "y":4.25, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.25}, + {"label":"X", "x":3.25, "y":4.25}, + {"label":"C", "x":4.25, "y":4.25}, + {"label":"V", "x":5.25, "y":4.25}, + {"label":"B", "x":6.25, "y":4.25}, + {"label":"N", "x":7.25, "y":4.25}, + {"label":"M", "x":8.25, "y":4.25}, + {"label":"<", "x":9.25, "y":4.25}, + {"label":">", "x":10.25, "y":4.25}, + {"label":"?", "x":11.25, "y":4.25}, + {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.25}, + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.25, "w":6.25}, + {"label":"Alt", "x":10, "y":5.25, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.25}, + {"label":"Down", "x":16.25, "y":5.25}, + {"label":"Right", "x":17.25, "y":5.25} + ] + }, + "LAYOUT_tkl_iso": { + "key_count": 88, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"\u00ac", "x":0, "y":1.25}, + {"label":"!", "x":1, "y":1.25}, + {"label":"\"", "x":2, "y":1.25}, + {"label":"\u00a3", "x":3, "y":1.25}, + {"label":"$", "x":4, "y":1.25}, + {"label":"%", "x":5, "y":1.25}, + {"label":"^", "x":6, "y":1.25}, + {"label":"&", "x":7, "y":1.25}, + {"label":"*", "x":8, "y":1.25}, + {"label":"(", "x":9, "y":1.25}, + {"label":")", "x":10, "y":1.25}, + {"label":"_", "x":11, "y":1.25}, + {"label":"+", "x":12, "y":1.25}, + {"label":"Backspace", "x":13, "y":1.25, "w":2}, + {"label":"Insert", "x":15.25, "y":1.25}, + {"label":"Home", "x":16.25, "y":1.25}, + {"label":"PgUp", "x":17.25, "y":1.25}, + {"label":"Tab", "x":0, "y":2.25, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.25}, + {"label":"W", "x":2.5, "y":2.25}, + {"label":"E", "x":3.5, "y":2.25}, + {"label":"R", "x":4.5, "y":2.25}, + {"label":"T", "x":5.5, "y":2.25}, + {"label":"Y", "x":6.5, "y":2.25}, + {"label":"U", "x":7.5, "y":2.25}, + {"label":"I", "x":8.5, "y":2.25}, + {"label":"O", "x":9.5, "y":2.25}, + {"label":"P", "x":10.5, "y":2.25}, + {"label":"{", "x":11.5, "y":2.25}, + {"label":"}", "x":12.5, "y":2.25}, + {"label":"Delete", "x":15.25, "y":2.25}, + {"label":"End", "x":16.25, "y":2.25}, + {"label":"PgDn", "x":17.25, "y":2.25}, + {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, + {"label":"A", "x":1.75, "y":3.25}, + {"label":"S", "x":2.75, "y":3.25}, + {"label":"D", "x":3.75, "y":3.25}, + {"label":"F", "x":4.75, "y":3.25}, + {"label":"G", "x":5.75, "y":3.25}, + {"label":"H", "x":6.75, "y":3.25}, + {"label":"J", "x":7.75, "y":3.25}, + {"label":"K", "x":8.75, "y":3.25}, + {"label":"L", "x":9.75, "y":3.25}, + {"label":":", "x":10.75, "y":3.25}, + {"label":"@", "x":11.75, "y":3.25}, + {"label":"~", "x":12.75, "y":3.25}, + {"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":4.25, "w":1.25}, + {"label":"|", "x":1.25, "y":4.25}, + {"label":"Z", "x":2.25, "y":4.25}, + {"label":"X", "x":3.25, "y":4.25}, + {"label":"C", "x":4.25, "y":4.25}, + {"label":"V", "x":5.25, "y":4.25}, + {"label":"B", "x":6.25, "y":4.25}, + {"label":"N", "x":7.25, "y":4.25}, + {"label":"M", "x":8.25, "y":4.25}, + {"label":"<", "x":9.25, "y":4.25}, + {"label":">", "x":10.25, "y":4.25}, + {"label":"?", "x":11.25, "y":4.25}, + {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.25}, + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.25, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.25, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.25}, + {"label":"Down", "x":16.25, "y":5.25}, + {"label":"Right", "x":17.25, "y":5.25} + ] + } + } +} diff --git a/keyboards/freyr/keymaps/default/config.h b/keyboards/freyr/keymaps/default/config.h new file mode 100644 index 0000000000..348d7c5513 --- /dev/null +++ b/keyboards/freyr/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/freyr/keymaps/default/keymap.c b/keyboards/freyr/keymaps/default/keymap.c new file mode 100644 index 0000000000..008ae47d4a --- /dev/null +++ b/keyboards/freyr/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _QWERTY, + _LOWER +}; + +#define LOWER MO(_LOWER) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_tkl_iso( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS , \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,\ + 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_DEL, KC_END, KC_PGDN,\ + 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_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,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_APP, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [_LOWER] = LAYOUT_tkl_iso( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ) +}; + diff --git a/keyboards/freyr/keymaps/default/readme.md b/keyboards/freyr/keymaps/default/readme.md new file mode 100644 index 0000000000..7a41bdd766 --- /dev/null +++ b/keyboards/freyr/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for freyr \ No newline at end of file diff --git a/keyboards/freyr/readme.md b/keyboards/freyr/readme.md new file mode 100644 index 0000000000..c6ddc30411 --- /dev/null +++ b/keyboards/freyr/readme.md @@ -0,0 +1,15 @@ +# freyr + +![Freyr](https://i.imgur.com/MeOrzoI.jpg) + +Freyr is a tenkeyless keyboard, support ansi and iso layout. +[Full layout here](http://www.keyboard-layout-editor.com/#/gists/438ef0c58c46ec28c80d9894ffcff177) + +Keyboard Maintainer: [HnahKB](https://github.com/vuhopkep) +Hardware Supported: Freyr.revB PCB + +Make example for this keyboard (after setting up your build environment): + + make freyr: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). diff --git a/keyboards/freyr/rules.mk b/keyboards/freyr/rules.mk new file mode 100644 index 0000000000..1a00e299fa --- /dev/null +++ b/keyboards/freyr/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# Supported layouts +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h index b56adb1146..1bf9392872 100644 --- a/keyboards/ft/mars80/config.h +++ b/keyboards/ft/mars80/config.h @@ -38,7 +38,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ft/mars80/mars80.c b/keyboards/ft/mars80/mars80.c index 7543450822..8e51274087 100644 --- a/keyboards/ft/mars80/mars80.c +++ b/keyboards/ft/mars80/mars80.c @@ -16,50 +16,6 @@ #include "mars80.h" -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output setPinOutput(D0); @@ -75,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } -} \ No newline at end of file + } +} diff --git a/keyboards/ft/mars80/mars80.h b/keyboards/ft/mars80/mars80.h index 6308d06d0d..fdeb4f9857 100644 --- a/keyboards/ft/mars80/mars80.h +++ b/keyboards/ft/mars80/mars80.h @@ -37,7 +37,7 @@ { \ { k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \ { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \ @@ -55,7 +55,7 @@ { \ { k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \ { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO }, \ { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \ diff --git a/keyboards/ft/mars80/rules.mk b/keyboards/ft/mars80/rules.mk index 159307f8d0..de85d62c8e 100644 --- a/keyboards/ft/mars80/rules.mk +++ b/keyboards/ft/mars80/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2019 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,13 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -SRC += i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/ft/mars80/usbconfig.h b/keyboards/ft/mars80/usbconfig.h index 338b67f583..4430d9e67d 100644 --- a/keyboards/ft/mars80/usbconfig.h +++ b/keyboards/ft/mars80/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'f', 't' diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h index ac67877ffc..8a6cc09a12 100644 --- a/keyboards/geekboards/tester/config.h +++ b/keyboards/geekboards/tester/config.h @@ -23,6 +23,7 @@ #define LOCKING_RESYNC_ENABLE #define DEBOUNCE 3 +#ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 #define RGB_DISABLE_WHEN_USB_SUSPENDED true #define RGB_MATRIX_KEYPRESSES @@ -32,8 +33,8 @@ #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110101 - #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 8 #define DRIVER_2_LED_TOTAL 0 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#endif \ No newline at end of file diff --git a/keyboards/geekboards/tester/rules.mk b/keyboards/geekboards/tester/rules.mk index 7e8d595fb7..1ca57f6d09 100644 --- a/keyboards/geekboards/tester/rules.mk +++ b/keyboards/geekboards/tester/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# project specific files -#SRC = - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. - # Build Options # change yes to no to disable # diff --git a/keyboards/georgi/matrix.c b/keyboards/georgi/matrix.c index 58f0776c42..f0b69c841a 100644 --- a/keyboards/georgi/matrix.c +++ b/keyboards/georgi/matrix.c @@ -27,10 +27,6 @@ along with this program. If not, see . #include "util.h" #include "keymap_steno.h" #include QMK_KEYBOARD_H -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif - #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -92,12 +88,6 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -143,10 +133,6 @@ void matrix_init(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif matrix_init_quantum(); } @@ -160,12 +146,6 @@ void matrix_power_up(void) { for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - } // Returns a matrix_row_t whose bits are set if the corresponding key should be @@ -214,18 +194,6 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { select_row(i); // and select on left hand diff --git a/keyboards/georgi/rules.mk b/keyboards/georgi/rules.mk index a87b448e34..412a318f0c 100644 --- a/keyboards/georgi/rules.mk +++ b/keyboards/georgi/rules.mk @@ -1,18 +1,15 @@ -#---------------------------------------------------------------------------- -# make georgi:default:dfu -# Make sure you have dfu-programmer installed! -# Do not edit this file! Make a copy of keymaps/default and modify that! -#---------------------------------------------------------------------------- -# Source includes -SRC += matrix.c i2c_master.c sten.c - -# Hardware info +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -F_USB = $(F_CPU) -EXTRAFLAGS += -flto CUSTOM_MATRIX = yes MOUSEKEY_ENABLE = no @@ -21,3 +18,6 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = no NKRO_ENABLE = yes + +EXTRAFLAGS += -flto +SRC += matrix.c i2c_master.c sten.c diff --git a/keyboards/georgi/sten.c b/keyboards/georgi/sten.c index 197abaf92f..c7469b6394 100644 --- a/keyboards/georgi/sten.c +++ b/keyboards/georgi/sten.c @@ -253,7 +253,7 @@ uint32_t processFakeSteno(bool lookup) { P( RB, SEND(KC_K);); P( RG, SEND(KC_L);); P( RS, SEND(KC_SCLN);); - P( RZ, SEND(KC_COMM);); + P( RZ, SEND(KC_QUOT);); P( LNO, SEND(KC_1);); P( RNO, SEND(KC_1);); diff --git a/keyboards/gergo/config.h b/keyboards/gergo/config.h index e4c61ecb07..f8738f0956 100644 --- a/keyboards/gergo/config.h +++ b/keyboards/gergo/config.h @@ -21,6 +21,9 @@ along with this program. If not, see . #pragma once #include "config_common.h" +#define BOOTMAGIC_LITE_ROW 13 +#define BOOTMAGIC_LITE_COLUMN 2 + /* Defaults */ #ifndef BALLSTEP #define BALLSTEP 20 diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c index ffa23462ee..d1e6224060 100644 --- a/keyboards/gergo/keymaps/drashna/keymap.c +++ b/keyboards/gergo/keymaps/drashna/keymap.c @@ -1,15 +1,13 @@ -/* Good on you for modifying your layout! if you don't have - * time to read the QMK docs, a list of keycodes can be found at - * - * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md - * - * There's also a template for adding new layers at the bottom of this file! - */ - -#include QMK_KEYBOARD_H #include "drashna.h" - +/* + * The `LAYOUT_gergo_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ +// clang-format off #define LAYOUT_gergo_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -17,7 +15,7 @@ ) \ LAYOUT_gergo_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \ - KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, KC_QUOT, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ ) @@ -111,3 +109,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), */ +// clang-format on diff --git a/keyboards/gergo/keymaps/oled/config.h b/keyboards/gergo/keymaps/oled/config.h new file mode 100644 index 0000000000..b186080681 --- /dev/null +++ b/keyboards/gergo/keymaps/oled/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define IGNORE_MOD_TAP_INTERRUPT +#define OLED_FONT_H "keyboards/gergo/keymaps/oled/glcdfont.c" diff --git a/keyboards/gergo/keymaps/oled/glcdfont.c b/keyboards/gergo/keymaps/oled/glcdfont.c new file mode 100644 index 0000000000..cf189e6e5a --- /dev/null +++ b/keyboards/gergo/keymaps/oled/glcdfont.c @@ -0,0 +1,232 @@ +// 'loveLain', 128x32px + +#include +#include + +static const unsigned char font[] PROGMEM = { +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, 0xA4, 0xA4, 0x9C, 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, +0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0xFC, 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, 0x40, 0x28, +0x00, 0x48, 0xC2, 0x24, 0x10, 0x12, +0x24, 0x10, 0x12, 0x29, 0x10, 0x22, +0x58, 0x44, 0x90, 0x20, 0x80, 0x00, +0x00, 0x04, 0x10, 0x88, 0x40, 0x20, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xE8, +0x00, 0x20, 0x00, 0x10, 0x08, 0x08, +0x00, 0x08, 0x10, 0x00, 0x10, 0x20, +0x40, 0x40, 0x80, 0x00, 0x00, 0x00, +0x00, 0x14, 0x42, 0x01, 0x00, 0x01, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x40, 0x40, 0x00, 0x40, 0x40, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +0x10, 0x08, 0x00, 0x00, 0x00, 0x40, +0x10, 0x80, 0x50, 0x22, 0xA4, 0x10, +0x52, 0x24, 0x10, 0x32, 0x08, 0x44, +0x64, 0x20, 0x90, 0x80, 0x40, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x82, 0x11, 0x48, 0x00, +0x37, 0xC0, 0x00, 0x00, 0x08, 0x10, +0x02, 0x48, 0x14, 0x00, 0x00, 0x00, +0x41, 0x42, 0xA2, 0x81, 0x42, 0x61, +0x04, 0x22, 0x00, 0x40, 0x82, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, +0x00, 0x49, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x02, 0x04, +0x08, 0x00, 0x08, 0x15, 0x20, 0x40, +0x00, 0x40, 0x00, 0x00, 0x00, 0x00, +0x00, 0x2C, 0x03, 0x60, 0x20, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x02, 0x00, +0x85, 0x20, 0x00, 0x42, 0x42, 0x42, +0x85, 0x44, 0xC2, 0x01, 0x00, 0x00, +0x48, 0x10, 0x04, 0x48, 0x10, 0x00, +0x00, 0x01, 0xA0, 0x5E, 0x00, 0xA2, +0x14, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x00, 0x09, +0x12, 0x20, 0x89, 0x12, 0x42, 0x24, +0x04, 0x48, 0x0C, 0x90, 0x06, 0x21, +0x4A, 0x05, 0x84, 0x00, 0x02, 0x00, +0x00, 0x00, 0x08, 0x04, 0x00, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, +0x00, 0x2A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x20, 0x00, 0x20, +0x00, 0x40, 0x00, 0x00, 0x40, 0x00, +0x40, 0x00, 0x40, 0x40, 0x00, 0x40, +0x00, 0x40, 0x20, 0x00, 0x90, 0x48, +0x03, 0x10, 0x08, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x02, 0x09, +0x10, 0x20, 0x08, 0x00, 0x00, 0x02, +0x00, 0x02, 0x48, 0x15, 0x02, 0xA4, +0x08, 0x44, 0x88, 0x24, 0x48, 0x04, +0xA2, 0x15, 0x00, 0x0A, 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, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +static const unsigned int fontLen = 512; diff --git a/keyboards/gergo/keymaps/oled/keymap.c b/keyboards/gergo/keymaps/oled/keymap.c new file mode 100644 index 0000000000..c348a2b96d --- /dev/null +++ b/keyboards/gergo/keymaps/oled/keymap.c @@ -0,0 +1,145 @@ +/* Good on you for modifying your layout! if you don't have + * time to read the QMK docs, a list of keycodes can be found at + * + * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md + * + * There's also a template for adding new layers at the bottom of this file! + */ + +#include QMK_KEYBOARD_H + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define NUMB 2 // numbers/motion + +// Blank template at the bottom +enum customKeycodes { + URL = 1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | L1/ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * |Ctrl/BS | A | S | D | F | G | RMB | | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | LMB | | | N | M | , < | . > | / ? | - _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .----------. .-------. .------. .-----. + * | Super/Del| |Ent/ALT| | Tab | |BKSP | + * '----------' '-------' `------. '-----' + * ,-------. ,-------. + * | MMB | | PgDn | + * ,------|-------| |-------|------. + * | SYMB | NUMB | | SYMB | NUMB | + * | Space| Escape| | Mod |Space | + * | | | | | | + * `--------------' `--------------' + */ +[BASE] = LAYOUT_gergo( + LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BTN3, KC_PGDN, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC), KC_TAB, KC_BSPC + ), +/* Keymap 1: Symbols layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | | | | | \ | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | = | , | . | / ? | - _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | DEL | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | PgUp | + * ,------|-------| |-------|------. + * | | | | | | + * | ; | = | | = | ; | + * | | | | | | + * `--------------' `--------------' + */ +[SYMB] = LAYOUT_gergo( + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_TRNS, KC_TRNS, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_PGUP, KC_DEL + ), +/* Keymap 2: Pad/Function layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | | LEFT | DOWN | UP | RIGHT|VolDn | VolUp | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT|Ply/Pa| Skip | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | PgUp | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' + */ +[NUMB] = LAYOUT_gergo( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +/* Keymap template + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' +[SYMB] = LAYOUT_gergo( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) + */ + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +void oled_task_user(void) { + static const char PROGMEM font_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + oled_write_P(font_logo, false); + +} + //for (int i = 0; i < fontLen; i++) { + //oled_write_char(pgm_read_byte(lain+i), false); + //oled_write_char((char)i, false); + //} +#endif diff --git a/keyboards/gergo/keymaps/oled/readme.md b/keyboards/gergo/keymaps/oled/readme.md new file mode 100644 index 0000000000..471a20fbdf --- /dev/null +++ b/keyboards/gergo/keymaps/oled/readme.md @@ -0,0 +1,10 @@ +# [Gergo! By g Heavy Industries](http://gboards.ca) + +![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg) + +This is the default keymap for Gergo, it's based heavily off of the naps62 ErgoDox layout and is aimed at a programmer friendly keymap. + +## Settings +To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! diff --git a/keyboards/gergo/keymaps/oled/rules.mk b/keyboards/gergo/keymaps/oled/rules.mk new file mode 100644 index 0000000000..fae936effb --- /dev/null +++ b/keyboards/gergo/keymaps/oled/rules.mk @@ -0,0 +1,38 @@ +#---------------------------------------------------------------------------- +# make gergo:germ:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- +# Firmware options +BALLER = no # Enable to ball out +BALLSTEP = 20 # Multiple in px to move, multiplied by layer number +SCROLLSTEP = 1 # Lines to scroll with ball +MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller +OLED_DRIVER_ENABLE = yes +LOCAL_GLCDFONT = yes + +#Debug options +VERBOSE = yes +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_BALLER = no +DEBUG_MATRIX = yes + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +ifneq ($(strip $(BALLSTEP)),) + OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP)) +endif +ifneq ($(strip $(SCROLLSTEP)),) + OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP)) +endif +ifeq ($(strip $(BALLER)), yes) + POINTING_DEVICE_ENABLE = yes + OPT_DEFS += -DBALLER +endif +ifeq ($(strip $(DEBUG_BALLER)), yes) + OPT_DEFS += -DDEBUG_BALLER +endif +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c index 9ef1f6b5cf..f659ed52c2 100644 --- a/keyboards/gergo/matrix.c +++ b/keyboards/gergo/matrix.c @@ -27,9 +27,6 @@ along with this program. If not, see . #include "util.h" #include "debounce.h" #include QMK_KEYBOARD_H -#ifdef DEBUG_MATRIX_SCAN_RATE -# include "timer.h" -#endif #ifdef BALLER #include @@ -124,12 +121,6 @@ static void enableInterrupts(void); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} __attribute__ ((weak)) void matrix_scan_user(void) {} @@ -161,10 +152,6 @@ void matrix_init(void) { raw_matrix[i] = 0; } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif debounce_init(MATRIX_ROWS); matrix_init_quantum(); } @@ -179,12 +166,6 @@ void matrix_power_up(void) { for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - } // Reads and stores a row, returning @@ -261,20 +242,6 @@ uint8_t matrix_scan(void) { } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - bool changed = false; for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { // select rows from left and right hands diff --git a/keyboards/gergo/rules.mk b/keyboards/gergo/rules.mk index a33bfcec8d..41f201a458 100644 --- a/keyboards/gergo/rules.mk +++ b/keyboards/gergo/rules.mk @@ -1,21 +1,22 @@ -#---------------------------------------------------------------------------- -# make gergo:germ:dfu -# Make sure you have dfu-programmer installed! -# Do not edit this file! Make a copy of keymaps/default and modify that! -#---------------------------------------------------------------------------- -# Source includes -SRC += matrix.c i2c_master.c - -# Hardware info +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -F_USB = $(F_CPU) CUSTOM_MATRIX = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes +BOOTMAGIC_ENABLE = lite DEBOUNCE_TYPE = eager_pr +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/gh60/config.h b/keyboards/gh60/config.h deleted file mode 100644 index 8b7391faf1..0000000000 --- a/keyboards/gh60/config.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER geekhack -#define PRODUCT GH60 -#define DESCRIPTION t.m.k. keyboard firmware for GH60 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ - #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -// Rev A -// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } -// Rev B/C - #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* 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 - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/gh60/gh60.c b/keyboards/gh60/gh60.c deleted file mode 100644 index 10ae893594..0000000000 --- a/keyboards/gh60/gh60.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "gh60.h" - - -extern inline void gh60_caps_led_on(void); -extern inline void gh60_poker_leds_on(void); -extern inline void gh60_fn_led_on(void); -extern inline void gh60_esc_led_on(void); -extern inline void gh60_wasd_leds_on(void); - -extern inline void gh60_caps_led_off(void); -extern inline void gh60_poker_leds_off(void); -extern inline void gh60_fn_led_off(void); -extern inline void gh60_esc_led_off(void); -extern inline void gh60_wasd_leds_off(void); - - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - gh60_caps_led_on(); - } else { - gh60_caps_led_off(); - } - - led_set_user(usb_led); -} diff --git a/keyboards/gh60/gh60.h b/keyboards/gh60/gh60.h deleted file mode 100644 index 048263ba73..0000000000 --- a/keyboards/gh60/gh60.h +++ /dev/null @@ -1,117 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "led.h" - -/* GH60 LEDs - * GPIO pads - * 0 F7 WASD LEDs - * 1 F6 ESC LED - * 2 F5 FN LED - * 3 F4 POKER Arrow LEDs - * B2 Capslock LED - * B0 not connected - */ -inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); } -inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); } -inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } -inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } -inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } - -inline void gh60_caps_led_off(void) { setPinInput(B2); writePinLow(B2); } -inline void gh60_poker_leds_off(void) { setPinInput(F4); writePinLow(F4); } -inline void gh60_fn_led_off(void) { setPinInput(F5); writePinLow(F5); } -inline void gh60_esc_led_off(void) { setPinInput(F6); writePinLow(F6); } -inline void gh60_wasd_leds_off(void) { setPinInput(F7); writePinLow(F7); } - -/* GH60 keymap definition macro - * K2C, K31 and K3C are extra keys for ISO - */ -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ -} - -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ -} - -/* ANSI variant. No extra keys for ISO */ -#define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ -} - -/* ISO variant. Remove useless ANSI keys */ -#define LAYOUT_60_iso( \ - 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, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ -} - - -/* HHKB Variant */ -#define LAYOUT_60_ansi_split_bs_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ -} - -/* ANSI with split Right Shift. No extra keys for ISO */ -#define LAYOUT_60_ansi_split_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ -} diff --git a/keyboards/gh60/info.json b/keyboards/gh60/info.json deleted file mode 100644 index e2a7746457..0000000000 --- a/keyboards/gh60/info.json +++ /dev/null @@ -1,425 +0,0 @@ -{ - "keyboard_name": "GH60", - "url": "http://qmk.fm/keyboards/gh60", - "maintainer": "qmk", - "keyboard_folder": "gh60", - "processor": "atmega32u4", - "manufacturer": "geekhack", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_all": { - "key_count": 65, - "layout": [ - {"label":"~", "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":"Backspace", "x":13, "y":0}, - {"label":"Backspace Extra", "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":"|", "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":"ISO Hash", "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":"ISO Backslash", "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":"HHKB Fn", "x":14, "y":3}, - {"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":"Win", "x":11.25, "y":4, "w":1.25}, - {"label":"Menu", "x":12.5, "y":4, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} - ] - }, - - "LAYOUT": { - "key_count": 65, - "layout": [ - {"label":"~", "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":"Backspace", "x":13, "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":"|", "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":"ISO Hash", "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":"ISO Backslash", "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":"HHKB Fn", "x":14, "y":3}, - {"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":"Backspace Extra", "x":14, "y":0}, - {"label":"Alt", "x":10, "y":4, "w":1.25}, - {"label":"Win", "x":11.25, "y":4, "w":1.25}, - {"label":"Menu", "x":12.5, "y":4, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} - ] - }, - - "LAYOUT_60_ansi": { - "key_count": 61, - "layout": [ - {"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, - {"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":"|", "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":2.25}, - {"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":2.75}, - {"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":"Win", "x":11.25, "y":4, "w":1.25}, - {"label":"Menu", "x":12.5, "y":4, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} - ] - }, - - "LAYOUT_60_iso": { - "key_count": 62, - "layout": [ - {"label":"\u00ac", "x":0, "y":0}, - {"label":"!", "x":1, "y":0}, - {"label":"\"", "x":2, "y":0}, - {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, - {"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":"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":1, "w":1.25, "h":2}, - {"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":2.75}, - {"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":"AltGr", "x":10, "y":4, "w":1.25}, - {"label":"Win", "x":11.25, "y":4, "w":1.25}, - {"label":"Menu", "x":12.5, "y":4, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} - ] - }, - - "LAYOUT_60_ansi_split_bs_rshift": { - "key_count": 63, - "layout": [ - {"label":"~", "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":"Backspace", "x":13, "y":0}, - {"label":"Backspace Extra", "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":"|", "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":2.25}, - {"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":"HHKB Fn", "x":14, "y":3}, - {"label":"Ctrl", "x":0, "y":4, "w":1.5}, - {"label":"Win", "x":1.5, "y":4}, - {"label":"Alt", "x":2.5, "y":4, "w":1.5}, - {"label":"Space", "x":4, "y":4, "w":6}, - {"label":"Alt", "x":10, "y":4, "w":1.5}, - {"label":"Win", "x":11.5, "y":4}, - {"label":"Menu", "x":12.5, "y":4}, - {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} - ] - }, - - "LAYOUT_60_ansi_split_rshift": { - "key_count": 62, - "layout": [ - {"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, - {"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":"|", "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":2.25}, - {"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":"HHKB Fn", "x":14, "y":3}, - {"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":"Win", "x":11.25, "y":4, "w":1.25}, - {"label":"Menu", "x":12.5, "y":4, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} - ] - } - } -} diff --git a/keyboards/gh60/keymaps/bluezio/rules.mk b/keyboards/gh60/keymaps/bluezio/rules.mk deleted file mode 100644 index bfd26779c6..0000000000 --- a/keyboards/gh60/keymaps/bluezio/rules.mk +++ /dev/null @@ -1,69 +0,0 @@ -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -KEY_LOCK_ENABLE = yes # KC_LOCK - -LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift diff --git a/keyboards/gh60/keymaps/dbroqua/rules.mk b/keyboards/gh60/keymaps/dbroqua/rules.mk deleted file mode 100644 index 5c6afa226f..0000000000 --- a/keyboards/gh60/keymaps/dbroqua/rules.mk +++ /dev/null @@ -1,108 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable RGB Underglow - diff --git a/keyboards/gh60/keymaps/dbroqua_7U/rules.mk b/keyboards/gh60/keymaps/dbroqua_7U/rules.mk deleted file mode 100644 index e4269566d2..0000000000 --- a/keyboards/gh60/keymaps/dbroqua_7U/rules.mk +++ /dev/null @@ -1,108 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable RGB Underglow - diff --git a/keyboards/gh60/keymaps/maxr1998/keymap.c b/keyboards/gh60/keymaps/maxr1998/keymap.c deleted file mode 100644 index eff94ff657..0000000000 --- a/keyboards/gh60/keymaps/maxr1998/keymap.c +++ /dev/null @@ -1,83 +0,0 @@ -/* -Copyright 2017 Max Rumpf alias Maxr1998 - -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 . -*/ - -#include QMK_KEYBOARD_H - -#define KC_EURO RALT(KC_5) - -#define SWITCH_LANG SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))) -#define PRINT_UMLAUT(str) SWITCH_LANG;_delay_ms(90);SEND_STRING(str);SWITCH_LANG; - -enum custom_keycodes { - MCO_AE = SAFE_RANGE, - MCO_OE = SAFE_RANGE + 1, - MCO_UE = SAFE_RANGE + 2, - MCO_SS = SAFE_RANGE + 3, - TP_REQ = SAFE_RANGE + 10, - TP_ACC = SAFE_RANGE + 11 -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwertz */ - LAYOUT( - 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_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NO, \ - KC_LOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HOME, KC_ENT, \ - KC_LSFT, KC_BSLS, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT,\ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, F(0), KC_LEFT, KC_DOWN, KC_RGHT), - /* 1: fn */ - LAYOUT( - KC_ESC, 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_DEL, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_EURO, TP_REQ, TP_ACC, KC_TRNS, MCO_UE, KC_TRNS, MCO_OE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, MCO_AE, MCO_SS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_SW,KC_TRNS, KC_GRV, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1) // to Fn overlay -}; - -void matrix_scan_user(void) { - -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch (keycode) { - case MCO_AE: - PRINT_UMLAUT("'"); // ä - return false; - case MCO_OE: - PRINT_UMLAUT(";"); // ö - return false; - case MCO_UE: - PRINT_UMLAUT("["); // ü - return false; - case MCO_SS: - PRINT_UMLAUT("-"); // ß - return false; - case TP_REQ: - SEND_STRING("/tpa "); - return false; - case TP_ACC: - SEND_STRING("/tpaccept"SS_TAP(X_ENTER)); - return false; - } - } - return true; -} \ No newline at end of file diff --git a/keyboards/gh60/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/keymaps/robotmaxtron/keymap.c deleted file mode 100644 index 649cbec389..0000000000 --- a/keyboards/gh60/keymaps/robotmaxtron/keymap.c +++ /dev/null @@ -1,225 +0,0 @@ -#include QMK_KEYBOARD_H - -#define _BL 0 -#define _AL 1 -#define _FL 2 -#define _UL 3 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * Base layer, pretty standard ANSI layout. - * ,-----------------------------------------------------------. - * |F(12)| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| - * |-----------------------------------------------------------| - * |Caps/Fn| A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | - * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | Space |Alt |Fn |Menu|Ctrl| - * `-----------------------------------------------------------' - */ - [_BL] = LAYOUT( - F(12),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, \ - F(2),KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_NO,KC_ENT, \ - KC_LSFT,KC_NO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_NO,KC_RSFT, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_NO,KC_RALT,F(0),KC_APP,KC_RCTL), - - /* - * Locking arrow keys to WASD for when you need dedicated arrow keys - * ,-----------------------------------------------------------. - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | | |Up | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | |Left|Down|Rght| | | | | | | | | | - * |-----------------------------------------------------------| - * | | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | | | | | | | | | - * `-----------------------------------------------------------' - */ - [_AL] = LAYOUT( - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), - - - /* - * Primary function layer, mostly the same as the traditional Pok3r layout. - * ,-------------------------------------------------------------. - * |`~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|DEL | - * |-------------------------------------------------------------| - * | |_AL| | | | |Calc|PgUp|Up|PgDn|Ptscn|Srlck|Pause| | - * |-------------------------------------------------------------| - * | | | | | | |Home|Left|Down|Rght|Ins| | | - * |-------------------------------------------------------------| - * | |_UL| | | | | | | | | | | - * |-------------------------------------------------------------| - * | | | | | | | | | - * `-------------------------------------------------------------' - */ - [_FL] = LAYOUT( - KC_GRAVE,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_DELETE, \ - KC_TRNS,F(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, \ - KC_TRNS,KC_MUTE,KC__VOLDOWN,KC__VOLUP,KC_TRNS,KC_TRNS,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,F(3),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), - - /* - * Locking layer for controlling the underglow. - * - * ,-----------------------------------------------------------. - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | |On|Mode| | | | | | | | | | | - * |-----------------------------------------------------------| - * | | |Hue+|Hue-|Sat+|Sat-|Val+|Val-| | | | | - * |-----------------------------------------------------------| - * | | | | | | | | | - * `-----------------------------------------------------------' - */ - [_UL] = LAYOUT( - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,F(4),F(5),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,F(6),F(7),F(8),F(9),F(10),F(11),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), -}; - -enum function_id { - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(2), // Momentary Fn overlay - [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer - [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay - [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow - [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode - [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - [12] = ACTION_FUNCTION(SHIFT_ESC), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - -void matrix_scan_user(void) { - -// Layer LED indicators -// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster - uint32_t layer = layer_state; - if (layer & (1<<1)) { - gh60_wasd_leds_on(); - } else { - gh60_wasd_leds_off(); - } - - if (layer & (1<<2)) { - gh60_esc_led_on(); - } else { - gh60_esc_led_off(); - } -}; - -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - static uint8_t shift_esc_shift_mask; - // Shift + ESC = ~ - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -}; diff --git a/keyboards/gh60/keymaps/robotmaxtron/rules.mk b/keyboards/gh60/keymaps/robotmaxtron/rules.mk deleted file mode 100644 index 6e5d6e1ec2..0000000000 --- a/keyboards/gh60/keymaps/robotmaxtron/rules.mk +++ /dev/null @@ -1,108 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable RGB Underglow - diff --git a/keyboards/gh60/keymaps/sethbc/keymap.c b/keyboards/gh60/keymaps/sethbc/keymap.c deleted file mode 100644 index 6c2c00ec27..0000000000 --- a/keyboards/gh60/keymaps/sethbc/keymap.c +++ /dev/null @@ -1,75 +0,0 @@ -#include QMK_KEYBOARD_H - -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - LAYOUT_60_ansi_split_bs_rshift( - F(0),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_BSLS,KC_GRV,\ - KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSPC,\ - KC_LCTL,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_ENT,\ - KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,F(1),\ - KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_APP,KC_RCTL), - /* 1: fn */ - LAYOUT_60_ansi_split_bs_rshift( - 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_TRNS,KC_TRNS,\ - KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,\ - KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_PENT,\ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END,KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS,\ - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), -}; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - -void matrix_scan_user(void) { - -} - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/gh60/keymaps/xyverz/keymap.c b/keyboards/gh60/keymaps/xyverz/keymap.c deleted file mode 100644 index e47fcc2f94..0000000000 --- a/keyboards/gh60/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,142 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QW 0 -#define _DV 1 -#define _CM 2 -#define _FL 3 - -// Macro name shortcuts -#define QWERTY M(_QW) -#define DVORAK M(_DV) -#define COLEMAK M(_CM) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * _QW: Qwerty Layer - * ,-----------------------------------------------------------. - * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| - * |-----------------------------------------------------------| - * |Fn | A| S| D| F| G| H| J| K| L| ;| '| Return| - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| - * |-----------------------------------------------------------| - * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn| - * `-----------------------------------------------------------' - */ - /* Layer 0: Qwerty */ - [_QW] = LAYOUT_60_ansi( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_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, - MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT , - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL) - ), - - /* - * _DV: Dvorak Layer - * ,-----------------------------------------------------------. - * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| Backsp| - * |-----------------------------------------------------------| - * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \| - * |-----------------------------------------------------------| - * |Fn | A| O| E| U| I| D| H| T| N| S| -| Return| - * |-----------------------------------------------------------| - * |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift| - * |-----------------------------------------------------------| - * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn| - * `-----------------------------------------------------------' - */ - /* Layer 1: Dvorak */ - [_DV] = LAYOUT_60_ansi( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, - MO(_FL), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL) - ), - - /* - * _CM: Colemak Layer - * ,-----------------------------------------------------------. - * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp| - * |-----------------------------------------------------------| - * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| - * |-----------------------------------------------------------| - * |Fn | A| R| S| T| D| H| N| E| I| O| '| Return| - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift| - * |-----------------------------------------------------------| - * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn| - * `-----------------------------------------------------------' - */ - /* Layer 2: Colemak */ - [_CM] = LAYOUT_60_ansi( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, - MO(_FL), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL) - ), - - /* - * _FL: Function Layer - * ,-----------------------------------------------------------. - * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Del| - * |-----------------------------------------------------------| - * | | | | | | | |PgU| Up|PgD|PSc|SLk|Pau| | - * |-----------------------------------------------------------| - * | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | | - * |-----------------------------------------------------------| - * |CAPS | |Mut|VlD|VlU| |End| | | | | | - * |-----------------------------------------------------------| - * |_QW |_DV |_CM | | | | | | - * `-----------------------------------------------------------' - */ - /* Layer 3: Functions */ - [_FL] = LAYOUT_60_ansi( - _______, 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_DEL , - _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, _______, - QWERTY, DVORAK, COLEMAK, _______, _______, _______, _______, _______ - ), - -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case _DV: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DV); - } - break; - case _QW: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QW); - } - break; - case _CM: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_CM); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/gh60/readme.md b/keyboards/gh60/readme.md deleted file mode 100644 index b63cce9735..0000000000 --- a/keyboards/gh60/readme.md +++ /dev/null @@ -1,52 +0,0 @@ -GH60 -=== - -![gh60 Rev C PCB](https://i.imgur.com/FejpoNF.jpg) - -A common 60% PCB. - -Keyboard Maintainer: QMK Community -Hardware Supported: GH60 rev. B and rev. C -Hardware Availability: http://blog.komar.be/projects/gh60-programmable-keyboard/ - -Make example for this keyboard (after setting up your build environment): - - make gh60: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). - - -## GH60 Hardware Information - - /* Column pin configuration - * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) - */ - - /* Row pin configuration - * row: 0 1 2 3 4 - * pin: D0 D1 D2 D3 D5 - */ - - GPIO pads - 0 F7 WASD LEDs - 1 F6 ESC LED - 2 F5 FN LED - 3 F4 POKER Arrow LEDs - - B2 Capslock LED - B0 not connected - -Functions to controls LED clusters - - gh60_caps_led_on() - gh60_poker_leds_on() - gh60_fn_led_on() - gh60_esc_led_on() - gh60_wasd_leds_on() - - gh60_caps_led_off() - gh60_poker_leds_off() - gh60_fn_led_off() - gh60_esc_led_off() - gh60_wasd_leds_off() diff --git a/keyboards/gh60/revc/config.h b/keyboards/gh60/revc/config.h new file mode 100644 index 0000000000..e0cfa7268d --- /dev/null +++ b/keyboards/gh60/revc/config.h @@ -0,0 +1,150 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER geekhack +#define PRODUCT GH60 +#define DESCRIPTION t.m.k. keyboard firmware for GH60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +// Rev A +// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } +// Rev B/C + #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/gh60/revc/info.json b/keyboards/gh60/revc/info.json new file mode 100644 index 0000000000..51c61f3182 --- /dev/null +++ b/keyboards/gh60/revc/info.json @@ -0,0 +1,46 @@ +{ + "keyboard_name": "GH60", + "url": "http://qmk.fm/keyboards/gh60", + "maintainer": "qmk", + "keyboard_folder": "gh60", + "processor": "atmega32u4", + "manufacturer": "geekhack", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "key_count":65, + "layout": [{"label":"~","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":"Backspace","x":13,"y":0},{"label":"Backspace Extra","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":"|","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":"ISO Hash","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":"ISO Backslash","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":"HHKB Fn","x":14,"y":3},{"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":"Win","x":11.25,"y":4,"w":1.25},{"label":"Menu","x":12.5,"y":4,"w":1.25},{"label":"Ctrl","x":13.75,"y":4,"w":1.25}] + }, + + "LAYOUT": { + "key_count":65, + "layout": [{"label":"~","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":"Backspace","x":13,"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":"|","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":"ISO Hash","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":"ISO Backslash","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":"HHKB Fn","x":14,"y":3},{"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":"Backspace Extra","x":14,"y":0},{"label":"Alt","x":10,"y":4,"w":1.25},{"label":"Win","x":11.25,"y":4,"w":1.25},{"label":"Menu","x":12.5,"y":4,"w":1.25},{"label":"Ctrl","x":13.75,"y":4,"w":1.25}] + }, + + "LAYOUT_60_ansi": { + "key_count":61, + "layout": [{"label":"~","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":"Backspace","x":13,"y":0,"w":2},{"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":"|","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":2.25},{"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":2.75},{"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":"Win","x":11.25,"y":4,"w":1.25},{"label":"Menu","x":12.5,"y":4,"w":1.25},{"label":"Ctrl","x":13.75,"y":4,"w":1.25}] + }, + + "LAYOUT_60_iso": { + "key_count":62, + "layout": [{"label":"\u00ac","x":0,"y":0},{"label":"!","x":1,"y":0},{"label":"\"","x":2,"y":0},{"label":"\u00a3","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":"Backspace","x":13,"y":0,"w":2},{"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":"Enter","x":13.75,"y":1,"w":1.25,"h":2},{"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":"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":2.75},{"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":"AltGr","x":10,"y":4,"w":1.25},{"label":"Win","x":11.25,"y":4,"w":1.25},{"label":"Menu","x":12.5,"y":4,"w":1.25},{"label":"Ctrl","x":13.75,"y":4,"w":1.25}] + }, + + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count":63, + "layout": [{"label":"~","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":"Backspace","x":13,"y":0},{"label":"Backspace Extra","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":"|","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":2.25},{"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":"HHKB Fn","x":14,"y":3},{"label":"Ctrl","x":0,"y":4,"w":1.5},{"label":"Win","x":1.5,"y":4},{"label":"Alt","x":2.5,"y":4,"w":1.5},{"label":"Space","x":4,"y":4,"w":6},{"label":"Alt","x":10,"y":4,"w":1.5},{"label":"Win","x":11.5,"y":4},{"label":"Menu","x":12.5,"y":4},{"label":"Ctrl","x":13.5,"y":4,"w":1.5}] + }, + + "LAYOUT_60_ansi_split_rshift": { + "key_count": 62, + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":"HHKB Fn", "x":14, "y":3}, {"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":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_abnt2": { + "key_count": 63, + "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":"\u00a8", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"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":"\u00c7", "x":10.75, "y":2}, {"label":"^", "x":11.75, "y":2}, {"label":"}", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"?", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/gh60/keymaps/bluezio/keymap.c b/keyboards/gh60/revc/keymaps/bluezio/keymap.c similarity index 100% rename from keyboards/gh60/keymaps/bluezio/keymap.c rename to keyboards/gh60/revc/keymaps/bluezio/keymap.c diff --git a/keyboards/gh60/revc/keymaps/bluezio/rules.mk b/keyboards/gh60/revc/keymaps/bluezio/rules.mk new file mode 100644 index 0000000000..4b820c974b --- /dev/null +++ b/keyboards/gh60/revc/keymaps/bluezio/rules.mk @@ -0,0 +1,68 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = yes # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +KEY_LOCK_ENABLE = yes # KC_LOCK + +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift diff --git a/keyboards/gh60/keymaps/chaser/README.md b/keyboards/gh60/revc/keymaps/chaser/README.md similarity index 100% rename from keyboards/gh60/keymaps/chaser/README.md rename to keyboards/gh60/revc/keymaps/chaser/README.md diff --git a/keyboards/gh60/keymaps/chaser/keymap.c b/keyboards/gh60/revc/keymaps/chaser/keymap.c similarity index 100% rename from keyboards/gh60/keymaps/chaser/keymap.c rename to keyboards/gh60/revc/keymaps/chaser/keymap.c diff --git a/keyboards/gh60/revc/keymaps/danbee/keymap.c b/keyboards/gh60/revc/keymaps/danbee/keymap.c new file mode 100644 index 0000000000..d8419f5a63 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/danbee/keymap.c @@ -0,0 +1,67 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _L1, + _L2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bcksp │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ Ent │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ \ │ │ + ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + │Shft│ ` │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + │ Fn │Alt │Cmd │ Space │Cmd │Hypr│Ctrl│Fn 2│ + └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘*/ + [_QW] = LAYOUT_60_iso( /* Layer 0: Qwerty */ + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT , + KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_L1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_HYPR, KC_RCTL, MO(_L2) + ), + /* 1: fn */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │ § │Br-│Br+│ │ │BL-│BL+│Pre│Pau│Nxt│Mut│Vo-│Vo+│ Del │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ Ins │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ │ │ │ │ │ │ ◀ │ ▼ │ ▲ │ ▶ │ │ │ │ │ + ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + │ │ │ │ │ │ │BL~│ │ │ │ │ │ │ + ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘*/ + [_L1] = LAYOUT_60_iso( /* Layer 1: Functions */ + KC_NUBS, KC_BRID, KC_BRIU, _______, _______, BL_DEC, BL_INC, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_INS , + _______, _______, _______, _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* 2: fn 2 */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │Pwr│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Eject │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ Caps │ │ │ │ │ │Hom│PgD│PgU│End│ │ │ │ │ + ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘*/ + [_L2] = LAYOUT_60_iso( /* Layer 2: Functions */ + KC_PWR, 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_EJCT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/gh60/revc/keymaps/danbee/rules.mk b/keyboards/gh60/revc/keymaps/danbee/rules.mk new file mode 100644 index 0000000000..b1434f75c8 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/danbee/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = no +KEYBOARD_LOCK_ENABLE = yes diff --git a/keyboards/gh60/keymaps/dbroqua/config.h b/keyboards/gh60/revc/keymaps/dbroqua/config.h similarity index 100% rename from keyboards/gh60/keymaps/dbroqua/config.h rename to keyboards/gh60/revc/keymaps/dbroqua/config.h diff --git a/keyboards/gh60/keymaps/dbroqua/keymap.c b/keyboards/gh60/revc/keymaps/dbroqua/keymap.c similarity index 100% rename from keyboards/gh60/keymaps/dbroqua/keymap.c rename to keyboards/gh60/revc/keymaps/dbroqua/keymap.c diff --git a/keyboards/gh60/revc/keymaps/dbroqua/rules.mk b/keyboards/gh60/revc/keymaps/dbroqua/rules.mk new file mode 100644 index 0000000000..21d4b60d96 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/dbroqua/rules.mk @@ -0,0 +1,107 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = yes # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable RGB Underglow + diff --git a/keyboards/gh60/keymaps/dbroqua_7U/keymap.c b/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c similarity index 100% rename from keyboards/gh60/keymaps/dbroqua_7U/keymap.c rename to keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c diff --git a/keyboards/gh60/revc/keymaps/dbroqua_7U/rules.mk b/keyboards/gh60/revc/keymaps/dbroqua_7U/rules.mk new file mode 100644 index 0000000000..21192b1794 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/dbroqua_7U/rules.mk @@ -0,0 +1,107 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = yes # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable RGB Underglow + diff --git a/keyboards/gh60/keymaps/default/keymap.c b/keyboards/gh60/revc/keymaps/default/keymap.c similarity index 100% rename from keyboards/gh60/keymaps/default/keymap.c rename to keyboards/gh60/revc/keymaps/default/keymap.c diff --git a/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c b/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c new file mode 100644 index 0000000000..633b053e69 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c @@ -0,0 +1,83 @@ +/* Copyright 2019 Luiz Correia + * + * 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 . + */ + + +#include QMK_KEYBOARD_H +#include "keymap_br_abnt2.h" + +enum layer_names { + _BL, + _FL, + _CL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0 (BR ABNT2 Layout shown) + * ,-----------------------------------------------------------. + * |Esc|1 !|2 @|3 #|4 $|5 %|6 ¨|7 &|8 *|9 (|0 )|- _|= +| Bksp | + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |' `|{ [|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L | Ç |^ ~|} ]| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|; :|/ ?|Shift | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Alt |GUI|Fn2|Ctrl | + * `-----------------------------------------------------------' + */ + [_BL] = LAYOUT_60_abnt2( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT, + KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), + + + [_FL] = LAYOUT_60_abnt2( + 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_DEL, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LGUI, XXXXXXX, KC_RALT, KC_RGUI, _______, KC_RCTL), + + [_CL] = LAYOUT_60_abnt2( + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX), + +}; + +void matrix_scan_user(void) { + + if (layer_state_is(_FL)) { + gh60_wasd_leds_on(); + gh60_fn_led_on(); + } else { + gh60_wasd_leds_off(); + gh60_fn_led_off(); + } + + if (layer_state_is(_CL)) { + gh60_poker_leds_on(); + gh60_esc_led_on(); + } else { + gh60_poker_leds_off(); + gh60_esc_led_off(); + } + +}; diff --git a/keyboards/gh60/revc/keymaps/default_abnt2/readme.md b/keyboards/gh60/revc/keymaps/default_abnt2/readme.md new file mode 100644 index 0000000000..fe81001a7e --- /dev/null +++ b/keyboards/gh60/revc/keymaps/default_abnt2/readme.md @@ -0,0 +1,15 @@ +# BR ABNT2 layout + +This is a Brazilian ABNT2 keymap for the GH60 in a standard layout. + +The top-left sends Escape normally, but becomes a quote key when +tapped whilst either Fn or GUI are held down. + +## Layout Image + +![Layout Image](http://s2.glbimg.com/hlQMZ_E87B3DB_96rVuO_pY2Yy8=/695x0/s.glbimg.com/po/tt2/f/original/2016/06/21/900px-kb_portuguese_brazilsvg_.png) + +---- +### References + +1. [Grave Escape - QMK Firmware Documentation](https://docs.qmk.fm/#/feature_grave_esc) diff --git a/keyboards/gh60/keymaps/emiilsd/keymap.c b/keyboards/gh60/revc/keymaps/emiilsd/keymap.c similarity index 100% rename from keyboards/gh60/keymaps/emiilsd/keymap.c rename to keyboards/gh60/revc/keymaps/emiilsd/keymap.c diff --git a/keyboards/gh60/keymaps/maartenwut/keymap.c b/keyboards/gh60/revc/keymaps/maartenwut/keymap.c similarity index 100% rename from keyboards/gh60/keymaps/maartenwut/keymap.c rename to keyboards/gh60/revc/keymaps/maartenwut/keymap.c diff --git a/keyboards/gh60/keymaps/maxr1998/config.h b/keyboards/gh60/revc/keymaps/maxr1998/config.h similarity index 100% rename from keyboards/gh60/keymaps/maxr1998/config.h rename to keyboards/gh60/revc/keymaps/maxr1998/config.h diff --git a/keyboards/gh60/revc/keymaps/maxr1998/keymap.c b/keyboards/gh60/revc/keymaps/maxr1998/keymap.c new file mode 100644 index 0000000000..4a1ad54b41 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/maxr1998/keymap.c @@ -0,0 +1,79 @@ +/* +Copyright 2017 Max Rumpf alias Maxr1998 + +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 . +*/ + +#include QMK_KEYBOARD_H + +#define KC_EURO RALT(KC_5) + +#define SWITCH_LANG SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))) +#define PRINT_UMLAUT(str) SWITCH_LANG;_delay_ms(90);SEND_STRING(str);SWITCH_LANG; + +enum custom_keycodes { + MCO_AE = SAFE_RANGE, + MCO_OE = SAFE_RANGE + 1, + MCO_UE = SAFE_RANGE + 2, + MCO_SS = SAFE_RANGE + 3, + TP_REQ = SAFE_RANGE + 10, + TP_ACC = SAFE_RANGE + 11 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwertz */ + LAYOUT( + 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_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NO, \ + KC_LOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HOME, KC_ENT, \ + KC_LSFT, KC_BSLS, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + /* 1: fn */ + LAYOUT( + KC_ESC, 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_DEL, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_EURO, TP_REQ, TP_ACC, KC_TRNS, MCO_UE, KC_TRNS, MCO_OE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, MCO_AE, MCO_SS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_SW,KC_TRNS, KC_GRV, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case MCO_AE: + PRINT_UMLAUT("'"); // ä + return false; + case MCO_OE: + PRINT_UMLAUT(";"); // ö + return false; + case MCO_UE: + PRINT_UMLAUT("["); // ü + return false; + case MCO_SS: + PRINT_UMLAUT("-"); // ß + return false; + case TP_REQ: + SEND_STRING("/tpa "); + return false; + case TP_ACC: + SEND_STRING("/tpaccept"SS_TAP(X_ENTER)); + return false; + } + } + return true; +} diff --git a/keyboards/gh60/keymaps/maxr1998/rules.mk b/keyboards/gh60/revc/keymaps/maxr1998/rules.mk similarity index 100% rename from keyboards/gh60/keymaps/maxr1998/rules.mk rename to keyboards/gh60/revc/keymaps/maxr1998/rules.mk diff --git a/keyboards/gh60/keymaps/robotmaxtron/config.h b/keyboards/gh60/revc/keymaps/robotmaxtron/config.h similarity index 100% rename from keyboards/gh60/keymaps/robotmaxtron/config.h rename to keyboards/gh60/revc/keymaps/robotmaxtron/config.h diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c new file mode 100644 index 0000000000..2f3f10f5c7 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c @@ -0,0 +1,224 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _AL 1 +#define _FL 2 +#define _UL 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * Base layer, pretty standard ANSI layout. + * ,-----------------------------------------------------------. + * |F(12)| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Caps/Fn| A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Alt |Fn |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + [_BL] = LAYOUT( + F(12),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, \ + F(2),KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_NO,KC_ENT, \ + KC_LSFT,KC_NO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_NO,KC_RSFT, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_NO,KC_RALT,MO(2),KC_APP,KC_RCTL), + + /* + * Locking arrow keys to WASD for when you need dedicated arrow keys + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | |Up | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | |Left|Down|Rght| | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [_AL] = LAYOUT( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), + + + /* + * Primary function layer, mostly the same as the traditional Pok3r layout. + * ,-------------------------------------------------------------. + * |`~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|DEL | + * |-------------------------------------------------------------| + * | |_AL| | | | |Calc|PgUp|Up|PgDn|Ptscn|Srlck|Pause| | + * |-------------------------------------------------------------| + * | | | | | | |Home|Left|Down|Rght|Ins| | | + * |-------------------------------------------------------------| + * | |_UL| | | | | | | | | | | + * |-------------------------------------------------------------| + * | | | | | | | | | + * `-------------------------------------------------------------' + */ + [_FL] = LAYOUT( + KC_GRAVE,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_DELETE, \ + KC_TRNS,F(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, \ + KC_TRNS,KC_MUTE,KC__VOLDOWN,KC__VOLUP,KC_TRNS,KC_TRNS,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,F(3),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), + + /* + * Locking layer for controlling the underglow. + * + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | |On|Mode| | | | | | | | | | | + * |-----------------------------------------------------------| + * | | |Hue+|Hue-|Sat+|Sat-|Val+|Val-| | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [_UL] = LAYOUT( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,F(4),F(5),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,F(6),F(7),F(8),F(9),F(10),F(11),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), +}; + +enum function_id { + RGBLED_TOGGLE, + RGBLED_STEP_MODE, + RGBLED_INCREASE_HUE, + RGBLED_DECREASE_HUE, + RGBLED_INCREASE_SAT, + RGBLED_DECREASE_SAT, + RGBLED_INCREASE_VAL, + RGBLED_DECREASE_VAL, + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay + [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer + [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay + [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow + [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode + [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), + [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), + [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), + [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), + [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), + [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), + [12] = ACTION_FUNCTION(SHIFT_ESC), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { + +// Layer LED indicators +// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster + uint32_t layer = layer_state; + if (layer & (1<<1)) { + gh60_wasd_leds_on(); + } else { + gh60_wasd_leds_off(); + } + + if (layer & (1<<2)) { + gh60_esc_led_on(); + } else { + gh60_esc_led_off(); + } +}; + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case RGBLED_TOGGLE: + //led operations + if (record->event.pressed) { + rgblight_toggle(); + } + break; + case RGBLED_INCREASE_HUE: + if (record->event.pressed) { + rgblight_increase_hue(); + } + break; + case RGBLED_DECREASE_HUE: + if (record->event.pressed) { + rgblight_decrease_hue(); + } + break; + case RGBLED_INCREASE_SAT: + if (record->event.pressed) { + rgblight_increase_sat(); + } + break; + case RGBLED_DECREASE_SAT: + if (record->event.pressed) { + rgblight_decrease_sat(); + } + break; + case RGBLED_INCREASE_VAL: + if (record->event.pressed) { + rgblight_increase_val(); + } + break; + case RGBLED_DECREASE_VAL: + if (record->event.pressed) { + rgblight_decrease_val(); + } + break; + case RGBLED_STEP_MODE: + if (record->event.pressed) { + rgblight_step(); + } + break; + static uint8_t shift_esc_shift_mask; + // Shift + ESC = ~ + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +}; diff --git a/keyboards/gh60/keymaps/robotmaxtron/readme.md b/keyboards/gh60/revc/keymaps/robotmaxtron/readme.md similarity index 100% rename from keyboards/gh60/keymaps/robotmaxtron/readme.md rename to keyboards/gh60/revc/keymaps/robotmaxtron/readme.md diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/rules.mk b/keyboards/gh60/revc/keymaps/robotmaxtron/rules.mk new file mode 100644 index 0000000000..b6761ac9ff --- /dev/null +++ b/keyboards/gh60/revc/keymaps/robotmaxtron/rules.mk @@ -0,0 +1,107 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = yes # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable RGB Underglow + diff --git a/keyboards/gh60/revc/keymaps/sethbc/keymap.c b/keyboards/gh60/revc/keymaps/sethbc/keymap.c new file mode 100644 index 0000000000..f2802827a1 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/sethbc/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + LAYOUT_60_ansi_split_bs_rshift( + F(0),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_BSLS,KC_GRV,\ + KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSPC,\ + KC_LCTL,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_ENT,\ + KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,MO(1),\ + KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_APP,KC_RCTL), + /* 1: fn */ + LAYOUT_60_ansi_split_bs_rshift( + 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_TRNS,KC_TRNS,\ + KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,\ + KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_PENT,\ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END,KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS,\ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { + +} + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/abstract/ellipse/keymaps/default/rules.mk b/keyboards/gh60/revc/keymaps/sethbc/rules.mk similarity index 100% rename from keyboards/abstract/ellipse/keymaps/default/rules.mk rename to keyboards/gh60/revc/keymaps/sethbc/rules.mk diff --git a/keyboards/gh60/pinout.txt b/keyboards/gh60/revc/pinout.txt similarity index 100% rename from keyboards/gh60/pinout.txt rename to keyboards/gh60/revc/pinout.txt diff --git a/keyboards/gh60/revc/readme.md b/keyboards/gh60/revc/readme.md new file mode 100644 index 0000000000..cb0d953514 --- /dev/null +++ b/keyboards/gh60/revc/readme.md @@ -0,0 +1,53 @@ +# GH60 Rev C + +![gh60 Rev C PCB](https://i.imgur.com/FejpoNF.jpg) + +A common 60% PCB. + +Keyboard Maintainer: QMK Community +Hardware Supported: GH60 rev. B and rev. C +Hardware Availability: http://blog.komar.be/projects/gh60-programmable-keyboard/ + +Make example for this keyboard (after setting up your build environment): + + make gh60/revc:default + +**Note:** This GH60 firmware will not be compatible with the GH60 Satan PCB. Conversely, the GH60 Satan firmware will not be compatible with this PCB. Please ensure you have the correct firmware/pcb combination before flashing. + +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). + + +## GH60 Hardware Information + + /* Column pin configuration + * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) + */ + + /* Row pin configuration + * row: 0 1 2 3 4 + * pin: D0 D1 D2 D3 D5 + */ + + GPIO pads + 0 F7 WASD LEDs + 1 F6 ESC LED + 2 F5 FN LED + 3 F4 POKER Arrow LEDs + + B2 Capslock LED + B0 not connected + +Functions to controls LED clusters + + gh60_caps_led_on() + gh60_poker_leds_on() + gh60_fn_led_on() + gh60_esc_led_on() + gh60_wasd_leds_on() + + gh60_caps_led_off() + gh60_poker_leds_off() + gh60_fn_led_off() + gh60_esc_led_off() + gh60_wasd_leds_off() diff --git a/keyboards/gh60/revc/revc.c b/keyboards/gh60/revc/revc.c new file mode 100644 index 0000000000..e06739d2ba --- /dev/null +++ b/keyboards/gh60/revc/revc.c @@ -0,0 +1,27 @@ +#include "revc.h" + + +extern inline void gh60_caps_led_on(void); +extern inline void gh60_poker_leds_on(void); +extern inline void gh60_fn_led_on(void); +extern inline void gh60_esc_led_on(void); +extern inline void gh60_wasd_leds_on(void); + +extern inline void gh60_caps_led_off(void); +extern inline void gh60_poker_leds_off(void); +extern inline void gh60_fn_led_off(void); +extern inline void gh60_esc_led_off(void); +extern inline void gh60_wasd_leds_off(void); + + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + gh60_caps_led_on(); + } else { + gh60_caps_led_off(); + } + + led_set_user(usb_led); +} diff --git a/keyboards/gh60/revc/revc.h b/keyboards/gh60/revc/revc.h new file mode 100644 index 0000000000..dda7a0db6d --- /dev/null +++ b/keyboards/gh60/revc/revc.h @@ -0,0 +1,144 @@ +#pragma once + +#include "quantum.h" +#include "led.h" + +/* GH60 LEDs + * GPIO pads + * 0 F7 WASD LEDs + * 1 F6 ESC LED + * 2 F5 FN LED + * 3 F4 POKER Arrow LEDs + * B2 Capslock LED + * B0 not connected + */ +inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); } +inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); } +inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } +inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } +inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } + +inline void gh60_caps_led_off(void) { setPinInput(B2); writePinLow(B2); } +inline void gh60_poker_leds_off(void) { setPinInput(F4); writePinLow(F4); } +inline void gh60_fn_led_off(void) { setPinInput(F5); writePinLow(F5); } +inline void gh60_esc_led_off(void) { setPinInput(F6); writePinLow(F6); } +inline void gh60_wasd_leds_off(void) { setPinInput(F7); writePinLow(F7); } + +/* GH60 keymap definition macro + * K2C, K31 and K3C are extra keys for ISO + */ +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} + +/* ANSI variant. No extra keys for ISO */ +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ +} + +/* ISO variant. Remove useless ANSI keys */ +#define LAYOUT_60_iso( \ + 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, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ +} + + +/* HHKB Variant */ +#define LAYOUT_60_ansi_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} + +/* ANSI with split Right Shift. No extra keys for ISO */ +#define LAYOUT_60_ansi_split_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ +} + +/* LAYOUT_60_abnt2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │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 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │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 │42 │45 │4a │4b │4c │4d │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +*/ +#define LAYOUT_60_abnt2( \ + 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, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K45, K4A, K4B,K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ +} diff --git a/keyboards/gh60/revc/rules.mk b/keyboards/gh60/revc/rules.mk new file mode 100644 index 0000000000..c9362b334b --- /dev/null +++ b/keyboards/gh60/revc/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = yes # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift diff --git a/keyboards/gh60/rules.mk b/keyboards/gh60/rules.mk deleted file mode 100644 index 37511432aa..0000000000 --- a/keyboards/gh60/rules.mk +++ /dev/null @@ -1,68 +0,0 @@ -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID - -LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift \ No newline at end of file diff --git a/keyboards/satan/config.h b/keyboards/gh60/satan/config.h similarity index 100% rename from keyboards/satan/config.h rename to keyboards/gh60/satan/config.h diff --git a/keyboards/satan/info.json b/keyboards/gh60/satan/info.json similarity index 100% rename from keyboards/satan/info.json rename to keyboards/gh60/satan/info.json diff --git a/keyboards/satan/keymaps/abhixec/keymap.c b/keyboards/gh60/satan/keymaps/abhixec/keymap.c similarity index 100% rename from keyboards/satan/keymaps/abhixec/keymap.c rename to keyboards/gh60/satan/keymaps/abhixec/keymap.c diff --git a/keyboards/satan/keymaps/abhixec/readme.md b/keyboards/gh60/satan/keymaps/abhixec/readme.md similarity index 100% rename from keyboards/satan/keymaps/abhixec/readme.md rename to keyboards/gh60/satan/keymaps/abhixec/readme.md diff --git a/keyboards/satan/keymaps/abhixec/rules.mk b/keyboards/gh60/satan/keymaps/abhixec/rules.mk similarity index 100% rename from keyboards/satan/keymaps/abhixec/rules.mk rename to keyboards/gh60/satan/keymaps/abhixec/rules.mk diff --git a/keyboards/satan/keymaps/addcninblue/keymap.c b/keyboards/gh60/satan/keymaps/addcninblue/keymap.c similarity index 100% rename from keyboards/satan/keymaps/addcninblue/keymap.c rename to keyboards/gh60/satan/keymaps/addcninblue/keymap.c diff --git a/keyboards/satan/keymaps/addcninblue/readme.md b/keyboards/gh60/satan/keymaps/addcninblue/readme.md similarity index 100% rename from keyboards/satan/keymaps/addcninblue/readme.md rename to keyboards/gh60/satan/keymaps/addcninblue/readme.md diff --git a/keyboards/satan/keymaps/addcninblue/rules.mk b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk similarity index 100% rename from keyboards/satan/keymaps/addcninblue/rules.mk rename to keyboards/gh60/satan/keymaps/addcninblue/rules.mk diff --git a/keyboards/satan/keymaps/admiralStrokers/config.h b/keyboards/gh60/satan/keymaps/admiralStrokers/config.h similarity index 100% rename from keyboards/satan/keymaps/admiralStrokers/config.h rename to keyboards/gh60/satan/keymaps/admiralStrokers/config.h diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/gh60/satan/keymaps/admiralStrokers/keymap.c similarity index 100% rename from keyboards/satan/keymaps/admiralStrokers/keymap.c rename to keyboards/gh60/satan/keymaps/admiralStrokers/keymap.c diff --git a/keyboards/satan/keymaps/admiralStrokers/readme.md b/keyboards/gh60/satan/keymaps/admiralStrokers/readme.md similarity index 100% rename from keyboards/satan/keymaps/admiralStrokers/readme.md rename to keyboards/gh60/satan/keymaps/admiralStrokers/readme.md diff --git a/keyboards/satan/keymaps/admiralStrokers/rules.mk b/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk similarity index 100% rename from keyboards/satan/keymaps/admiralStrokers/rules.mk rename to keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk diff --git a/keyboards/satan/keymaps/ben_iso/config.h b/keyboards/gh60/satan/keymaps/ben_iso/config.h similarity index 100% rename from keyboards/satan/keymaps/ben_iso/config.h rename to keyboards/gh60/satan/keymaps/ben_iso/config.h diff --git a/keyboards/satan/keymaps/ben_iso/keymap.c b/keyboards/gh60/satan/keymaps/ben_iso/keymap.c similarity index 100% rename from keyboards/satan/keymaps/ben_iso/keymap.c rename to keyboards/gh60/satan/keymaps/ben_iso/keymap.c diff --git a/keyboards/satan/keymaps/ben_iso/readme.md b/keyboards/gh60/satan/keymaps/ben_iso/readme.md similarity index 100% rename from keyboards/satan/keymaps/ben_iso/readme.md rename to keyboards/gh60/satan/keymaps/ben_iso/readme.md diff --git a/keyboards/satan/keymaps/ben_iso/rules.mk b/keyboards/gh60/satan/keymaps/ben_iso/rules.mk similarity index 100% rename from keyboards/satan/keymaps/ben_iso/rules.mk rename to keyboards/gh60/satan/keymaps/ben_iso/rules.mk diff --git a/keyboards/satan/keymaps/bri/keymap.c b/keyboards/gh60/satan/keymaps/bri/keymap.c similarity index 100% rename from keyboards/satan/keymaps/bri/keymap.c rename to keyboards/gh60/satan/keymaps/bri/keymap.c diff --git a/keyboards/satan/keymaps/bri/readme.md b/keyboards/gh60/satan/keymaps/bri/readme.md similarity index 100% rename from keyboards/satan/keymaps/bri/readme.md rename to keyboards/gh60/satan/keymaps/bri/readme.md diff --git a/keyboards/satan/keymaps/chaser/keymap.c b/keyboards/gh60/satan/keymaps/chaser/keymap.c similarity index 100% rename from keyboards/satan/keymaps/chaser/keymap.c rename to keyboards/gh60/satan/keymaps/chaser/keymap.c diff --git a/keyboards/satan/keymaps/chaser/readme.md b/keyboards/gh60/satan/keymaps/chaser/readme.md similarity index 100% rename from keyboards/satan/keymaps/chaser/readme.md rename to keyboards/gh60/satan/keymaps/chaser/readme.md diff --git a/keyboards/satan/keymaps/chaser/rules.mk b/keyboards/gh60/satan/keymaps/chaser/rules.mk similarity index 100% rename from keyboards/satan/keymaps/chaser/rules.mk rename to keyboards/gh60/satan/keymaps/chaser/rules.mk diff --git a/keyboards/satan/keymaps/colemak/keymap.c b/keyboards/gh60/satan/keymaps/colemak/keymap.c similarity index 100% rename from keyboards/satan/keymaps/colemak/keymap.c rename to keyboards/gh60/satan/keymaps/colemak/keymap.c diff --git a/keyboards/satan/keymaps/colemak/readme.md b/keyboards/gh60/satan/keymaps/colemak/readme.md similarity index 100% rename from keyboards/satan/keymaps/colemak/readme.md rename to keyboards/gh60/satan/keymaps/colemak/readme.md diff --git a/keyboards/satan/keymaps/colemak/rules.mk b/keyboards/gh60/satan/keymaps/colemak/rules.mk similarity index 100% rename from keyboards/satan/keymaps/colemak/rules.mk rename to keyboards/gh60/satan/keymaps/colemak/rules.mk diff --git a/keyboards/satan/keymaps/dbroqua/keymap.c b/keyboards/gh60/satan/keymaps/dbroqua/keymap.c similarity index 100% rename from keyboards/satan/keymaps/dbroqua/keymap.c rename to keyboards/gh60/satan/keymaps/dbroqua/keymap.c diff --git a/keyboards/satan/keymaps/dbroqua/readme.md b/keyboards/gh60/satan/keymaps/dbroqua/readme.md similarity index 100% rename from keyboards/satan/keymaps/dbroqua/readme.md rename to keyboards/gh60/satan/keymaps/dbroqua/readme.md diff --git a/keyboards/satan/keymaps/default/keymap.c b/keyboards/gh60/satan/keymaps/default/keymap.c similarity index 100% rename from keyboards/satan/keymaps/default/keymap.c rename to keyboards/gh60/satan/keymaps/default/keymap.c diff --git a/keyboards/satan/keymaps/default/readme.md b/keyboards/gh60/satan/keymaps/default/readme.md similarity index 100% rename from keyboards/satan/keymaps/default/readme.md rename to keyboards/gh60/satan/keymaps/default/readme.md diff --git a/keyboards/satan/keymaps/default/rules.mk b/keyboards/gh60/satan/keymaps/default/rules.mk similarity index 100% rename from keyboards/satan/keymaps/default/rules.mk rename to keyboards/gh60/satan/keymaps/default/rules.mk diff --git a/keyboards/satan/keymaps/dende_iso/keymap.c b/keyboards/gh60/satan/keymaps/dende_iso/keymap.c similarity index 100% rename from keyboards/satan/keymaps/dende_iso/keymap.c rename to keyboards/gh60/satan/keymaps/dende_iso/keymap.c diff --git a/keyboards/satan/keymaps/dende_iso/readme.md b/keyboards/gh60/satan/keymaps/dende_iso/readme.md similarity index 100% rename from keyboards/satan/keymaps/dende_iso/readme.md rename to keyboards/gh60/satan/keymaps/dende_iso/readme.md diff --git a/keyboards/satan/keymaps/dende_iso/rules.mk b/keyboards/gh60/satan/keymaps/dende_iso/rules.mk similarity index 100% rename from keyboards/satan/keymaps/dende_iso/rules.mk rename to keyboards/gh60/satan/keymaps/dende_iso/rules.mk diff --git a/keyboards/satan/keymaps/denolfe/README.md b/keyboards/gh60/satan/keymaps/denolfe/README.md similarity index 100% rename from keyboards/satan/keymaps/denolfe/README.md rename to keyboards/gh60/satan/keymaps/denolfe/README.md diff --git a/keyboards/satan/keymaps/denolfe/keymap.c b/keyboards/gh60/satan/keymaps/denolfe/keymap.c similarity index 100% rename from keyboards/satan/keymaps/denolfe/keymap.c rename to keyboards/gh60/satan/keymaps/denolfe/keymap.c diff --git a/keyboards/satan/keymaps/denolfe/rules.mk b/keyboards/gh60/satan/keymaps/denolfe/rules.mk similarity index 100% rename from keyboards/satan/keymaps/denolfe/rules.mk rename to keyboards/gh60/satan/keymaps/denolfe/rules.mk diff --git a/keyboards/satan/keymaps/dkrieger/config.h b/keyboards/gh60/satan/keymaps/dkrieger/config.h similarity index 100% rename from keyboards/satan/keymaps/dkrieger/config.h rename to keyboards/gh60/satan/keymaps/dkrieger/config.h diff --git a/keyboards/satan/keymaps/dkrieger/keymap.c b/keyboards/gh60/satan/keymaps/dkrieger/keymap.c similarity index 100% rename from keyboards/satan/keymaps/dkrieger/keymap.c rename to keyboards/gh60/satan/keymaps/dkrieger/keymap.c diff --git a/keyboards/satan/keymaps/dkrieger/readme.md b/keyboards/gh60/satan/keymaps/dkrieger/readme.md similarity index 100% rename from keyboards/satan/keymaps/dkrieger/readme.md rename to keyboards/gh60/satan/keymaps/dkrieger/readme.md diff --git a/keyboards/satan/keymaps/dkrieger/rules.mk b/keyboards/gh60/satan/keymaps/dkrieger/rules.mk similarity index 100% rename from keyboards/satan/keymaps/dkrieger/rules.mk rename to keyboards/gh60/satan/keymaps/dkrieger/rules.mk diff --git a/keyboards/satan/keymaps/fakb/config.h b/keyboards/gh60/satan/keymaps/fakb/config.h similarity index 100% rename from keyboards/satan/keymaps/fakb/config.h rename to keyboards/gh60/satan/keymaps/fakb/config.h diff --git a/keyboards/satan/keymaps/fakb/keymap.c b/keyboards/gh60/satan/keymaps/fakb/keymap.c similarity index 100% rename from keyboards/satan/keymaps/fakb/keymap.c rename to keyboards/gh60/satan/keymaps/fakb/keymap.c diff --git a/keyboards/satan/keymaps/fakb/readme.md b/keyboards/gh60/satan/keymaps/fakb/readme.md similarity index 100% rename from keyboards/satan/keymaps/fakb/readme.md rename to keyboards/gh60/satan/keymaps/fakb/readme.md diff --git a/keyboards/satan/keymaps/fakb/rules.mk b/keyboards/gh60/satan/keymaps/fakb/rules.mk similarity index 100% rename from keyboards/satan/keymaps/fakb/rules.mk rename to keyboards/gh60/satan/keymaps/fakb/rules.mk diff --git a/keyboards/gh60/satan/keymaps/gipsy-king/config.h b/keyboards/gh60/satan/keymaps/gipsy-king/config.h new file mode 100644 index 0000000000..0368fa812c --- /dev/null +++ b/keyboards/gh60/satan/keymaps/gipsy-king/config.h @@ -0,0 +1,10 @@ +#undef RGBLED_NUM +#define RGBLED_NUM 17 +#undef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 5 +#undef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 5 +#undef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 5 + +#undef RGBLIGHT_ANIMATIONS diff --git a/keyboards/gh60/satan/keymaps/gipsy-king/keymap.c b/keyboards/gh60/satan/keymaps/gipsy-king/keymap.c new file mode 100644 index 0000000000..6e0345d9a0 --- /dev/null +++ b/keyboards/gh60/satan/keymaps/gipsy-king/keymap.c @@ -0,0 +1,161 @@ +#include QMK_KEYBOARD_H +#include "rgblight.h" + +enum layer_names { + _BL, + _FL +}; + +/** + * HHKB style. + * Esc on capslock, space-hold is fn. + * Fn layer has hjkl arrows, home on backspace, rgb stuff. + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_ansi( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + _______, KC_LCTL, KC_LALT, LT(_FL,KC_SPC), KC_LGUI, KC_RALT, KC_RCTL, _______ + ), + + [_FL] = LAYOUT_60_ansi( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, BL_TOGG, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +/** + * Terminal Prompt + * Mimicks a terminal prompt. On keystrokes, the led bar is filled. Backspace + * removes from bar. Enter clears bar. After some timeout, the bar is also cleared. + * A blinking cursor is displayed at the right of the bar. + * This can't be defined as an animation, because animations only are called on an + * interval, not on keypress. In the future all animations could be enhanced to + * react to keystrokes in QMK. + */ + +uint8_t cursor_pos; + +uint16_t interval_time = 10; // maybe too short... +uint16_t reset_time = 10000; +uint16_t last_timer = 0; +uint16_t timer_pos = 0; +uint16_t reset_timer = 0; + +void reset_chars(void); +void add_char(bool space); +void remove_char(void); +void animate_cursor(uint16_t); + +// animate, like the built-in animations, with timer_* functions +void matrix_scan_user(void) { + if (timer_elapsed(reset_timer) > reset_time) { + reset_chars(); + reset_timer = timer_read(); + return; + } + if (timer_elapsed(last_timer) < interval_time) { + return; + } + last_timer += interval_time; + timer_pos += 4; + if (timer_pos >= 255) { + timer_pos = 0; + last_timer = timer_read(); + } + animate_cursor(timer_pos); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + keycode = keycode & 0xFF; + } + switch (keycode) { + case KC_A ... KC_Z: + case KC_1 ... KC_0: + case KC_LBRC: + case KC_RBRC: + case KC_SCLN: + case KC_QUOT: + case KC_COMM: + case KC_DOT: + case KC_SLSH: + case KC_BSLS: + if (record->event.pressed) { + add_char(false); + } + break; + case KC_ENTER: + case KC_ESC: + if (record->event.pressed) { + reset_chars(); + } + break; + case KC_BSPC: + if (record->event.pressed) { + remove_char(); + } + break; + case KC_SPACE: + if (!record->event.pressed) { + add_char(true); + } + break; + } + reset_timer = timer_read(); + return true; +} + +void keyboard_post_init_user(void) { + // reset the bar and animation + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + cursor_pos = 0; + reset_chars(); + reset_timer = last_timer = timer_read(); +} + + +void reset_chars(void) { + // flush the whole thing, gets rid of previous animations + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + // don't flicker the cursor if bar was empty on reset_timer + if (i == 0 && cursor_pos == 0) { + continue; + } + rgblight_sethsv_at(0, 0, 0, i); + } + cursor_pos = 0; +} + +void add_char(bool space) { + if (cursor_pos == RGBLED_NUM - 1) { + cursor_pos = 0; + reset_chars(); + return; + } + + if (space) { + rgblight_sethsv_at(0, 0, 0, cursor_pos); + } else { + rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), cursor_pos); + } + cursor_pos += 1; +} + +void remove_char(void) { + if (cursor_pos == 0) return; + + rgblight_sethsv_at(0, 0, 0, cursor_pos); + rgblight_sethsv_at(0, 0, 0, cursor_pos - 1); + cursor_pos -= 1; +} + +void animate_cursor(uint16_t pos) { + uint16_t value = pos < 196 ? fmin(255, pos * 16) : (255 - (pos * 2)); + rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), value, cursor_pos); +} diff --git a/keyboards/gh60/satan/keymaps/gipsy-king/readme.md b/keyboards/gh60/satan/keymaps/gipsy-king/readme.md new file mode 100644 index 0000000000..c366147df3 --- /dev/null +++ b/keyboards/gh60/satan/keymaps/gipsy-king/readme.md @@ -0,0 +1 @@ +# default Satan GH60 layout diff --git a/keyboards/gh60/satan/keymaps/gipsy-king/rules.mk b/keyboards/gh60/satan/keymaps/gipsy-king/rules.mk new file mode 100644 index 0000000000..12ab55fae1 --- /dev/null +++ b/keyboards/gh60/satan/keymaps/gipsy-king/rules.mk @@ -0,0 +1,7 @@ +BOOTMAGIC_ENABLE = no +EXTRAKEY_ENABLE = no +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +NKRO_ENABLE = no +UNICODE_ENABLE = yes +SLEEP_LED_ENABLE = yes diff --git a/keyboards/satan/keymaps/hhkb_7u/keymap.c b/keyboards/gh60/satan/keymaps/hhkb_7u/keymap.c similarity index 100% rename from keyboards/satan/keymaps/hhkb_7u/keymap.c rename to keyboards/gh60/satan/keymaps/hhkb_7u/keymap.c diff --git a/keyboards/satan/keymaps/hhkb_7u/readme.md b/keyboards/gh60/satan/keymaps/hhkb_7u/readme.md similarity index 100% rename from keyboards/satan/keymaps/hhkb_7u/readme.md rename to keyboards/gh60/satan/keymaps/hhkb_7u/readme.md diff --git a/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c b/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c new file mode 100644 index 0000000000..46d66e5db6 --- /dev/null +++ b/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c @@ -0,0 +1,122 @@ +#include QMK_KEYBOARD_H + +// Used for SHIFT_ESC +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 + +enum custom_keycodes { + KC_ENYE = SAFE_RANGE, + KC_CEDL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Ret | + * |-------------------------------------------------------. | + * |Ctrl | A| S| D| F| G| H| J| K| L| Ñ| ;| ' |urn| + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Fn| + * |-----------------------------------------------------------| + * | |Alt|WinK | Space |WinK |Alt| | + * `-----------------------------------------------------------' + * + */ + [_BL] = LAYOUT_60_iso_split_rshift( \ + F(0), 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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENYE, KC_SCLN, KC_QUOT, KC_ENT, + OSM(MOD_LSFT), _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), MO(_FL), + _______, KC_LGUI, KC_LALT, KC_SPC, _______, KC_RALT, KC_RGUI, _______ + ), + + /* Keymap _FL: (Function Layer) Second Layer + * ,-----------------------------------------------------------. + * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|PSR| RESET| + * |-----------------------------------------------------------| + * | | |VUP| | | | | | | | | | | | + * |-------------------------------------------------------. | + * |CapsLck|PRV|VDN|NXT| |RGB|FRW|BRT|VAI|VAD|INC|DEC| | | + * |-----------------------------------------------------------| + * | | | | Ç| |BTG| |MUT| | | | | | + * |-----------------------------------------------------------| + * | | | | PLY/PAU | | | | + * `-----------------------------------------------------------' + */ + [_FL] = LAYOUT_60_iso_split_rshift(\ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_PSCR, RESET, + _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, RGB_TOG, RGB_MOD, RGB_M_B, RGB_VAI, RGB_VAD, BL_INC, BL_DEC, _______, + _______, _______, _______, _______, KC_CEDL, _______, BL_TOGG, _______, KC_MUTE, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MPLY, _______, _______, _______, _______ + ) + +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case KC_ENYE: // Ñ + register_code16(KC_LALT); + tap_code(KC_KP_0); + tap_code(KC_KP_2); + tap_code(KC_KP_4); + tap_code(KC_KP_1); + unregister_code16(KC_LALT); + return false; + case KC_CEDL: // Ç + register_code16(KC_LALT); + tap_code(KC_KP_0); + tap_code(KC_KP_2); + tap_code(KC_KP_3); + tap_code(KC_KP_1); + unregister_code16(KC_LALT); + return false; + default: + return true; + } + } + return true; +}; diff --git a/keyboards/satan/keymaps/isoHHKB/readme.md b/keyboards/gh60/satan/keymaps/isoHHKB/readme.md similarity index 100% rename from keyboards/satan/keymaps/isoHHKB/readme.md rename to keyboards/gh60/satan/keymaps/isoHHKB/readme.md diff --git a/keyboards/satan/keymaps/isoHHKB/rules.mk b/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk similarity index 100% rename from keyboards/satan/keymaps/isoHHKB/rules.mk rename to keyboards/gh60/satan/keymaps/isoHHKB/rules.mk diff --git a/keyboards/satan/keymaps/iso_split_rshift/.gitignore b/keyboards/gh60/satan/keymaps/iso_split_rshift/.gitignore similarity index 100% rename from keyboards/satan/keymaps/iso_split_rshift/.gitignore rename to keyboards/gh60/satan/keymaps/iso_split_rshift/.gitignore diff --git a/keyboards/satan/keymaps/iso_split_rshift/build.sh b/keyboards/gh60/satan/keymaps/iso_split_rshift/build.sh similarity index 100% rename from keyboards/satan/keymaps/iso_split_rshift/build.sh rename to keyboards/gh60/satan/keymaps/iso_split_rshift/build.sh diff --git a/keyboards/satan/keymaps/iso_split_rshift/config.h b/keyboards/gh60/satan/keymaps/iso_split_rshift/config.h similarity index 100% rename from keyboards/satan/keymaps/iso_split_rshift/config.h rename to keyboards/gh60/satan/keymaps/iso_split_rshift/config.h diff --git a/keyboards/gh60/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/gh60/satan/keymaps/iso_split_rshift/keymap.c new file mode 100644 index 0000000000..a21f83505e --- /dev/null +++ b/keyboards/gh60/satan/keymaps/iso_split_rshift/keymap.c @@ -0,0 +1,115 @@ + +#include QMK_KEYBOARD_H + +// TODO: replace your ugly german brckets with #defines + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _DEF 0 +#define _SPC 1 +#define _TAB 2 +#define _SFX 3 + +// dual-role shortcuts +#define TABDUAL LT(_TAB, KC_TAB) +#define CAPSDUAL CTL_T(KC_ESC) +#define SPACEDUAL LT(_SPC, KC_SPACE) +#define ENTERDUAL CTL_T(KC_ENT) +// arrow cluster duality bottom right corner +#define ARRLEFT ALT_T(KC_LEFT) +#define ARRDOWN GUI_T(KC_DOWN) +#define ARRUP SFT_T(KC_UP) +#define ARRRIGHT CTL_T(KC_RIGHT) +// german brackets +#define GER_CUR_L RALT(KC_7) // [ +#define GER_CUR_R RALT(KC_0) // ] +#define GER_PAR_L LSFT(KC_8) // ( +#define GER_PAR_R LSFT(KC_9) // ) +#define GER_ANG_L KC_NUBS // < +#define GER_ANG_R LSFT(KC_NUBS) // > +#define GER_BRC_L RALT(KC_8) // [ +#define GER_BRC_R RALT(KC_9) // ] + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _DEF: Default Layer + * ,-----------------------------------------------------------. + * |Grv| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1 + * |-----------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return | + * |-----------------------------------------------------------| + * |Sft | < | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| RShift is UP + * |-----------------------------------------------------------| + * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is + * `-----------------------------------------------------------' LEFT DWN RIGHT + */ + [_DEF] = LAYOUT_60_iso_split_rshift( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + TABDUAL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \ + CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ARRUP, TG(_SFX), \ + KC_LCTL, KC_LGUI, KC_LALT, SPACEDUAL, KC_RALT, ARRLEFT, ARRDOWN, ARRRIGHT), + + /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) + * ,-----------------------------------------------------------. + * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete| + * |-----------------------------------------------------------| + * | |Paus| Up| [ | ] | | | | ( | ) | | | | | + * |-----------------------------------------------------------| + * | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY | + * |-----------------------------------------------------------| + * | | | | | < | > | |M0 | | | | | Vol+ | | + * |-----------------------------------------------------------| + * | | | | |Alt |Prev|Vol-|Next| + * `-----------------------------------------------------------' + */ + [_SPC] = LAYOUT_60_iso_split_rshift( + KC_PSCR, 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_DEL, \ + _______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ + _______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, RALT(KC_SPC),_______, _______, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), + + /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) + * ,-----------------------------------------------------------. + * |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE + * |-----------------------------------------------------------| + * | | | | | | | | | { | } | | | | | + * |-----------------------------------------------------------| + * | | | | | | |Pos1|PgDn|PgUp|End| | |Retrn | + * |-----------------------------------------------------------| + * | | | | | | | |AF2| | | | | PgUp | | + * |-----------------------------------------------------------| + * | | | | |Alt |Pos1|PgDn|End | + * `-----------------------------------------------------------' + */ + [_TAB] = LAYOUT_60_iso_split_rshift( + KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, A(KC_F2), _______, _______, _______, _______, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) + * ,-----------------------------------------------------------. + * |RSET| | | | | | | 7| 8| 9| | | |Backsp | + * |-----------------------------------------------------------| + * | | | | | | | | 4 | 5 | 6 | | | | \ | + * |-----------------------------------------------------------| + * | | L | L | | | | | 1 | 2 | 3 | | | Return | + * |-----------------------------------------------------------| + * | | | L | L | L | L | L | L | | 0 | | /| Up | | All "L"s represent + * |-----------------------------------------------------------| LED controlling + * |Ctrl|Win |Alt | |Alt |Left|Down|Right| + * `-----------------------------------------------------------' + */ + [_SFX] = LAYOUT_60_iso_split_rshift( + RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ + _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ + _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), +}; diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/gh60/satan/keymaps/iso_split_rshift/readme.md similarity index 100% rename from keyboards/satan/keymaps/iso_split_rshift/readme.md rename to keyboards/gh60/satan/keymaps/iso_split_rshift/readme.md diff --git a/keyboards/satan/keymaps/iso_split_rshift/rules.mk b/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk similarity index 100% rename from keyboards/satan/keymaps/iso_split_rshift/rules.mk rename to keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk diff --git a/keyboards/satan/keymaps/jarred/keymap.c b/keyboards/gh60/satan/keymaps/jarred/keymap.c similarity index 100% rename from keyboards/satan/keymaps/jarred/keymap.c rename to keyboards/gh60/satan/keymaps/jarred/keymap.c diff --git a/keyboards/satan/keymaps/jarred/readme.md b/keyboards/gh60/satan/keymaps/jarred/readme.md similarity index 100% rename from keyboards/satan/keymaps/jarred/readme.md rename to keyboards/gh60/satan/keymaps/jarred/readme.md diff --git a/keyboards/satan/keymaps/lepa/keymap.c b/keyboards/gh60/satan/keymaps/lepa/keymap.c similarity index 100% rename from keyboards/satan/keymaps/lepa/keymap.c rename to keyboards/gh60/satan/keymaps/lepa/keymap.c diff --git a/keyboards/satan/keymaps/lepa/readme.md b/keyboards/gh60/satan/keymaps/lepa/readme.md similarity index 100% rename from keyboards/satan/keymaps/lepa/readme.md rename to keyboards/gh60/satan/keymaps/lepa/readme.md diff --git a/keyboards/satan/keymaps/lepa/rules.mk b/keyboards/gh60/satan/keymaps/lepa/rules.mk similarity index 100% rename from keyboards/satan/keymaps/lepa/rules.mk rename to keyboards/gh60/satan/keymaps/lepa/rules.mk diff --git a/keyboards/satan/keymaps/mark1/keymap.c b/keyboards/gh60/satan/keymaps/mark1/keymap.c similarity index 100% rename from keyboards/satan/keymaps/mark1/keymap.c rename to keyboards/gh60/satan/keymaps/mark1/keymap.c diff --git a/keyboards/satan/keymaps/mark1/readme.md b/keyboards/gh60/satan/keymaps/mark1/readme.md similarity index 100% rename from keyboards/satan/keymaps/mark1/readme.md rename to keyboards/gh60/satan/keymaps/mark1/readme.md diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/gh60/satan/keymaps/midi/config.h similarity index 100% rename from keyboards/satan/keymaps/midi/config.h rename to keyboards/gh60/satan/keymaps/midi/config.h diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/gh60/satan/keymaps/midi/keymap.c similarity index 100% rename from keyboards/satan/keymaps/midi/keymap.c rename to keyboards/gh60/satan/keymaps/midi/keymap.c diff --git a/keyboards/satan/keymaps/midi/readme.md b/keyboards/gh60/satan/keymaps/midi/readme.md similarity index 100% rename from keyboards/satan/keymaps/midi/readme.md rename to keyboards/gh60/satan/keymaps/midi/readme.md diff --git a/keyboards/satan/keymaps/midi/rules.mk b/keyboards/gh60/satan/keymaps/midi/rules.mk similarity index 100% rename from keyboards/satan/keymaps/midi/rules.mk rename to keyboards/gh60/satan/keymaps/midi/rules.mk diff --git a/keyboards/satan/keymaps/no_caps_lock/keymap.c b/keyboards/gh60/satan/keymaps/no_caps_lock/keymap.c similarity index 100% rename from keyboards/satan/keymaps/no_caps_lock/keymap.c rename to keyboards/gh60/satan/keymaps/no_caps_lock/keymap.c diff --git a/keyboards/satan/keymaps/no_caps_lock/readme.md b/keyboards/gh60/satan/keymaps/no_caps_lock/readme.md similarity index 100% rename from keyboards/satan/keymaps/no_caps_lock/readme.md rename to keyboards/gh60/satan/keymaps/no_caps_lock/readme.md diff --git a/keyboards/satan/keymaps/olligranlund_iso/config.h b/keyboards/gh60/satan/keymaps/olligranlund_iso/config.h similarity index 100% rename from keyboards/satan/keymaps/olligranlund_iso/config.h rename to keyboards/gh60/satan/keymaps/olligranlund_iso/config.h diff --git a/keyboards/satan/keymaps/olligranlund_iso/keymap.c b/keyboards/gh60/satan/keymaps/olligranlund_iso/keymap.c similarity index 100% rename from keyboards/satan/keymaps/olligranlund_iso/keymap.c rename to keyboards/gh60/satan/keymaps/olligranlund_iso/keymap.c diff --git a/keyboards/satan/keymaps/olligranlund_iso/readme.md b/keyboards/gh60/satan/keymaps/olligranlund_iso/readme.md similarity index 100% rename from keyboards/satan/keymaps/olligranlund_iso/readme.md rename to keyboards/gh60/satan/keymaps/olligranlund_iso/readme.md diff --git a/keyboards/satan/keymaps/olligranlund_iso/rules.mk b/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk similarity index 100% rename from keyboards/satan/keymaps/olligranlund_iso/rules.mk rename to keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/gh60/satan/keymaps/poker/keymap.c similarity index 100% rename from keyboards/satan/keymaps/poker/keymap.c rename to keyboards/gh60/satan/keymaps/poker/keymap.c diff --git a/keyboards/satan/keymaps/rask63/keymap.c b/keyboards/gh60/satan/keymaps/rask63/keymap.c similarity index 100% rename from keyboards/satan/keymaps/rask63/keymap.c rename to keyboards/gh60/satan/keymaps/rask63/keymap.c diff --git a/keyboards/satan/keymaps/sethbc/keymap.c b/keyboards/gh60/satan/keymaps/sethbc/keymap.c similarity index 100% rename from keyboards/satan/keymaps/sethbc/keymap.c rename to keyboards/gh60/satan/keymaps/sethbc/keymap.c diff --git a/keyboards/satan/keymaps/sethbc/readme.md b/keyboards/gh60/satan/keymaps/sethbc/readme.md similarity index 100% rename from keyboards/satan/keymaps/sethbc/readme.md rename to keyboards/gh60/satan/keymaps/sethbc/readme.md diff --git a/keyboards/satan/keymaps/sethbc/rules.mk b/keyboards/gh60/satan/keymaps/sethbc/rules.mk similarity index 100% rename from keyboards/satan/keymaps/sethbc/rules.mk rename to keyboards/gh60/satan/keymaps/sethbc/rules.mk diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/gh60/satan/keymaps/smt/keymap.c similarity index 100% rename from keyboards/satan/keymaps/smt/keymap.c rename to keyboards/gh60/satan/keymaps/smt/keymap.c diff --git a/keyboards/satan/keymaps/smt/readme.md b/keyboards/gh60/satan/keymaps/smt/readme.md similarity index 100% rename from keyboards/satan/keymaps/smt/readme.md rename to keyboards/gh60/satan/keymaps/smt/readme.md diff --git a/keyboards/satan/keymaps/smt/rules.mk b/keyboards/gh60/satan/keymaps/smt/rules.mk similarity index 100% rename from keyboards/satan/keymaps/smt/rules.mk rename to keyboards/gh60/satan/keymaps/smt/rules.mk diff --git a/keyboards/satan/keymaps/spacemanspiff/keymap.c b/keyboards/gh60/satan/keymaps/spacemanspiff/keymap.c similarity index 100% rename from keyboards/satan/keymaps/spacemanspiff/keymap.c rename to keyboards/gh60/satan/keymaps/spacemanspiff/keymap.c diff --git a/keyboards/satan/keymaps/spacemanspiff/readme.md b/keyboards/gh60/satan/keymaps/spacemanspiff/readme.md similarity index 100% rename from keyboards/satan/keymaps/spacemanspiff/readme.md rename to keyboards/gh60/satan/keymaps/spacemanspiff/readme.md diff --git a/keyboards/satan/keymaps/stanleylai/config.h b/keyboards/gh60/satan/keymaps/stanleylai/config.h similarity index 100% rename from keyboards/satan/keymaps/stanleylai/config.h rename to keyboards/gh60/satan/keymaps/stanleylai/config.h diff --git a/keyboards/satan/keymaps/stanleylai/keymap.c b/keyboards/gh60/satan/keymaps/stanleylai/keymap.c similarity index 100% rename from keyboards/satan/keymaps/stanleylai/keymap.c rename to keyboards/gh60/satan/keymaps/stanleylai/keymap.c diff --git a/keyboards/satan/keymaps/unxmaal/README.md b/keyboards/gh60/satan/keymaps/unxmaal/README.md similarity index 100% rename from keyboards/satan/keymaps/unxmaal/README.md rename to keyboards/gh60/satan/keymaps/unxmaal/README.md diff --git a/keyboards/satan/keymaps/unxmaal/keymap.c b/keyboards/gh60/satan/keymaps/unxmaal/keymap.c similarity index 100% rename from keyboards/satan/keymaps/unxmaal/keymap.c rename to keyboards/gh60/satan/keymaps/unxmaal/keymap.c diff --git a/keyboards/satan/keymaps/unxmaal/rules.mk b/keyboards/gh60/satan/keymaps/unxmaal/rules.mk similarity index 100% rename from keyboards/satan/keymaps/unxmaal/rules.mk rename to keyboards/gh60/satan/keymaps/unxmaal/rules.mk diff --git a/keyboards/gh60/satan/readme.md b/keyboards/gh60/satan/readme.md new file mode 100644 index 0000000000..f6a56e4a80 --- /dev/null +++ b/keyboards/gh60/satan/readme.md @@ -0,0 +1,35 @@ +# Satan GH60 + +A clone of the GH60 60% keyboard, with full backlighting support. + +Keyboard Maintainer: QMK Community +Hardware Supported: Satan GH60 PCB +Hardware Availability: https://www.1upkeyboards.com/shop/controllers/gh60-satan-pcb/ + +Make example for this keyboard (after setting up your build environment): + + make gh60/satan:default + +**Note:** This GH60 Satan firmware will not be compatible with the GH60 Rev C PCB. Conversely, the GH60 Rev C firmware will not be compatible with this PCB. Please ensure you have the correct firmware/pcb combination before flashing. + +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). + +## RGB Underglow (WS2812B LED Strip) + +This board also supports underglow with a slight mod. + +Connect the DIN pad of the LED strip to PE2 on the ATmega32U4, like so: + +![controller](https://i.imgur.com/9vyRBoT.jpg) + +Then connect VCC and GND to pins 1 and 6 at the bottom of the PCB: + +![power](https://i.imgur.com/pHMZHLP.jpg) + +## ISP Header + +If you want to flash another bootloader (such as QMK-DFU), or can't get into the bootloader in the first place, the row of pins at the bottom can be used to ISP flash the board: + +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | +|---|----|---|----|-----|---|----| +|VCC|MISO|SCK|MOSI|RESET|GND|*NC*| diff --git a/keyboards/gh60/satan/rules.mk b/keyboards/gh60/satan/rules.mk new file mode 100644 index 0000000000..9bd667535d --- /dev/null +++ b/keyboards/gh60/satan/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift diff --git a/keyboards/satan/satan.c b/keyboards/gh60/satan/satan.c similarity index 100% rename from keyboards/satan/satan.c rename to keyboards/gh60/satan/satan.c diff --git a/keyboards/satan/satan.h b/keyboards/gh60/satan/satan.h similarity index 100% rename from keyboards/satan/satan.h rename to keyboards/gh60/satan/satan.h diff --git a/keyboards/gh80_3000/rules.mk b/keyboards/gh80_3000/rules.mk index 9e4bc3f0d2..0da2d6a2fd 100644 --- a/keyboards/gh80_3000/rules.mk +++ b/keyboards/gh80_3000/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/gingham/config.h b/keyboards/gingham/config.h index 53601e8cad..d89120c281 100644 --- a/keyboards/gingham/config.h +++ b/keyboards/gingham/config.h @@ -51,6 +51,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/gingham/rules.mk b/keyboards/gingham/rules.mk index b66b071295..aa228c875b 100644 --- a/keyboards/gingham/rules.mk +++ b/keyboards/gingham/rules.mk @@ -3,42 +3,6 @@ SRC = matrix.c \ # MCU name MCU = atmega328p -PROTOCOL = VUSB - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader selection # Teensy halfkay @@ -46,20 +10,9 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID -# -# This uses usbaspbootloader -# BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp # Flash program via avrdude, but default command is not suitable. # You can use plaid:default:program @@ -89,7 +42,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes CUSTOM_MATRIX = yes diff --git a/keyboards/gingham/usbconfig.h b/keyboards/gingham/usbconfig.h index 30cdd36987..3c7aa0da06 100644 --- a/keyboards/gingham/usbconfig.h +++ b/keyboards/gingham/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -239,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x01, 0x00 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'Y','i','a','n','c','a','r','-','D','e', 's', 'i', 'g', 'n', 's' diff --git a/keyboards/gonnerd/rules.mk b/keyboards/gonnerd/rules.mk index ebea1005ba..d4858ff130 100644 --- a/keyboards/gonnerd/rules.mk +++ b/keyboards/gonnerd/rules.mk @@ -1,51 +1,18 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/gray_studio/cod67/cod67.h b/keyboards/gray_studio/cod67/cod67.h index 2d3911e69c..ed4a729971 100644 --- a/keyboards/gray_studio/cod67/cod67.h +++ b/keyboards/gray_studio/cod67/cod67.h @@ -19,11 +19,11 @@ #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K48, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D \ + K40, K41, K42, K43, K44, K45, K46, K47, K0D, K49, K4A, K4B, K4C, K4D \ ) \ { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ diff --git a/keyboards/gray_studio/cod67/config.h b/keyboards/gray_studio/cod67/config.h index 47b42d8a60..2231827ba6 100644 --- a/keyboards/gray_studio/cod67/config.h +++ b/keyboards/gray_studio/cod67/config.h @@ -15,18 +15,17 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define PRODUCT_ID 0x0C0D #define DEVICE_VER 0x0001 -#define MANUFACTURER Gray -#define PRODUCT cod67 -#define DESCRIPTION 60% Custom Keyboard +#define MANUFACTURER Gray Studio +#define PRODUCT COD67 +#define DESCRIPTION 60% custom keyboard /* key matrix size */ #define MATRIX_ROWS 5 @@ -49,135 +48,27 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* D4 is not a PWM pin, but look at timer assisted software PWM if you want something other than toggle + * https://docs.qmk.fm/#/feature_backlight?id=timer-assisted-pwm-implementation + */ #define BACKLIGHT_PIN D4 -#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 20 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 + #define RGBLIGHT_SLEEP + #define RGBLIGHT_ANIMATIONS +#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - /* 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 -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/gray_studio/cod67/keymaps/default/keymap.c b/keyboards/gray_studio/cod67/keymaps/default/keymap.c index 9e1273a189..5403bf406f 100644 --- a/keyboards/gray_studio/cod67/keymaps/default/keymap.c +++ b/keyboards/gray_studio/cod67/keymaps/default/keymap.c @@ -19,29 +19,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + 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_TRNS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/gray_studio/cod67/keymaps/default/readme.md b/keyboards/gray_studio/cod67/keymaps/default/readme.md index cfbf846a9a..4b45689de8 100644 --- a/keyboards/gray_studio/cod67/keymaps/default/readme.md +++ b/keyboards/gray_studio/cod67/keymaps/default/readme.md @@ -1 +1,5 @@ -# The default keymap for cod67 +# The default keymap for a COD67 + +The default map only implements the default layer from the map on [ydkb.io](http://ydkb.io). + +If you want an example of a multi-layer map, look at [rys's map](../rys). diff --git a/keyboards/gray_studio/cod67/keymaps/rys/keymap.c b/keyboards/gray_studio/cod67/keymaps/rys/keymap.c new file mode 100644 index 0000000000..9f1d069b73 --- /dev/null +++ b/keyboards/gray_studio/cod67/keymaps/rys/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +enum layers { + _TOP, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_TOP] = LAYOUT( + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LALT, KC_LGUI, _______, _______, KC_SPC, _______, _______, _______, KC_RGUI, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, RGB_TOG, RGB_MOD,RGB_RMOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, + _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/gray_studio/cod67/keymaps/rys/readme.md b/keyboards/gray_studio/cod67/keymaps/rys/readme.md new file mode 100644 index 0000000000..8214809bba --- /dev/null +++ b/keyboards/gray_studio/cod67/keymaps/rys/readme.md @@ -0,0 +1,5 @@ +# Rys's keymap for a COD67 + +The COD67 supports really nice RGB underglow which you can see through the mid diffuser. I've put control for that on layer 1, along with reset on `Space`, backlight toggle on `Enter`, and the function row. The board supports all of the QMK RGB effects. + +Look at the excellent [RGB Lighting](https://docs.qmk.fm/#/feature_rgblight) docs on the QMK site for more controls. diff --git a/keyboards/gray_studio/cod67/readme.md b/keyboards/gray_studio/cod67/readme.md index 7f91cf30d1..6e79ffec4a 100644 --- a/keyboards/gray_studio/cod67/readme.md +++ b/keyboards/gray_studio/cod67/readme.md @@ -1,30 +1,45 @@ # Gray COD67 -The Gray COD67 is a 60% keyboard with a modern and bold design. It features 20 RGB Underglow LED lights and a unique diffuser placement. The COD67 has the most stunning RGB light strip for a custom mechanical keyboard. It also features a center mounted USB C port. +The Gray COD67 is a 60% keyboard with a modern and bold design. It features 20 RGB Underglow LED lights and a unique diffuser placement. The COD67 has the most stunning RGB light strip for a custom mechanical keyboard. It also features a center mounted USB C port. -There were only 75 units made worldwide. +There were only 75 units made worldwide. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Hardware Supported: Gray COD67 Hardware Availability: [Zfrontier](https://en.zfrontier.com/products/cod67) -At this time, flashing ONLY works on Windows systems. +## Bootloader mode -To put in bootloader mode, hold the `Esc` key while plugging in the USB cable. +To put in bootloader mode, hold the `Esc` key while plugging in the USB cable. -The COD67 will show up as a drive. +## Making firmware Make example for this keyboard (after setting up your build environment): - make gray_studio/cod67:default:bin + make gray_studio/cod67: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). -Rename the resulting `.bin` file to `cod67.bin`. +## Flashing in Windows -Drag and drop `cod67.bin` to the drive, overwriting the previous `cod67.bin` stored on it. +After putting your COD67 in bootloader mode, it will show up as a drive. -Press the `Esc` key again to reset the board. You are now ready to type! +* Rename the resulting `.bin` file to `COD67.BIN`. +* Drag and drop your new `COD67.BIN` to the drive, overwriting the previous `COD67.BIN` stored on it. +* Wait a few seconds for it to write. The caps lock LED flashes rapidly while writing. +* Press the `Esc` key again to reset the board. You are now ready to type! + +## Flashing in macOS + +After putting your COD67 in bootloader mode, it will show up as a drive. + +* Rename the resulting `.bin` file to `COD67.BIN`. +* Drag the existing `COD67.BIN` file from the drive to the Trash in Finder. +* Empty the Trash in Finder. It's important you do that due to how macOS handles hidden `.Trashes` on removable drives. It needs to be empty to free up flash space. +* Drag and drop your new `COD67.BIN` to the drive. +* Wait a few seconds for it to write. The caps lock LED flashes rapidly while writing. +* Press the `Esc` key or eject the drive in Finder to reset the board. You are now ready to type! ## Notes -The backlight pin is attached to a non PWM pin `D4` so backlight is only on/off. + +The backlight pin is attached to a non PWM pin `D4` so the backlight is only on/off. diff --git a/keyboards/gray_studio/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk index 45eb6ee376..0bed09539f 100644 --- a/keyboards/gray_studio/cod67/rules.mk +++ b/keyboards/gray_studio/cod67/rules.mk @@ -1,66 +1,33 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # actually lufa-ms +# Mass storage bootloader on the COD67 uses bin files +FIRMWARE_FORMAT = bin # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/gray_studio/hb85/config.h b/keyboards/gray_studio/hb85/config.h index da230f7e8d..dff360ec6a 100644 --- a/keyboards/gray_studio/hb85/config.h +++ b/keyboards/gray_studio/hb85/config.h @@ -19,6 +19,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422F +#define DEVICE_VER 0x0200 #define MANUFACTURER Gray Studio #define PRODUCT HB85 diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c index 3e42023587..21562b9e0f 100644 --- a/keyboards/gray_studio/hb85/hb85.c +++ b/keyboards/gray_studio/hb85/hb85.c @@ -16,33 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include - -#include "rgblight.h" - -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "hb85.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -51,7 +25,7 @@ void backlight_init_ports(void) { setPinOutput(D4); setPinOutput(D6); - // turn RGB LEDs on + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); @@ -59,17 +33,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { - // turn RGB LEDs off + if (level == 0) { + // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { - // turn RGB LEDs on + } else { + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk index c3e17e4932..ec57b03dcb 100644 --- a/keyboards/gray_studio/hb85/rules.mk +++ b/keyboards/gray_studio/hb85/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2019 fcoury -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,11 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/gray_studio/hb85/usbconfig.h b/keyboards/gray_studio/hb85/usbconfig.h index c52c90ce8a..186e2dca35 100644 --- a/keyboards/gray_studio/hb85/usbconfig.h +++ b/keyboards/gray_studio/hb85/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'G', 'r', 'a', 'y', ' ', 'S', 't', 'u', 'd', 'i', 'o' diff --git a/keyboards/gray_studio/space65/info.json b/keyboards/gray_studio/space65/info.json index 9c1d439b41..72674bdef6 100644 --- a/keyboards/gray_studio/space65/info.json +++ b/keyboards/gray_studio/space65/info.json @@ -7,6 +7,10 @@ "layouts": { "LAYOUT": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_ansi_blocker": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } -} \ No newline at end of file +} diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index 10bd7cf035..ced89eac04 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -78,3 +31,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/gray_studio/space65/space65.c b/keyboards/gray_studio/space65/space65.c index f9f2224ab8..74a86a202d 100644 --- a/keyboards/gray_studio/space65/space65.c +++ b/keyboards/gray_studio/space65/space65.c @@ -19,6 +19,7 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up + setPinOutput(E6); matrix_init_user(); } @@ -39,9 +40,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(E6); - } else { writePinLow(E6); + } else { + writePinHigh(E6); } led_set_user(usb_led); diff --git a/keyboards/gray_studio/space65/space65.h b/keyboards/gray_studio/space65/space65.h index b7d8580c06..15aa89935b 100644 --- a/keyboards/gray_studio/space65/space65.h +++ b/keyboards/gray_studio/space65/space65.h @@ -40,3 +40,18 @@ { k40, k41, KC_NO, k43, KC_NO, k45, KC_NO, k47, k48, KC_NO, k4A, k4B, KC_NO, k4D, k4E, k4F }, \ } +#define LAYOUT_65_ansi_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, k3F, \ + k40, k41, k43, k47, k4A, k4B, k4D, k4E, k4F \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, KC_NO, k0E, k0F }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO, k2F }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E, k3F }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4A, k4B, KC_NO, k4D, k4E, k4F }, \ +} + diff --git a/keyboards/gray_studio/think65/hotswap/config.h b/keyboards/gray_studio/think65/hotswap/config.h new file mode 100644 index 0000000000..fc1734146d --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Gray Studio +#define PRODUCT THINK6.5 +#define DESCRIPTION 65% 6.5 degree custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D1, D0, D2, D3, D5, D4, D6, D7, B4, B5, F0, F1, B6, F4, F5, F6 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 22 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/gray_studio/think65/hotswap/hotswap.c b/keyboards/gray_studio/think65/hotswap/hotswap.c new file mode 100644 index 0000000000..07cdc8b1f7 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/hotswap.c @@ -0,0 +1,71 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "hotswap.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(C6); + setPinOutput(C7); + setPinOutput(F7); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(F7); + } else { + writePinHigh(F7); + } + + led_set_user(usb_led); +} + diff --git a/keyboards/gray_studio/think65/hotswap/hotswap.h b/keyboards/gray_studio/think65/hotswap/hotswap.h new file mode 100644 index 0000000000..f6087e39e6 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/hotswap.h @@ -0,0 +1,35 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/gray_studio/think65/hotswap/info.json b/keyboards/gray_studio/think65/hotswap/info.json new file mode 100644 index 0000000000..6047c4f4a2 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "THINK6.5", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "key_count": 67, + "layout": [ + {"label":"K00 (B0,D1)", "x":0, "y":0}, + {"label":"K01 (B0,D0)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,F0)", "x":10, "y":0}, + {"label":"K0B (B0,F1)", "x":11, "y":0}, + {"label":"K0C (B0,B6)", "x":12, "y":0}, + {"label":"K0E (B0,F5)", "x":13, "y":0, "w":2}, + {"label":"K0F (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D1)", "x":0, "y":1, "w":1.5}, + {"label":"K12 (B1,D2)", "x":1.5, "y":1}, + {"label":"K13 (B1,D3)", "x":2.5, "y":1}, + {"label":"K14 (B1,D5)", "x":3.5, "y":1}, + {"label":"K15 (B1,D4)", "x":4.5, "y":1}, + {"label":"K16 (B1,D6)", "x":5.5, "y":1}, + {"label":"K17 (B1,D7)", "x":6.5, "y":1}, + {"label":"K18 (B1,B4)", "x":7.5, "y":1}, + {"label":"K19 (B1,B5)", "x":8.5, "y":1}, + {"label":"K1A (B1,F0)", "x":9.5, "y":1}, + {"label":"K1B (B1,F1)", "x":10.5, "y":1}, + {"label":"K1C (B1,B6)", "x":11.5, "y":1}, + {"label":"K1D (B1,F4)", "x":12.5, "y":1}, + {"label":"K1E (B1,F5)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D1)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,F0)", "x":9.75, "y":2}, + {"label":"K2B (B2,F1)", "x":10.75, "y":2}, + {"label":"K2C (B2,B6)", "x":11.75, "y":2}, + {"label":"K2D (B2,F4)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (B2,F6)", "x":15, "y":2}, + {"label":"K31 (B3,D0)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,F0)", "x":10.25, "y":3}, + {"label":"K3B (B3,F1)", "x":11.25, "y":3}, + {"label":"K3D (B3,F4)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E (B3,F5)", "x":14, "y":3}, + {"label":"K3F (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D0)", "x":1.25, "y":4, "w":1.25}, + {"label":"K43 (E6,D3)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (E6,F0)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (E6,F1)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D (E6,F4)", "x":13, "y":4}, + {"label":"K4E (E6,F5)", "x":14, "y":4}, + {"label":"K4F (E6,F6)", "x":15, "y":4} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} \ No newline at end of file diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/default/config.h b/keyboards/gray_studio/think65/hotswap/keymaps/default/config.h new file mode 100644 index 0000000000..26c6d6ade1 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/default/keymap.c b/keyboards/gray_studio/think65/hotswap/keymaps/default/keymap.c new file mode 100644 index 0000000000..187f68c5c0 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( + 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_HOME, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/default/readme.md b/keyboards/gray_studio/think65/hotswap/keymaps/default/readme.md new file mode 100644 index 0000000000..438e10e291 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for think65 diff --git a/keyboards/gray_studio/think65/hotswap/readme.md b/keyboards/gray_studio/think65/hotswap/readme.md new file mode 100644 index 0000000000..1dee91509a --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/readme.md @@ -0,0 +1,15 @@ +# Think6.5 Hotswap + +65% board with 6.5 degree angle ran by Airpotter and Oldcat. PCB Manufactured by DEMO Studio and Keyboard manufactured by Gray Studio. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Think6.5 Hotswap PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=100166.0) + +**Note:** The `LAYOUT_65_ansi_blocker` LAYOUT macro utilizes the same pins and switch matrix as the soldered (compatible) version. Any firmware made with this LAYOUT macro can be flashed on both the Solder (Compatible) version and the Hotswap version of the Think6.5. + +Make example for this keyboard (after setting up your build environment): + + make gray_studio/think65/hotswap: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). diff --git a/keyboards/gray_studio/think65/hotswap/rules.mk b/keyboards/gray_studio/think65/hotswap/rules.mk new file mode 100644 index 0000000000..2d789ff59a --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/rules.mk @@ -0,0 +1,40 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LINK_TIME_OPTIMIZATION_ENABLE = yes + +LAYOUTS = 65_ansi_blocker + +# generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/gray_studio/think65/solder/config.h b/keyboards/gray_studio/think65/solder/config.h new file mode 100644 index 0000000000..cc8892a116 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/config.h @@ -0,0 +1,73 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Gray Studio +#define PRODUCT THINK6.5 +#define DESCRIPTION 65% 6.5 degree custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + // 0 1 2 3 4 5 6 7 8 9 A B C D E F +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D1, D0, D2, D3, D5, D4, D6, D7, B4, B5, F0, F1, B6, F4, F5, F6 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 22 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/gray_studio/think65/solder/info.json b/keyboards/gray_studio/think65/solder/info.json new file mode 100644 index 0000000000..0be5042538 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/info.json @@ -0,0 +1,157 @@ +{ + "keyboard_name": "THINK6.5", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "key_count": 67, + "layout": [ + {"label":"K00 (B0,D1)", "x":0, "y":0}, + {"label":"K01 (B0,D0)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,F0)", "x":10, "y":0}, + {"label":"K0B (B0,F1)", "x":11, "y":0}, + {"label":"K0C (B0,B6)", "x":12, "y":0}, + {"label":"K0E (B0,F5)", "x":13, "y":0, "w":2}, + {"label":"K0F (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D1)", "x":0, "y":1, "w":1.5}, + {"label":"K12 (B1,D2)", "x":1.5, "y":1}, + {"label":"K13 (B1,D3)", "x":2.5, "y":1}, + {"label":"K14 (B1,D5)", "x":3.5, "y":1}, + {"label":"K15 (B1,D4)", "x":4.5, "y":1}, + {"label":"K16 (B1,D6)", "x":5.5, "y":1}, + {"label":"K17 (B1,D7)", "x":6.5, "y":1}, + {"label":"K18 (B1,B4)", "x":7.5, "y":1}, + {"label":"K19 (B1,B5)", "x":8.5, "y":1}, + {"label":"K1A (B1,F0)", "x":9.5, "y":1}, + {"label":"K1B (B1,F1)", "x":10.5, "y":1}, + {"label":"K1C (B1,B6)", "x":11.5, "y":1}, + {"label":"K1D (B1,F4)", "x":12.5, "y":1}, + {"label":"K1E (B1,F5)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D1)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,F0)", "x":9.75, "y":2}, + {"label":"K2B (B2,F1)", "x":10.75, "y":2}, + {"label":"K2C (B2,B6)", "x":11.75, "y":2}, + {"label":"K2D (B2,F4)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (B2,F6)", "x":15, "y":2}, + {"label":"K31 (B3,D0)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,F0)", "x":10.25, "y":3}, + {"label":"K3B (B3,F1)", "x":11.25, "y":3}, + {"label":"K3D (B3,F4)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E (B3,F5)", "x":14, "y":3}, + {"label":"K3F (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D0)", "x":1.25, "y":4, "w":1.25}, + {"label":"K43 (E6,D3)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (E6,F0)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (E6,F1)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D (E6,F4)", "x":13, "y":4}, + {"label":"K4E (E6,F5)", "x":14, "y":4}, + {"label":"K4F (E6,F6)", "x":15, "y":4} + ] + }, + + "LAYOUT_all": { + "key_count": 69, + "layout": [ + {"label":"K00 (B0,D1)", "x":0, "y":0}, + {"label":"K01 (B0,D0)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,F0)", "x":10, "y":0}, + {"label":"K0B (B0,F1)", "x":11, "y":0}, + {"label":"K0C (B0,B6)", "x":12, "y":0}, + {"label":"K0D (B0,F4)", "x":13, "y":0}, + {"label":"K0E (B0,F5)", "x":14, "y":0}, + {"label":"K0F (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D1)", "x":0, "y":1, "w":1.5}, + {"label":"K12 (B1,D2)", "x":1.5, "y":1}, + {"label":"K13 (B1,D3)", "x":2.5, "y":1}, + {"label":"K14 (B1,D5)", "x":3.5, "y":1}, + {"label":"K15 (B1,D4)", "x":4.5, "y":1}, + {"label":"K16 (B1,D6)", "x":5.5, "y":1}, + {"label":"K17 (B1,D7)", "x":6.5, "y":1}, + {"label":"K18 (B1,B4)", "x":7.5, "y":1}, + {"label":"K19 (B1,B5)", "x":8.5, "y":1}, + {"label":"K1A (B1,F0)", "x":9.5, "y":1}, + {"label":"K1B (B1,F1)", "x":10.5, "y":1}, + {"label":"K1C (B1,B6)", "x":11.5, "y":1}, + {"label":"K1D (B1,F4)", "x":12.5, "y":1}, + {"label":"K1E (B1,F5)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D1)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,F0)", "x":9.75, "y":2}, + {"label":"K2B (B2,F1)", "x":10.75, "y":2}, + {"label":"K2C (B2,B6)", "x":11.75, "y":2}, + {"label":"K2D (B2,F4)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (B2,F6)", "x":15, "y":2}, + {"label":"K30 (B3,D1)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,D0)", "x":1.25, "y":3}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,F0)", "x":10.25, "y":3}, + {"label":"K3B (B3,F1)", "x":11.25, "y":3}, + {"label":"K3D (B3,F4)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E (B3,F5)", "x":14, "y":3}, + {"label":"K3F (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D0)", "x":1.25, "y":4, "w":1.25}, + {"label":"K43 (E6,D3)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (E6,F0)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (E6,F1)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D (E6,F4)", "x":13, "y":4}, + {"label":"K4E (E6,F5)", "x":14, "y":4}, + {"label":"K4F (E6,F6)", "x":15, "y":4} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} \ No newline at end of file diff --git a/keyboards/gray_studio/think65/solder/keymaps/default/config.h b/keyboards/gray_studio/think65/solder/keymaps/default/config.h new file mode 100644 index 0000000000..26c6d6ade1 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/gray_studio/think65/solder/keymaps/default/keymap.c b/keyboards/gray_studio/think65/solder/keymaps/default/keymap.c new file mode 100644 index 0000000000..187f68c5c0 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( + 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_HOME, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/gray_studio/think65/solder/keymaps/default/readme.md b/keyboards/gray_studio/think65/solder/keymaps/default/readme.md new file mode 100644 index 0000000000..438e10e291 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for think65 diff --git a/keyboards/gray_studio/think65/solder/readme.md b/keyboards/gray_studio/think65/solder/readme.md new file mode 100644 index 0000000000..e8636bf8ae --- /dev/null +++ b/keyboards/gray_studio/think65/solder/readme.md @@ -0,0 +1,17 @@ +# Think6.5 Solder (Compatible) + +65% board with 6.5 degree angle ran by Airpotter and Oldcat. PCB Manufactured by DEMO Studio and Keyboard manufactured by Gray Studio. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Think6.5 Compatible PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=100166.0) + +**Note:** The `LAYOUT_65_ansi_blocker` LAYOUT macro utilizes the same pins and switch matrix as the hotswap version. Any firmware made with this LAYOUT macro can be flashed on both the Solder (Compatible) version and the Hotswap version of the Think6.5. + +**Indicator LEDs:** The solder PCB ONLY supports Caps Lock LEDs unlike the Hotswap version that supports Num Lock, Caps Lock, and Scroll Lock. + +Make example for this keyboard (after setting up your build environment): + + make gray_studio/think65/solder: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). diff --git a/keyboards/gray_studio/think65/solder/rules.mk b/keyboards/gray_studio/think65/solder/rules.mk new file mode 100644 index 0000000000..2d789ff59a --- /dev/null +++ b/keyboards/gray_studio/think65/solder/rules.mk @@ -0,0 +1,40 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LINK_TIME_OPTIMIZATION_ENABLE = yes + +LAYOUTS = 65_ansi_blocker + +# generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/gray_studio/think65/solder/solder.c b/keyboards/gray_studio/think65/solder/solder.c new file mode 100644 index 0000000000..4f40fb4a92 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/solder.c @@ -0,0 +1,57 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "solder.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(C7); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } + + led_set_user(usb_led); +} + diff --git a/keyboards/gray_studio/think65/solder/solder.h b/keyboards/gray_studio/think65/solder/solder.h new file mode 100644 index 0000000000..b77cc578b1 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/solder.h @@ -0,0 +1,49 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} + +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/grid600/press/config.h b/keyboards/grid600/press/config.h new file mode 100644 index 0000000000..7c93457005 --- /dev/null +++ b/keyboards/grid600/press/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2019 mechmerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x7539 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Grid +#define PRODUCT PRESS +#define DESCRIPTION Top module for Grid 600 + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0 } +#define MATRIX_COL_PINS { F1, F4, F5, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define RGB_DI_PIN B6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 4 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + #define RGBLIGHT_ANIMATIONS +/*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/grid600/press/info.json b/keyboards/grid600/press/info.json new file mode 100644 index 0000000000..131b094af5 --- /dev/null +++ b/keyboards/grid600/press/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Grid 600 Type 05 PRESS Cover Module", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}] + } + } +} \ No newline at end of file diff --git a/keyboards/grid600/press/keymaps/default/config.h b/keyboards/grid600/press/keymaps/default/config.h new file mode 100644 index 0000000000..60dd02a9d0 --- /dev/null +++ b/keyboards/grid600/press/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/grid600/press/keymaps/default/keymap.c b/keyboards/grid600/press/keymaps/default/keymap.c new file mode 100644 index 0000000000..f253c69215 --- /dev/null +++ b/keyboards/grid600/press/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_G, KC_R, KC_I, KC_D + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/grid600/press/keymaps/default/readme.md b/keyboards/grid600/press/keymaps/default/readme.md new file mode 100644 index 0000000000..b29ee67868 --- /dev/null +++ b/keyboards/grid600/press/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for grid diff --git a/keyboards/grid600/press/press.c b/keyboards/grid600/press/press.c new file mode 100644 index 0000000000..33935deca4 --- /dev/null +++ b/keyboards/grid600/press/press.c @@ -0,0 +1,16 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "press.h" \ No newline at end of file diff --git a/keyboards/grid600/press/press.h b/keyboards/grid600/press/press.h new file mode 100644 index 0000000000..ca9eac9d19 --- /dev/null +++ b/keyboards/grid600/press/press.h @@ -0,0 +1,32 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03 \ +) { \ + { K00, K01, K02, K03 } \ +} diff --git a/keyboards/grid600/press/readme.md b/keyboards/grid600/press/readme.md new file mode 100644 index 0000000000..4113b372e9 --- /dev/null +++ b/keyboards/grid600/press/readme.md @@ -0,0 +1,18 @@ +# Grid 600 Type 05 "PRESS" Cover Module + +Cover module for Grid 600 Keyboard with 4 keys. + +Code for the module was originally located at [gridishere's QMK fork](https://github.com/gridishere/qmk_firmware/tree/master/keyboards/grid/gridmod5). + +Please keep in mind that this is actually a separate keyboard from the one installed in the Grid 600. +Functionality such as layer changes and light modifications triggered on one PCB will not affect the other. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Grid 600 Type 05 "PRESS" cover module. +Hardware Availability: [zFrontier](https://en.zfrontier.com/products/grid600s) + +Make example for this keyboard (after setting up your build environment): + + make grid600/press: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). diff --git a/keyboards/grid600/press/rules.mk b/keyboards/grid600/press/rules.mk new file mode 100644 index 0000000000..fb575b3abc --- /dev/null +++ b/keyboards/grid600/press/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/grid600/readme.md b/keyboards/grid600/readme.md new file mode 100644 index 0000000000..f7fa6a085b --- /dev/null +++ b/keyboards/grid600/readme.md @@ -0,0 +1,7 @@ +# Grid 600 Cover Modules + +The Grid 600 is a tray mount 60% case supporting most standard 60% PCBs. + +A unique feature of the Grid 600 is that it has five different cover modules that not only include USB C pass through, but also have functions such as RGB or additional macro keys. + +This is a collection of some of the programmable modules available for this enclosure. \ No newline at end of file diff --git a/keyboards/gskt00/rules.mk b/keyboards/gskt00/rules.mk index 338384e3e8..2acbeaa901 100755 --- a/keyboards/gskt00/rules.mk +++ b/keyboards/gskt00/rules.mk @@ -1,41 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/hadron/config.h b/keyboards/hadron/config.h index 61e7647483..3fc76b0b3b 100644 --- a/keyboards/hadron/config.h +++ b/keyboards/hadron/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0xFB30 +#define PRODUCT_ID 0x5F37 #define MANUFACTURER ishtob #define PRODUCT Hadron Keyboard #define DESCRIPTION A low profile ortholinear keyboard diff --git a/keyboards/hadron/rules.mk b/keyboards/hadron/rules.mk index bd1633f619..8498675750 100644 --- a/keyboards/hadron/rules.mk +++ b/keyboards/hadron/rules.mk @@ -1,2 +1 @@ - DEFAULT_FOLDER = hadron/ver2 diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c index 9d96abd8db..3b3dd58e2c 100644 --- a/keyboards/hadron/ver2/keymaps/default/keymap.c +++ b/keyboards/hadron/ver2/keymaps/default/keymap.c @@ -5,7 +5,6 @@ #ifdef SSD1306OLED #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -37,10 +36,7 @@ enum preonic_keycodes { RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, -}; - -enum macro_keycodes { - KC_DEMOMACRO, + DEMOMACRO }; // Custom macros @@ -51,7 +47,6 @@ enum macro_keycodes { // Requires KC_TRNS/_______ for the trigger key in the destination layer #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise -#define DEMOMACRO M(KC_DEMOMACRO) // Sample for macros const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -302,32 +297,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case DEMOMACRO: + if (record->event.pressed) { + SEND_STRING("hello world"); + } + return false; + break; } return true; } - - -/* - * Macro definition - */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - - switch (id) { - case KC_DEMOMACRO: - if (record->event.pressed){ - return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } - } - - return MACRO_NONE; -} - - //Functions for ver2 #ifdef KEYBOARD_hadron_ver2 #include "LUFA/Drivers/Peripheral/TWI.h" diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk b/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk deleted file mode 100644 index 79be3bb87e..0000000000 --- a/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk +++ /dev/null @@ -1,23 +0,0 @@ - - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = yes # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk index c47bdb1af9..3d48d88e7c 100644 --- a/keyboards/hadron/ver2/rules.mk +++ b/keyboards/hadron/ver2/rules.mk @@ -1,49 +1,14 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options @@ -73,4 +38,4 @@ EXTRAFLAGS += -flto SRC = i2c.c \ - ssd1306.c \ No newline at end of file + ssd1306.c diff --git a/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.c b/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100644 index 4331155df4..0000000000 --- a/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -#if HAL_USE_PAL || defined(__DOXYGEN__) -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -const PALConfig pal_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} -#endif -}; -#endif - -void enter_bootloader_mode_if_requested(void); - -/** - * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. - */ -void __early_init(void) { - enter_bootloader_mode_if_requested(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) { -} diff --git a/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.h b/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100644 index ec26557f3a..0000000000 --- a/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null @@ -1,1187 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for Clueboard 60% Keyboard - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "Planck PCB" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_USB_DM 11U -#define GPIOA_USB_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#define LINE_USB_DM PAL_LINE(GPIOA, 11U) -#define LINE_USB_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) - -#define LINE_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - PIN_MODE_ALTERNATE(GPIOA_PIN1) | \ - PIN_MODE_INPUT(GPIOA_PIN2) | \ - PIN_MODE_INPUT(GPIOA_PIN3) | \ - PIN_MODE_INPUT(GPIOA_PIN4) | \ - PIN_MODE_INPUT(GPIOA_PIN5) | \ - PIN_MODE_INPUT(GPIOA_PIN6) | \ - PIN_MODE_INPUT(GPIOA_PIN7) | \ - PIN_MODE_INPUT(GPIOA_PIN8) | \ - PIN_MODE_INPUT(GPIOA_PIN9) | \ - PIN_MODE_INPUT(GPIOA_PIN10) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ - PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ - PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ - PIN_OSPEED_HIGH(GPIOA_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ - PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ - PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ - PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_PIN4) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_USB_DM) | \ - PIN_ODR_HIGH(GPIOA_USB_DP) | \ - PIN_ODR_HIGH(GPIOA_SWDIO) | \ - PIN_ODR_HIGH(GPIOA_SWCLK) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \ - PIN_AFIO_AF(GPIOA_PIN1, 1) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - PIN_MODE_OUTPUT(GPIOB_PIN7) | \ - PIN_MODE_INPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_HIGH(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_PIN3) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_LOW(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - PIN_MODE_INPUT(GPIOC_PIN1) | \ - PIN_MODE_INPUT(GPIOC_PIN2) | \ - PIN_MODE_INPUT(GPIOC_PIN3) | \ - PIN_MODE_INPUT(GPIOC_PIN4) | \ - PIN_MODE_INPUT(GPIOC_PIN5) | \ - PIN_MODE_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - PIN4 (input pullup). - * PD5 - PIN5 (input pullup). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD11 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - PIN12 (input pullup). - * PD13 - PIN13 (input pullup). - * PD14 - PIN14 (input pullup). - * PD15 - PIN15 (input pullup). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ - PIN_MODE_INPUT(GPIOD_PIN1) | \ - PIN_MODE_INPUT(GPIOD_PIN2) | \ - PIN_MODE_INPUT(GPIOD_PIN3) | \ - PIN_MODE_INPUT(GPIOD_PIN4) | \ - PIN_MODE_INPUT(GPIOD_PIN5) | \ - PIN_MODE_INPUT(GPIOD_PIN6) | \ - PIN_MODE_INPUT(GPIOD_PIN7) | \ - PIN_MODE_INPUT(GPIOD_PIN8) | \ - PIN_MODE_INPUT(GPIOD_PIN9) | \ - PIN_MODE_INPUT(GPIOD_PIN10) | \ - PIN_MODE_INPUT(GPIOD_PIN11) | \ - PIN_MODE_INPUT(GPIOD_PIN12) | \ - PIN_MODE_INPUT(GPIOD_PIN13) | \ - PIN_MODE_INPUT(GPIOD_PIN14) | \ - PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_PIN4) | \ - PIN_ODR_HIGH(GPIOD_PIN5) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_HIGH(GPIOD_PIN12) | \ - PIN_ODR_HIGH(GPIOD_PIN13) | \ - PIN_ODR_HIGH(GPIOD_PIN14) | \ - PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) |\ - PIN_MODE_OUTPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) |\ - PIN_MODE_INPUT(GPIOE_PIN5) |\ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_OUTPUT(GPIOE_PIN8) | \ - PIN_MODE_OUTPUT(GPIOE_PIN9) | \ - PIN_MODE_OUTPUT(GPIOE_PIN10) | \ - PIN_MODE_OUTPUT(GPIOE_PIN11) | \ - PIN_MODE_OUTPUT(GPIOE_PIN12) | \ - PIN_MODE_OUTPUT(GPIOE_PIN13) | \ - PIN_MODE_OUTPUT(GPIOE_PIN14) | \ - PIN_MODE_OUTPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\ - PIN_OSPEED_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN4) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN5) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_LOW(GPIOE_PIN8) | \ - PIN_ODR_LOW(GPIOE_PIN9) | \ - PIN_ODR_LOW(GPIOE_PIN10) | \ - PIN_ODR_LOW(GPIOE_PIN11) | \ - PIN_ODR_LOW(GPIOE_PIN12) | \ - PIN_ODR_LOW(GPIOE_PIN13) | \ - PIN_ODR_LOW(GPIOE_PIN14) | \ - PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0) |\ - PIN_AFIO_AF(GPIOE_PIN3, 0) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0) |\ - PIN_AFIO_AF(GPIOE_PIN5, 0) |\ - PIN_AFIO_AF(GPIOE_PIN6, 0) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (input floating). - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \ - PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ - PIN_MODE_INPUT(GPIOF_PIN2) | \ - PIN_MODE_INPUT(GPIOF_PIN3) | \ - PIN_MODE_INPUT(GPIOF_PIN4) | \ - PIN_MODE_INPUT(GPIOF_PIN5) | \ - PIN_MODE_INPUT(GPIOF_PIN6) | \ - PIN_MODE_INPUT(GPIOF_PIN7) | \ - PIN_MODE_INPUT(GPIOF_PIN8) | \ - PIN_MODE_INPUT(GPIOF_PIN9) | \ - PIN_MODE_INPUT(GPIOF_PIN10) | \ - PIN_MODE_INPUT(GPIOF_PIN11) | \ - PIN_MODE_INPUT(GPIOF_PIN12) | \ - PIN_MODE_INPUT(GPIOF_PIN13) | \ - PIN_MODE_INPUT(GPIOF_PIN14) | \ - PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \ - PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \ - PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \ - PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \ - PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \ - PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ - PIN_MODE_INPUT(GPIOG_PIN1) | \ - PIN_MODE_INPUT(GPIOG_PIN2) | \ - PIN_MODE_INPUT(GPIOG_PIN3) | \ - PIN_MODE_INPUT(GPIOG_PIN4) | \ - PIN_MODE_INPUT(GPIOG_PIN5) | \ - PIN_MODE_INPUT(GPIOG_PIN6) | \ - PIN_MODE_INPUT(GPIOG_PIN7) | \ - PIN_MODE_INPUT(GPIOG_PIN8) | \ - PIN_MODE_INPUT(GPIOG_PIN9) | \ - PIN_MODE_INPUT(GPIOG_PIN10) | \ - PIN_MODE_INPUT(GPIOG_PIN11) | \ - PIN_MODE_INPUT(GPIOG_PIN12) | \ - PIN_MODE_INPUT(GPIOG_PIN13) | \ - PIN_MODE_INPUT(GPIOG_PIN14) | \ - PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ - PIN_MODE_INPUT(GPIOH_PIN1) | \ - PIN_MODE_INPUT(GPIOH_PIN2) | \ - PIN_MODE_INPUT(GPIOH_PIN3) | \ - PIN_MODE_INPUT(GPIOH_PIN4) | \ - PIN_MODE_INPUT(GPIOH_PIN5) | \ - PIN_MODE_INPUT(GPIOH_PIN6) | \ - PIN_MODE_INPUT(GPIOH_PIN7) | \ - PIN_MODE_INPUT(GPIOH_PIN8) | \ - PIN_MODE_INPUT(GPIOH_PIN9) | \ - PIN_MODE_INPUT(GPIOH_PIN10) | \ - PIN_MODE_INPUT(GPIOH_PIN11) | \ - PIN_MODE_INPUT(GPIOH_PIN12) | \ - PIN_MODE_INPUT(GPIOH_PIN13) | \ - PIN_MODE_INPUT(GPIOH_PIN14) | \ - PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ - PIN_ODR_HIGH(GPIOH_PIN1) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ - PIN_AFIO_AF(GPIOH_PIN1, 0) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0)) - - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) -/* - * USB bus de-activation macro, required by the USB driver. - */ -// #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) -// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a3..0000000000 --- a/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/hadron/ver3/bootloader_defs.h b/keyboards/hadron/ver3/bootloader_defs.h deleted file mode 100644 index 3b0e9d20a6..0000000000 --- a/keyboards/hadron/ver3/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here: - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 5e44b27ae6..2912486f44 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -44,7 +44,6 @@ #define MATRIX_COL_PINS { B8, B2, B10, A0, A1, A2, B0, A3, B1, A6, A7, B12, C13, B11, B9 } #define UNUSED_PINS -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B13 } #define ENCODERS_PAD_B { B14 } diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c index 9afddba26a..749c385c85 100644 --- a/keyboards/hadron/ver3/keymaps/default/keymap.c +++ b/keyboards/hadron/ver3/keymaps/default/keymap.c @@ -27,10 +27,7 @@ enum preonic_keycodes { RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, -}; - -enum macro_keycodes { - KC_DEMOMACRO, + DEMOMACRO }; // Custom macros @@ -41,8 +38,6 @@ enum macro_keycodes { // Requires KC_TRNS/_______ for the trigger key in the destination layer #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise -#define DEMOMACRO M(KC_DEMOMACRO) // Sample for macros - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -248,6 +243,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case DEMOMACRO: + if (record->event.pressed) { + SEND_STRING("hello world"); + } } return true; } @@ -262,27 +261,6 @@ bool music_mask_user(uint16_t keycode) { } } - -/* - * Macro definition - */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - - switch (id) { - case KC_DEMOMACRO: - if (record->event.pressed){ - return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } - } - - return MACRO_NONE; -} - - void matrix_init_user(void) { } diff --git a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c index 51062acc22..0998ad93b7 100644 --- a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c +++ b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c @@ -5,7 +5,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,------+------+------+------+------+------------------------------------------------. - * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | DEL | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | PSCR | * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. * | Tab | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------------------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_wrapper( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, \ LT_FN(KC_TAB), _________________QWERTY_L1_________________, KC_P7, KC_P8, KC_P9, _________________QWERTY_R1_________________, KC_BSPC, \ KC_CAPS, _________________QWERTY_L2_________________, KC_P4, KC_P5, KC_P6, _________________QWERTY_R2_________________, CTL_ENT, \ KC_LSFT, _________________QWERTY_L3_________________, KC_P1, KC_P2, KC_P3, _________________QWERTY_R3_________________, LT_RAI(KC_MINS), \ @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak * ,------+------+------+------+------+------------------------------------------------. - * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | 0 | - | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | PSCR | * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. * | Tab | Q | W | F | P | G | 7 | 8 | 9 | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------------------------------------------------------------------------------------------' */ [_COLEMAK] = LAYOUT_wrapper( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, \ LT_FN(KC_TAB), _________________COLEMAK_L1________________, KC_P7, KC_P8, KC_P9, _________________COLEMAK_R1________________, KC_BSPC, \ KC_LCTRL, _________________COLEMAK_L2________________, KC_P4, KC_P5, KC_P6, _________________COLEMAK_R2________________, CTL_ENT, \ KC_LSFT, _________________COLEMAK_L3________________, KC_P1, KC_P2, KC_P3, _________________COLEMAK_R3________________, LT_RAI(KC_MINS), \ @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak * ,------+------+------+------+------+------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | PSCR | * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. * | Tab | " | , | . | P | Y | 7 | 8 | 9 | F | G | C | R | L | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------------------------------------------------------------------------------------------' */ [_DVORAK] = LAYOUT_wrapper( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, \ LT_FN(KC_TAB), _________________DVORAK_L1_________________, KC_P7, KC_P8, KC_P9, _________________DVORAK_R1_________________, KC_BSPC, \ KC_LCTL, _________________DVORAK_L2_________________, KC_P4, KC_P5, KC_P6, _________________DVORAK_R2_________________, CTL_ENT, \ KC_LSFT, _________________DVORAK_L3_________________, KC_P1, KC_P2, KC_P3, _________________DVORAK_R3_________________, LT_RAI(KC_MINS), \ diff --git a/keyboards/hadron/ver3/keymaps/xulkal/config.h b/keyboards/hadron/ver3/keymaps/xulkal/config.h new file mode 100644 index 0000000000..6f70f09bee --- /dev/null +++ b/keyboards/hadron/ver3/keymaps/xulkal/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/hadron/ver3/keymaps/xulkal/keymap.c b/keyboards/hadron/ver3/keymaps/xulkal/keymap.c new file mode 100644 index 0000000000..0b7fd6f5e5 --- /dev/null +++ b/keyboards/hadron/ver3/keymaps/xulkal/keymap.c @@ -0,0 +1,73 @@ +#include QMK_KEYBOARD_H +#include "xulkal.h" + +#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty Layout + * ,-----------------------------------------------------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------|------+------+------+------+------+------+--------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | 7 | 8 | 9 | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * |FN(CAPS)| A | S | D | F | G | H | J | K | L | ; | Enter| 4 | 5 | 6 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Sft[ | Z | X | C | V | B | N | M | , | . | / | Sft] | 1 | 2 | 3 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctl- | Win | LOWER| RAISE| Alt | Space| Space| Left | Up | Down | Right| Ctl= | 0 | . | = | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------' + */ + [_QWERTY] = EXPAND_LAYOUT( \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,\ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_P7, KC_P8, KC_P9, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_P4, KC_P5, KC_P6, \ + _________________QWERTY_L4_________________, _________________QWERTY_R4_________________, KC_P1, KC_P2, KC_P3, \ + _________________QWERTY_L5_________________, _________________QWERTY_R5_________________, KC_P0, KC_DOT, KC_EQL \ + ), + +#ifndef GAMELAYER_DISABLE + [_GAME] = EXPAND_LAYOUT( \ + ___________________GAME_L1_________________, ___________________GAME_R1_________________, \ + ___________________GAME_L2_________________, ___________________GAME_R2_________________, _______, _______, _______, \ + ___________________GAME_L3_________________, ___________________GAME_R3_________________, _______, _______, _______, \ + ___________________GAME_L4_________________, ___________________GAME_R4_________________, _______, _______, _______, \ + ___________________GAME_L5_________________, ___________________GAME_R5_________________, _______, _______, _______ \ + ), +#endif + + [_LOWER] = EXPAND_LAYOUT( \ + __________________LOWER_L1_________________, __________________LOWER_R1_________________, \ + __________________LOWER_L2_________________, __________________LOWER_R2_________________, _______, _______, _______, \ + __________________LOWER_L3_________________, __________________LOWER_R3_________________, _______, _______, _______, \ + __________________LOWER_L4_________________, __________________LOWER_R4_________________, _______, _______, _______, \ + __________________LOWER_L5_________________, __________________LOWER_R5_________________, _______, _______, _______ \ + ), + + [_RAISE] = EXPAND_LAYOUT( \ + __________________RAISE_L1_________________, __________________RAISE_R1_________________, \ + __________________RAISE_L2_________________, __________________RAISE_R2_________________, _______, _______, _______, \ + __________________RAISE_L3_________________, __________________RAISE_R3_________________, _______, _______, _______, \ + __________________RAISE_L4_________________, __________________RAISE_R4_________________, _______, _______, _______, \ + __________________RAISE_L5_________________, __________________RAISE_R5_________________, _______, _______, _______ \ + ), + +#ifdef TRILAYER_ENABLED + [_ADJUST] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______, _______, _______, \ + _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, _______, _______, _______, \ + _________________ADJUST_L4_________________, _________________ADJUST_R4_________________, _______, _______, _______, \ + _________________ADJUST_L5_________________, _________________ADJUST_R5_________________, _______, _______, _______ \ + ), +#endif +}; + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/hadron/ver3/keymaps/xulkal/rules.mk b/keyboards/hadron/ver3/keymaps/xulkal/rules.mk new file mode 100644 index 0000000000..0305226b32 --- /dev/null +++ b/keyboards/hadron/ver3/keymaps/xulkal/rules.mk @@ -0,0 +1,4 @@ +# Overridden build options + +COMMAND_ENABLE = no +ENCODER_ENABLER = no diff --git a/keyboards/hadron/ver3/rules.mk b/keyboards/hadron/ver3/rules.mk index 599fb53fae..8ce0d77b78 100644 --- a/keyboards/hadron/ver3/rules.mk +++ b/keyboards/hadron/ver3/rules.mk @@ -1,6 +1,4 @@ -# projecct specific files - -# Cortex version +# MCU name MCU = STM32F303 # Build Options @@ -17,7 +15,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = no # Custom matrix file AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no #WS2812 once arm_rgb is implemented HAPTIC_ENABLE += DRV2605L QWIIC_ENABLE += MICRO_OLED diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h index 32930d7781..cf3460b618 100644 --- a/keyboards/halberd/config.h +++ b/keyboards/halberd/config.h @@ -111,13 +111,6 @@ along with this program. If not, see . * */ -/* key combination for magic key command */ -/* -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) -*/ - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk index ed4e6bde32..35c693379b 100644 --- a/keyboards/halberd/rules.mk +++ b/keyboards/halberd/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/108key_trackpoint/rules.mk b/keyboards/handwired/108key_trackpoint/rules.mk index 84ec52eee9..2a8ed6af15 100644 --- a/keyboards/handwired/108key_trackpoint/rules.mk +++ b/keyboards/handwired/108key_trackpoint/rules.mk @@ -1,43 +1,5 @@ # MCU name MCU = at90usb1286 -#MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -45,19 +7,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/2x5keypad/2x5keypad.c b/keyboards/handwired/2x5keypad/2x5keypad.c new file mode 100644 index 0000000000..873c579a17 --- /dev/null +++ b/keyboards/handwired/2x5keypad/2x5keypad.c @@ -0,0 +1,25 @@ +#include "2x5keypad.h" + + +void matrix_init_kb(void) +{ + matrix_init_user(); + + setPinOutput(RED_LED); + setPinOutput(BLUE_LED); + setPinOutput(GREEN_LED); +} + + + +void turn_off_leds(void) +{ + writePinLow(RED_LED); + writePinLow(BLUE_LED); + writePinLow(GREEN_LED); +} + +void turn_on_led(pin_t pin) +{ + writePinHigh(pin); +} diff --git a/keyboards/handwired/2x5keypad/2x5keypad.h b/keyboards/handwired/2x5keypad/2x5keypad.h new file mode 100644 index 0000000000..6284e83b72 --- /dev/null +++ b/keyboards/handwired/2x5keypad/2x5keypad.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +#define RED_LED D0 +#define BLUE_LED B5 +#define GREEN_LED B6 + + +#define LAYOUT( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14 \ +) { \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 } \ +} + + + +void turn_off_leds(void); +void turn_on_led(pin_t pin); diff --git a/keyboards/handwired/2x5keypad/config.h b/keyboards/handwired/2x5keypad/config.h new file mode 100644 index 0000000000..35a0fda8d1 --- /dev/null +++ b/keyboards/handwired/2x5keypad/config.h @@ -0,0 +1,56 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x2020 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jonathan Cameron +#define PRODUCT 2x5keypad +#define DESCRIPTION 2x5 Keypad + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 5 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, B2 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Tap dancing params */ +#define TAPPING_TERM 250 + +/* key combination for command */ +/* DISABLED +#define IS_COMMAND() ( \ + get_mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) +*/ + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c new file mode 100644 index 0000000000..91a0e28f6a --- /dev/null +++ b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c @@ -0,0 +1,164 @@ +#include QMK_KEYBOARD_H + +#define WIN_TAB LGUI(KC_TAB) +#define WIN_LOCK LGUI(KC_L) + +enum layers { + NORMAL_LAYER = 0, + MEDIA_LAYER, + TBD_LAYER2, + FRENCH_LAYER +}; + + +/* Enum for the tap dancing keys */ +enum tap_codes { + A_Q, E_Q, E_U, E_E, + A_Y, I_I, O_C, U_U +}; + +#define FR_A_GRAVE "00E0" +#define FR_A_HAT "00E2" + +#define FR_C_CIRCUM "00E7" + +#define FR_E_AIGU "00E9" +#define FR_E_GRAVE "00E8" +#define FR_E_HAT "00EA" +#define FR_E_UMLAUT "00EB" + +#define FR_I_HAT "00EE" +#define FR_I_UMLAUT "00EF" + +#define FR_O_HAT "00F4" + +#define FR_U_GRAVE "00F9" +#define FR_U_HAT "00FB" +#define FR_U_UMLAUT "00FC" + +#define FR_Y_UMLAUT "00FF" + +#define FR_L_QUOTE "00AB" +#define FR_R_QUOTE "00BB" + +void send_french_unicode_char(uint8_t count, char *once, char *twice) +{ + if (count <= 1) + send_unicode_hex_string(once); + else + send_unicode_hex_string(twice); +} + +void dance_a_q(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_A_GRAVE, FR_L_QUOTE); +} + +void dance_e_q(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_AIGU, FR_R_QUOTE); +} + +void dance_e_u(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_GRAVE, FR_U_GRAVE); +} + +void dance_e_e(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_HAT, FR_E_UMLAUT); +} + +void dance_a_y(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_A_HAT, FR_Y_UMLAUT); +} + +void dance_i_i(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_I_HAT, FR_I_UMLAUT); +} + +void dance_o_c(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_O_HAT, FR_C_CIRCUM); +} + +void dance_u_u(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_U_HAT, FR_U_UMLAUT); +} + +/* Define the tap dance actions for the french characters */ +qk_tap_dance_action_t tap_dance_actions[] = { + [A_Q] = ACTION_TAP_DANCE_FN(dance_a_q), + [E_Q] = ACTION_TAP_DANCE_FN(dance_e_q), + [E_U] = ACTION_TAP_DANCE_FN(dance_e_u), + [E_E] = ACTION_TAP_DANCE_FN(dance_e_e), + + [A_Y] = ACTION_TAP_DANCE_FN(dance_a_y), + [I_I] = ACTION_TAP_DANCE_FN(dance_i_i), + [O_C] = ACTION_TAP_DANCE_FN(dance_o_c), + [U_U] = ACTION_TAP_DANCE_FN(dance_u_u) +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [NORMAL_LAYER] = LAYOUT(TO(1), WIN_TAB, KC_HOME, KC_UP, KC_END, + WIN_LOCK, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT), + + [MEDIA_LAYER] = LAYOUT(TO(2), KC_CALC, KC_MPRV, KC_MNXT, KC_VOLU, + KC_TRNS, KC_TRNS, KC_MSTP, KC_MPLY, KC_VOLD), + + [TBD_LAYER2] = LAYOUT(TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [FRENCH_LAYER] = LAYOUT(TO(0), TD(A_Q), TD(E_Q), TD(E_U), TD(E_E), + KC_TRNS, TD(A_Y), TD(I_I), TD(O_C), TD(U_U)) +}; + + +/* DISABLED +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} +*/ + + +void matrix_init_user(void) +{ + set_unicode_input_mode(UC_WINC); /* See https://jayliu50.github.io/qmk-cheatsheet/ */ +} + + +layer_state_t layer_state_set_user(layer_state_t state) +{ + turn_off_leds(); + + switch (biton32(state)) + { + case NORMAL_LAYER: + break; + + case MEDIA_LAYER: + turn_on_led(RED_LED); + break; + + case TBD_LAYER2: + turn_on_led(BLUE_LED); + break; + + case FRENCH_LAYER: + turn_on_led(GREEN_LED); + break; + } + return state; +} diff --git a/keyboards/handwired/2x5keypad/readme.md b/keyboards/handwired/2x5keypad/readme.md new file mode 100644 index 0000000000..d87a2e0178 --- /dev/null +++ b/keyboards/handwired/2x5keypad/readme.md @@ -0,0 +1,26 @@ +# 2x5keypad + +![2x5keypad](http://jmcameron.net/2x5keypad-small.jpg) + +This Keypad has 2 rows x 5 columns of keys. It has the top/default layer that +has a few handy navigation keys as well as one dedicated key to cycle through +the layers. The second layer has some media keys. The third and fourth layers +are currently undefined (although I may use them for inserting accented French +characters). The keypad also includes three LEDs that show which layer is +active (no lit LEDs means the default layer). + +Keyboard Maintainer: [Jonathan Cameron](https://github.com/jmcameron) + +Hardware: + * Key switch holes cut in blank piece of copper-clad project board + * Uses Kailh Box White switches with relegendable keycaps + * Chassis is three layers of wood + * Handwired + * Uses a Pro Micro + * Includes a reset switch accessible by a hole on the bottom + +Make example for this keyboard (after setting up your build environment): + + make handwired/2x5keyapd: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). diff --git a/keyboards/handwired/2x5keypad/rules.mk b/keyboards/handwired/2x5keypad/rules.mk new file mode 100644 index 0000000000..e62a0f24a8 --- /dev/null +++ b/keyboards/handwired/2x5keypad/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + + +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE= no # Console for debug +EXTRAKEY_ENABLE = yes # Audio control and System control +MOUSEKEY_ENABLE = yes # Mouse keys +NKRO_ENABLE = yes # USB Nkey Rollover - + +RGBLIGHT_ENABLE = no +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/412_64/keymaps/default/keymap.c b/keyboards/handwired/412_64/keymaps/default/keymap.c index 405c563056..27966eb9a5 100644 --- a/keyboards/handwired/412_64/keymaps/default/keymap.c +++ b/keyboards/handwired/412_64/keymaps/default/keymap.c @@ -71,17 +71,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - (void)event; - - switch (id) { - - } - return MACRO_NONE; -} - - void matrix_init_user(void) { } diff --git a/keyboards/handwired/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk index 9e74da5d98..c7dfa8705b 100644 --- a/keyboards/handwired/412_64/rules.mk +++ b/keyboards/handwired/412_64/rules.mk @@ -1,53 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/handwired/42/42.h b/keyboards/handwired/42/42.h new file mode 100644 index 0000000000..5be29bf252 --- /dev/null +++ b/keyboards/handwired/42/42.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Angelo Gazzola (nglgzz) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K33, K34, K35, K36, K37, K38 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { ___, ___, ___, K33, K34, K35, K36, K37, K38, ___, ___, ___ } \ +} diff --git a/keyboards/handwired/42/README.md b/keyboards/handwired/42/README.md new file mode 100644 index 0000000000..20fb67aa7e --- /dev/null +++ b/keyboards/handwired/42/README.md @@ -0,0 +1,15 @@ +# 42 + +42-keys ergonomic keyboard running on Adafruit Feather BLE. + +![42](https://github.com/nglgzz/42/raw/master/42.jpg) + +Keyboard Maintainer: [Angelo Gazzola (nglgzz)](https://github.com/nglgzz) +Hardware Supported: 42 (rev2, rev3), Feather 32u4 BLE +Hardware Availability: [GitHub](https://github.com/nglgzz/42/) + +Make example for this keyboard (after setting up your build environment): + + make handwired/42: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). diff --git a/keyboards/handwired/42/config.h b/keyboards/handwired/42/config.h new file mode 100644 index 0000000000..3f5060989b --- /dev/null +++ b/keyboards/handwired/42/config.h @@ -0,0 +1,42 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0003 +#define MANUFACTURER nglgzz +#define PRODUCT 42 +#define DESCRIPTION BT + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_COL_PINS { F5, F6, F7, F0, F1, F4, B6, B5, D7, C7, D6, B7 } +#define MATRIX_ROW_PINS { D2, D3, D0, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define TAPPING_TERM 100 diff --git a/keyboards/handwired/42/keymaps/default/keymap.c b/keyboards/handwired/42/keymaps/default/keymap.c new file mode 100644 index 0000000000..099e1fa012 --- /dev/null +++ b/keyboards/handwired/42/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +#include QMK_KEYBOARD_H + +// MOD_KC +#define CTL_ESC MT(MOD_LCTL, KC_ESCAPE) +#define CTL_ENT MT(MOD_LCTL, KC_ENTER) +#define ALT_Z MT(MOD_LALT, KC_Z) +#define ALT_SLS MT(MOD_LALT, KC_SLASH) +#define SU_QUOT MT(MOD_LGUI, KC_QUOTE) +#define SU_BSLS MT(MOD_LGUI, KC_BSLS) +#define SFT_DEL MT(MOD_LSFT, KC_DELETE) + +// LAYER_KC +#define L3_SPC LT(3, KC_SPC) +#define L2_SPC LT(2, KC_SPC) +#define L1_LBRC LT(1, KC_LBRC) +#define L1_RBRC LT(1, KC_RBRC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + LAYOUT( + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC, + CTL_ESC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, CTL_ENT, + KC_LSFT, ALT_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , ALT_SLS, SFT_DEL, + L1_LBRC, L3_SPC , SU_QUOT, SU_BSLS, L2_SPC , L1_RBRC + ), + // Symbols Layer + LAYOUT( + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , + KC_INS , S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_MINS, + 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_CAPS, OUT_USB, OUT_BT , _______, _______, _______ + ), + // Navigation Layer + LAYOUT( + _______, _______, _______, KC_PGUP, _______, _______, KC_BRIU, _______, KC_UP , _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END , _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, KC_BRID, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + // Mouse Layer + LAYOUT( + _______, _______, KC_WREF, KC_WH_U, KC_WSCH, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, _______, KC_WH_L, KC_WH_D, KC_WH_R, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk new file mode 100644 index 0000000000..f2306f310f --- /dev/null +++ b/keyboards/handwired/42/rules.mk @@ -0,0 +1,39 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328p USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # ^^ +UCIS_ENABLE = no # ^^ +BLUETOOTH = AdafruitBLE diff --git a/keyboards/handwired/6macro/6macro.c b/keyboards/handwired/6macro/6macro.c new file mode 100644 index 0000000000..0a62bedf16 --- /dev/null +++ b/keyboards/handwired/6macro/6macro.c @@ -0,0 +1,16 @@ +/* Copyright 2019 joaofbmaia + * + * 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 . + */ +#include "6macro.h" diff --git a/keyboards/handwired/6macro/6macro.h b/keyboards/handwired/6macro/6macro.h new file mode 100644 index 0000000000..c1d5005128 --- /dev/null +++ b/keyboards/handwired/6macro/6macro.h @@ -0,0 +1,35 @@ +/* Copyright 2019 joaofbmaia + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ +} diff --git a/keyboards/handwired/6macro/config.h b/keyboards/handwired/6macro/config.h new file mode 100644 index 0000000000..7919c3c71f --- /dev/null +++ b/keyboards/handwired/6macro/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2019 joaofbmaia + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0037 +#define DEVICE_VER 0x0001 +#define MANUFACTURER joaofbmaia +#define PRODUCT 6macro +#define DESCRIPTION 6macro + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* pinout - DON'T CHANGE */ +#define MATRIX_ROW_PINS { B3, B4 } +#define MATRIX_COL_PINS { B0, B1, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D2 +#define RGBLED_NUM 10 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 \ No newline at end of file diff --git a/keyboards/handwired/6macro/info.json b/keyboards/handwired/6macro/info.json new file mode 100644 index 0000000000..52bd03a1dd --- /dev/null +++ b/keyboards/handwired/6macro/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "6macro", + "url": "", + "maintainer": "joaofbmaia", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}] + } + } + } + \ No newline at end of file diff --git a/keyboards/handwired/6macro/keymaps/default/config.h b/keyboards/handwired/6macro/keymaps/default/config.h new file mode 100644 index 0000000000..64ba57443f --- /dev/null +++ b/keyboards/handwired/6macro/keymaps/default/config.h @@ -0,0 +1,18 @@ +/* Copyright 2019 joaofbmaia + * + * 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 . + */ + +#pragma once + diff --git a/keyboards/handwired/6macro/keymaps/default/keymap.c b/keyboards/handwired/6macro/keymaps/default/keymap.c new file mode 100644 index 0000000000..365dbf7b05 --- /dev/null +++ b/keyboards/handwired/6macro/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2019 joaofbmaia + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* LAYER 0 + * ,-----------------------. + * | F13 | F14 | F15/FN| Hold for FN + * |-------+-------+-------| + * | F16 | F17 | F18 | + * `-------+-------+-------' + */ + [0] = LAYOUT( + KC_F13, KC_F14, LT(1, KC_F15), \ + KC_F16, KC_F17, KC_F18 \ + ), + + /* LAYER 1 + * ,-----------------------. + * |RGB_TOG|RGBMOD+| | + * |-------+-------+-------| + * |RGBHUE+|RGBBRI+|Spec FN| Hold along with previous to access special funtions (RESET) + * `-------+-------+-------' + */ + [1] = LAYOUT( + RGB_TOG, RGB_MOD, KC_TRNS, \ + RGB_HUI, RGB_VAI, MO(2) \ + ), + + /* LAYER 2 + * ,-----------------------. + * | RESET |RGBMOD-| | + * |-------+-------+-------| + * |RGBHUE-|RGBBRI-| | + * `-------+-------+-------' + */ + [2] = LAYOUT( + RESET, RGB_RMOD, KC_NO, \ + RGB_HUD, RGB_VAD, KC_TRNS \ + ) + +}; diff --git a/keyboards/handwired/6macro/keymaps/default/readme.md b/keyboards/handwired/6macro/keymaps/default/readme.md new file mode 100644 index 0000000000..dd42a8fc62 --- /dev/null +++ b/keyboards/handwired/6macro/keymaps/default/readme.md @@ -0,0 +1,15 @@ +Layer 0: + +![Layer 0](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer0_default.png) + +Layer 1: + +![Layer 1](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer1.png) + +Layer 2: + +![Layer 2](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer2.png) + +# Default 6macro Layout + +This is the default layout. Layer 0 is mappped to function keys 13-18. Top right key switches to layer above when held. Upper layers are for RGB control. \ No newline at end of file diff --git a/keyboards/handwired/6macro/keymaps/osu/config.h b/keyboards/handwired/6macro/keymaps/osu/config.h new file mode 100644 index 0000000000..64ba57443f --- /dev/null +++ b/keyboards/handwired/6macro/keymaps/osu/config.h @@ -0,0 +1,18 @@ +/* Copyright 2019 joaofbmaia + * + * 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 . + */ + +#pragma once + diff --git a/keyboards/handwired/6macro/keymaps/osu/keymap.c b/keyboards/handwired/6macro/keymaps/osu/keymap.c new file mode 100644 index 0000000000..ffed7d909f --- /dev/null +++ b/keyboards/handwired/6macro/keymaps/osu/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2019 joaofbmaia + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* LAYER 0 + * ,-----------------------. + * | ESC | ~ | SPC/FN| Hold for FN + * |-------+-------+-------| + * | C | Z | X | + * `-------+-------+-------' + */ + [0] = LAYOUT( + KC_ESC, KC_GRAVE, LT(1, KC_SPC), \ + KC_C, KC_Z, KC_X \ + ), + + /* LAYER 1 + * ,-----------------------. + * |RGB_TOG|RGBMOD+| | + * |-------+-------+-------| + * |RGBHUE+|RGBBRI+|Spec FN| Hold along with previous to access special funtions (RESET) + * `-------+-------+-------' + */ + [1] = LAYOUT( + RGB_TOG, RGB_MOD, KC_TRNS, \ + RGB_HUI, RGB_VAI, MO(2) \ + ), + + /* LAYER 2 + * ,-----------------------. + * | RESET |RGBMOD-| | + * |-------+-------+-------| + * |RGBHUE-|RGBBRI-| | + * `-------+-------+-------' + */ + [2] = LAYOUT( + RESET, RGB_RMOD, KC_NO, \ + RGB_HUD, RGB_VAD, KC_TRNS \ + ) + +}; diff --git a/keyboards/handwired/6macro/keymaps/osu/readme.md b/keyboards/handwired/6macro/keymaps/osu/readme.md new file mode 100644 index 0000000000..0de5d6bf2e --- /dev/null +++ b/keyboards/handwired/6macro/keymaps/osu/readme.md @@ -0,0 +1,15 @@ +Layer 0: + +![Layer 0](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer0_osu.png) + +Layer 1: + +![Layer 1](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer1.png) + +Layer 2: + +![Layer 2](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer2.png) + +# OSU 6macro Layout + +This layout is for the game OSU. Layer 0 is mappped as shown above. Top right key switches to layer above when held. Upper layers are for RGB control. \ No newline at end of file diff --git a/keyboards/handwired/6macro/readme.md b/keyboards/handwired/6macro/readme.md new file mode 100644 index 0000000000..3fbd917c80 --- /dev/null +++ b/keyboards/handwired/6macro/readme.md @@ -0,0 +1,15 @@ +# 6macro + +![6macro photo](https://raw.githubusercontent.com/joaofbmaia/6macro/master/photo.jpg) +![6macro photo with RGB](https://raw.githubusercontent.com/joaofbmaia/6macro/master/photo_rgb.jpg) + +This is a 6-key keyboard intended for macros or as a dedicated controller for games with few bindings. + +Keyboard Maintainer: [joaofbmaia](https://github.com/joaofbmaia) +Hardware: https://github.com/joaofbmaia/6macro + +Make example for this keyboard (after setting up your build environment): + + make handwired/6macro: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). diff --git a/keyboards/handwired/6macro/rules.mk b/keyboards/handwired/6macro/rules.mk new file mode 100644 index 0000000000..13760ae066 --- /dev/null +++ b/keyboards/handwired/6macro/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +#RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/aek64/aek64.c b/keyboards/handwired/aek64/aek64.c new file mode 100644 index 0000000000..0646d308d0 --- /dev/null +++ b/keyboards/handwired/aek64/aek64.c @@ -0,0 +1,36 @@ +/* +Copyright 2012,2013 Jun Wako <4sStylZ@protonmail.ch> + +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 . +*/ +#include "quantum.h" + +/* + * Hardware function pre initialisation. + * See https://docs.qmk.fm/#/custom_quantum_functions?id=example-keyboard_pre_init_user-implementation + */ +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. + + // Set our LED pins as output + setPinOutput(C3); +} + +void matrix_init_kb(void) { + + // Flash the led 1 sec on startup. + writePinHigh(C3); + wait_ms(1000); + writePinLow(C3); +} diff --git a/keyboards/handwired/aek64/aek64.h b/keyboards/handwired/aek64/aek64.h new file mode 100644 index 0000000000..6378448760 --- /dev/null +++ b/keyboards/handwired/aek64/aek64.h @@ -0,0 +1,34 @@ +/* +Copyright 2012,2013 Jun Wako <4sStylZ@protonmail.ch> + +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 . +*/ +#pragma once + +#include "quantum.h" + +/* Alps64 physical definition macro */ +#define LAYOUT( \ + k00, k01, k02, k03 , k04 , k05 , k06, k07 , k08 , k09 , k010 , k011, k012, k013 , \ + k10, k11, k12, k13 , k14 , k15 , k16, k17 , k18 , k19 , k110 , k111, k112, \ + k20, k21, k22, k23 , k24 , k25 , k26, k27 , k28 , k29 , k210 , k211, k212, k213 , \ + k30, k31, k32, k33 , k34 , k35 , k36, k37 , k38 , k39 , k310 , k311, k312, \ + k40, k41, k42, k46, k411, k412, k413 \ +) { \ + { k00, k01, k02, k03 , k04 , k05 , k06, k07 , k08 , k09 , k010 , k011, k012, k013 }, \ + { k10, k11, k12, k13 , k14 , k15 , k16, k17 , k18 , k19 , k110 , k111, k112, KC_NO }, \ + { k20, k21, k22, k23 , k24 , k25 , k26, k27 , k28 , k29 , k210 , k211, k212, k213 }, \ + { k30, k31, k32, k33 , k34 , k35 , k36, k37 , k38 , k39 , k310 , k311, k312, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, k413 }, \ +} diff --git a/keyboards/handwired/aek64/config.h b/keyboards/handwired/aek64/config.h new file mode 100644 index 0000000000..45ce6665bc --- /dev/null +++ b/keyboards/handwired/aek64/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2015 Jun Wako <4sStylZ@protonmail.ch> + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6464 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 4sStylZ and others makers +#define PRODUCT AEK64 +#define DESCRIPTION QMK keyboard firmware for AEK64 handwired + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +// Originally made for a Teensy 2++ +#define MATRIX_COL_PINS { F0, E6, E7, B0, B1, B2, B3, B4, B5, B6, B7, D0, D1, D2 } +#define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 } +#define UNUSED_PINS + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +// #define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* Enable the space-cadet options */ +#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_PGUP +#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_PGDOWN +#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_HOME +#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_END + +/* Enable double tab */ +#define TAPPING_TERM 175 + +#define COMBO_COUNT 1 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/handwired/aek64/info.json b/keyboards/handwired/aek64/info.json new file mode 100644 index 0000000000..4665b46387 --- /dev/null +++ b/keyboards/handwired/aek64/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "aek64", + "url": "", + "maintainer": "qmk", + "width": 14.75, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0, "w":1.25}, {"label":"1", "x":1.25, "y":0}, {"label":"2", "x":2.25, "y":0}, {"label":"3", "x":3.25, "y":0}, {"label":"4", "x":4.25, "y":0}, {"label":"5", "x":5.25, "y":0}, {"label":"6", "x":6.25, "y":0}, {"label":"7", "x":7.25, "y":0}, {"label":"8", "x":8.25, "y":0}, {"label":"9", "x":9.25, "y":0}, {"label":"0", "x":10.25, "y":0}, {"label":"\u00b0", "x":11.25, "y":0}, {"label":"+", "x":12.25, "y":0}, {"label":"Backspace", "x":13.25, "y":0, "w":1.75}, {"label":"Tab", "x":0, "y":1, "w":1.75}, {"label":"A", "x":1.75, "y":1}, {"label":"Z", "x":2.75, "y":1}, {"label":"E", "x":3.75, "y":1}, {"label":"R", "x":4.75, "y":1}, {"label":"T", "x":5.75, "y":1}, {"label":"Y", "x":6.75, "y":1}, {"label":"U", "x":7.75, "y":1}, {"label":"I", "x":8.75, "y":1}, {"label":"O", "x":9.75, "y":1}, {"label":"P", "x":10.75, "y":1}, {"label":"{", "x":11.75, "y":1}, {"label":"}", "x":12.75, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":2}, {"label":"Q", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":"M", "x":11, "y":2}, {"label":"%", "x":12, "y":2}, {"label":"µ", "x":13, "y":2}, {"label":"Enter", "x":14, "y":1, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.5}, {"label":">", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"?", "x":8.5, "y":3}, {"label":".", "x":9.5, "y":3}, {"label":"/", "x":10.5, "y":3}, {"label":"§", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.5}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Opt", "x":1.5, "y":4, "w":1.25}, {"label":"Cmd", "x":2.75, "y":4, "w":1.5}, {"label":"Space", "x":4.25, "y":4, "w":6.5}, {"label":"Cmd", "x":10.75, "y":4, "w":1.5}, {"label":"Opt", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c b/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c new file mode 100644 index 0000000000..65f8354aab --- /dev/null +++ b/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c @@ -0,0 +1,102 @@ +#include QMK_KEYBOARD_H + +// Implement Super-alt↯tab +// See https://docs.qmk.fm/#/feature_macros?id=super-alt↯tab +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; + +// Defining all the custom keycodes. +enum custom_keycodes { + ALT_TAB = SAFE_RANGE +}; + +const uint16_t PROGMEM lock_combo[] = {KC_J, KC_K, KC_L, KC_SCLN, COMBO_END}; +combo_t key_combos[COMBO_COUNT] = {COMBO(lock_combo, LGUI(KC_O))}; + +// Define the keycodes for one qwerty layer and one Fn layer. +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐ + * │ ` Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ + * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ + * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ Enter│ + * │ Layer 2 │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ + * ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤ + * │ Shift│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + * ├──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┼──────┬──────┬──────┤ + * │ Ctrl │ Alt │↯ATab │ Space │ Gui │ Alt │ Ctrl │ + * └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘ + * + * Hidden features :  + * - Left Shift is also Home on a single tap. + * - Left Ctrl is also End on a single tap. + * - Right Shift is also page-up on a single tap. + * - Right Ctrl is also page-down on a single tap. + * - Press JKLM for Windows + L (Session lock) + */ + [0] = LAYOUT( \ + KC_GESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, + MO(1) , 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_LSPO , KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC , + KC_LCPO , KC_LALT, ALT_TAB, KC_SPC, KC_LGUI, KC_RALT, KC_RCPC + ), + + /* 1: second layer for media keys and many advanced features ç + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐ + * │Alt F4│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ + * │ │ │ │PrtScn│ Brt+ │ Brt- │Ctrl A│ Home │ Up │ End │ ‽  │ ↑     │ ⸮   │ │ │ + * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ │ + * │ │ Cut │ Copy │Paste │ Del │ Del │ Left │ Down │Right │ ← │ ↓ │ → │ │ │ + * ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤ + * │ │ │ Mute │ Vol- │ Vol+ │ │ │ │ │ │ │Reset │ │ + * ├──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┼──────┬──────┬──────┤ + * │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘ + */ + [1] = LAYOUT( \ + LALT(KC_F4), 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_PSCR , KC_BRIU , KC_BRID, LCTL(KC_A), KC_HOME, KC_UP , KC_END , UC(0x203D) , UC(0x8593), UC(0x2E2E), + _______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_DEL , KC_LEFT, KC_DOWN, KC_RIGHT, UC(0x8592) , UC(0x8595), UC(0x8594), _______, + _______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , _______, _______ , _______, _______, _______ , _______ , RESET , _______ , + _______ , _______ , _______ , _______, _______ , _______ , _______ + ) +}; + +// Set the unicode input mode for using UC. +void matrix_init_user(void) { + set_unicode_input_mode(UC_LNX); +} + +// Processing all the key pressed. +// Alt+tab. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + // Depending keycodes… + switch (keycode) { // This will do most of the grunt work with the keycodes. + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +void matrix_scan_user(void) { // The very important timer. + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 750) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} diff --git a/keyboards/handwired/aek64/keymaps/default/keymap.c b/keyboards/handwired/aek64/keymaps/default/keymap.c new file mode 100644 index 0000000000..5b9115902d --- /dev/null +++ b/keyboards/handwired/aek64/keymaps/default/keymap.c @@ -0,0 +1,53 @@ +#include QMK_KEYBOARD_H + +// Define the keycodes for one qwerty layer and one Fn layer. +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐ + * │ ` Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ + * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ + * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ Enter│ + * │ Layer 2 │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ + * ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤ + * │ Shift│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + * ├──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┼──────┬──────┬──────┤ + * │ Ctrl │ Alt │ Gui │ Space │ Gui │ Alt │ Ctrl │ + * └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘ + * + * Hidden features :  + * - Left Shift is also Home on a single tap. + * - Left Ctrl is also End on a single tap. + * - Right Shift is also page-up on a single tap. + * - Right Ctrl is also page-down on a single tap. + * - Press JKLM for Windows + L (Session lock) + */ + [0] = LAYOUT( + 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, + MO(1) , 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_LSPO, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC , + KC_LCPO, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCPC + ), + + /* 1: second layer for media keys and many advanced features ç + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐ + * │Alt F4│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ + * │ │ │ │ │ │ │Ctrl A│ Home │ Up │ End │ │ │ │ │ │ + * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ │ + * │ │ Cut │ Copy │Paste │ Del │ Del │ Left │ Down │Right │ │ │ │ │ │ + * ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤ + * │ │ │ Mute │ Vol- │ Vol+ │ │ │ │ │ │ │Reset │ │ + * ├──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┼──────┬──────┬──────┤ + * │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘ + */ + [1] = LAYOUT( + LALT(KC_F4), KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, + _______ , _______ , _______ , _______ , _______ , _______, LCTL(KC_A), KC_HOME, KC_UP , KC_END , _______ , _______ , _______ , + _______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_DEL , KC_LEFT, KC_DOWN, KC_RIGHT, _______ , _______ , _______ , _______, + _______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , _______, _______ , _______, _______, _______ , _______ , RESET , _______ , + _______ , _______ , _______ , _______, _______ , _______ , _______ + ) +}; diff --git a/keyboards/handwired/aek64/readme.md b/keyboards/handwired/aek64/readme.md new file mode 100644 index 0000000000..7afecca12c --- /dev/null +++ b/keyboards/handwired/aek64/readme.md @@ -0,0 +1,17 @@ +# AEK64 + +An Alps-only 60% handwired ISO AEK based on the original AEK plate. + +Keyboard Maintainer: QMK Community +Hardware Supported: AEK II ISO +Hardware Availability: buy an used one and salvage / cut the plate and rip-off the switchs. For the case, a GH60 can be good. + +Make example for this keyboard (after setting up your build environment): + + make aek64: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). + +# Known issues + +* The Unicode characters on the keymap don’t work. diff --git a/keyboards/handwired/aek64/rules.mk b/keyboards/handwired/aek64/rules.mk new file mode 100644 index 0000000000..c02af3dd6c --- /dev/null +++ b/keyboards/handwired/aek64/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + +# Build Options +# change to no to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA +UNICODE_ENABLE = yes # Enable support for arrow keys icon on the second layer. +COMBO_ENABLE = yes # Enable combo for special function when using multiple keys at once. +TAP_DANCE_ENABLE = no # Enable use multiple tap +NKRO_ENABLE = yes diff --git a/keyboards/handwired/aranck/aranck.c b/keyboards/handwired/aranck/aranck.c new file mode 100644 index 0000000000..2e67ec1dae --- /dev/null +++ b/keyboards/handwired/aranck/aranck.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include "aranck.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} \ No newline at end of file diff --git a/keyboards/handwired/aranck/aranck.h b/keyboards/handwired/aranck/aranck.h new file mode 100644 index 0000000000..de7639fd03 --- /dev/null +++ b/keyboards/handwired/aranck/aranck.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_aranck_mit(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, KC_NO, k35, k36, k37, k38, k39, k3a } \ +} diff --git a/keyboards/handwired/aranck/config.h b/keyboards/handwired/aranck/config.h new file mode 100644 index 0000000000..5212409c8d --- /dev/null +++ b/keyboards/handwired/aranck/config.h @@ -0,0 +1,262 @@ +/* +Copyright 2019 Arda Kilicdagi + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ardakilic +#define PRODUCT ARANCK +#define DESCRIPTION A handwired 40% ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { D3, D2, D1, D0 } +#define MATRIX_COL_PINS \ + { C6, D7, E6, B4, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +/** + * Aranck-specific definitions + */ +#define B5_AUDIO +/** + * Aranck-specific definitions END + */ + + +#define TAPPING_TERM 200 +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/aranck/info.json b/keyboards/handwired/aranck/info.json new file mode 100644 index 0000000000..450d89634a --- /dev/null +++ b/keyboards/handwired/aranck/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "Aranck", + "keyboard_folder": "handwired/aranck", + "url": "https://github.com/Ardakilic", + "maintainer": "Arda Kilicdagi", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_aranck_mit": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 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": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/handwired/aranck/keymaps/default/config.h b/keyboards/handwired/aranck/keymaps/default/config.h new file mode 100644 index 0000000000..cf888b0adc --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ + +#pragma once + +// place overrides here + +// #define RETRO_TAPPING +// #define PERMISSIVE_HOLD \ No newline at end of file diff --git a/keyboards/handwired/aranck/keymaps/default/keymap.c b/keyboards/handwired/aranck/keymaps/default/keymap.c new file mode 100644 index 0000000000..2765c7afbf --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/default/keymap.c @@ -0,0 +1,178 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +enum aranck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _SPACE, + _SODA, + _NUMPAD +}; + + +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NPdESC| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |SftEtr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | PWR | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_aranck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LT(_SODA, KC_POWER), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), LT(_SPACE, KC_SPC), MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_aranck_mit( + 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_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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_aranck_mit( + 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_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 +), + +/* Soda Layer + * Keys that I mostly use when while chilling or taking a break :) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SODA] = LAYOUT_aranck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Space Layer (Space Bar Layer Tap) + * ,-----------------------------------------------------------------------------------. + * | |CMD+1 |CMD+2 |CMD+3 |CMD+4 |CMD+5 |CMD+6 |CMD+7 |CMD+8 |CMD+9 |CMD+0 |LCKOSX| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Up | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down | Right| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SPACE] = LAYOUT_aranck_mit( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Numpad Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | + | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 0 | . | , | = | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_aranck_mit( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|EEPRst| | | | | | | | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_aranck_mit( + _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +// Enable the adjust layer when both lower and +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// return true; +//} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/aranck/keymaps/default/readme.md b/keyboards/handwired/aranck/keymaps/default/readme.md new file mode 100644 index 0000000000..ba7ddbdd33 --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Aranck diff --git a/keyboards/handwired/aranck/keymaps/turkishish/config.h b/keyboards/handwired/aranck/keymaps/turkishish/config.h new file mode 100644 index 0000000000..3e40ef4f6d --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/turkishish/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ + +#pragma once + +// place overrides here + +#define RETRO_TAPPING +#define PERMISSIVE_HOLD \ No newline at end of file diff --git a/keyboards/handwired/aranck/keymaps/turkishish/keymap.c b/keyboards/handwired/aranck/keymaps/turkishish/keymap.c new file mode 100644 index 0000000000..195b8aaad0 --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/turkishish/keymap.c @@ -0,0 +1,225 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +enum aranck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _SPACE, + _SODA, + _NUMPAD +}; + +//KC_NONUS_BSLASH (\|) is equivalent to ["é] key in Turkish keyboards. +//KC_GRV (~ `) is equivalent to [<>|] key in Turkish keyboards. +// KC_SCLN is Turkish s [şŞ] key +// KC_QUOT is Turkish i [iİ] key +// KC_COMM is Turkish o [öÖ] key +// KC_DOT is Turkish c [çÇ] key + +// Custom shortcuts specific to Turkish layout +#define CURLY_OPEN RALT(KC_7) +#define CURLY_CLOSE RALT(KC_0) +#define SQUARE_OPEN RALT(KC_8) +#define SQUARE_CLOSE RALT(KC_9) +#define DOLLAR_SIGN RALT(KC_4) +#define BACKSLASH RALT(KC_MINS) +#define VERTICAL_PIPE RALT(KC_EQL) +#define BACKTICK RALT(KC_BSLS) +#define TILDE RALT(KC_RBRC) +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +/* +// Unicode Turkish characters, in case it's needed +enum { + TR_C, // ç + TR_C_L, // Ç + TR_I, // ı + TR_I_L, // İ + TR_G, // ğ + TR_G_L, // Ğ + TR_S, // ş + TR_S_L, // Ş + TR_U, // ü + TR_U_L, // Ü + TR_O, // ö + TR_O_L, // Ö +}; + +// clang-format off +const uint32_t PROGMEM unicode_map[] = { + [TR_C] = 0x00c7, + [TR_C_L] = 0x00e7, + [TR_I] = 0x0130, + [TR_I_L] = 0x0131, + [TR_G] = 0x011e, + [TR_G_L] = 0x011f, + [TR_S] = 0x015e, + [TR_S_L] = 0x015f, + [TR_U] = 0x00dc, + [TR_U_L] = 0x00fc, + [TR_O] = 0x00d6, + [TR_O_L] = 0x00f6, +}; +// clang-format on +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NPdEsc| A | S | D | F | G | H | J | K | L | Ş | İ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |SftCps| Z | X | C | V | B | N | M | Ö | Ç | . |SftEtr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Sda|<>| Ctrl | Alt | OS |Lowr|,| Space* |Rise|"| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_aranck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LT(_SODA, KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_BSLS), LT(_SPACE, KC_SPC), LT(_RAISE, KC_NONUS_BSLASH), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | > | ! | ' | ^ | + | % | & | / | ( | ) | = | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | ? | _ | Ğ | Ü | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | "$" | "{" | "}" | , | ">" | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | "[" | "]" | ' | " | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_aranck_mit( + 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_EQL, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DOLLAR_SIGN, CURLY_OPEN, CURLY_CLOSE, KC_BSLS, LSFT(KC_GRV), + _______, _______, _______, _______, _______, _______, _______, SQUARE_OPEN, SQUARE_CLOSE, LSFT(KC_2), KC_NONUS_BSLASH +), + + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | <>| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | * | - | "\" | "|" | , | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | , | " | "~" | "`" | <>| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_aranck_mit( + 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, BACKSLASH, VERTICAL_PIPE, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, TILDE, BACKTICK, KC_GRV, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Soda Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SODA] = LAYOUT_aranck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Space Layer (Space Bar Layer Tap) + * ,-----------------------------------------------------------------------------------. + * | |CMD+1 |CMD+2 |CMD+3 |CMD+4 |CMD+5 |CMD+6 |CMD+7 |CMD+8 |CMD+9 |CMD+0 |LCKOSX| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Up | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down |Right | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SPACE] = LAYOUT_aranck_mit( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + + +/* Numpad Layer + * KC_PDOT is comma on the Turkish layout ¯\_(ツ)_/¯ + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | + | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 0 | . | , | = | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_aranck_mit( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_SLSH, KC_PDOT, KC_PEQL +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|EEPRom| | | | | | | | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_aranck_mit( + _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +// Enable the adjust layer when both lower and +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/aranck/keymaps/turkishish/readme.md b/keyboards/handwired/aranck/keymaps/turkishish/readme.md new file mode 100644 index 0000000000..8998081c1f --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/turkishish/readme.md @@ -0,0 +1 @@ +# The Turkishish keymap for Aranck diff --git a/keyboards/handwired/aranck/readme.md b/keyboards/handwired/aranck/readme.md new file mode 100644 index 0000000000..67089b4997 --- /dev/null +++ b/keyboards/handwired/aranck/readme.md @@ -0,0 +1,22 @@ +# Aranck + +![aranck](https://i.imgur.com/IWfovI2l.jpg) + +![aranck2](https://i.imgur.com/rrhEhQZl.jpg) + +A handwired 40% ortholinear keyboard. + +The story: https://imgur.com/a/4QI7ifJ + +Keyboard Maintainer: [Arda Kilicdagi](https://github.com/ardakilic) +Hardware Supported: Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make handwired/aranck:default:flash + +You can flash the "turkishish" layout (which I'm currently using) like: + + make handwired/aranck:turkishish: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). \ No newline at end of file diff --git a/keyboards/handwired/aranck/rules.mk b/keyboards/handwired/aranck/rules.mk new file mode 100644 index 0000000000..b95b98a4c7 --- /dev/null +++ b/keyboards/handwired/aranck/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file diff --git a/keyboards/handwired/arrow_pad/rules.mk b/keyboards/handwired/arrow_pad/rules.mk index a03f0836b2..65fc42a062 100644 --- a/keyboards/handwired/arrow_pad/rules.mk +++ b/keyboards/handwired/arrow_pad/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable @@ -67,4 +28,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 \ No newline at end of file +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk index 21c4704e0d..e8b551fbb7 100644 --- a/keyboards/handwired/atreus50/rules.mk +++ b/keyboards/handwired/atreus50/rules.mk @@ -1,52 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/handwired/chiron/chiron.c b/keyboards/handwired/chiron/chiron.c new file mode 100644 index 0000000000..997cda6a4d --- /dev/null +++ b/keyboards/handwired/chiron/chiron.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Mike Hix + * + * 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 . + */ +#include "chiron.h" diff --git a/keyboards/handwired/chiron/chiron.h b/keyboards/handwired/chiron/chiron.h new file mode 100644 index 0000000000..9d1ab385a5 --- /dev/null +++ b/keyboards/handwired/chiron/chiron.h @@ -0,0 +1,42 @@ +/* Copyright 2019 Mike Hix + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ + ) \ + { \ + /* Left Half */ \ + { L06, L05, L04, L03, L02, L01, L00 }, \ + { L16, L15, L14, L13, L12, L11, L10 }, \ + { L26, L25, L24, L23, L22, L21, L20 }, \ + { L36, L35, L34, L33, L32, L31, L30 }, \ + { L45, L44, L43, KC_NO, L42, L41, L40 }, \ + /* Right Half */ \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R45, R44, R43, KC_NO, R42, R41, R40 } \ + } + +#define LAYOUT_chiron LAYOUT diff --git a/keyboards/handwired/chiron/config.h b/keyboards/handwired/chiron/config.h new file mode 100644 index 0000000000..fcc5ae49a6 --- /dev/null +++ b/keyboards/handwired/chiron/config.h @@ -0,0 +1,57 @@ +/* +Copyright 2019 Mike Hix + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mike Hix +#define PRODUCT chiron +#define DESCRIPTION A custom keyboard + +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// Pro Micro Pins 4, 6, 7, 8, 9 +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +// Pro Micro Pins A3, A2, A1, A0, 15, 14, 16 +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +#define UNUSED_PINS + +// Pro Micro Pins RX1 +#define SPLIT_HAND_PIN D2 + +// Pro Micro Pins RX1 +#define SOFT_SERIAL_PIN D0 + +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 5 + +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 4 + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 7 + diff --git a/keyboards/handwired/chiron/info.json b/keyboards/handwired/chiron/info.json new file mode 100644 index 0000000000..85aba1b43f --- /dev/null +++ b/keyboards/handwired/chiron/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "Chiron Keyboard", + "url": "", + "maintainer": "musl", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"L06", "x":6, "y":0}, + {"label":"R00", "x":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R06", "x":14, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"L16", "x":6, "y":1}, + {"label":"R10", "x":8, "y":1}, + {"label":"R11", "x":9, "y":1}, + {"label":"R12", "x":10, "y":1}, + {"label":"R13", "x":11, "y":1}, + {"label":"R14", "x":12, "y":1}, + {"label":"R15", "x":13, "y":1}, + {"label":"R16", "x":14, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"L26", "x":6, "y":2}, + {"label":"R20", "x":8, "y":2}, + {"label":"R21", "x":9, "y":2}, + {"label":"R22", "x":10, "y":2}, + {"label":"R23", "x":11, "y":2}, + {"label":"R24", "x":12, "y":2}, + {"label":"R25", "x":13, "y":2}, + {"label":"R26", "x":14, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"L36", "x":6, "y":3}, + {"label":"R30", "x":8, "y":3}, + {"label":"R31", "x":9, "y":3}, + {"label":"R32", "x":10, "y":3}, + {"label":"R33", "x":11, "y":3}, + {"label":"R34", "x":12, "y":3}, + {"label":"R35", "x":13, "y":3}, + {"label":"R36", "x":14, "y":3}, + {"label":"L40", "x":0, "y":4}, + {"label":"L41", "x":1, "y":4}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":4, "y":4, "h":1.25}, + {"label":"L44", "x":5, "y":4, "h":1.25}, + {"label":"L45", "x":6, "y":4, "h":1.25}, + {"label":"R40", "x":8, "y":4, "h":1.25}, + {"label":"R41", "x":9, "y":4, "h":1.25}, + {"label":"R42", "x":10, "y":4, "h":1.25}, + {"label":"R43", "x":12, "y":4}, + {"label":"R44", "x":13, "y":4}, + {"label":"R45", "x":14, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/chiron/keymaps/default/config.h b/keyboards/handwired/chiron/keymaps/default/config.h new file mode 100644 index 0000000000..08134a720b --- /dev/null +++ b/keyboards/handwired/chiron/keymaps/default/config.h @@ -0,0 +1,52 @@ +/* Copyright 2019 Mike Hix + * + * 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 . + */ + +#pragma once + +#define USE_SERIAL +#define MASTER_RIGHT +//#define MASTER_LEFT + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#define TAPPING_TERM 200 + +#define MOUSEKEY_DELAY 20 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 10 +#define MOUSEKEY_TIME_TO_MAX 30 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#undef RGBLED_NUM +#define RGBLED_NUM 2 +#define RGBLED_SPLIT {1, 1} + +// Don't turn off lights when the host goes to sleep. +#undef RGBLIGHT_SLEEP + +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +// Selectively enable animations to save on code size. +#undef RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL + diff --git a/keyboards/handwired/chiron/keymaps/default/keymap.c b/keyboards/handwired/chiron/keymaps/default/keymap.c new file mode 100644 index 0000000000..53c8edeb0a --- /dev/null +++ b/keyboards/handwired/chiron/keymaps/default/keymap.c @@ -0,0 +1,64 @@ +/* Copyright 2019 Mike Hix + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_END, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSPC, KC_DEL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, + KC_ESC, KC_A, KC_O, LT(1,KC_E), LT(2,KC_U), KC_I, LCTL_T(KC_ENT), RCTL_T(KC_ENT), KC_D, LT(3,KC_H), LT(4,KC_T), KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_PGUP, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_CAPS, KC_INS, KC_LCTL, /*, */KC_LALT, LGUI_T(KC_SPC), KC_HYPR, KC_HYPR, RGUI_T(KC_SPC), KC_RALT, /*, */KC_LBRC, KC_RBRC, KC_SLSH + ), + [1] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, EEP_RST, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, _______, KC_MUTE, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_BTN2, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLD, XXXXXXX, KC_WH_D, XXXXXXX, KC_BTN3, KC_BTN4, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ), + [2] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_UP, KC_PAUS, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ), + [3] = LAYOUT( + XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ), + [4] = LAYOUT( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, RGB_TOG, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, + _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ) + /* + [] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ) + */ +}; + diff --git a/keyboards/handwired/chiron/keymaps/default/readme.md b/keyboards/handwired/chiron/keymaps/default/readme.md new file mode 100644 index 0000000000..c95a502f22 --- /dev/null +++ b/keyboards/handwired/chiron/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for chiron diff --git a/keyboards/butterstick/keymaps/default/rules.mk b/keyboards/handwired/chiron/keymaps/default/rules.mk similarity index 100% rename from keyboards/butterstick/keymaps/default/rules.mk rename to keyboards/handwired/chiron/keymaps/default/rules.mk diff --git a/keyboards/handwired/chiron/readme.md b/keyboards/handwired/chiron/readme.md new file mode 100644 index 0000000000..1e4bcf8b66 --- /dev/null +++ b/keyboards/handwired/chiron/readme.md @@ -0,0 +1,16 @@ +# Chiron Keyboard + +![chiron](https://i.imgur.com/3XZACfs.jpg) + +This is a custom keyboard meant to be easily and quickly 3D printable on +most FFF/FDM printers. It's inspired by the [Viterbi](https://keeb.io/products/viterbi-keyboard-pcbs-5x7-70-split-ortholinear), [Iris](https://keeb.io/products/iris-keyboard-split-ergonomic-keyboard), and +[Dactyl Manuform](https://github.com/adereth/dactyl-keyboard) keyboards. + +Keyboard Maintainer: [Mike Hix](https://github.com/musl/) +Case: [https://github.com/musl/chiron-keyboard](https://github.com/musl/chiron-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make handwired/chiron: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). diff --git a/keyboards/handwired/chiron/rules.mk b/keyboards/handwired/chiron/rules.mk new file mode 100644 index 0000000000..96f6422700 --- /dev/null +++ b/keyboards/handwired/chiron/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +AUDIO_ENABLE = no +AUTOLOG_ENABLE = no +BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no +CONSOLE_ENABLE = no +DEBUG_ENABLE = no +EXTRAKEY_ENABLE = no +FAUXCLICKY_ENABLE = no +HD44780_ENABLE = no +LEADER_ENABLE = no +MIDI_ENABLE = no +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = no +RGBLIGHT_ENABLE = yes +SLEEP_LED_ENABLE = yes +TAP_DANCE_ENABLE = no +UCIS_ENABLE = no +UNICODEMAP_ENABLE = no +UNICODE_ENABLE = no +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/cmd60/rules.mk b/keyboards/handwired/cmd60/rules.mk index d980716eae..b5e96d74bf 100644 --- a/keyboards/handwired/cmd60/rules.mk +++ b/keyboards/handwired/cmd60/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable @@ -65,5 +28,3 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - - diff --git a/keyboards/handwired/co60/rev1/rules.mk b/keyboards/handwired/co60/rev1/rules.mk index 31ce6cbe41..56b5aed0a3 100644 --- a/keyboards/handwired/co60/rev1/rules.mk +++ b/keyboards/handwired/co60/rev1/rules.mk @@ -1,49 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/handwired/co60/rev6/rules.mk b/keyboards/handwired/co60/rev6/rules.mk index dba41e12be..fc7cabb108 100644 --- a/keyboards/handwired/co60/rev6/rules.mk +++ b/keyboards/handwired/co60/rev6/rules.mk @@ -1,40 +1,5 @@ -# project specific files - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# MCU name +MCU = STM32F303 # Code for backlight breathing: SRC += led.c diff --git a/keyboards/handwired/co60/rev7/rules.mk b/keyboards/handwired/co60/rev7/rules.mk index 6e0b3856ab..9daeaf047a 100644 --- a/keyboards/handwired/co60/rev7/rules.mk +++ b/keyboards/handwired/co60/rev7/rules.mk @@ -1,40 +1,5 @@ -# project specific files - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# MCU name +MCU = STM32F303 # Code for backlight breathing: SRC += led.c diff --git a/keyboards/handwired/dactyl/keymaps/default/keymap.c b/keyboards/handwired/dactyl/keymaps/default/keymap.c index db666f43fe..47f5ba96ba 100644 --- a/keyboards/handwired/dactyl/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/default/keymap.c @@ -34,8 +34,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_dactyl( // layer 0 : default // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, @@ -137,24 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } - return MACRO_NONE; -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case VRSN: diff --git a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c index 7c44f78a65..cc6fc52e5a 100644 --- a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c @@ -34,8 +34,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_dactyl( // layer 0 : default // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_DEL, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LT(SYMB,KC_GRV), KC_EQL, LALT(KC_LSFT), KC_LEFT, KC_RGHT, diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c index 28cf37522b..faa5c19cf2 100644 --- a/keyboards/handwired/dactyl/matrix.c +++ b/keyboards/handwired/dactyl/matrix.c @@ -76,11 +76,6 @@ uint8_t expander_status; uint8_t expander_input_pin_mask; bool i2c_initialized = false; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - #define ROW_SHIFTER ((matrix_row_t)1) __attribute__ ((weak)) @@ -129,11 +124,6 @@ void matrix_init(void) matrix_debouncing[i] = 0; } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - matrix_init_quantum(); } @@ -236,20 +226,6 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - #if (DIODE_DIRECTION == COL2ROW) for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { # if (DEBOUNCE > 0) diff --git a/keyboards/handwired/dactyl/rules.mk b/keyboards/handwired/dactyl/rules.mk index dc25f9c3fb..2e740e3847 100644 --- a/keyboards/handwired/dactyl/rules.mk +++ b/keyboards/handwired/dactyl/rules.mk @@ -1,71 +1,15 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = twimaster.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. @@ -84,3 +28,7 @@ SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no + +# project specific files +SRC = twimaster.c \ + matrix.c diff --git a/keyboards/handwired/dactyl_left/config.h b/keyboards/handwired/dactyl_left/config.h new file mode 100644 index 0000000000..43c0d3d43f --- /dev/null +++ b/keyboards/handwired/dactyl_left/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 RedForty + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RedForty +#define PRODUCT dactyl_left +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS \ + { D0, B7, B3, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/dactyl_left/dactyl_left.c b/keyboards/handwired/dactyl_left/dactyl_left.c new file mode 100644 index 0000000000..e6fe3402da --- /dev/null +++ b/keyboards/handwired/dactyl_left/dactyl_left.c @@ -0,0 +1,51 @@ +/* Copyright 2019 RedForty + * + * 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 . + */ +#include "dactyl_left.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/handwired/dactyl_left/dactyl_left.h b/keyboards/handwired/dactyl_left/dactyl_left.h new file mode 100644 index 0000000000..1babf3fe47 --- /dev/null +++ b/keyboards/handwired/dactyl_left/dactyl_left.h @@ -0,0 +1,42 @@ +/* Copyright 2019 RedForty + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT(\ + k00, k01, k02, k03, k04, k05, \ + k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, \ + k40, k41, k42, k43, k44, \ + k50, k51, k52, k53, k54, k55 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, KC_NO }, \ + { k50, k51, k52, k53, k54, k55 } \ +} diff --git a/keyboards/handwired/dactyl_left/info.json b/keyboards/handwired/dactyl_left/info.json new file mode 100644 index 0000000000..4c9cd0845b --- /dev/null +++ b/keyboards/handwired/dactyl_left/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "dactyl_left", + "url": "", + "maintainer": "RedForty", + "width": 8, + "height": 7.75, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, {"x":6, "y":4.75}, {"x":7, "y":4.75}, {"x":5, "y":5.75, "h":2}, {"x":6, "y":5.75, "h":2}, {"x":7, "y":5.75}, {"x":7, "y":6.75}] + } + } +} diff --git a/keyboards/handwired/dactyl_left/keymaps/default/config.h b/keyboards/handwired/dactyl_left/keymaps/default/config.h new file mode 100644 index 0000000000..729cab1684 --- /dev/null +++ b/keyboards/handwired/dactyl_left/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 RedForty + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/dactyl_left/keymaps/default/keymap.c b/keyboards/handwired/dactyl_left/keymaps/default/keymap.c new file mode 100644 index 0000000000..708a380890 --- /dev/null +++ b/keyboards/handwired/dactyl_left/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2019 RedForty + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { QMKBEST = SAFE_RANGE, QMKURL }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(/* Base */ + KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_SPC, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_SPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, + KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/dactyl_left/keymaps/default/readme.md b/keyboards/handwired/dactyl_left/keymaps/default/readme.md new file mode 100644 index 0000000000..7fa3e26f5f --- /dev/null +++ b/keyboards/handwired/dactyl_left/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for dactyl_left \ No newline at end of file diff --git a/keyboards/handwired/dactyl_left/readme.md b/keyboards/handwired/dactyl_left/readme.md new file mode 100644 index 0000000000..edcc832068 --- /dev/null +++ b/keyboards/handwired/dactyl_left/readme.md @@ -0,0 +1,15 @@ +# dactyl_left + +![dactyl_left](https://i.imgur.com/PYL3Ca2.png) + +A custom build of an ergodox dactyl using a Teensy. Pins are custom. + +Keyboard Maintainer: [RedForty](https://github.com/RedForty) +Hardware Supported: Left side of the dactyl only +Hardware Availability: Custom job + +Make example for this keyboard (after setting up your build environment): + + make handwired/dactyl_left: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). diff --git a/keyboards/handwired/dactyl_left/rules.mk b/keyboards/handwired/dactyl_left/rules.mk new file mode 100644 index 0000000000..61c123d038 --- /dev/null +++ b/keyboards/handwired/dactyl_left/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/dactyl_manuform/4x5/4x5.h b/keyboards/handwired/dactyl_manuform/4x5/4x5.h index b34d97adbf..a70f52f3e1 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/4x5.h +++ b/keyboards/handwired/dactyl_manuform/4x5/4x5.h @@ -2,10 +2,8 @@ #include "dactyl_manuform.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF #define LAYOUT( \ L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c index 2e5cfd7ced..1a328f9d0a 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _BASE 0 #define _RAISE 1 @@ -20,7 +19,7 @@ extern keymap_config_t keymap_config; #define KC_MU KC_MS_UP #define KC_MD KC_MS_DOWN #define KC_MB1 KC_MS_BTN1 -#define KC_MB2 KC_MS_BTN1 +#define KC_MB2 KC_MS_BTN2 #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) @@ -44,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '------+------' '------+------' * | TAB | HOME | | END | DEL | * '------+------' '------+------' - * | Lower| ~ | | GUI | Raise| + * | Raise| ~ | | GUI | Lower| * '------+------' '------+------' */ @@ -92,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,----------------------------------, ,----------------------------------, * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | * |------+------+------+------+------| |-------------+------+------+------| - * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 10 | + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | * |------+------+------+------+------| |------|------+------+------+------| * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | * |------+------+------+-------------, ,-------------+------+------+------, diff --git a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c index ad23beef5c..52ddfad038 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _BASE 0 #define _RAISE 1 @@ -84,4 +83,3 @@ void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); } - diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c index 0d1efde33b..0910faf899 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c @@ -2,7 +2,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 @@ -48,5 +47,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______, _______,_______ ), }; - - diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h new file mode 100644 index 0000000000..98dc760031 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + + +#pragma once + + +// #define USE_SERIAL +#define USE_I2C +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS +// Rows are doubled-up +// #define DEBOUNCE 5 +#define TAPPING_TOGGLE 3 +#define ONESHOT_TAP_TOGGLE 3 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 300 +#ifdef RGBLED_NUM +# undef RGBLED_NUM +#endif +#define RGBLED_NUM 54 +#define RGBLIGHT_LIMIT_VAL 200 +#define RGBLIGHT_ANIMATIONS +// #define RGBLIGHT_LED_MAP { 11,10,9,8,7,6,5,4,3,2,1,0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 } +#define RGBLIGHT_SPLIT 27 diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/keymap.c new file mode 100644 index 0000000000..71a91cfd2a --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/keymap.c @@ -0,0 +1,61 @@ +/* A standard layout for the Dactyl Manuform 5x6 Keyboard */ + +#include QMK_KEYBOARD_H +#include "rishka.h" + +enum layers { + BASE, // default layer + WIN, // Switch keys that are needed in windows + SYMB, // symbols + MDIA // media keys +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT_5x6_wrapper( + KC_EQL , ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, KC_MINS, + KC_ESC , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, + KC_F1 , _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, KC_QUOT, + OS_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, OS_RSFT, + KC_LEFT,KC_RGHT, KC_UP, KC_DOWN, + KC_BSPC, KC_SPC, KC_TAB, KC_ENT, + KC_LGUI, MO(SYMB), MO(SYMB), TT(MDIA), + KC_DEL, KC_GRV, TT(WIN), KC_LALT + ), + [WIN] = LAYOUT_5x6_wrapper( + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _________________QWERTY_L2_________________, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, + _______, _______, _______, _______ + ), + + [SYMB] = LAYOUT_5x6_wrapper( + KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11, + _______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, KC_NLCK, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _________________SYMBOL_R3_________________, _______, + _______, _______, KC_P0 , KC_PDOT, + _______, _______, _______, _______, + RESET , _______, _______, _______, + RGB_TOG, _______, _______, _______ + ), + [MDIA] = LAYOUT_5x6_wrapper( + + RGB_MOD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_M_SN, RGB_HUD, _______, KC_MS_U, _______, KC_WH_U, _______, _______, KC_WH_U, _______, _______, _______, + RGB_VAI, RGB_SAI, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, MOUSE_L, KC_WH_D, MOUSE_R, _______, _______, + RGB_VAD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + KC_BTN1, KC_BTN2, _______, _______, + KC_BTN3, KC_BTN4, _______, _______, + KC_BTN5, _______, _______, _______ + + ), +}; + + diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/rules.mk b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/rules.mk new file mode 100644 index 0000000000..7084862d13 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/rules.mk @@ -0,0 +1,3 @@ +BOOTLOADER=qmk-dfu +RGBLIGHT_ENABLE = yes + diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c index 1378f87232..eb4deb6285 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c index b78a560086..fd2e5f413d 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 @@ -52,4 +51,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - diff --git a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h index 72f2acaab4..d8f27f729c 100644 --- a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h +++ b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h @@ -14,7 +14,6 @@ #include "62key.h" #endif -//void promicro_bootloader_jmp(bool program); #include "quantum.h" diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c index 3012d40a1b..3770a6d68e 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include #include -extern keymap_config_t keymap_config; // Automatic Layer ID: enum layer_names { diff --git a/keyboards/handwired/dactyl_manuform/rules.mk b/keyboards/handwired/dactyl_manuform/rules.mk index a93de36858..1ba5f5a093 100644 --- a/keyboards/handwired/dactyl_manuform/rules.mk +++ b/keyboards/handwired/dactyl_manuform/rules.mk @@ -1,48 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c index d396e46762..394803aef5 100644 --- a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/handwired/dactyl_promicro/rules.mk b/keyboards/handwired/dactyl_promicro/rules.mk index a93de36858..1ba5f5a093 100644 --- a/keyboards/handwired/dactyl_promicro/rules.mk +++ b/keyboards/handwired/dactyl_promicro/rules.mk @@ -1,48 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/daishi/config.h b/keyboards/handwired/daishi/config.h index 15ff6a6a62..b4665bece4 100644 --- a/keyboards/handwired/daishi/config.h +++ b/keyboards/handwired/daishi/config.h @@ -52,10 +52,9 @@ along with this program. If not, see . #define DEBOUNCE 5 /* Set up rotary encoder */ -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { F1 } #define ENCODERS_PAD_B { F0 } #define ENCODER_RESOLUTION 2 /* Set delay for tap_code on rotary encoder */ -#define TAP_CODE_DELAY 10 \ No newline at end of file +#define TAP_CODE_DELAY 10 diff --git a/keyboards/handwired/daishi/rules.mk b/keyboards/handwired/daishi/rules.mk index ece1eaaac3..dacecfb0b1 100644 --- a/keyboards/handwired/daishi/rules.mk +++ b/keyboards/handwired/daishi/rules.mk @@ -1,49 +1,14 @@ # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # QMK Build Options @@ -63,4 +28,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ENCODER_ENABLE = yes # Add rotary encoder support \ No newline at end of file +ENCODER_ENABLE = yes # Add rotary encoder support diff --git a/keyboards/handwired/datahand/rules.mk b/keyboards/handwired/datahand/rules.mk index 59f14e17a4..a46dcedb1c 100644 --- a/keyboards/handwired/datahand/rules.mk +++ b/keyboards/handwired/datahand/rules.mk @@ -1,44 +1,14 @@ -# Project-specific includes -SRC = matrix.c - # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options @@ -57,3 +27,6 @@ CUSTOM_MATRIX = yes # We definitely have a nonstandard matrix # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# Project specific files +SRC = matrix.c diff --git a/keyboards/handwired/downbubble/rules.mk b/keyboards/handwired/downbubble/rules.mk index 87d0d4a1e2..189b82720e 100644 --- a/keyboards/handwired/downbubble/rules.mk +++ b/keyboards/handwired/downbubble/rules.mk @@ -1,43 +1,5 @@ # MCU name MCU = at90usb1286 -#MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -45,20 +7,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/fivethirteen/rules.mk b/keyboards/handwired/fivethirteen/rules.mk index c8dd19ef7b..64d566cb17 100644 --- a/keyboards/handwired/fivethirteen/rules.mk +++ b/keyboards/handwired/fivethirteen/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c index 7b82f36e36..b0713b730c 100644 --- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c +++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c @@ -12,8 +12,8 @@ #define PEDAL_DELAY 250 #define KEY_DELAY 130 -enum macros { - M_LP = SAFE_RANGE, // left pedal +enum custom_keycodes { + M_LP = SAFE_RANGE, // left pedal M_RP, // right pedal M_SF, // shift M_SFS, // shift and space diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c index 26c2b31260..c9c7e94aea 100644 --- a/keyboards/handwired/frenchdev/matrix.c +++ b/keyboards/handwired/frenchdev/matrix.c @@ -35,9 +35,6 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "frenchdev.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif /* * This constant define not debouncing time in msecs, but amount of matrix @@ -66,12 +63,6 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -120,13 +111,7 @@ void matrix_init(void) matrix_debouncing[i] = 0; } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - matrix_init_quantum(); - } void matrix_power_up(void) { @@ -140,12 +125,6 @@ void matrix_power_up(void) { matrix[i] = 0; matrix_debouncing[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - } uint8_t matrix_scan(void) @@ -165,20 +144,6 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); wait_us(30); // without this wait read unstable value. diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk index 69a12b68d7..abf4e62c4b 100644 --- a/keyboards/handwired/frenchdev/rules.mk +++ b/keyboards/handwired/frenchdev/rules.mk @@ -1,70 +1,15 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = i2c_master.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -BOOTLOADER = halfKay +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. @@ -85,3 +30,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = no API_SYSEX_ENABLE = no + +# project specific files +SRC = i2c_master.c \ + matrix.c diff --git a/keyboards/handwired/fruity60/config.h b/keyboards/handwired/fruity60/config.h new file mode 100644 index 0000000000..5cccba3dc8 --- /dev/null +++ b/keyboards/handwired/fruity60/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2019 Yan-Fa Li + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB170 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yanfali +#define PRODUCT fruity60 +#define DESCRIPTION An Adafruit BLE 32u4 capable 60 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 11 + +#define MATRIX_ROW_PINS \ + { B6, B5, D7, C6, D0, D1 } +#define MATRIX_COL_PINS \ + { F7, F6, F5, F4, F1, F0, D2, D3, B7, D6, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/handwired/fruity60/fruity60.c b/keyboards/handwired/fruity60/fruity60.c new file mode 100644 index 0000000000..d68b17955e --- /dev/null +++ b/keyboards/handwired/fruity60/fruity60.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ +#include "fruity60.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/handwired/fruity60/fruity60.h b/keyboards/handwired/fruity60/fruity60.h new file mode 100644 index 0000000000..7eb2e7e6fd --- /dev/null +++ b/keyboards/handwired/fruity60/fruity60.h @@ -0,0 +1,42 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_60_tsangan_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k50, k51, k52, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k54, k55, k56, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k57, k58, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k59, k5a, \ + k40, k41, k42, k45, k48, k49, k4a \ + ) \ + { \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a}, \ + {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, k48, k49, k4a}, \ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a}, \ + } diff --git a/keyboards/handwired/fruity60/info.json b/keyboards/handwired/fruity60/info.json new file mode 100644 index 0000000000..7cf5e61d18 --- /dev/null +++ b/keyboards/handwired/fruity60/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "fruity60", + "url": "https://github.com/yanfali/fruity60", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"label":"Backspace", "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":"|", "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":2.25}, {"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}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Menu", "x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/handwired/fruity60/keymaps/default/config.h b/keyboards/handwired/fruity60/keymaps/default/config.h new file mode 100644 index 0000000000..7d7844ac61 --- /dev/null +++ b/keyboards/handwired/fruity60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/fruity60/keymaps/default/keymap.c b/keyboards/handwired/fruity60/keymaps/default/keymap.c new file mode 100644 index 0000000000..a6cd15f4e2 --- /dev/null +++ b/keyboards/handwired/fruity60/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +enum layer { + BASE, + FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_60_tsangan_hhkb( + 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_GRV, 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, + LCTL_T(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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [FN] = LAYOUT_60_tsangan_hhkb( + _______, 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_INS, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/handwired/fruity60/keymaps/default/readme.md b/keyboards/handwired/fruity60/keymaps/default/readme.md new file mode 100644 index 0000000000..7c01154cd1 --- /dev/null +++ b/keyboards/handwired/fruity60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for fruity60 diff --git a/keyboards/handwired/fruity60/readme.md b/keyboards/handwired/fruity60/readme.md new file mode 100644 index 0000000000..ed476d2643 --- /dev/null +++ b/keyboards/handwired/fruity60/readme.md @@ -0,0 +1,15 @@ +# fruity60 + +![fruity60](https://github.com/yanfali/fruity60/blob/master/assets/pcb.png) + +A 60% tsangan, split bs/rs keyboard designed to support the bluefruit 32u4 ble controller + +Keyboard Maintainer: [Yan-Fa Li](https://github.com/yanfali)
+Hardware Supported: [github](https://github.com/yanfali/fruity60)
+Hardware Availability: You can make them yourself by downloading kicad and generating gerbers.
+ +Make example for this keyboard (after setting up your build environment): + + make fruity60: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). diff --git a/keyboards/handwired/fruity60/rules.mk b/keyboards/handwired/fruity60/rules.mk new file mode 100644 index 0000000000..9e64f161af --- /dev/null +++ b/keyboards/handwired/fruity60/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +BLUETOOTH = AdafruitBLE + +LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c index 7d667cd390..237b0fb927 100644 --- a/keyboards/handwired/gamenum/keymaps/default/keymap.c +++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c @@ -29,11 +29,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -}; - - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case TO(HDN): diff --git a/keyboards/handwired/gamenum/rules.mk b/keyboards/handwired/gamenum/rules.mk index d980716eae..3989329835 100644 --- a/keyboards/handwired/gamenum/rules.mk +++ b/keyboards/handwired/gamenum/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable @@ -65,5 +28,3 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - - diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index 1a341c0f4e..d4bf11f235 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . */ // WR XR YR ZR VR ZL YL XL WL VL -#define MATRIX_ROW_PINS { B3, B5, F1, B4, B6, D5, D4, D6, D7, C4} +#define MATRIX_ROW_PINS { B3, B4, F1, B5, B6, D5, D4, D6, D7, C4} // ER DR CR BR AR FR FL AL BL CL DL EL #define MATRIX_COL_PINS { F7, F6, F5, F4, F3, F2, E0, E1, C0, C1, C2, C3 } @@ -120,7 +120,6 @@ along with this program. If not, see . * power-up. * */ -#define FORCE_NKRO /* * Magic Key Options diff --git a/keyboards/handwired/hacked_motospeed/keymaps/german/keymap.c b/keyboards/handwired/hacked_motospeed/keymaps/german/keymap.c new file mode 100644 index 0000000000..23c076680f --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/german/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT(KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LSFT(KC_8), LSFT(KC_9), KC_PEQL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LSFT(KC_MINS), MO(2), MO(6), KC_TAB, KC_BSPC, KC_SPC, MO(1), KC_LCTL, KC_LALT, MO(4), KC_LGUI, MO(2)), +[1] = LAYOUT(LALT(KC_F4), LSFT(KC_Q), LSFT(KC_W), LSFT(KC_E), LSFT(KC_R), LSFT(KC_T), LSFT(KC_Y), LSFT(KC_U), LSFT(KC_I), LSFT(KC_O), LSFT(KC_P), LSFT(KC_A), LSFT(KC_S), LSFT(KC_D), LSFT(KC_F), LSFT(KC_G), LSFT(KC_H), LSFT(KC_J), LSFT(KC_K), LSFT(KC_L), RALT(KC_7), RALT(KC_0), KC_NUHS, LSFT(KC_Z), LSFT(KC_X), LSFT(KC_C), LSFT(KC_V), LSFT(KC_B), LSFT(KC_N), LSFT(KC_M), LSFT(KC_COMM), LSFT(KC_DOT), LSFT(KC_1), MO(3), TG(6), LSFT(KC_TAB), KC_DEL, KC_ENT, KC_TRNS, LSFT(KC_LCTL), LSFT(KC_LALT), LSFT(KC_RALT), LSFT(KC_LGUI), MO(3)), +[2] = LAYOUT(LSFT(KC_GRV), RALT(KC_Q), KC_JYEN, RALT(KC_E), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), KC_LBRC, KC_UP, KC_SCLN, KC_PSCR, KC_QUOT, KC_MINS, LSFT(KC_7), LSFT(KC_2), LSFT(KC_NUHS), LSFT(KC_3), KC_LEFT, KC_DOWN, KC_RGHT, KC_NUBS, LSFT(KC_NUBS), RALT(KC_RBRC), KC_GRV, LSFT(KC_RBRC), KC_SLSH, KC_RBRC, RALT(KC_NUBS), KC_HOME, KC_PGDN, KC_PGUP, KC_END, RALT(KC_6), KC_TRNS, KC_CAPS, KC_TAB, KC_DEL, KC_ENT, MO(3), OUT_BT, OUT_USB, OUT_AUTO, BL_STEP, KC_TRNS), +[3] = LAYOUT(LSFT(KC_GRV), RALT(KC_Q), KC_JYEN, RALT(KC_E), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_LBRC), KC_UP, LSFT(KC_SCLN), KC_PSCR, LSFT(KC_QUOT), KC_MINS, RALT(KC_MINS), LSFT(KC_EQL), KC_EQL, LSFT(KC_3), KC_LEFT, KC_DOWN, KC_RGHT, RALT(KC_8), RALT(KC_9), RALT(KC_RBRC), KC_GRV, LSFT(KC_RBRC), LSFT(KC_SLSH), KC_RBRC, RALT(KC_NUBS), KC_HOME, KC_PGDN, KC_PGUP, KC_END, RALT(KC_6), KC_TRNS, KC_CAPS, LSFT(KC_TAB), LSFT(KC_DEL), LSFT(KC_ENT), KC_TRNS, RSFT(KC_RCTL), RSFT(KC_LALT), RSFT(KC_RALT), RSFT(KC_RGUI), KC_TRNS), +[4] = LAYOUT(RALT(KC_ESC), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), RALT(KC_L), RALT(KC_8), RALT(KC_9), LSFT(KC_0), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_6), KC_NO, RALT(KC_ENT), RALT(KC_TAB), RALT(KC_DEL), RALT(KC_SPC), RALT(KC_LSFT), RALT(KC_LCTL), RALT(KC_LALT), KC_TRNS, RALT(KC_LGUI), KC_NO), +[5] = LAYOUT(KC_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_NO, KC_TRNS, KC_TAB, KC_BSPC, KC_SPC, KC_LSFT, KC_LCTL, KC_LALT, KC_RALT, KC_LGUI, KC_NO) +}; diff --git a/keyboards/handwired/hacked_motospeed/keymaps/german/layers.json b/keyboards/handwired/hacked_motospeed/keymaps/german/layers.json new file mode 100644 index 0000000000..d2ff7c5b46 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/german/layers.json @@ -0,0 +1 @@ +[["KC_ESC", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "LSFT(KC_8)", "LSFT(KC_9)", "KC_PEQL", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "LSFT(KC_MINS)", "MO(2)", "MO(6)", "KC_TAB", "KC_BSPC", "KC_SPC", "MO(1)", "KC_LCTL", "KC_LALT", "MO(4)", "KC_LGUI", "MO(2)"], ["LALT(KC_F4)", "LSFT(KC_Q)", "LSFT(KC_W)", "LSFT(KC_E)", "LSFT(KC_R)", "LSFT(KC_T)", "LSFT(KC_Y)", "LSFT(KC_U)", "LSFT(KC_I)", "LSFT(KC_O)", "LSFT(KC_P)", "LSFT(KC_A)", "LSFT(KC_S)", "LSFT(KC_D)", "LSFT(KC_F)", "LSFT(KC_G)", "LSFT(KC_H)", "LSFT(KC_J)", "LSFT(KC_K)", "LSFT(KC_L)", "RALT(KC_7)", "RALT(KC_0)", "KC_NUHS", "LSFT(KC_Z)", "LSFT(KC_X)", "LSFT(KC_C)", "LSFT(KC_V)", "LSFT(KC_B)", "LSFT(KC_N)", "LSFT(KC_M)", "LSFT(KC_COMM)", "LSFT(KC_DOT)", "LSFT(KC_1)", "MO(3)", "TG(6)", "LSFT(KC_TAB)", "KC_DEL", "KC_ENT", "KC_TRNS", "LSFT(KC_LCTL)", "LSFT(KC_LALT)", "LSFT(KC_RALT)", "LSFT(KC_LGUI)", "MO(3)"], ["LSFT(KC_GRV)", "RALT(KC_Q)", "KC_JYEN", "RALT(KC_E)", "LSFT(KC_4)", "LSFT(KC_5)", "LSFT(KC_6)", "KC_LBRC", "KC_UP", "KC_SCLN", "KC_PSCR", "KC_QUOT", "KC_MINS", "LSFT(KC_7)", "LSFT(KC_2)", "LSFT(KC_NUHS)", "LSFT(KC_3)", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_NUBS", "LSFT(KC_NUBS)", "RALT(KC_RBRC)", "KC_GRV", "LSFT(KC_RBRC)", "KC_SLSH", "KC_RBRC", "RALT(KC_NUBS)", "KC_HOME", "KC_PGDN", "KC_PGUP", "KC_END", "RALT(KC_6)", "KC_TRNS", "KC_CAPS", "KC_TAB", "KC_DEL", "KC_ENT", "MO(3)", "OUT_BT", "OUT_USB", "OUT_AUTO", "BL_STEP", "KC_TRNS"], ["LSFT(KC_GRV)", "RALT(KC_Q)", "KC_JYEN", "RALT(KC_E)", "LSFT(KC_4)", "LSFT(KC_5)", "LSFT(KC_6)", "LSFT(KC_LBRC)", "KC_UP", "LSFT(KC_SCLN)", "KC_PSCR", "LSFT(KC_QUOT)", "KC_MINS", "RALT(KC_MINS)", "LSFT(KC_EQL)", "KC_EQL", "LSFT(KC_3)", "KC_LEFT", "KC_DOWN", "KC_RGHT", "RALT(KC_8)", "RALT(KC_9)", "RALT(KC_RBRC)", "KC_GRV", "LSFT(KC_RBRC)", "LSFT(KC_SLSH)", "KC_RBRC", "RALT(KC_NUBS)", "KC_HOME", "KC_PGDN", "KC_PGUP", "KC_END", "RALT(KC_6)", "KC_TRNS", "KC_CAPS", "LSFT(KC_TAB)", "LSFT(KC_DEL)", "LSFT(KC_ENT)", "KC_TRNS", "RSFT(KC_RCTL)", "RSFT(KC_LALT)", "RSFT(KC_RALT)", "RSFT(KC_RGUI)", "KC_TRNS"], ["RALT(KC_ESC)", "RALT(KC_Q)", "RALT(KC_W)", "RALT(KC_E)", "RALT(KC_R)", "RALT(KC_T)", "RALT(KC_Y)", "RALT(KC_U)", "RALT(KC_I)", "RALT(KC_O)", "RALT(KC_P)", "RALT(KC_A)", "RALT(KC_S)", "RALT(KC_D)", "RALT(KC_F)", "RALT(KC_G)", "RALT(KC_H)", "RALT(KC_J)", "RALT(KC_K)", "RALT(KC_L)", "RALT(KC_8)", "RALT(KC_9)", "LSFT(KC_0)", "RALT(KC_Z)", "RALT(KC_X)", "RALT(KC_C)", "RALT(KC_V)", "RALT(KC_B)", "RALT(KC_N)", "RALT(KC_M)", "RALT(KC_COMM)", "RALT(KC_DOT)", "RALT(KC_6)", "KC_NO", "RALT(KC_ENT)", "RALT(KC_TAB)", "RALT(KC_DEL)", "RALT(KC_SPC)", "RALT(KC_LSFT)", "RALT(KC_LCTL)", "RALT(KC_LALT)", "KC_TRNS", "RALT(KC_LGUI)", "KC_NO"], ["KC_0", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_F11", "KC_F12", "KC_F13", "KC_F14", "KC_F15", "KC_F16", "KC_F17", "KC_F18", "KC_F19", "KC_F20", "KC_F21", "KC_F22", "KC_F23", "KC_NO", "KC_TRNS", "KC_TAB", "KC_BSPC", "KC_SPC", "KC_LSFT", "KC_LCTL", "KC_LALT", "KC_RALT", "KC_LGUI", "KC_NO"]] \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/keymaps/german/readme.md b/keyboards/handwired/hacked_motospeed/keymaps/german/readme.md new file mode 100755 index 0000000000..fd07b155fb --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/german/readme.md @@ -0,0 +1,13 @@ +# Generated Keymap Layout + +This layout was generated by the QMK API. You can find the JSON data used to +generate this keymap in the file layers.json. + +To make use of this file you will need follow the following steps: + +* Download or Clone QMK Firmware: +* Extract QMK Firmware to a location on your hard drive +* Copy this folder into %s +* You are now ready to compile or use your keymap with the source + +More information can be found in the QMK docs: \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk index 1dc955718f..7cb9e914ec 100644 --- a/keyboards/handwired/hacked_motospeed/rules.mk +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -1,43 +1,5 @@ # MCU name MCU = at90usb1286 -#MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -45,20 +7,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=1024 - - # Build Options # change yes to no to disable # @@ -70,7 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover +NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) @@ -78,4 +30,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in +BLUETOOTH = RN42 diff --git a/keyboards/handwired/hexon38/rules.mk b/keyboards/handwired/hexon38/rules.mk index 2b6f17afc2..fb5e1b0c9b 100644 --- a/keyboards/handwired/hexon38/rules.mk +++ b/keyboards/handwired/hexon38/rules.mk @@ -1,54 +1,16 @@ -# see https://github.com/pepaslabs/hexon38 - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - # Enabled build options: BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/handwired/hnah108/config.h b/keyboards/handwired/hnah108/config.h new file mode 100644 index 0000000000..b2d84e3e38 --- /dev/null +++ b/keyboards/handwired/hnah108/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 HnahKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0002 +#define MANUFACTURER HnahKB +#define PRODUCT Hnah108 +#define DESCRIPTION Fullsize PCB keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { F7, F6, F5, F4, F1, C7, B4, B5, B6, C6 } +#define MATRIX_COL_PINS \ + { F0, E6, B0, D0, D1, D2, D3, D5, D4, D6, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define ENCODERS_PAD_A { B2 } +#define ENCODERS_PAD_B { B3 } + +#define ENCODER_RESOLUTION 4 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 31 + +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/handwired/hnah108/hnah108.c b/keyboards/handwired/hnah108/hnah108.c new file mode 100644 index 0000000000..a05cc4fe12 --- /dev/null +++ b/keyboards/handwired/hnah108/hnah108.c @@ -0,0 +1,43 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include "hnah108.h" + + + +led_config_t g_led_config = { { + //Key Matrix to LED Index + { 18, 17, 16,NO_LED, 15, 14,NO_LED,NO_LED, 13, 12,NO_LED}, + {NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED}, + {19, NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED}, + {NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED}, + {20, NO_LED,NO_LED,NO_LED,NO_LED,24 ,NO_LED,NO_LED,26 ,NO_LED,NO_LED}, + { 21, 22, 23, 25, 27,NO_LED, 28, 29,NO_LED, 0, 1}, + { 11, 10,NO_LED, 9,NO_LED, 8,NO_LED, 7, 6,NO_LED, 5}, + {NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED, 4}, + {NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED, 3}, + {NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED,NO_LED, 2} +}, { + //LED Index to Physical Positon + { 0, 0}, { 18, 0}, { 37, 0 }, { 56, 0}, { 74, 0}, { 93, 0}, { 112, 0 }, { 130, 0}, { 149, 0}, { 168, 0}, { 186, 0 }, { 205, 0}, + { 0, 25} , { 205, 25}, + { 0, 51} , { 205, 51}, + { 0, 63} , { 18, 63}, { 37, 63}, { 56, 63}, { 74, 63}, { 93, 63}, { 112, 63}, { 130, 63},{ 149, 63}, { 168, 63}, { 186, 63 }, { 205, 63}, +}, { + 1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1, + 1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1, +} }; \ No newline at end of file diff --git a/keyboards/handwired/hnah108/hnah108.h b/keyboards/handwired/hnah108/hnah108.h new file mode 100644 index 0000000000..9ea34b83ad --- /dev/null +++ b/keyboards/handwired/hnah108/hnah108.h @@ -0,0 +1,72 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, k82, k83, k84, k85, k86, k87, k79, k6A, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91, k93, k94, k96, k97, k88, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k90, k92, k95, k98, k99, k89, k7A, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k9A, k8A \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A }, \ +} + +#define LAYOUT_fullsize_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, k83, k84, k85, k86, k87, k79, k6A, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91, k93, k94, k96, k97, k88, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k90, k92, k95, k98, k99, k89, k7A, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k9A, k8A \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, KC_NO, k83, k84, k85, k86, k87, k79, k6A, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91, k93, k94, k96, k97, k88, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k90, k92, k95, k98, k99, k89, k7A, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k9A, k8A \ +) + +#define LAYOUT_fullsize_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, k82, k83, k84, k85, k86, k87, k79, k6A, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91, k94, k96, k97, k88, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k90, k92, k95, k98, k99, k89, k7A, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k9A, k8A \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, k82, k83, k84, k85, k86, k87, k79, k6A, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91,KC_NO,k94, k96, k97, k88, \ + k40,KC_NO,k42, k43, k44, k45, k46, k47, k48, k49, k4A, k90, k92, k95, k98, k99, k89, k7A, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k9A, k8A \ +) diff --git a/keyboards/handwired/hnah108/info.json b/keyboards/handwired/hnah108/info.json new file mode 100644 index 0000000000..a8671a870c --- /dev/null +++ b/keyboards/handwired/hnah108/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "hnah108", + "url": "", + "maintainer": "HnahKB", + "width": 22.5, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"x":18.5, "y":0}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"@", "x":11.75, "y":3.25}, {"label":"~", "x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"label":"|", "x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] + }, + "LAYOUT_fullsize_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"x":18.5, "y":0}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"@", "x":11.75, "y":3.25}, {"label":"~", "x":12.75, "y":3.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"label":"|", "x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] + }, + "LAYOUT_fullsize_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"x":18.5, "y":0}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/hnah108/keymaps/default/config.h b/keyboards/handwired/hnah108/keymaps/default/config.h new file mode 100644 index 0000000000..348d7c5513 --- /dev/null +++ b/keyboards/handwired/hnah108/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/hnah108/keymaps/default/keymap.c b/keyboards/handwired/hnah108/keymaps/default/keymap.c new file mode 100644 index 0000000000..6d8fe072c1 --- /dev/null +++ b/keyboards/handwired/hnah108/keymaps/default/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _QWERTY, + _FN +}; + +#define LOWER MO(_FN) +#define RAISE MO(_QWERTY) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( /* Base */ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, KC_MYCM, KC_CALC, KC_MPLY, LOWER, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_SLSH, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [_FN] = LAYOUT_all( /* Base */ + RESET, BL_STEP,RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRIU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, _______, _______, _______ + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (IS_LAYER_ON(_FN)) { + if (clockwise) { + tap_code(KC_BRIU); + } else { + tap_code(KC_BRID); + } + } else { + if (clockwise) { + tap_code(KC_VOLU); + + } else { + tap_code(KC_VOLD); + } + } + } +} + +void rgb_matrix_indicators_user(void) +{ + if IS_HOST_LED_ON(USB_LED_CAPS_LOCK) + { + rgb_matrix_set_color(30, 0x00, 0xFF, 0x00); + } else if IS_HOST_LED_ON(USB_LED_NUM_LOCK) + { + rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); + } else if IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) + { + rgb_matrix_set_color(30, 0x00, 0x00, 0xFF); + } else { + rgb_matrix_set_color(30, 0x00, 0x00, 0x00); + } +} \ No newline at end of file diff --git a/keyboards/handwired/hnah108/keymaps/default/readme.md b/keyboards/handwired/hnah108/keymaps/default/readme.md new file mode 100644 index 0000000000..37477efdb1 --- /dev/null +++ b/keyboards/handwired/hnah108/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hnah108 \ No newline at end of file diff --git a/keyboards/handwired/hnah108/readme.md b/keyboards/handwired/hnah108/readme.md new file mode 100644 index 0000000000..d4cd6a1802 --- /dev/null +++ b/keyboards/handwired/hnah108/readme.md @@ -0,0 +1,14 @@ +# hnah108 + +![hnah108](https://i.imgur.com/rV0lM8M.jpg) + +A Full size keyboard pcb with rotary encoder. Used ws2811 IC as a indicator LED driver + +Keyboard Maintainer: [HnahKB](https://github.com/vuhopkep) +Hardware Supported: Hnah108 v1 + +Make example for this keyboard (after setting up your build environment): + + make handwired/hnah108: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). diff --git a/keyboards/handwired/hnah108/rules.mk b/keyboards/handwired/hnah108/rules.mk new file mode 100644 index 0000000000..8e486c594b --- /dev/null +++ b/keyboards/handwired/hnah108/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = WS2812 diff --git a/keyboards/handwired/hnah40/config.h b/keyboards/handwired/hnah40/config.h index b7a4105d00..3d3c05fd42 100644 --- a/keyboards/handwired/hnah40/config.h +++ b/keyboards/handwired/hnah40/config.h @@ -78,6 +78,8 @@ along with this program. If not, see . */ // #define GRAVE_ESC_CTRL_OVERRIDE +#define USB_MAX_POWER_CONSUMPTION 100 + /* * Force NKRO * diff --git a/keyboards/handwired/hnah40/info.json b/keyboards/handwired/hnah40/info.json index 6a577a5207..f9664d22c9 100644 --- a/keyboards/handwired/hnah40/info.json +++ b/keyboards/handwired/hnah40/info.json @@ -39,7 +39,8 @@ {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":",", "x":8.75, "y":2}, - {"label":"Shift", "x":9.75, "y":2, "w":2.25}, + {"label":".", "x":9.75, "y":2}, + {"label":"Shift", "x":10.75, "y":2, "w":1.25}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Win", "x":1.25, "y":3, "w":1.5}, {"label":"Alt", "x":2.75, "y":3, "w":1.25}, @@ -51,4 +52,4 @@ ] } } -} \ No newline at end of file +} diff --git a/keyboards/handwired/hnah40/rules.mk b/keyboards/handwired/hnah40/rules.mk index efd11bfa5c..bbdf5176c4 100644 --- a/keyboards/handwired/hnah40/rules.mk +++ b/keyboards/handwired/hnah40/rules.mk @@ -1,44 +1,15 @@ # MCU name MCU = atmega328p -PROTOCOL = VUSB -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -BOOTLOADER = bootloadHID +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp # Flash program via avrdude, but default command is not suitable. # You can use hnah40:default:program @@ -69,5 +40,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes \ No newline at end of file diff --git a/keyboards/handwired/hnah40/usbconfig.h b/keyboards/handwired/hnah40/usbconfig.h index cbd37c34dc..b26a3c7d67 100644 --- a/keyboards/handwired/hnah40/usbconfig.h +++ b/keyboards/handwired/hnah40/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -239,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'H','n','a','h','K','B' diff --git a/keyboards/handwired/hnah40rgb/config.h b/keyboards/handwired/hnah40rgb/config.h new file mode 100644 index 0000000000..7741f3965f --- /dev/null +++ b/keyboards/handwired/hnah40rgb/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2019 HnahKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER HnahKB +#define PRODUCT Hnah40V2 +#define DESCRIPTION A custom rgb keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { B7, D7, F1, F0 } +#define MATRIX_COL_PINS \ + { D5, D6, D3, D2, B6, C6, C7, F7, F6, F5, F4 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#ifdef RGB_MATRIX_ENABLE +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 50 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +#endif diff --git a/keyboards/handwired/hnah40rgb/hnah40rgb.c b/keyboards/handwired/hnah40rgb/hnah40rgb.c new file mode 100644 index 0000000000..2bf1373d91 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/hnah40rgb.c @@ -0,0 +1,47 @@ +#include "hnah40rgb.h" +#ifdef RGB_MATRIX_ENABLE +#if defined (ansi) +led_config_t g_led_config = { { + //Key Matrix to LED Index + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, + {22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12 }, + {23, 24, 25, 26, 27, 28, 29, 30, 31, NO_LED, 34}, + {43, 42, 41, NO_LED, NO_LED, NO_LED, 38, NO_LED, 36, 35, 11} +}, { + //LED Index to Physical Positon + { 0, 0}, { 20, 0}, { 40, 0 }, { 61, 0 }, { 81, 0}, { 101, 0}, { 122, 0}, { 142, 0}, { 162, 0}, { 183, 0}, { 224, 0}, { 224, 0}, + {224, 21}, {183, 21}, {162,21 }, {142, 21}, {122,21}, { 101,21}, { 81 ,21}, { 61 ,21}, { 40 ,21}, { 20 ,21}, { 0 ,21}, + { 0, 42}, { 20, 42}, { 40,42 }, { 61, 42}, { 81,42}, { 101,42}, { 122,42}, { 142,42}, { 162,42}, { 183,42}, { 224,42}, + {224, 64}, {224, 64}, {181,64 }, {162, 64}, {122,64}, {101,64}, { 61,64}, { 40,64}, { 20,64}, { 0,64}, + { 0,64}, { 0,0}, { 224,10}, { 224,18}, { 224,30}, { 224,47}, +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +} }; + +#else +led_config_t g_led_config = { { + //Key Matrix to LED Index + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, + {22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12 }, + {23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34}, + {43, 42, 41, NO_LED, 40, 39, 38, 37, 36, 35, 11} +}, { + //LED Index to Physical Positon + { 0, 0}, { 20, 0}, { 40, 0 }, { 61, 0 }, { 81, 0}, { 101, 0}, { 122, 0}, { 142, 0}, { 162, 0}, { 183, 0}, { 224, 0}, { 224, 0}, + {224, 21}, {183, 21}, {162,21 }, {142, 21}, {122,21}, { 101,21}, { 81 ,21}, { 61 ,21}, { 40 ,21}, { 20 ,21}, { 0 ,21}, + { 0, 42}, { 20, 42}, { 40,42 }, { 61, 42}, { 81,42}, { 101,42}, { 122,42}, { 142,42}, { 162,42}, { 183,42}, { 224,42}, + {224, 64}, {224, 64}, {181,64 }, {162, 64}, {122,64}, {101,64}, { 61,64}, { 40,64}, { 20,64}, { 0,64}, + { 0,64}, { 0,0}, { 224,10}, { 224,18}, { 224,30}, { 224,47}, +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +} }; +#endif +#endif \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/hnah40rgb.h b/keyboards/handwired/hnah40rgb/hnah40rgb.h new file mode 100644 index 0000000000..182c68603a --- /dev/null +++ b/keyboards/handwired/hnah40rgb/hnah40rgb.h @@ -0,0 +1,44 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ +k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k41, \ +k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, \ +k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33,\ +k34, k35, k36, k37, k38, k39, k40 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10}, \ + {k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21}, \ + {k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32}, \ + {k33, k34, k35, KC_NO,k36, KC_NO, k37, k38, k39, k40, k41}, \ +} + +#define LAYOUT_ansi( \ +k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k41, \ +k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, \ +k22, k23, k24, k25, k26, k27, k28, k29, k30, k32,\ +k33, k34, k35, k38, k39, k40 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10}, \ + {k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21}, \ + {k22, k23, k24, k25, k26, k27, k28, k29, k30, KC_NO, k32}, \ + {k33, k34, k35, KC_NO, KC_NO, KC_NO, k38, KC_NO, k39, k40, k41}, \ +} diff --git a/keyboards/handwired/hnah40rgb/info.json b/keyboards/handwired/hnah40rgb/info.json new file mode 100644 index 0000000000..dd1b423259 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/info.json @@ -0,0 +1,100 @@ +{ + "keyboard_name": "Hnah40", + "url": "", + "maintainer": "HnahKB", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_all": { + "key_count": 42, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"BSPC", "x":11, "y":0}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.5}, + {"label":"A", "x":1.5, "y":1}, + {"label":"S", "x":2.5, "y":1}, + {"label":"D", "x":3.5, "y":1}, + {"label":"F", "x":4.5, "y":1}, + {"label":"G", "x":5.5, "y":1}, + {"label":"H", "x":6.5, "y":1}, + {"label":"J", "x":7.5, "y":1}, + {"label":"K", "x":8.5, "y":1}, + {"label":"L", "x":9.5, "y":1}, + {"label":"Enter", "x":10.5, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":",", "x":8.75, "y":2}, + {"label":".", "x":9.75, "y":2}, + {"label":"Shift", "x":10.75, "y":2, "w":1.25}, + {"label":"Ctrl", "x":0, "y":3, "w":1.25}, + {"label":"Win", "x":1.25, "y":3, "w":1}, + {"label":"Alt", "x":2.25, "y":3, "w":1.25}, + {"label":"Space", "x":3.5, "y":3, "w":2.25}, + {"label":"Space", "x":5.75, "y":3, "w":2.75}, + {"label":"App", "x":8.5, "y":3, "w":1.25}, + {"label":"Fn", "x":9.75, "y":3, "w":1}, + {"label":"Ctrl", "x":10.75, "y":3, "w":1.25} + ] + }, + "LAYOUT_ansi": { + "key_count": 39, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"BSPC", "x":11, "y":0}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.5}, + {"label":"A", "x":1.5, "y":1}, + {"label":"S", "x":2.5, "y":1}, + {"label":"D", "x":3.5, "y":1}, + {"label":"F", "x":4.5, "y":1}, + {"label":"G", "x":5.5, "y":1}, + {"label":"H", "x":6.5, "y":1}, + {"label":"J", "x":7.5, "y":1}, + {"label":"K", "x":8.5, "y":1}, + {"label":"L", "x":9.5, "y":1}, + {"label":"Enter", "x":10.5, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":",", "x":8.75, "y":2}, + {"label":"Shift", "x":9.75, "y":2, "w":2.25}, + {"label":"Ctrl", "x":0, "y":3, "w":1.25}, + {"label":"Win", "x":1.25, "y":3}, + {"label":"Alt", "x":2.25, "y":3, "w":1.25}, + {"label":"Space", "x":3.5, "y":3, "w":6}, + {"label":"App", "x":9.5, "y":3, "w":1.25}, + {"label":"Ctrl", "x":10.75, "y":3, "w":1.25} + ] + } + } +} diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h b/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h new file mode 100644 index 0000000000..66cd76a901 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h @@ -0,0 +1,18 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once +#define ansi \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c b/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c new file mode 100644 index 0000000000..320f7d93e4 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _BASE, + _L1, + _L2 +}; + +enum hnah_keycodes{ + BASE, + L1, + L2 +}; + +#define L1 MO(_L1) +#define L2 MO(_L2) + +// Defines the keycodes used by our macros in process_record_user + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ansi(/* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_L2,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, L1, KC_RCTL ), + [_L1] = LAYOUT_ansi(/* Base */ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [_L2] = LAYOUT_ansi(/* Base */ + RGB_TOG, RGB_RMOD, KC_UP, RGB_MOD, RGB_HUI, RGB_VAI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_HUD, RGB_VAD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS ), +}; + +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(22, 255, 255, 255); + } + if (IS_LAYER_ON(_L1)) + { + rgb_matrix_set_color(46, 255, 255, 255); + } + if (IS_LAYER_ON(_L2)) + { + rgb_matrix_set_color(45, 255, 255, 255); + } +} \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/readme.md b/keyboards/handwired/hnah40rgb/keymaps/ansi/readme.md new file mode 100644 index 0000000000..825a57ab07 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/ansi/readme.md @@ -0,0 +1 @@ +# The ansi keymap for hnah40rgb \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/config.h b/keyboards/handwired/hnah40rgb/keymaps/default/config.h new file mode 100644 index 0000000000..aa9325a59d --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c b/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c new file mode 100644 index 0000000000..2906f8bdbf --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _BASE, + _L1, + _L2 +}; + +enum hnah_keycodes{ + BASE, + L1, + L2 +}; + +#define L1 MO(_L1) +#define L2 MO(_L2) + +// Defines the keycodes used by our macros in process_record_user + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all(/* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_L2,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, L1, KC_RCTL ), + [_L1] = LAYOUT_all(/* Base */ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_SLSH, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [_L2] = LAYOUT_all(/* Base */ + RGB_TOG, RGB_RMOD, KC_UP, RGB_MOD, RGB_HUI, RGB_VAI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_HUD, RGB_VAD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), +}; + +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(22, 255, 255, 255); + } + if (IS_LAYER_ON(_L1)) + { + rgb_matrix_set_color(46, 255, 255, 255); + } + if (IS_LAYER_ON(_L2)) + { + rgb_matrix_set_color(45, 255, 255, 255); + } +} \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/readme.md b/keyboards/handwired/hnah40rgb/keymaps/default/readme.md new file mode 100644 index 0000000000..866686644d --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hnah40rgb \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/readme.md b/keyboards/handwired/hnah40rgb/readme.md new file mode 100644 index 0000000000..80876f8da2 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/readme.md @@ -0,0 +1,14 @@ +# hnah40rgb + +![hnah40rgb](https://i.imgur.com/wmqx6oL.jpg) + +A 40 percent keyboard Hnah40v2 rgb version + +Keyboard Maintainer: [HnahKB](https://github.com/vuhopkep) +Hardware Availability: Hnah40V2 RGB + +Make example for this keyboard (after setting up your build environment): + + make handwired/hnah40rgb: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). diff --git a/keyboards/handwired/hnah40rgb/rules.mk b/keyboards/handwired/hnah40rgb/rules.mk new file mode 100644 index 0000000000..5ad9f40c30 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32A bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +RGB_MATRIX_ENABLE = WS2812 \ No newline at end of file diff --git a/keyboards/handwired/ibm122m/rules.mk b/keyboards/handwired/ibm122m/rules.mk index ba4be67667..f775fa03b3 100644 --- a/keyboards/handwired/ibm122m/rules.mk +++ b/keyboards/handwired/ibm122m/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = at90usb1286 -BOOTLOADER = halfKay - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/jn68m/rules.mk b/keyboards/handwired/jn68m/rules.mk index 42d85ada17..80b59d628d 100644 --- a/keyboards/handwired/jn68m/rules.mk +++ b/keyboards/handwired/jn68m/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/jopr/rules.mk b/keyboards/handwired/jopr/rules.mk index de83252c38..ae10be0d26 100644 --- a/keyboards/handwired/jopr/rules.mk +++ b/keyboards/handwired/jopr/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/jot50/keymaps/default/keymap.c b/keyboards/handwired/jot50/keymaps/default/keymap.c index 4ec535c31d..7342dcd22e 100644 --- a/keyboards/handwired/jot50/keymaps/default/keymap.c +++ b/keyboards/handwired/jot50/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -81,4 +80,3 @@ uint32_t layer_state_set_user(uint32_t state) { void matrix_init_user(void) { } - diff --git a/keyboards/handwired/jot50/rules.mk b/keyboards/handwired/jot50/rules.mk index 36a100c963..d01dfefa5e 100644 --- a/keyboards/handwired/jot50/rules.mk +++ b/keyboards/handwired/jot50/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c index 3eb01a6581..2467559a60 100644 --- a/keyboards/handwired/jotanck/keymaps/default/keymap.c +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -13,11 +12,14 @@ extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 -#define _ADJUST 3 #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) +static bool is_ctl_pressed; +static bool is_esc_pressed; +static bool is_bspc_pressed; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -73,20 +75,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), - -/* Adjust */ -[_ADJUST] = LAYOUT_ortho_4x12 ( - _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), + }; uint32_t layer_state_set_user(uint32_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + #ifdef JOTANCK_LEDS + switch (biton32(state)) { + case _LOWER: + writePinHigh(JOTANCK_LED1); + writePinLow(JOTANCK_LED2); + break; + case _RAISE: + writePinLow(JOTANCK_LED1); + writePinHigh(JOTANCK_LED2); + break; + default: + writePinLow(JOTANCK_LED1); + writePinLow(JOTANCK_LED2); + break; + }; + #endif + return state; } -void matrix_init_user(void) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LCTL: + is_ctl_pressed = record->event.pressed; + break; + case KC_ESC: + is_esc_pressed = record->event.pressed; + break; + case KC_BSPC: + is_bspc_pressed = record->event.pressed; + break; + }; + return true; } +void matrix_scan_user(void) { + if (is_ctl_pressed && is_esc_pressed && is_bspc_pressed) { + reset_keyboard(); + } +} diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md index e9dd824030..3ceea1ef4c 100644 --- a/keyboards/handwired/jotanck/readme.md +++ b/keyboards/handwired/jotanck/readme.md @@ -35,4 +35,6 @@ Make example for this keyboard (after setting up your build environment): ![Default Keymap](https://i.imgur.com/xh7Dmd7.png) +To reset the keyboard press Ctrl+Esc+BackSpace + 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). diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk index fa28814133..2a233cccd0 100644 --- a/keyboards/handwired/jotanck/rules.mk +++ b/keyboards/handwired/jotanck/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/jotpad16/keymaps/default/keymap.c b/keyboards/handwired/jotpad16/keymaps/default/keymap.c index fb5dc71e23..a5d81ab3f4 100644 --- a/keyboards/handwired/jotpad16/keymaps/default/keymap.c +++ b/keyboards/handwired/jotpad16/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk index 8105f800cb..0c9370f1c1 100644 --- a/keyboards/handwired/jotpad16/rules.mk +++ b/keyboards/handwired/jotpad16/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 49083820ad..3119784e26 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -75,11 +75,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -}; - void led_set_user(uint8_t usb_led) { if (usb_led & _BV(USB_LED_CAPS_LOCK)) { PORTB |= _BV(PB0); diff --git a/keyboards/handwired/kbod/rules.mk b/keyboards/handwired/kbod/rules.mk index b97cacd5c3..0c84098633 100644 --- a/keyboards/handwired/kbod/rules.mk +++ b/keyboards/handwired/kbod/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/handwired/lovelive9/rules.mk b/keyboards/handwired/lovelive9/rules.mk index 99a531a638..4799b5ec92 100644 --- a/keyboards/handwired/lovelive9/rules.mk +++ b/keyboards/handwired/lovelive9/rules.mk @@ -1,49 +1,14 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/handwired/maartenwut/rules.mk b/keyboards/handwired/maartenwut/rules.mk index 7ed63c65ec..5f50d6b52a 100755 --- a/keyboards/handwired/maartenwut/rules.mk +++ b/keyboards/handwired/maartenwut/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/handwired/magicforce61/rules.mk b/keyboards/handwired/magicforce61/rules.mk index 91147ab4fb..d1ed63f65b 100644 --- a/keyboards/handwired/magicforce61/rules.mk +++ b/keyboards/handwired/magicforce61/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=1024 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index fe01b544c8..3989329835 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/handwired/mechboards_micropad/rules.mk b/keyboards/handwired/mechboards_micropad/rules.mk index 8ac2297e46..a61b3b3d83 100644 --- a/keyboards/handwired/mechboards_micropad/rules.mk +++ b/keyboards/handwired/mechboards_micropad/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/minorca/keymaps/default/keymap.c b/keyboards/handwired/minorca/keymaps/default/keymap.c index 29ed7aa03f..f8f9061fec 100644 --- a/keyboards/handwired/minorca/keymaps/default/keymap.c +++ b/keyboards/handwired/minorca/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk index 3e408e2b93..5c29c0c93e 100644 --- a/keyboards/handwired/minorca/rules.mk +++ b/keyboards/handwired/minorca/rules.mk @@ -1,50 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change to "no" to disable the options, or define them in the Makefile in @@ -64,4 +29,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/ms_sculpt_mobile/rules.mk b/keyboards/handwired/ms_sculpt_mobile/rules.mk index 680c057d36..d38138bbb8 100644 --- a/keyboards/handwired/ms_sculpt_mobile/rules.mk +++ b/keyboards/handwired/ms_sculpt_mobile/rules.mk @@ -1,37 +1,27 @@ - -## Project specific files -SRC= babblePaste.c - - ifdef ASTAR - CFLAGS=-D ASTAR - MCU = atmega32u4 - SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - + MCU = atmega32u4 + CFLAGS = -D ASTAR + USB = /dev/cu.usbmodem14141 + SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) else - MCU = at90usb1286 - SCULPT_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex + MCU = at90usb1286 + SCULPT_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex endif -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp ifdef ASTAR - BOOTLOADER = caterina + BOOTLOADER = caterina else - BOOTLOADER = atmel-dfu + BOOTLOADER = atmel-dfu endif -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) @@ -47,10 +37,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - -USB = /dev/cu.usbmodem14141 - - - -# upload: build -# $(SCULPT_UPLOAD_COMMAND) +# Project specific files +SRC = babblePaste.c diff --git a/keyboards/handwired/nicekey/rules.mk b/keyboards/handwired/nicekey/rules.mk index cfa693a73b..61c1fa79aa 100644 --- a/keyboards/handwired/nicekey/rules.mk +++ b/keyboards/handwired/nicekey/rules.mk @@ -1,53 +1,15 @@ - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -58,4 +20,4 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA \ No newline at end of file +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c index 9e89611631..296a7a281d 100644 --- a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c +++ b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/not_so_minidox/rules.mk b/keyboards/handwired/not_so_minidox/rules.mk index 833dd4b79e..ae5cb83b7b 100644 --- a/keyboards/handwired/not_so_minidox/rules.mk +++ b/keyboards/handwired/not_so_minidox/rules.mk @@ -1,53 +1,16 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -69,3 +32,7 @@ USE_I2C ?= no SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c diff --git a/keyboards/handwired/numbrero/readme.md b/keyboards/handwired/numbrero/readme.md index 42f005dbe2..931c601274 100644 --- a/keyboards/handwired/numbrero/readme.md +++ b/keyboards/handwired/numbrero/readme.md @@ -8,6 +8,6 @@ Hardware Availability: The Board Podcast Slack Make example for this keyboard (after setting up your build environment): - make handwired/numbrero/numbrero:default + make handwired/numbrero: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). diff --git a/keyboards/handwired/numbrero/rules.mk b/keyboards/handwired/numbrero/rules.mk index bda6c866e2..969dd0b507 100644 --- a/keyboards/handwired/numbrero/rules.mk +++ b/keyboards/handwired/numbrero/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -#Bootloder -#Pro Micro = caterina +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk index 361b2e93af..b5e96d74bf 100644 --- a/keyboards/handwired/numpad20/rules.mk +++ b/keyboards/handwired/numpad20/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable @@ -64,4 +27,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by d MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 \ No newline at end of file +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h index 3d88ee00e5..01555e4315 100644 --- a/keyboards/handwired/onekey/bluepill/config.h +++ b/keyboards/handwired/onekey/bluepill/config.h @@ -21,3 +21,9 @@ #define MATRIX_COL_PINS { B0 } #define MATRIX_ROW_PINS { A7 } #define UNUSED_PINS + +#define BACKLIGHT_PIN A0 +#define BACKLIGHT_PWM_DRIVER PWMD2 +#define BACKLIGHT_PWM_CHANNEL 1 + +#define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/bluepill/halconf.h b/keyboards/handwired/onekey/bluepill/halconf.h index 72879a575b..53b2f91e33 100644 --- a/keyboards/handwired/onekey/bluepill/halconf.h +++ b/keyboards/handwired/onekey/bluepill/halconf.h @@ -146,7 +146,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI FALSE #endif /** diff --git a/keyboards/handwired/onekey/bluepill/mcuconf.h b/keyboards/handwired/onekey/bluepill/mcuconf.h index fced27289e..a645d3c5d5 100644 --- a/keyboards/handwired/onekey/bluepill/mcuconf.h +++ b/keyboards/handwired/onekey/bluepill/mcuconf.h @@ -132,8 +132,8 @@ * PWM driver system settings. */ #define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 TRUE -#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 TRUE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE @@ -168,7 +168,7 @@ * SPI driver system settings. */ #define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE #define STM32_SPI_SPI1_DMA_PRIORITY 1 #define STM32_SPI_SPI2_DMA_PRIORITY 1 diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 46274066dd..aeda2782b9 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -1,7 +1,11 @@ # GENERIC STM32F103C8T6 board - stm32duino bootloader +BOARD = GENERIC_STM32_F103 + OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 + +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS ?= -v 1eaf -p 0003 # OPT_DEFS = # MCU_LDSCRIPT = STM32F103x8 diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index 6f7ec1289f..64a447481d 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -35,6 +35,8 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +#define TAPPING_TERM 500 + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/handwired/onekey/elite_c/rules.mk b/keyboards/handwired/onekey/elite_c/rules.mk index eb7c443951..2f20507d4d 100644 --- a/keyboards/handwired/onekey/elite_c/rules.mk +++ b/keyboards/handwired/onekey/elite_c/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/keymaps/backlight/config.h b/keyboards/handwired/onekey/keymaps/backlight/config.h new file mode 100644 index 0000000000..af01528b43 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define BACKLIGHT_BREATHING diff --git a/keyboards/handwired/onekey/keymaps/backlight/keymap.c b/keyboards/handwired/onekey/keymaps/backlight/keymap.c new file mode 100644 index 0000000000..1f4be16a62 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +//Tap Dance Declarations +enum { + TD_BL = 0 +}; + +void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { + // noop +} + +void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + // single tap - step through backlight + backlight_step(); + break; +#ifdef BACKLIGHT_BREATHING + case 2: + // double tap - toggle breathing + breathing_toggle(); + break; + case 3: + //tripple tap - do some pulse stuff + breathing_pulse(); + break; +#endif + default: + // more - nothing + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( TD(TD_BL) ) +}; diff --git a/keyboards/handwired/onekey/keymaps/backlight/rules.mk b/keyboards/handwired/onekey/keymaps/backlight/rules.mk new file mode 100644 index 0000000000..176e099770 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/onekey/keymaps/rgb/config.h b/keyboards/handwired/onekey/keymaps/rgb/config.h new file mode 100644 index 0000000000..89e76326b4 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/rgb/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define RGBLED_NUM 9 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/handwired/onekey/keymaps/rgb/keymap.c b/keyboards/handwired/onekey/keymaps/rgb/keymap.c new file mode 100644 index 0000000000..a96c6f3863 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/rgb/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( RGB_MOD ) +}; + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); +} diff --git a/keyboards/romac/keymaps/stanrc85/rules.mk b/keyboards/handwired/onekey/keymaps/rgb/rules.mk similarity index 100% rename from keyboards/romac/keymaps/stanrc85/rules.mk rename to keyboards/handwired/onekey/keymaps/rgb/rules.mk diff --git a/keyboards/handwired/onekey/promicro/rules.mk b/keyboards/handwired/onekey/promicro/rules.mk index dc6f196237..e6fef51727 100644 --- a/keyboards/handwired/onekey/promicro/rules.mk +++ b/keyboards/handwired/onekey/promicro/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/proton_c/config.h b/keyboards/handwired/onekey/proton_c/config.h index f6bedcfe64..fe34f94add 100644 --- a/keyboards/handwired/onekey/proton_c/config.h +++ b/keyboards/handwired/onekey/proton_c/config.h @@ -21,3 +21,10 @@ #define MATRIX_COL_PINS { A3 } #define MATRIX_ROW_PINS { A2 } #define UNUSED_PINS + +#define BACKLIGHT_PIN B8 +#define BACKLIGHT_PWM_DRIVER PWMD4 +#define BACKLIGHT_PWM_CHANNEL 3 +#define BACKLIGHT_PAL_MODE 2 + +#define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/pytest/config.h b/keyboards/handwired/onekey/pytest/config.h new file mode 100644 index 0000000000..f6bedcfe64 --- /dev/null +++ b/keyboards/handwired/onekey/pytest/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS { A3 } +#define MATRIX_ROW_PINS { A2 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/pytest/readme.md b/keyboards/handwired/onekey/pytest/readme.md new file mode 100644 index 0000000000..dbbd991f1c --- /dev/null +++ b/keyboards/handwired/onekey/pytest/readme.md @@ -0,0 +1,3 @@ +# PyTest onekey + +This is used by the python test framework. It's probably not useful otherwise. diff --git a/keyboards/handwired/onekey/pytest/rules.mk b/keyboards/handwired/onekey/pytest/rules.mk new file mode 100644 index 0000000000..b17a3d0316 --- /dev/null +++ b/keyboards/handwired/onekey/pytest/rules.mk @@ -0,0 +1,2 @@ +# MCU name +MCU = STM32F303 diff --git a/keyboards/handwired/onekey/pytest/templates/keymap.c b/keyboards/handwired/onekey/pytest/templates/keymap.c new file mode 100644 index 0000000000..d355210c47 --- /dev/null +++ b/keyboards/handwired/onekey/pytest/templates/keymap.c @@ -0,0 +1 @@ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; diff --git a/keyboards/handwired/onekey/stm32f0_disco/chconf.h b/keyboards/handwired/onekey/stm32f0_disco/chconf.h new file mode 100644 index 0000000000..99fa8ce398 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f0_disco/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/onekey/stm32f0_disco/config.h b/keyboards/handwired/onekey/stm32f0_disco/config.h new file mode 100644 index 0000000000..637ed65d3f --- /dev/null +++ b/keyboards/handwired/onekey/stm32f0_disco/config.h @@ -0,0 +1,30 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS { B4 } +#define MATRIX_ROW_PINS { B5 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN C8 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 +#define BACKLIGHT_PAL_MODE 0 + +#define RGB_DI_PIN B15 diff --git a/keyboards/handwired/onekey/stm32f0_disco/halconf.h b/keyboards/handwired/onekey/stm32f0_disco/halconf.h new file mode 100644 index 0000000000..53b2f91e33 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f0_disco/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/handwired/onekey/stm32f0_disco/mcuconf.h b/keyboards/handwired/onekey/stm32f0_disco/mcuconf.h new file mode 100644 index 0000000000..20c48b611a --- /dev/null +++ b/keyboards/handwired/onekey/stm32f0_disco/mcuconf.h @@ -0,0 +1,171 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/onekey/stm32f0_disco/readme.md b/keyboards/handwired/onekey/stm32f0_disco/readme.md new file mode 100644 index 0000000000..48d999d69c --- /dev/null +++ b/keyboards/handwired/onekey/stm32f0_disco/readme.md @@ -0,0 +1,5 @@ +# STM32F072 Discovery kit onekey + +Supported Hardware: + +To trigger keypress, short together pins *B4* and *B5*. diff --git a/keyboards/handwired/onekey/stm32f0_disco/rules.mk b/keyboards/handwired/onekey/stm32f0_disco/rules.mk new file mode 100644 index 0000000000..69639f940e --- /dev/null +++ b/keyboards/handwired/onekey/stm32f0_disco/rules.mk @@ -0,0 +1,34 @@ +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p df11 -v 0483 diff --git a/keyboards/handwired/onekey/teensy_2/rules.mk b/keyboards/handwired/onekey/teensy_2/rules.mk index 3fb7c7e5a7..ae398e2588 100644 --- a/keyboards/handwired/onekey/teensy_2/rules.mk +++ b/keyboards/handwired/onekey/teensy_2/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/teensy_2pp/rules.mk b/keyboards/handwired/onekey/teensy_2pp/rules.mk index e318e4b9e7..c421eb862e 100644 --- a/keyboards/handwired/onekey/teensy_2pp/rules.mk +++ b/keyboards/handwired/onekey/teensy_2pp/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk index fe01b544c8..b5e96d74bf 100644 --- a/keyboards/handwired/ortho5x13/rules.mk +++ b/keyboards/handwired/ortho5x13/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/owlet60/config.h b/keyboards/handwired/owlet60/config.h new file mode 100644 index 0000000000..29fd0b1e57 --- /dev/null +++ b/keyboards/handwired/owlet60/config.h @@ -0,0 +1,250 @@ +/* +Copyright 2019 worthlessowl + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDA19 +#define DEVICE_VER 0x0001 +#define MANUFACTURER worthlessowl +#define PRODUCT Owlet60 +#define DESCRIPTION TGR Alice inspired 65 or 60 percent keyboard + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS {B5, F4, F5, F6, F7, B1, B3, B2, B6} +#define MATRIX_COL_SELECT_PINS {D7, B4, E6} +#define MATRIX_COL_DATA_PIN {C6} +#define MATRIX_COL_PINS {} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +//#define BACKLIGHT_PIN D3 +//#define BACKLIGHT_BREATHING +//#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 128 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 9 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/owlet60/info.json b/keyboards/handwired/owlet60/info.json new file mode 100644 index 0000000000..6e5345c337 --- /dev/null +++ b/keyboards/handwired/owlet60/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "Owlet60", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/owlet60/", + "maintainer": "worthlessowl", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT_owlet60_full_bsp": { + "key_count": 71, + "layout": [{"label":"F1", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"F2", "x":0.25, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"PgDn", "x":17.5, "y":1}, {"label":"F3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Home", "x":17.75, "y":2}, {"label":"Shift", "x":1, "y":3, "w":2.25}, {"label":"Z", "x":3.25, "y":3}, {"label":"X", "x":4.25, "y":3}, {"label":"C", "x":5.25, "y":3}, {"label":"V", "x":6.25, "y":3}, {"label":"B", "x":7.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Up", "x":17, "y":3}, {"label":"End", "x":18, "y":3}, {"label":"Ctrl", "x":1, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Super", "x":7.25, "y":4, "w":1.25}, {"x":9.25, "y":4, "w":2}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + }, + "LAYOUT_owlet60_split_bsp": { + "key_count": 72, + "layout": [{"label":"F1", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Bsp", "x":15.25, "y":0}, {"label":"Del", "x":16.25, "y":0}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"F2", "x":0.25, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"PgDn", "x":17.5, "y":1}, {"label":"F3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Home", "x":17.75, "y":2}, {"label":"Shift", "x":1, "y":3, "w":2.25}, {"label":"Z", "x":3.25, "y":3}, {"label":"X", "x":4.25, "y":3}, {"label":"C", "x":5.25, "y":3}, {"label":"V", "x":6.25, "y":3}, {"label":"B", "x":7.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Up", "x":17, "y":3}, {"label":"End", "x":18, "y":3}, {"label":"Ctrl", "x":1, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Super", "x":7.25, "y":4, "w":1.25}, {"x":9.25, "y":4, "w":2}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + }, + "LAYOUT_owlet60_60_percent_split_bsp": { + "key_count": 66, + "layout": [{"label":"F1", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Bsp", "x":15.25, "y":0}, {"label":"Del", "x":16.25, "y":0}, {"label":"F2", "x":0.25, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"F3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Shift", "x":1, "y":3, "w":2.25}, {"label":"Z", "x":3.25, "y":3}, {"label":"X", "x":4.25, "y":3}, {"label":"C", "x":5.25, "y":3}, {"label":"V", "x":6.25, "y":3}, {"label":"B", "x":7.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Up", "x":17, "y":3}, {"label":"Ctrl", "x":1, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Super", "x":7.25, "y":4, "w":1.25}, {"x":9.25, "y":4, "w":2}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.25, "y":4, "w":1.5}] + }, + "LAYOUT_owlet60_60_percent_full_bsp": { + "key_count": 65, + "layout": [{"label":"F1", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Bsp", "x":15.25, "y":0, "w":2}, {"label":"F2", "x":0.25, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"F3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Shift", "x":1, "y":3, "w":2.25}, {"label":"Z", "x":3.25, "y":3}, {"label":"X", "x":4.25, "y":3}, {"label":"C", "x":5.25, "y":3}, {"label":"V", "x":6.25, "y":3}, {"label":"B", "x":7.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Up", "x":17, "y":3}, {"label":"Ctrl", "x":1, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Super", "x":7.25, "y":4, "w":1.25}, {"x":9.25, "y":4, "w":2}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.25, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/handwired/owlet60/keymaps/default/config.h b/keyboards/handwired/owlet60/keymaps/default/config.h new file mode 100644 index 0000000000..f662fe7c93 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/owlet60/keymaps/default/keymap.c b/keyboards/handwired/owlet60/keymaps/default/keymap.c new file mode 100644 index 0000000000..b4d0360db3 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_owlet60_full_bsp( + KC_1, 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_PGUP, \ + KC_2, 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_PGDOWN, \ + KC_3, 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_HOME, \ + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTRL, KC_LALT, KC_SPC, MO(1),KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [1] = LAYOUT_owlet60_full_bsp( + KC_NO, 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_DEL, RGB_TOG, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, \ + KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, RGB_VAI, \ + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_VAD, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/owlet60/keymaps/default/readme.md b/keyboards/handwired/owlet60/keymaps/default/readme.md new file mode 100644 index 0000000000..1d177ae102 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for owlet60 \ No newline at end of file diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/config.h b/keyboards/handwired/owlet60/keymaps/oled_testing/config.h new file mode 100644 index 0000000000..884d36b690 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ + +#pragma once + +// place overrides here + + +#define OLED_FONT_H "customfont.c" diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c new file mode 100644 index 0000000000..b7ad73bfa2 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c @@ -0,0 +1,20 @@ +#pragma once + +#ifdef __AVR__ +# include +# include +#elif defined(ESP8266) +# include +#else +# define PROGMEM +#endif + +// Helidox 8x6 font with QMK Firmware Logo +// Online editor: http://teripom.x0.com/ + +static const unsigned char font[] PROGMEM = { +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,0xa4,0xa4,0x9c,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,0xfc,0x18,0x24,0x24,0x18,0x00,0x18,0x24,0x24,0x18,0xfc,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,0x80,0xe0,0xe0,0xe0,0xe0,0x60,0x60,0xe0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x04,0x0c,0x1c,0x1c,0x1c,0x18,0x38,0x38,0x78,0x70,0x70,0xf0,0xa0,0xa0,0x08, +0x18,0x18,0x18,0x1c,0x1c,0x1c,0x1c,0x1c,0x18,0x18,0x18,0xf8,0xf8,0xfc,0xf0,0x10,0x10,0x00,0x00,0x80,0xe0,0xf8,0xf0,0x70,0x70,0x70,0x70,0x60,0x60,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xc0,0xc0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xf8,0xfc,0xfe,0xde,0x80,0x80,0x80,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,0xc0,0xf0,0xf8,0xfc,0x3e,0x1e,0x06,0x01,0x00,0x00,0x00,0x7f,0x41,0x41,0x41,0x7f,0x00,0x7f,0x41,0x41,0x41,0x7f,0x00,0x00,0x80,0xc0,0xe0,0x7e,0x5b,0x4f,0x5b,0xfe,0xc0,0x00,0x00,0xc0,0x00,0xdc,0xd7,0xde,0xde,0xde,0xd7,0xdc,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x7f,0xff,0xf3,0xe0,0xc0,0xc0,0xc0,0xf3,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x70,0x78,0x78,0xf8,0xf8,0xdc,0xcc,0x8c,0x84,0x07,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0x00,0x00,0x00,0xc0,0xfc,0xff,0x1f,0x03,0x01,0x00,0x00,0xc0,0xe0,0xfc,0x7f,0x1f,0x0f,0x03,0x80,0xe0,0xfc,0xff,0x1f,0x03,0x00,0x00,0x00,0x00,0x00,0xe0,0xfc,0xff,0x3f,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0f,0x0f,0x0f,0x0e,0x1e,0x1e,0x0e,0x0c,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x69,0x6f,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0f,0x1f,0x3f,0x3c,0x78,0x70,0x60,0x00,0x00,0x00,0x7f,0x41,0x41,0x41,0x7f,0x00,0x7f,0x41,0x41,0x41,0x7f,0x00,0x30,0x7b,0x7f,0x78,0x30,0x20,0x20,0x30,0x78,0x7f,0x3b,0x00,0x03,0x00,0x0f,0x7f,0x0f,0x0f,0x0f,0x7f,0x0f,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x03,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x38,0x38,0x1c,0x1c,0x0e,0x0e,0x07,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x03,0x01,0x00, +0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x0e,0x0f,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c new file mode 100644 index 0000000000..f63ec18933 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_owlet60_full_bsp( + KC_1, 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_PGUP, \ + KC_2, 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_PGDOWN, \ + KC_3, 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_HOME, \ + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTRL, KC_LALT, KC_SPC, MO(1),KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [1] = LAYOUT_owlet60_full_bsp( + KC_NO, 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_DEL, RGB_TOG, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, \ + KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, RGB_VAI, \ + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_VAD, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + //return OLED_ROTATION_180; + return OLED_ROTATION_180; +} +void oled_task_user(void) { + // Host Keyboard Layer Status + /*oled_write_P(PSTR("Lyr: "), false); + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Alpha\n"), false); + break; + case 1: + oled_write_P(PSTR("FN\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); + } + + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(led_usb_state & (1< +Cole Markham + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include "owlet60.h" +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "config.h" +#include "timer.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_select_pins[3] = MATRIX_COL_SELECT_PINS; +static const uint8_t dat_pin = MATRIX_COL_DATA_PIN; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //raw values + +/* 2d array containing binary representation of its index */ +static const uint8_t num_in_binary[8][3] = { + {0, 0, 0}, + {0, 0, 1}, + {0, 1, 0}, + {0, 1, 1}, + {1, 0, 0}, + {1, 0, 1}, + {1, 1, 0}, + {1, 1, 1}, +}; + +static void select_col_analog(uint8_t col); +static void mux_pin_control(const uint8_t binary[]); +void debounce_init(uint8_t num_rows); +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed); + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<. + */ +#include "owlet60.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +/* +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); + oled_task_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/handwired/owlet60/owlet60.h b/keyboards/handwired/owlet60/owlet60.h new file mode 100644 index 0000000000..f17f40fdaf --- /dev/null +++ b/keyboards/handwired/owlet60/owlet60.h @@ -0,0 +1,98 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_owlet60_split_bsp( \ + k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48 \ +) { \ + { k50, k11, k13, k15, k07, k19, k1b, k1d}, \ + { k51, k21, k23, k25, k17, k29, k2b, k3d}, \ + { k52, k31, k33, k35, k27, k39, k3b, k47}, \ + { k40, k41, k42, k43, k37, k45, k46, k48}, \ + { k30, k32, k34, k44, k38, k3a, k3c, k3e}, \ + { k20, k22, k24, k36, k28, k2a, k2c, k2d}, \ + { k10, k12, k14, k26, k18, k1a, k1c, k1e}, \ + { k00, k02, k04, k16, k08, k0a, k0c, k0f}, \ + { k01, k03, k05, k06, k09, k0b, k0d, k0e} \ +} + +#define LAYOUT_owlet60_full_bsp( \ + k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \ + k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48 \ +) { \ + { k50, k11, k13, k15, k07, k19, k1b, k1d}, \ + { k51, k21, k23, k25, k17, k29, k2b, k3d}, \ + { k52, k31, k33, k35, k27, k39, k3b, k47}, \ + { k40, k41, k42, k43, k37, k45, k46, k48}, \ + { k30, k32, k34, k44, k38, k3a, k3c, k3e}, \ + { k20, k22, k24, k36, k28, k2a, k2c, k2d}, \ + { k10, k12, k14, k26, k18, k1a, k1c, k1e}, \ + { k00, k02, k04, k16, k08, k0a, k0c, k0f}, \ + { k01, k03, k05, k06, k09, k0b, k0d, KC_NO} \ +} + +#define LAYOUT_owlet60_60_percent_split_bsp( \ + k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k43, k44, k45, k47 \ +) { \ + { k50, k11, k13, k15, k07, k19, k1b, k1d}, \ + { k51, k21, k23, k25, k17, k29, k2b, k3d}, \ + { k52, k31, k33, k35, k27, k39, k3b, k47}, \ + { k40, k41, k42, k43, k37, k45, KC_NO, KC_NO}, \ + { k30, k32, k34, k44, k38, k3a, k3c, KC_NO}, \ + { k20, k22, k24, k36, k28, k2a, k2c, KC_NO}, \ + { k10, k12, k14, k26, k18, k1a, k1c, KC_NO}, \ + { k00, k02, k04, k16, k08, k0a, k0c, KC_NO}, \ + { k01, k03, k05, k06, k09, k0b, k0d, k0e} \ +} + +#define LAYOUT_owlet60_60_percent_full_bsp( \ + k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k43, k44, k45, k47 \ +) { \ + { k50, k11, k13, k15, k07, k19, k1b, k1d}, \ + { k51, k21, k23, k25, k17, k29, k2b, k3d}, \ + { k52, k31, k33, k35, k27, k39, k3b, k47}, \ + { k40, k41, k42, k43, k37, k45, KC_NO, KC_NO}, \ + { k30, k32, k34, k44, k38, k3a, k3c, KC_NO}, \ + { k20, k22, k24, k36, k28, k2a, k2c, KC_NO}, \ + { k10, k12, k14, k26, k18, k1a, k1c, KC_NO}, \ + { k00, k02, k04, k16, k08, k0a, k0c, KC_NO}, \ + { k01, k03, k05, k06, k09, k0b, k0d, KC_NO} \ +} diff --git a/keyboards/handwired/owlet60/readme.md b/keyboards/handwired/owlet60/readme.md new file mode 100644 index 0000000000..05439e7eb4 --- /dev/null +++ b/keyboards/handwired/owlet60/readme.md @@ -0,0 +1,13 @@ +# owlet60 + +Owlet60, a TGR Alice inspired 60%-65% keyboard. Powered with a Pro Micro and 4051 mux multiplexed matrix. PCB can be permanently snapped off for a 60% layout. + +Keyboard Maintainer: [worthlessowl](https://github.com/worthlessowl) +Hardware Supported: Owlet60 PCB, standard Pro Micro +Hardware Availability: Keyboard is running on a local pre order as of 24 September 2019, limited quantity + +Make example for this keyboard (after setting up your build environment): + + make handwired/owlet60: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). diff --git a/keyboards/handwired/owlet60/rules.mk b/keyboards/handwired/owlet60/rules.mk new file mode 100644 index 0000000000..6d8bdfd1c6 --- /dev/null +++ b/keyboards/handwired/owlet60/rules.mk @@ -0,0 +1,48 @@ +SRC += matrix.c + +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +CUSTOM_MATRIX = yes +OLED_DRIVER_ENABLE = no \ No newline at end of file diff --git a/keyboards/handwired/pilcrow/rules.mk b/keyboards/handwired/pilcrow/rules.mk index 67badc8207..b5e96d74bf 100644 --- a/keyboards/handwired/pilcrow/rules.mk +++ b/keyboards/handwired/pilcrow/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/postageboard/config.h b/keyboards/handwired/postageboard/config.h new file mode 100644 index 0000000000..417cc9901c --- /dev/null +++ b/keyboards/handwired/postageboard/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2019 Yan-Fa Li + +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 . +*/ + +#pragma once + +#include "config_common.h" + diff --git a/keyboards/handwired/postageboard/keymaps/default/keymap.c b/keyboards/handwired/postageboard/keymaps/default/keymap.c new file mode 100644 index 0000000000..a42697a9b1 --- /dev/null +++ b/keyboards/handwired/postageboard/keymaps/default/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKURL = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_A, KC_1, MO(_FN) + ), + [_FN] = LAYOUT( + RESET, QMKURL, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/keyboards/handwired/postageboard/keymaps/default/readme.md b/keyboards/handwired/postageboard/keymaps/default/readme.md new file mode 100644 index 0000000000..c166556a85 --- /dev/null +++ b/keyboards/handwired/postageboard/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for PostageBoard diff --git a/keyboards/handwired/postageboard/mini/config.h b/keyboards/handwired/postageboard/mini/config.h new file mode 100644 index 0000000000..ac7d468855 --- /dev/null +++ b/keyboards/handwired/postageboard/mini/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2019 Yan-Fa Li + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB07D +#define DEVICE_VER 0x0002 +#define MANUFACTURER LifeIsOnTheWire +#define PRODUCT PostageBoard +#define DESCRIPTION "A Handwire Controller Board Round 2" + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D5 } +#define MATRIX_COL_PINS { E6, B3, B7 } +#define UNUSED_PINS { D0, D1, D2, D3, D4, D6, D7, B4, B5, B6, C6, C7, B2, B1, B0, F7, F6, F5, F4, F1, F0 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/postageboard/mini/mini.c b/keyboards/handwired/postageboard/mini/mini.c new file mode 100644 index 0000000000..381ad975f0 --- /dev/null +++ b/keyboards/handwired/postageboard/mini/mini.c @@ -0,0 +1,18 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ + +#include "mini.h" + diff --git a/keyboards/handwired/postageboard/mini/mini.h b/keyboards/handwired/postageboard/mini/mini.h new file mode 100644 index 0000000000..28ee58ef13 --- /dev/null +++ b/keyboards/handwired/postageboard/mini/mini.h @@ -0,0 +1,34 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02 \ +) \ +{ \ + { k00, k01, k02 } \ +} diff --git a/keyboards/handwired/postageboard/mini/rules.mk b/keyboards/handwired/postageboard/mini/rules.mk new file mode 100644 index 0000000000..96e8e574cf --- /dev/null +++ b/keyboards/handwired/postageboard/mini/rules.mk @@ -0,0 +1,29 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/postageboard/postageboard.c b/keyboards/handwired/postageboard/postageboard.c new file mode 100644 index 0000000000..005ce313df --- /dev/null +++ b/keyboards/handwired/postageboard/postageboard.c @@ -0,0 +1 @@ +#include "postageboard.h" diff --git a/keyboards/handwired/postageboard/postageboard.h b/keyboards/handwired/postageboard/postageboard.h new file mode 100644 index 0000000000..5bd9ceee5a --- /dev/null +++ b/keyboards/handwired/postageboard/postageboard.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02 \ +) \ +{ \ + { k00, k01, k02 } \ +} diff --git a/keyboards/handwired/postageboard/r1/config.h b/keyboards/handwired/postageboard/r1/config.h new file mode 100644 index 0000000000..435e87fa1b --- /dev/null +++ b/keyboards/handwired/postageboard/r1/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2019 Yan-Fa Li + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB07D +#define DEVICE_VER 0x0001 +#define MANUFACTURER LifeIsOnTheWire +#define PRODUCT PostageBoard +#define DESCRIPTION "A Handwire Controller Board" + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B6 } +#define MATRIX_COL_PINS { B7, C6, C7 } +#define UNUSED_PINS { D4, D6, D7, B4, B5, D5, D3, D2, D1, D0, B2, B3, F0, F1, F4, F5, F6, F7, E6, B0, B1 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/postageboard/r1/r1.c b/keyboards/handwired/postageboard/r1/r1.c new file mode 100644 index 0000000000..e87edc145b --- /dev/null +++ b/keyboards/handwired/postageboard/r1/r1.c @@ -0,0 +1,18 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ + +#include "r1.h" + diff --git a/keyboards/handwired/postageboard/r1/r1.h b/keyboards/handwired/postageboard/r1/r1.h new file mode 100644 index 0000000000..28ee58ef13 --- /dev/null +++ b/keyboards/handwired/postageboard/r1/r1.h @@ -0,0 +1,34 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02 \ +) \ +{ \ + { k00, k01, k02 } \ +} diff --git a/keyboards/handwired/postageboard/r1/rules.mk b/keyboards/handwired/postageboard/r1/rules.mk new file mode 100644 index 0000000000..96e8e574cf --- /dev/null +++ b/keyboards/handwired/postageboard/r1/rules.mk @@ -0,0 +1,29 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/postageboard/readme.md b/keyboards/handwired/postageboard/readme.md new file mode 100644 index 0000000000..db9d0d11c5 --- /dev/null +++ b/keyboards/handwired/postageboard/readme.md @@ -0,0 +1,25 @@ +# Postage Board + +### Round 1 +![PostageBoard](https://cdn.shopify.com/s/files/1/1851/5125/products/image_db6a6d1c-01d8-4263-b148-136292425b6a_530x@2x.jpg?v=1540240631) + +### Round 2: Mini version +![PostageBoard](https://cdn.shopify.com/s/files/1/1851/5125/products/image_94eb103e-07f9-437f-b661-0909247cd766_1024x1024@2x.jpg?v=1574211602) + +The Postage board is a controller board meant to aid people in making a hand wired keyboard. Controller boards are essentially the brain of the keyboard. It is similar to the common Teensy 2.0, and also the Pro Micro. + +However, neither the Teensy, nor the Pro Micro are designed for keyboards specifically. They are just general Arduino-like boards meant for a variety of DIY projects. The Postage Board is designed for mechanical keyboards specifically, and thus the process of assembling your keyboard is easier, and the final product is more refined. + +* Keyboard Maintainer: [LifeIsOnTheWire](https://github.com/LifeIsOnTheWire/Postage-Board) +* Hardware Supported: Available at GB +* Hardware Availability: Available at GB + +Make example for this keyboard (after setting up your build environment): + + make handwired/postageboard/r1:default + +or + + make handwired/postageboard/mini: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). diff --git a/keyboards/handwired/postageboard/rules.mk b/keyboards/handwired/postageboard/rules.mk new file mode 100644 index 0000000000..a7fcf6bea6 --- /dev/null +++ b/keyboards/handwired/postageboard/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER=handwired/postageboard/mini diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index a2962c0746..ef6e204ec4 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -56,16 +56,16 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*9*2)) = (35+720) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 755 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 269 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*9*2)) = (37+720) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 757 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 267 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR #define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/rules.mk b/keyboards/handwired/prime_exl/rules.mk index 5cce4e8113..d7aca43dfc 100644 --- a/keyboards/handwired/prime_exl/rules.mk +++ b/keyboards/handwired/prime_exl/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index b09e30457c..207984407c 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -84,7 +84,6 @@ enum glow_modes { uint8_t glow_mode = GLOW_MIN; void turn_off_capslock(void); -extern keymap_config_t keymap_config; // layers, ordering is important! enum layers { diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index fbb1ae1d69..094eb15762 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -895,13 +895,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Emoji * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | 💕 | 😢 | 😩 | 😍 | 😏 | 😂 | ♻ | 😒 | 🎶 | 👌 | 😔 | 😌 | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | 👍 | 🙏 | 😁 | 😅 | 😳 | 😊 | ❤ | 👋 | 😘 | 🙌 | 😎 | 🙈 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | 👎 | 😴 | 👏 | 😭 | ✌ | 💔 | ☀ | 😊 | 😉 | 🌔 | 😕 | 🙉 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | 💩 | 👀 | 💯 | | 💀 | 😈 | 😇 | 😱 | | 😋 | 😞 | 🙊 | * `-----------------------------------------------------------------------------------' */ [_EMOJI] = LAYOUT( diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c index 3b8e5af820..b4a4c6396a 100644 --- a/keyboards/handwired/promethium/matrix.c +++ b/keyboards/handwired/promethium/matrix.c @@ -104,13 +104,6 @@ uint8_t matrix_cols(void) { } void matrix_init(void) { - - // To use PORTF disable JTAG with writing JTD bit twice within four cycles. - #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__)) - MCUCR |= _BV(JTD); - MCUCR |= _BV(JTD); - #endif - // initialize row and col unselect_rows(); init_cols(); diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index dab92e52cf..19d20ee03f 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -1,50 +1,18 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/handwired/pteron/rules.mk b/keyboards/handwired/pteron/rules.mk index 10218020e6..648387460b 100644 --- a/keyboards/handwired/pteron/rules.mk +++ b/keyboards/handwired/pteron/rules.mk @@ -1,45 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options @@ -55,4 +24,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no UNICODE_ENABLE = no -UNICODEMAP_ENABLE = no \ No newline at end of file +UNICODEMAP_ENABLE = no diff --git a/keyboards/handwired/qc60/keymaps/default/keymap.c b/keyboards/handwired/qc60/keymaps/default/keymap.c index 88062d4ed4..a0f6250ffe 100644 --- a/keyboards/handwired/qc60/keymaps/default/keymap.c +++ b/keyboards/handwired/qc60/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/qc60/rules.mk b/keyboards/handwired/qc60/rules.mk index e61b18b00c..8859f5012d 100644 --- a/keyboards/handwired/qc60/rules.mk +++ b/keyboards/handwired/qc60/rules.mk @@ -1,48 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk index 00ca06dd40..4400decaac 100755 --- a/keyboards/handwired/reddot/rules.mk +++ b/keyboards/handwired/reddot/rules.mk @@ -1,45 +1,14 @@ - -#MCU = at90usb1287 +# MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# for avr upload -USB = /dev/cu.usbmodem1421 -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp ifdef TEENSY2 BOOTLOADER = halfkay OPT_DEFS += -DATREUS_TEENSY2 @@ -51,11 +20,6 @@ else avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) endif -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - - # Build Options # change yes to no to disable # @@ -77,3 +41,5 @@ AUDIO_ENABLE = no # Audio output on port C6 # upload: build # $(ATREUS_UPLOAD_COMMAND) +# for avr upload +USB = /dev/cu.usbmodem1421 diff --git a/keyboards/handwired/retro_refit/rules.mk b/keyboards/handwired/retro_refit/rules.mk index 98aa19e6b1..04db510d13 100644 --- a/keyboards/handwired/retro_refit/rules.mk +++ b/keyboards/handwired/retro_refit/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. diff --git a/keyboards/handwired/rs60/rules.mk b/keyboards/handwired/rs60/rules.mk index 7b4ec69d0d..ee10944c67 100644 --- a/keyboards/handwired/rs60/rules.mk +++ b/keyboards/handwired/rs60/rules.mk @@ -1,50 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -LAYOUTS = ortho_5x12 - -# Boot Section Size in *bytes* -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -59,3 +25,4 @@ BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not b AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. +LAYOUTS = ortho_5x12 diff --git a/keyboards/handwired/slash/config.h b/keyboards/handwired/slash/config.h new file mode 100644 index 0000000000..56aec3144a --- /dev/null +++ b/keyboards/handwired/slash/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2019 4sdftemp + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER asdftemp +#define PRODUCT Slash +#define DESCRIPTION 60% keyboard with bluetooth + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { C7, D6, B7, B6, B5, D7, C6, D0 } +#define MATRIX_COL_PINS { D2, F0, F1, F4, F5, F6, F7, D3 } +#define UNUSED_PINS +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/handwired/slash/info.json b/keyboards/handwired/slash/info.json new file mode 100644 index 0000000000..713a77aaae --- /dev/null +++ b/keyboards/handwired/slash/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "slash", + "url": "", + "maintainer": "qmk", + "width": 16.75, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "x":1.75, "y":0}, + {"label":"1", "x":2.75, "y":0}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0}, + {"label":"4", "x":5.75, "y":0}, + {"label":"5", "x":6.75, "y":0}, + {"label":"6", "x":7.75, "y":0}, + {"label":"7", "x":8.75, "y":0}, + {"label":"8", "x":9.75, "y":0}, + {"label":"9", "x":10.75, "y":0}, + {"label":"0", "x":11.75, "y":0}, + {"label":"-", "x":12.75, "y":0}, + {"label":"=", "x":13.75, "y":0}, + {"label":"Backspace", "x":14.75, "y":0, "w":2}, + {"label":"Tab", "x":1.25, "y":1, "w":1.5}, + {"label":"Q", "x":2.75, "y":1}, + {"label":"W", "x":3.75, "y":1}, + {"label":"E", "x":4.75, "y":1}, + {"label":"R", "x":5.75, "y":1}, + {"label":"T", "x":6.75, "y":1}, + {"label":"Y", "x":7.75, "y":1}, + {"label":"U", "x":8.75, "y":1}, + {"label":"I", "x":9.75, "y":1}, + {"label":"O", "x":10.75, "y":1}, + {"label":"P", "x":11.75, "y":1}, + {"label":"[", "x":12.75, "y":1}, + {"label":"]", "x":13.75, "y":1}, + {"label":"\\", "x":14.75, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":1, "y":2, "w":1.75}, + {"label":"A", "x":2.75, "y":2}, + {"label":"S", "x":3.75, "y":2}, + {"label":"D", "x":4.75, "y":2}, + {"label":"F", "x":5.75, "y":2}, + {"label":"G", "x":6.75, "y":2}, + {"label":"H", "x":7.75, "y":2}, + {"label":"J", "x":8.75, "y":2}, + {"label":"K", "x":9.75, "y":2}, + {"label":"L", "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":2.25}, + {"label":"Shift", "x":0.5, "y":3, "w":2.25}, + {"label":"Z", "x":2.75, "y":3}, + {"label":"X", "x":3.75, "y":3}, + {"label":"C", "x":4.75, "y":3}, + {"label":"V", "x":5.75, "y":3}, + {"label":"B", "x":6.75, "y":3}, + {"label":"N", "x":7.75, "y":3}, + {"label":"M", "x":8.75, "y":3}, + {"label":",", "x":9.75, "y":3}, + {"label":".", "x":10.75, "y":3}, + {"label":"/", "x":11.75, "y":3}, + {"label":"Shift", "x":12.75, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "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":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/handwired/slash/keymaps/default/config.h b/keyboards/handwired/slash/keymaps/default/config.h new file mode 100644 index 0000000000..05a8d25b91 --- /dev/null +++ b/keyboards/handwired/slash/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 4sdftemp + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/slash/keymaps/default/keymap.c b/keyboards/handwired/slash/keymaps/default/keymap.c new file mode 100644 index 0000000000..f57ef8b645 --- /dev/null +++ b/keyboards/handwired/slash/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( /* Base */ + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), +}; diff --git a/keyboards/handwired/slash/keymaps/default/readme.md b/keyboards/handwired/slash/keymaps/default/readme.md new file mode 100644 index 0000000000..517377a4b0 --- /dev/null +++ b/keyboards/handwired/slash/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for slash diff --git a/keyboards/handwired/slash/readme.md b/keyboards/handwired/slash/readme.md new file mode 100644 index 0000000000..954a847388 --- /dev/null +++ b/keyboards/handwired/slash/readme.md @@ -0,0 +1,19 @@ +# slash + +![slash](https://i.imgur.com/MYEfSE0.jpg) + +I found this project a while ago on [Reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/6v3b6f/build_slash_keyboard_handwired_bluetooth/). This keyboard uses 61 keys in a 8x8 matrix. That bring the required pins to 16 which leaves 1 pin free. Unfortunately I couldn't get the firmware to compile on kbfirmware.com(the way [ND1BV](https://imgur.com/user/ND1BV) described it). So I decided to create the config myself and share it. I changed the wiring of the pins a little bit showed [here](https://i.imgur.com/WZ93xHx.png) + +Keyboard Maintainer: [asdftemp](https://github.com/asdftemp) +Hardware Supported: Adafruit Feather 32u4 Bluefruit LE +Hardware Availability: [Adafruit shop](https://www.adafruit.com/product/2829) + +Make example for this keyboard (after setting up your build environment): + + make handwired/slash:default + +Flashing should be done trough avrdude. Full make command is: + + make handwired/slash: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). diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk new file mode 100644 index 0000000000..4aba5bdeb9 --- /dev/null +++ b/keyboards/handwired/slash/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +#BLUETOOTH_ENABLE = Yes # Enable Bluetooth with the Adafruit EZ-Key HID +BLUETOOTH = AdafruitBLE +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/slash/slash.c b/keyboards/handwired/slash/slash.c new file mode 100644 index 0000000000..59902b5074 --- /dev/null +++ b/keyboards/handwired/slash/slash.c @@ -0,0 +1,16 @@ +/* Copyright 2019 4sdftemp + * + * 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 . + */ +#include "slash.h" diff --git a/keyboards/handwired/slash/slash.h b/keyboards/handwired/slash/slash.h new file mode 100644 index 0000000000..6c1342d6b2 --- /dev/null +++ b/keyboards/handwired/slash/slash.h @@ -0,0 +1,36 @@ +/* Copyright 2019 asdftemp + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + 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, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k02, k04, k06, k08, k0A, k0C, KC_NO }, \ + { k01, k03, k05, k07, k09, k0B, k0D, KC_NO }, \ + { k10, k12, k14, k16, k18, k1A, k1C, k45 }, \ + { k11, k13, k15, k17, k19, k1B, k1D, k44 }, \ + { k21, k23, k25, k27, k29, k2B, KC_NO, k42 }, \ + { k20, k22, k24, k26, k28, k2A, k2C, k43 }, \ + { k31, k33, k35, k37, k39, k3B, k47, k40 }, \ + { k30, k32, k34, k36, k38, k3A, k46, k41 } \ +} diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk index b597ef2b09..43fc1f34a3 100644 --- a/keyboards/handwired/space_oddity/rules.mk +++ b/keyboards/handwired/space_oddity/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/splittest/config.h b/keyboards/handwired/splittest/config.h index a502d12382..56574f7529 100644 --- a/keyboards/handwired/splittest/config.h +++ b/keyboards/handwired/splittest/config.h @@ -33,12 +33,6 @@ along with this program. If not, see . #define MATRIX_ROWS 2 #define MATRIX_COLS 1 -// wiring of each half -#define MATRIX_ROW_PINS { B3 } -#define MATRIX_COL_PINS { B6 } -#define SPLIT_HAND_PIN F6 -#define SOFT_SERIAL_PIN D1 - /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -51,7 +45,6 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE /* ws2812 RGB LED */ -#define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 #define RGBLED_SPLIT { 6, 6 } diff --git a/keyboards/handwired/splittest/promicro/config.h b/keyboards/handwired/splittest/promicro/config.h new file mode 100644 index 0000000000..c2a9c6002e --- /dev/null +++ b/keyboards/handwired/splittest/promicro/config.h @@ -0,0 +1,28 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +// wiring of each half +#define MATRIX_ROW_PINS { B3 } +#define MATRIX_COL_PINS { B6 } +#define SPLIT_HAND_PIN F6 +#define SOFT_SERIAL_PIN D1 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 diff --git a/keyboards/handwired/splittest/promicro/readme.md b/keyboards/handwired/splittest/promicro/readme.md new file mode 100644 index 0000000000..64a6f4c249 --- /dev/null +++ b/keyboards/handwired/splittest/promicro/readme.md @@ -0,0 +1,11 @@ +# Pro Micro splittest + +To trigger keypress, short together pins *B3* and *B6* (marked on the PCB as *14* and *10*). + +## Wiring +- Add switches to both Pro Micros across B3 and B6 pins +- Add pull-up resistor to left side between VCC and F6 +- Add pull-down resistors to right side between GND and F6 +- Connect the following pins on both sides together: D0, D1, GND, VCC +- Add I2C 4.7kOhm resistors between D0 and VCC, and D1 and VCC +- Wire Di of RGB strip for each half to D3 diff --git a/keyboards/handwired/splittest/promicro/rules.mk b/keyboards/handwired/splittest/promicro/rules.mk new file mode 100644 index 0000000000..e6fef51727 --- /dev/null +++ b/keyboards/handwired/splittest/promicro/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina diff --git a/keyboards/handwired/splittest/readme.md b/keyboards/handwired/splittest/readme.md index 3dbff32ed4..33dbc6e805 100644 --- a/keyboards/handwired/splittest/readme.md +++ b/keyboards/handwired/splittest/readme.md @@ -4,7 +4,10 @@ Split Tester A two-switch tester built using two Pro Micros, mainly intended to test RGB on split keyboards. Seen here: https://www.instagram.com/p/BvCPNzynwrV/ Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro +Hardware Supported: Pro Micro, Teensy 2.0 +Hardware Availability: + +**See each individual board for pin infomation** Make example for this keyboard (after setting up your build environment): @@ -15,12 +18,3 @@ Example of flashing this keyboard: make handwired/splittest:default:avrdude 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). - -Wiring ------- -- Add switches to both Pro Micros across B3 and B6 pins -- Add pull-up resistor to left side between VCC and F6 -- Add pull-down resistors to right side between GND and F6 -- Connect the following pins on both sides together: D0, D1, GND, VCC -- Add I2C 4.7kOhm resistors between D0 and VCC, and D1 and VCC -- Wire Di of RGB strip for each half to D2 diff --git a/keyboards/handwired/splittest/rules.mk b/keyboards/handwired/splittest/rules.mk index 9512c0f648..2aa484db0b 100644 --- a/keyboards/handwired/splittest/rules.mk +++ b/keyboards/handwired/splittest/rules.mk @@ -1,47 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -63,3 +19,5 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = handwired/splittest/promicro diff --git a/keyboards/handwired/splittest/teensy_2/config.h b/keyboards/handwired/splittest/teensy_2/config.h new file mode 100644 index 0000000000..7c092db307 --- /dev/null +++ b/keyboards/handwired/splittest/teensy_2/config.h @@ -0,0 +1,31 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +// wiring of each half +#define MATRIX_ROW_PINS { F5 } +#define MATRIX_COL_PINS { F7 } +#define SPLIT_HAND_PIN F0 +#define SOFT_SERIAL_PIN D1 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +// teensy has vbus detection issues - use usb detection instead +#define SPLIT_USB_DETECT diff --git a/keyboards/handwired/splittest/teensy_2/readme.md b/keyboards/handwired/splittest/teensy_2/readme.md new file mode 100644 index 0000000000..ed5f845d20 --- /dev/null +++ b/keyboards/handwired/splittest/teensy_2/readme.md @@ -0,0 +1,11 @@ +# Teensy 2.0 splittest + +To trigger keypress, short together pins *F5* and *F7* + +## Wiring +- Add switches to both Teensy 2s across F5 and F7 pins +- Add pull-up resistor to left side between VCC and F0 +- Add pull-down resistors to right side between GND and F0 +- Connect the following pins on both sides together: D0, D1, GND, VCC +- Add I2C 4.7kOhm resistors between D0 and VCC, and D1 and VCC +- Wire Di of RGB strip for each half to D3 diff --git a/keyboards/handwired/splittest/teensy_2/rules.mk b/keyboards/handwired/splittest/teensy_2/rules.mk new file mode 100644 index 0000000000..ae398e2588 --- /dev/null +++ b/keyboards/handwired/splittest/teensy_2/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay diff --git a/keyboards/handwired/steamvan/info.json b/keyboards/handwired/steamvan/info.json new file mode 100644 index 0000000000..1a057e5ca2 --- /dev/null +++ b/keyboards/handwired/steamvan/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "steamvan", + "url": "", + "maintainer": "qmk", + "width": 12.75, + "height": 4, + "layouts": { + "LAYOUT_standard": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"|", "x":11, "y":0, "w":1.75}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"x":11.75, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Win", "x":1.25, "y":3, "w":1.5}, {"label":"Alt", "x":2.75, "y":3, "w":1.25}, {"x":4, "y":3, "w":2.25}, {"x":6.25, "y":3, "w":2}, {"label":"Alt", "x":8.25, "y":3, "w":1.25}, {"label":"Win", "x":9.5, "y":3, "w":1.5}, {"label":"Menu", "x":11, "y":3, "w":1.75}] + }, + + "LAYOUT_arrow": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"|", "x":11, "y":0, "w":1.75}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"x":11.75, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Win", "x":1.25, "y":3, "w":1.5}, {"label":"Alt", "x":2.75, "y":3, "w":1.25}, {"x":4, "y":3, "w":2.25}, {"x":6.25, "y":3, "w":2}, {"x":8.25, "y":3, "w":1.5}, {"label":"Alt", "x":9.75, "y":3}, {"label":"Win", "x":10.75, "y":3}, {"label":"Menu", "x":11.75, "y":3}] + }, + + "LAYOUT_command": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"|", "x":11, "y":0, "w":1.75}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"x":11.75, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Win", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "w":2.25}, {"x":6.25, "y":3, "w":2}, {"x":8.25, "y":3, "w":1.5}, {"label":"Alt", "x":9.75, "y":3, "w":1.5}, {"label":"Win", "x":11.25, "y":3, "w":1.5}] + }, + + "LAYOUT_arrow_command": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"|", "x":11, "y":0, "w":1.75}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"x":11.75, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Win", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "w":2.25}, {"x":6.25, "y":3, "w":2}, {"x":8.25, "y":3, "w":1.5}, {"label":"Alt", "x":9.75, "y":3}, {"label":"Win", "x":10.75, "y":3}, {"label":"Menu", "x":11.75, "y":3}] + } + } +} diff --git a/keyboards/handwired/steamvan/keymaps/default/config.h b/keyboards/handwired/steamvan/keymaps/default/config.h new file mode 100644 index 0000000000..271f48d001 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/handwired/steamvan/keymaps/default/keymap.c b/keyboards/handwired/steamvan/keymaps/default/keymap.c new file mode 100644 index 0000000000..e796f09409 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// This file is based on the default keyman the the MiniVan. + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layer_names { + _QW, + _DV, + _CM, + _L1, + _L2, + _L3, +}; + +// Curly braces have their own keys. These are defined to make them not mess up +// the grid in layer 2. +#define L_CURBR LSFT(KC_LBRC) +#define R_CURBR LSFT(KC_RBRC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_standard( /* Qwerty */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_DV] = LAYOUT_standard( /* Dvorak */ + KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1), + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_CM] = LAYOUT_standard( /* Colemak */ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_L1] = LAYOUT_standard( /* LAYER 1 */ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______, + _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT, + _______, KC_LGUI, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT_standard( /* LAYER 2 */ + _______, DF(_QW), DF(_DV), DF(_CM), _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, L_CURBR, R_CURBR, KC_4, KC_5, KC_6, KC_VOLU, KC_ENT, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT_standard( /* LAYER 3 */ + _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______ + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/steamvan/keymaps/default/readme.md b/keyboards/handwired/steamvan/keymaps/default/readme.md new file mode 100644 index 0000000000..efc2165482 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the SteamVan, based on the MiniVan default layout. diff --git a/keyboards/handwired/steamvan/keymaps/jmdaly/config.h b/keyboards/handwired/steamvan/keymaps/jmdaly/config.h new file mode 100644 index 0000000000..271f48d001 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/jmdaly/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c b/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c new file mode 100644 index 0000000000..2bc5432712 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c @@ -0,0 +1,80 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum { + // Layers + _L1, + _L2, + _L3, + _L4, + _L5 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L1] = LAYOUT_standard( /* Qwerty */ + LT(_L5, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_L2, KC_QUOT), + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + MO(_L2), KC_LGUI, MO(_L3), KC_ENT, LT(_L2, KC_SPC), KC_RALT, KC_BSLS, MO(_L4) + ), + [_L2] = LAYOUT_standard( /* LAYER 2 */ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_LBRC, KC_RBRC, KC_MNXT, _______, + _______, KC_LGUI, _______, _______, _______, _______, _______, MO(_L4) + ), + [_L3] = LAYOUT_standard( /* LAYER 3 */ + KC_MINS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_EQL, KC_PIPE, KC_TILD, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_INS, + _______, _______, _______, KC_DQUO, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L4] = LAYOUT_standard( /* LAYER 4 */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_PGUP, _______, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_HOME, KC_END, _______, + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_PGDN, KC_F12, _______, + _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______ + ), + [_L5] = LAYOUT_standard( /* LAYER 5 */ + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LGUI(KC_MINS), + KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_HOME, KC_END, _______, + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_PGDN, KC_F12, _______, + _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______ + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/steamvan/keymaps/jmdaly/readme.md b/keyboards/handwired/steamvan/keymaps/jmdaly/readme.md new file mode 100644 index 0000000000..5aeae7064f --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/jmdaly/readme.md @@ -0,0 +1 @@ +# jmdaly's keymap for the steamvan diff --git a/keyboards/handwired/steamvan/readme.md b/keyboards/handwired/steamvan/readme.md new file mode 100644 index 0000000000..508d67f234 --- /dev/null +++ b/keyboards/handwired/steamvan/readme.md @@ -0,0 +1,24 @@ +# SteamVan + +The SteamVan is a 40% PCB that aims to meet the following goals: + +* Switches oriented such that the LEDs are South-facing, for + compatibility with Cherry profile keycaps. +* USB Type-C support in both A to C and C to C configurations. +* QMK support. +* ESD protection circuitry, including data line protection and a + polyfuse on the VCC line. +* Support for per-switch LED backlighting. +* Fits in MiniVan keyboard cases. + +More info on the project, including all of the design files, can be found [here](https://github.com/jmdaly/steamvan). + +Keyboard Maintainer: [jmdaly](https://github.com/jmdaly) +Hardware Supported: SteamVan PCB rev1 +Hardware Availability: Through group buys. + +Make example for this keyboard (after setting up your build environment): + + make handwired/steamvan/rev1: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). diff --git a/keyboards/handwired/steamvan/rev1/chconf.h b/keyboards/handwired/steamvan/rev1/chconf.h new file mode 100644 index 0000000000..1d9f12ff1f --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM TRUE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/steamvan/rev1/config.h b/keyboards/handwired/steamvan/rev1/config.h new file mode 100644 index 0000000000..f10f42966b --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2019 John M Daly + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER John M Daly +#define PRODUCT SteamVan rev1 +#define DESCRIPTION An open hardware forty percent PCB + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* ROWS: Top to bottom, COLS: Left to right +*/ +#define MATRIX_ROW_PINS { A6, A5, A4, A3 } +#define MATRIX_COL_PINS { A9, A8, B15, B14, B13, A10, B9, B6, B5, B4, B3, A15 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Backlight configuration + * Backlight LEDs on B8 + */ +#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +#define RGBLIGHT_ANIMATIONS + +#define RGBLED_NUM 16 +#define RGB_DI_PIN A7 +#define DRIVER_LED_TOTAL RGBLED_NUM + +#define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/handwired/steamvan/rev1/halconf.h b/keyboards/handwired/steamvan/rev1/halconf.h new file mode 100644 index 0000000000..5e5d70219e --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/halconf.h @@ -0,0 +1,388 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/steamvan/rev1/led.c b/keyboards/handwired/steamvan/rev1/led.c new file mode 100644 index 0000000000..1b78fa2f86 --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/led.c @@ -0,0 +1,242 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#include "hal.h" +#include "led_custom.h" +#include "rev1.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + + +void backlight_init_ports(void) { + palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); + pwmStart(&PWMD4, &pwmCFG); + if(kb_backlight_config.enable){ + if(kb_backlight_config.breathing){ + breathing_enable(); + } else{ + backlight_set(kb_backlight_config.level); + } + } else { + backlight_set(0); + } +} + +void backlight_set(uint8_t level) { + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + if (level == 0) { + // Turn backlight off + // Disable channel 3 on PWM4 + pwmDisableChannel(&PWMD4, 2); + } else { + // Turn backlight on + if(!is_breathing()){ + // Enable channel 3 on PWM4 + pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,duty)); + } + } +} + + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +bool is_breathing(void) { + return PWMD4.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD4); + pwmStart(&PWMD4, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD4); + pwmEnableChannelI( + &PWMD4, + 2, + PWM_FRACTION_TO_WIDTH( + &PWMD4, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD4); + pwmStart(&PWMD4, &pwmCFG); +} + +void breathing_enable(void) +{ + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (kb_backlight_config.level == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(kb_backlight_config.level); +} + +void breathing_self_disable(void) +{ + if (kb_backlight_config.level == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()){ + breathing_disable(); + } else { + breathing_enable(); + } +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * kb_backlight_config.level; +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + breathing_interrupt_disable(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD4, + 2, + PWM_FRACTION_TO_WIDTH( + &PWMD4, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} diff --git a/keyboards/handwired/steamvan/rev1/led_custom.h b/keyboards/handwired/steamvan/rev1/led_custom.h new file mode 100644 index 0000000000..56e723db8f --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/led_custom.h @@ -0,0 +1,22 @@ +/* +Copyright 2019 John M Daly + +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 . +*/ + +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); diff --git a/keyboards/handwired/steamvan/rev1/mcuconf.h b/keyboards/handwired/steamvan/rev1/mcuconf.h new file mode 100644 index 0000000000..69bf9185d1 --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/mcuconf.h @@ -0,0 +1,257 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +#undef STM32_HSE_BYPASS +// #error "oh no" +// #endif + +/* + * ADC driver system settings. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/handwired/steamvan/rev1/rev1.c b/keyboards/handwired/steamvan/rev1/rev1.c new file mode 100644 index 0000000000..3188649494 --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/rev1.c @@ -0,0 +1,36 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#include "rev1.h" + +#include "led.h" +#include "printf.h" + +backlight_config_t kb_backlight_config = { + .enable = true, + .breathing = true, + .level = BACKLIGHT_LEVELS +}; + + + +void matrix_init_kb(void) { + matrix_init_user(); + backlight_init_ports(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} diff --git a/keyboards/handwired/steamvan/rev1/rev1.h b/keyboards/handwired/steamvan/rev1/rev1.h new file mode 100644 index 0000000000..83f7ecb9ca --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/rev1.h @@ -0,0 +1,90 @@ +/* Copyright 2019 Jack Humbert + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#include "backlight.h" + +// This a shortcut to help you visually see your layout. +// There are a number of variations depending on the layout of your bottom row. +// The arrow variant adds an additional key on the bottom-right, while the +// command variant adds an additional key on the bottom-left. arrow-command is a +// combination of both of those, having an additional key on both sides. +// +// Please note that the numbering of the macro arguments are based on the +// numbers of the keys on the PCB. + +#define LAYOUT_standard( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K33, K34, K36, K38, K39, K3B \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, KC_NO, K33, K34, KC_NO, K36, KC_NO, K38, K39, KC_NO, K3B } \ +} + +#define LAYOUT_arrow( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K33, K34, K36, K38, K39, K3A, K3B \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, KC_NO, K33, K34, KC_NO, K36, KC_NO, K38, K39, K3A, K3B } \ +} + +#define LAYOUT_command( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K36, K38, K39, K3B \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, KC_NO, K36, KC_NO, K38, K39, KC_NO, K3B } \ +} + +#define LAYOUT_arrow_command( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K36, K38, K39, K3A, K3B \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, KC_NO, K36, KC_NO, K38, K39, K3A, K3B } \ +} + +// Backlighting +extern backlight_config_t kb_backlight_config; +extern bool kb_backlight_breathing; + +void backlight_init_ports(void); +void backlight_set(uint8_t level); +bool is_breathing(void); +void breathing_enable(void); +void breathing_disable(void); diff --git a/keyboards/handwired/steamvan/rev1/rules.mk b/keyboards/handwired/steamvan/rev1/rules.mk new file mode 100644 index 0000000000..471cb4c1e1 --- /dev/null +++ b/keyboards/handwired/steamvan/rev1/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F303 + +# Code for backlight breathing: +SRC += led.c + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = yes +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +LEADER_ENABLE = yes + diff --git a/keyboards/handwired/sticc14/config.h b/keyboards/handwired/sticc14/config.h new file mode 100644 index 0000000000..22011f0788 --- /dev/null +++ b/keyboards/handwired/sticc14/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 ErkHal + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER u/ergorius +#define PRODUCT Sticc14 +#define DESCRIPTION Custom macropad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1 } +#define MATRIX_COL_PINS { B6, B2, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/sticc14/info.json b/keyboards/handwired/sticc14/info.json new file mode 100644 index 0000000000..fac5ab313e --- /dev/null +++ b/keyboards/handwired/sticc14/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "Sticc14", + "url": "", + "maintainer": "erkhal", + "width": 3, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K20", "x":0, "y":2}, + {"label":"K21", "x":1, "y":2}, + {"label":"K22", "x":2, "y":2}, + {"label":"K30", "x":0, "y":3}, + {"label":"K31", "x":1, "y":3}, + {"label":"K32", "x":2, "y":3}, + {"label":"K40", "x":0, "y":4, "w":2}, + {"label":"K41", "x":2, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/sticc14/keymaps/default/config.h b/keyboards/handwired/sticc14/keymaps/default/config.h new file mode 100644 index 0000000000..0d34db1407 --- /dev/null +++ b/keyboards/handwired/sticc14/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ErkHal + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/sticc14/keymaps/default/keymap.c b/keyboards/handwired/sticc14/keymaps/default/keymap.c new file mode 100644 index 0000000000..17364f0a22 --- /dev/null +++ b/keyboards/handwired/sticc14/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2019 ErkHal + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_PPLS, KC_PSLS, KC_BSPC, + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3, + KC_0, LT(1, KC_ENT)), + + [1] = LAYOUT( + KC_MPRV, KC_MPLY, KC_MNXT, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_MPRV, KC_MPLY, KC_MNXT, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/handwired/sticc14/keymaps/default/readme.md b/keyboards/handwired/sticc14/keymaps/default/readme.md new file mode 100644 index 0000000000..098402e68a --- /dev/null +++ b/keyboards/handwired/sticc14/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default Sticc14 Layout + +![Sticc14 layout image](https://i.imgur.com/Xmmhmvi.png) + +Second layer has media keys on top-row. (Prev, Play/Pause, Next) diff --git a/keyboards/handwired/sticc14/readme.md b/keyboards/handwired/sticc14/readme.md new file mode 100644 index 0000000000..65f1a2416f --- /dev/null +++ b/keyboards/handwired/sticc14/readme.md @@ -0,0 +1,15 @@ +# Sticc14 + +![Sticc14](https://i.imgur.com/blzFw5R.jpg) + +Sticc14 is a simple macropad, designed to be easy to build and affordable. + +Keyboard Maintainer: [ErkHal](https://github.com/erkhal) +Hardware Supported: Sticc14 +Hardware Availability: [Ergorius](https://reddit.com/u/ergorius) + +Make example for this keyboard (after setting up your build environment): + + make handwired/sticc14: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). diff --git a/keyboards/handwired/sticc14/rules.mk b/keyboards/handwired/sticc14/rules.mk new file mode 100644 index 0000000000..7b326cc319 --- /dev/null +++ b/keyboards/handwired/sticc14/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/sticc14/sticc14.c b/keyboards/handwired/sticc14/sticc14.c new file mode 100644 index 0000000000..8edd2bda6b --- /dev/null +++ b/keyboards/handwired/sticc14/sticc14.c @@ -0,0 +1,51 @@ +/* Copyright 2019 ErkHal + * + * 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 . + */ +#include "sticc14.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/handwired/sticc14/sticc14.h b/keyboards/handwired/sticc14/sticc14.h new file mode 100644 index 0000000000..1a5f51e41a --- /dev/null +++ b/keyboards/handwired/sticc14/sticc14.h @@ -0,0 +1,40 @@ +/* Copyright 2019 ErkHal + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32, \ + K40, K41 \ +) { \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 }, \ + { K40, K41} \ +} diff --git a/keyboards/handwired/symmetry60/config.h b/keyboards/handwired/symmetry60/config.h new file mode 100644 index 0000000000..ee72208afc --- /dev/null +++ b/keyboards/handwired/symmetry60/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2019 Marhalloweenvt + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Marhalloweenvt +#define PRODUCT Symmetry60 +#define DESCRIPTION A Boardwalk-inspired keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B6, B5, B4, D7, D6, D4, E6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 diff --git a/keyboards/handwired/symmetry60/info.json b/keyboards/handwired/symmetry60/info.json new file mode 100644 index 0000000000..f33c28b0c5 --- /dev/null +++ b/keyboards/handwired/symmetry60/info.json @@ -0,0 +1,83 @@ +{ + "Keyboard_name": "Symmetry60", + "url": "", + "maintainer": "marhalloweenvt", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x14": { + "layout": [ + {"label":"K00", "x":0, "y":0, "w":1.5}, + {"label":"K01", "x":1.5, "y":0}, + {"label":"K02", "x":2.5, "y":0}, + {"label":"K03", "x":3.5, "y":0}, + {"label":"K04", "x":4.5, "y":0}, + {"label":"K05", "x":5.5, "y":0}, + {"label":"K06", "x":6.5, "y":0}, + {"label":"K07", "x":7.5, "y":0}, + {"label":"K08", "x":8.5, "y":0}, + {"label":"K09", "x":9.5, "y":0}, + {"label":"K0A", "x":10.5, "y":0}, + {"label":"K0B", "x":11.5, "y":0}, + {"label":"K0C", "x":12.5, "y":0}, + {"label":"K0D", "x":13.5, "y":0, "w":1.5}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K11", "x":1.5, "y":1}, + {"label":"K12", "x":2.5, "y":1}, + {"label":"K13", "x":3.5, "y":1}, + {"label":"K14", "x":4.5, "y":1}, + {"label":"K15", "x":5.5, "y":1}, + {"label":"K16", "x":6.5, "y":1}, + {"label":"K17", "x":7.5, "y":1}, + {"label":"K18", "x":8.5, "y":1}, + {"label":"K19", "x":9.5, "y":1}, + {"label":"K1A", "x":10.5, "y":1}, + {"label":"K1B", "x":11.5, "y":1}, + {"label":"K1C", "x":12.5, "y":1}, + {"label":"K1D", "x":13.5, "y":1, "w":1.5}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":6.5, "y":2}, + {"label":"K27", "x":7.5, "y":2}, + {"label":"K28", "x":8.5, "y":2}, + {"label":"K29", "x":9.5, "y":2}, + {"label":"K2A", "x":10.5, "y":2}, + {"label":"K2B", "x":11.5, "y":2}, + {"label":"K2C", "x":12.5, "y":2}, + {"label":"K2D", "x":13.5, "y":2, "w":1.5}, + {"label":"K30", "x":0, "y":3, "w":1.5}, + {"label":"K31", "x":1.5, "y":3}, + {"label":"K32", "x":2.5, "y":3}, + {"label":"K33", "x":3.5, "y":3}, + {"label":"K34", "x":4.5, "y":3}, + {"label":"K35", "x":5.5, "y":3}, + {"label":"K36", "x":6.5, "y":3}, + {"label":"K37", "x":7.5, "y":3}, + {"label":"K38", "x":8.5, "y":3}, + {"label":"K39", "x":9.5, "y":3}, + {"label":"K3A", "x":10.5, "y":3}, + {"label":"K3B", "x":11.5, "y":3}, + {"label":"K3C", "x":12.5, "y":3}, + {"label":"K3D", "x":13.5, "y":3, "w":1.5}, + {"label":"K40", "x":0, "y":4, "w":1.5}, + {"label":"K41", "x":1.5, "y":4}, + {"label":"K42", "x":2.5, "y":4}, + {"label":"K43", "x":3.5, "y":4}, + {"label":"K44", "x":4.5, "y":4}, + {"label":"K45", "x":5.5, "y":4}, + {"label":"K46", "x":6.5, "y":4}, + {"label":"K47", "x":7.5, "y":4}, + {"label":"K48", "x":8.5, "y":4}, + {"label":"K49", "x":9.5, "y":4}, + {"label":"K4A", "x":10.5, "y":4}, + {"label":"K4B", "x":11.5, "y":4}, + {"label":"K4C", "x":12.5, "y":4}, + {"label":"K4D", "x":13.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/handwired/symmetry60/keymaps/default/config.h b/keyboards/handwired/symmetry60/keymaps/default/config.h new file mode 100644 index 0000000000..7b52e1dd03 --- /dev/null +++ b/keyboards/handwired/symmetry60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/symmetry60/keymaps/default/keymap.c b/keyboards/handwired/symmetry60/keymaps/default/keymap.c new file mode 100644 index 0000000000..6960698951 --- /dev/null +++ b/keyboards/handwired/symmetry60/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x14( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, 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_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL + ), +}; diff --git a/keyboards/handwired/symmetry60/keymaps/default/readme.md b/keyboards/handwired/symmetry60/keymaps/default/readme.md new file mode 100644 index 0000000000..db25aa3bf2 --- /dev/null +++ b/keyboards/handwired/symmetry60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for symmetry60 diff --git a/keyboards/handwired/symmetry60/readme.md b/keyboards/handwired/symmetry60/readme.md new file mode 100644 index 0000000000..5a4de934fe --- /dev/null +++ b/keyboards/handwired/symmetry60/readme.md @@ -0,0 +1,13 @@ +# SYMMETRY60 + +A keyboard inspired by Boardwalk + +* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt) +* Hardware Supported: Symmetry60 PCB +* Hardware Availability: Symmetry60 PCB + +Make example for this keyboard (after setting up your build environment): + + make handwired/symmetry60: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). diff --git a/keyboards/handwired/symmetry60/rules.mk b/keyboards/handwired/symmetry60/rules.mk new file mode 100644 index 0000000000..6830cc6905 --- /dev/null +++ b/keyboards/handwired/symmetry60/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +LTO_ENABLE = yes # Use link time optimization + +LAYOUTS = ortho_5x14 diff --git a/keyboards/handwired/symmetry60/symmetry60.c b/keyboards/handwired/symmetry60/symmetry60.c new file mode 100644 index 0000000000..70828297c7 --- /dev/null +++ b/keyboards/handwired/symmetry60/symmetry60.c @@ -0,0 +1,16 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 . + */ +#include "symmetry60.h" diff --git a/keyboards/handwired/symmetry60/symmetry60.h b/keyboards/handwired/symmetry60/symmetry60.h new file mode 100644 index 0000000000..138e5bb234 --- /dev/null +++ b/keyboards/handwired/symmetry60/symmetry60.h @@ -0,0 +1,42 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_5x14( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \ +} + diff --git a/keyboards/handwired/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk index 0119dc6fb2..b41b736a71 100644 --- a/keyboards/handwired/tennie/rules.mk +++ b/keyboards/handwired/tennie/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 276475873a..78578a33ee 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -15,7 +15,6 @@ */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/terminus_mini/keymaps/default/rules.mk b/keyboards/handwired/terminus_mini/keymaps/default/rules.mk index 42ab51f150..a0c29684b1 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/rules.mk +++ b/keyboards/handwired/terminus_mini/keymaps/default/rules.mk @@ -1,19 +1,3 @@ -# Copyright 2013 Jun Wako -# -# 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 . - - # QMK Build Options # change to "no" to disable the options, or define them in the rules.mk in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/terminus_mini/rules.mk b/keyboards/handwired/terminus_mini/rules.mk index 9ecba25d80..684da4cbb9 100644 --- a/keyboards/handwired/terminus_mini/rules.mk +++ b/keyboards/handwired/terminus_mini/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk index 47dace8a22..668b3bb1ff 100644 --- a/keyboards/handwired/trackpoint/rules.mk +++ b/keyboards/handwired/trackpoint/rules.mk @@ -1,9 +1,17 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=512 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + + BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) @@ -19,4 +27,3 @@ AUDIO_ENABLE = no # Audio output on port C6 PS2_MOUSE_ENABLE = yes PS2_USE_USART = yes - diff --git a/keyboards/handwired/tradestation/rules.mk b/keyboards/handwired/tradestation/rules.mk index 649b63babf..d3612c3c29 100644 --- a/keyboards/handwired/tradestation/rules.mk +++ b/keyboards/handwired/tradestation/rules.mk @@ -1,54 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c index 44f65f4b81..4802b05345 100644 --- a/keyboards/handwired/traveller/keymaps/default/keymap.c +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -15,13 +15,13 @@ #define RGBLED_TOGGLE 10 #define _HIOUT 15 #define _LWOUT 16 -// Macros -#define MDL 4 -#define MDR 5 -#define MUR 6 -#define MUL 3 - +enum custom_keycodes { + M_MUL = SAFE_RANGE, + M_MDL, + M_MDR, + M_MUR +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -102,9 +102,9 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key */ [_NAV] = KEYMAP( - TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, + TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M_MUL, KC_MS_U, M_MUR, KC_NO, KC_ACL2, KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1, - KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0, + KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M_MDL, KC_MS_D, M_MDR, KC_UP, KC_ACL0, KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -152,23 +152,10 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; - +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { // from algernon's ErgoDox EZ layout, - case MUL: + case M_MUL: if (record->event.pressed) { mousekey_on(KC_MS_UP); mousekey_on(KC_MS_LEFT); @@ -177,9 +164,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_off(KC_MS_LEFT); } mousekey_send(); - break; + return false; - case MUR: + case M_MUR: if (record->event.pressed) { mousekey_on(KC_MS_UP); mousekey_on(KC_MS_RIGHT); @@ -188,9 +175,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_off(KC_MS_RIGHT); } mousekey_send(); - break; + return false; - case MDL: + case M_MDL: if (record->event.pressed) { mousekey_on(KC_MS_DOWN); mousekey_on(KC_MS_LEFT); @@ -199,9 +186,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_off(KC_MS_LEFT); } mousekey_send(); - break; + return false; - case MDR: + case M_MDR: if (record->event.pressed) { mousekey_on(KC_MS_DOWN); mousekey_on(KC_MS_RIGHT); @@ -210,11 +197,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_off(KC_MS_RIGHT); } mousekey_send(); - break; - - + return false; + default: + return true; } - return MACRO_NONE; + return true; }; void LayerLEDSet(uint8_t layr) { @@ -262,11 +249,6 @@ void matrix_scan_user(void) { } } - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk index 8568def354..0758e59340 100644 --- a/keyboards/handwired/traveller/rules.mk +++ b/keyboards/handwired/traveller/rules.mk @@ -1,46 +1,14 @@ - -#MCU = at90usb1287 +# MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# for avr upload -USB = /dev/cu.usbmodem1421 -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp ifdef TEENSY2 BOOTLOADER = halfkay OPT_DEFS += -DATREUS_TEENSY2 @@ -52,23 +20,6 @@ else avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) endif - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# MCU name - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -88,3 +39,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = yes +# for avr upload +USB = /dev/cu.usbmodem1421 diff --git a/keyboards/handwired/tritium_numpad/rules.mk b/keyboards/handwired/tritium_numpad/rules.mk index c990a6ab14..42dfc5cbec 100644 --- a/keyboards/handwired/tritium_numpad/rules.mk +++ b/keyboards/handwired/tritium_numpad/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/woodpad/keymaps/default/rules.mk b/keyboards/handwired/woodpad/keymaps/default/rules.mk index fce19bfaa8..394bc0271f 100644 --- a/keyboards/handwired/woodpad/keymaps/default/rules.mk +++ b/keyboards/handwired/woodpad/keymaps/default/rules.mk @@ -1,19 +1,3 @@ -# Copyright 2013 Jun Wako -# -# 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 . - - # QMK Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -31,4 +15,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/handwired/woodpad/rules.mk b/keyboards/handwired/woodpad/rules.mk index f8c488307f..7725131978 100644 --- a/keyboards/handwired/woodpad/rules.mk +++ b/keyboards/handwired/woodpad/rules.mk @@ -1,50 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Build Options # change yes to no to disable # @@ -64,15 +30,3 @@ BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches RGBLIGHT_ENABLE ?= no - -#avrdude: build -# ls /dev/tty* > /tmp/1; \ -# echo "Reset your Pro Micro now"; \ -# while [ -z $$USB ]; do \ -# sleep 1; \ -# ls /dev/tty* > /tmp/2; \ -# USB=`diff /tmp/1 /tmp/2 | $(GREP) -o '/dev/tty.*'`; \ -# done; \ -# avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -# -#.PHONY: avrdude diff --git a/keyboards/handwired/wulkan/rules.mk b/keyboards/handwired/wulkan/rules.mk index 3f881b7f12..f432c7d673 100644 --- a/keyboards/handwired/wulkan/rules.mk +++ b/keyboards/handwired/wulkan/rules.mk @@ -1,3 +1,4 @@ +# MCU name MCU = STM32F303 # Build Options diff --git a/keyboards/handwired/xealous/keymaps/default/keymap.c b/keyboards/handwired/xealous/keymaps/default/keymap.c index 4e691a0a76..ca82445a55 100644 --- a/keyboards/handwired/xealous/keymaps/default/keymap.c +++ b/keyboards/handwired/xealous/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/keyboards/handwired/xealous/matrix.c b/keyboards/handwired/xealous/matrix.c index e2d2199391..46410b986d 100644 --- a/keyboards/handwired/xealous/matrix.c +++ b/keyboards/handwired/xealous/matrix.c @@ -27,21 +27,8 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "split_util.h" -#include "pro_micro.h" #include "config.h" #include "timer.h" -#ifdef DEBUG_MATRIX_SCAN_RATE - #include "matrix_scanrate.h" -#endif - -void matrix_scan_user(void) -{ -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_check_scan_rate(); - matrix_time_between_scans(); -#endif - -} // Copy this code to split_common/matrix.c, // and call it instead of the unoptimized col_reader. Scan-rate jumps from 1200->1920 diff --git a/keyboards/handwired/xealous/matrix_scanrate.c b/keyboards/handwired/xealous/matrix_scanrate.c deleted file mode 100644 index f2c7cbe6e3..0000000000 --- a/keyboards/handwired/xealous/matrix_scanrate.c +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "timer.h" - -#ifdef CONSOLE_ENABLE -static uint16_t matrix_scan_count = 0; -static uint32_t matrix_timer = 0; -void matrix_check_scan_rate(void) { - matrix_scan_count++; - if (matrix_scan_count > 1000) { - uint32_t timer_now = timer_read32(); - uint16_t ms_per_thousand = TIMER_DIFF_32(timer_now, matrix_timer); - uint16_t rate_per_second = 1000000UL / ms_per_thousand; - print("scan_rate: "); - pdec(rate_per_second); - print("\n"); - matrix_timer = timer_now; - matrix_scan_count = 0; - } -} - -static uint32_t last_scan_time = 0; -void matrix_time_between_scans(void) { - if (timer_elapsed(last_scan_time) > 1) - { - print(">1ms elapsed since last scan: "); - pdec(timer_elapsed(last_scan_time)); - print("\n"); - } - last_scan_time = timer_read(); - -} -#endif diff --git a/keyboards/handwired/xealous/matrix_scanrate.h b/keyboards/handwired/xealous/matrix_scanrate.h deleted file mode 100644 index 18d56cd5b4..0000000000 --- a/keyboards/handwired/xealous/matrix_scanrate.h +++ /dev/null @@ -1,4 +0,0 @@ -__attribute__((weak)) -void matrix_check_scan_rate(void) {} -__attribute__((weak)) -void matrix_time_between_scans(void) {} diff --git a/keyboards/handwired/xealous/rev1/rev1.h b/keyboards/handwired/xealous/rev1/rev1.h index d195af49de..0d8913b2ea 100644 --- a/keyboards/handwired/xealous/rev1/rev1.h +++ b/keyboards/handwired/xealous/rev1/rev1.h @@ -1,10 +1,8 @@ #ifndef REV1_H #define REV1_H -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); #define XXX KC_NO #define LAYOUT( \ diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index ef3357982e..2d816ab7ce 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -1,49 +1,16 @@ -SRC += matrix_scanrate.c matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -66,6 +33,7 @@ SUBPROJECT_rev1 = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SRC += matrix.c DEBOUNCE_TYPE = eager_pk LAYOUTS = split60 diff --git a/keyboards/handwired/xealousbrown/rules.mk b/keyboards/handwired/xealousbrown/rules.mk index 2bad9a1c6e..c346ef6c98 100644 --- a/keyboards/handwired/xealousbrown/rules.mk +++ b/keyboards/handwired/xealousbrown/rules.mk @@ -1,44 +1,16 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina + # Build Options # change yes to no to disable # @@ -56,5 +28,3 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - - diff --git a/keyboards/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk index 3e726f1d6c..83afff3261 100644 --- a/keyboards/hecomi/alpha/rules.mk +++ b/keyboards/hecomi/alpha/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/hecomi/keymaps/kakunpc/keymap.c b/keyboards/hecomi/keymaps/kakunpc/keymap.c index d73bcd03f2..614035de23 100644 --- a/keyboards/hecomi/keymaps/kakunpc/keymap.c +++ b/keyboards/hecomi/keymaps/kakunpc/keymap.c @@ -16,28 +16,16 @@ */ #include QMK_KEYBOARD_H -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - -//R1:7 + 8 = 15 -//R2:7 + 8 = 15 -//R3:6 + 7 = 13 -//R4:6 + 8 = 14 -//R5:6 + 6 = 12 -//total : 69 keys -// enum layers{ DF, LW, FN }; -#define KC_FN MO(FN) + +#define LT_F13 LT(FN, KC_F13) +#define LT_F14 LT(FN, KC_F14) #define KC_LW MO(LW) -#define KC_SFT(XXX) LSFT(XXX) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DF]=LAYOUT(\ @@ -45,10 +33,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_LCTRL ,KC_A,KC_S,KC_D,KC_F,KC_G, KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_ENT, KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_DEL, - KC_LGUI,KC_NO,KC_LALT,KC_LW,KC_FN,KC_SPC, KC_SPC,KC_FN,KC_LEFT,KC_UP,KC_DOWN,KC_RIGHT + KC_LGUI,KC_NO,KC_LALT,KC_LW,LT_F13,KC_SPC, KC_SPC,LT_F14,KC_LEFT,KC_UP,KC_DOWN,KC_RIGHT ), [LW]=LAYOUT(\ - KC_NO,KC_NO,RGB_VAD,RGB_VAI,RGB_HUI,RGB_HUD,KC_TRNS, RGB_MOD,RGB_RMOD,KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + RGB_TOG,KC_NO,RGB_VAD,RGB_VAI,RGB_HUI,RGB_HUD,KC_TRNS, RGB_MOD,RGB_RMOD,KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO ,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, @@ -64,29 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } return true; } void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); + } void matrix_scan_user(void) { diff --git a/keyboards/hecomi/rules.mk b/keyboards/hecomi/rules.mk index 19b763d435..28febe217b 100644 --- a/keyboards/hecomi/rules.mk +++ b/keyboards/hecomi/rules.mk @@ -1,67 +1,16 @@ -DEFAULT_FOLDER=hecomi/alpha -# -# # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -83,3 +32,5 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = hecomi/alpha diff --git a/keyboards/helix/config.h b/keyboards/helix/config.h index fbfbd32804..875312f0c3 100644 --- a/keyboards/helix/config.h +++ b/keyboards/helix/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -27,8 +26,6 @@ along with this program. If not, see . // -include keyboards/helix/rev?/keymaps/MAPNAME/config.h // XXXX.c -#include - // GCC include search path in qmk_firmare/keyboards/helix/ // #include "..." search starts here: // #include <...> search starts here: @@ -38,14 +35,3 @@ along with this program. If not, see . // . // ./tmk_core // ...... - -#ifdef USE_Link_Time_Optimization - // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), - // so just disable them - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION - - #define DISABLE_LEADER -#endif // USE_Link_Time_Optimization - -#endif /* CONFIG_H */ diff --git a/keyboards/helix/helix.h b/keyboards/helix/helix.h index d73feb6bbf..7dac2455de 100644 --- a/keyboards/helix/helix.h +++ b/keyboards/helix/helix.h @@ -1,5 +1,4 @@ -#ifndef HELIX_H -#define HELIX_H +#pragma once #ifdef KEYBOARD_helix_rev1 #include "rev1.h" @@ -12,5 +11,3 @@ #endif #include "quantum.h" - -#endif diff --git a/keyboards/helix/i2c.c b/keyboards/helix/local_drivers/i2c.c similarity index 100% rename from keyboards/helix/i2c.c rename to keyboards/helix/local_drivers/i2c.c diff --git a/keyboards/helix/i2c.h b/keyboards/helix/local_drivers/i2c.h similarity index 100% rename from keyboards/helix/i2c.h rename to keyboards/helix/local_drivers/i2c.h diff --git a/keyboards/helix/local_drivers/serial.c b/keyboards/helix/local_drivers/serial.c new file mode 100644 index 0000000000..674c42d593 --- /dev/null +++ b/keyboards/helix/local_drivers/serial.c @@ -0,0 +1,589 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" + +#ifdef SOFT_SERIAL_PIN + +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_I2C + #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 + #error Using ATmega32U4 I2C, so can not use PD0, PD1 + #endif + #endif + + #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 + #define SERIAL_PIN_DDR DDRD + #define SERIAL_PIN_PORT PORTD + #define SERIAL_PIN_INPUT PIND + #if SOFT_SERIAL_PIN == D0 + #define SERIAL_PIN_MASK _BV(PD0) + #define EIMSK_BIT _BV(INT0) + #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) + #define SERIAL_PIN_INTERRUPT INT0_vect + #elif SOFT_SERIAL_PIN == D1 + #define SERIAL_PIN_MASK _BV(PD1) + #define EIMSK_BIT _BV(INT1) + #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) + #define SERIAL_PIN_INTERRUPT INT1_vect + #elif SOFT_SERIAL_PIN == D2 + #define SERIAL_PIN_MASK _BV(PD2) + #define EIMSK_BIT _BV(INT2) + #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) + #define SERIAL_PIN_INTERRUPT INT2_vect + #elif SOFT_SERIAL_PIN == D3 + #define SERIAL_PIN_MASK _BV(PD3) + #define EIMSK_BIT _BV(INT3) + #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) + #define SERIAL_PIN_INTERRUPT INT3_vect + #endif + #elif SOFT_SERIAL_PIN == E6 + #define SERIAL_PIN_DDR DDRE + #define SERIAL_PIN_PORT PORTE + #define SERIAL_PIN_INPUT PINE + #define SERIAL_PIN_MASK _BV(PE6) + #define EIMSK_BIT _BV(INT6) + #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) + #define SERIAL_PIN_INTERRUPT INT6_vect + #else + #error invalid SOFT_SERIAL_PIN value + #endif + +#else + #error serial.c now support ATmega32U4 only +#endif + +//////////////// for backward compatibility //////////////////////////////// +#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) +/* --- USE OLD API (compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + #endif + uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + #else + 0, (uint8_t *)NULL, + #endif + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + #else + 0, (uint8_t *)NULL, + #endif + } +}; + +void serial_master_init(void) +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } + +void serial_slave_init(void) +{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers() +{ + int result; + result = soft_serial_transaction(); + return result; +} + +#endif // end of OLD API (compatible with let's split serial.c) +//////////////////////////////////////////////////////////////////////////// + +#define ALWAYS_INLINE __attribute__((always_inline)) +#define NO_INLINE __attribute__((noinline)) +#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) + +// parity check +#define ODD_PARITY 1 +#define EVEN_PARITY 0 +#define PARITY EVEN_PARITY + +#ifdef SERIAL_DELAY + // custom setup in config.h + // #define TID_SEND_ADJUST 2 + // #define SERIAL_DELAY 6 // micro sec + // #define READ_WRITE_START_ADJUST 30 // cycles + // #define READ_WRITE_WIDTH_ADJUST 8 // cycles +#else +// ============ Standard setups ============ + +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif + +#if SELECT_SOFT_SERIAL_SPEED == 0 + // Very High speed + #define SERIAL_DELAY 4 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 34 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 1 + // High speed + #define SERIAL_DELAY 6 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 2 + // Middle speed + #define SERIAL_DELAY 12 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 3 + // Low speed + #define SERIAL_DELAY 24 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 4 + // Very Low speed + #define SERIAL_DELAY 36 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 5 + // Ultra Low speed + #define SERIAL_DELAY 48 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#error invalid SELECT_SOFT_SERIAL_SPEED value +#endif /* SELECT_SOFT_SERIAL_SPEED */ +#endif /* SERIAL_DELAY */ + +#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) +#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#endif + +static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; + +inline static void serial_delay(void) ALWAYS_INLINE; +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static void serial_delay_half1(void) ALWAYS_INLINE; +inline static +void serial_delay_half1(void) { + _delay_us(SERIAL_DELAY_HALF1); +} + +inline static void serial_delay_half2(void) ALWAYS_INLINE; +inline static +void serial_delay_half2(void) { + _delay_us(SERIAL_DELAY_HALF2); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_output(); + serial_high(); +} + +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { + uint8_t byte, i, p, pb; + + _delay_sub_us(READ_WRITE_START_ADJUST); + for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; +void serial_write_chunk(uint8_t data, uint8_t bit) { + uint8_t b, p; + for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { + if(data & b) { + serial_high(); p ^= 1; + } else { + serial_low(); p ^= 0; + } + serial_delay(); + } + /* send parity bit */ + if(p & 1) { serial_high(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + serial_delay_half1(); //4 +} + +static inline uint8_t nibble_bits_count(uint8_t bits) +{ + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + +// interrupt handle to be used by the target device +ISR(SERIAL_PIN_INTERRUPT) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + bits = serial_read_chunk(&pecount,7); + tid = bits>>3; + bits = (bits&7) != nibble_bits_count(tid); + if( bits || pecount> 0 || tid > Transaction_table_size ) { + return; + } + serial_delay_half1(); + + serial_high(); // response step1 low->high + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size); + // target switch to input + change_sender2reciver(); + + // target recive phase + if( trans->initiator2target_buffer_size > 0 ) { + if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size) ) { + *trans->status = TRANSACTION_ACCEPTED; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void) { + SSTD_t *trans = Transaction_table; +#else +int soft_serial_transaction(int sstd_index) { + if( sstd_index > Transaction_table_size ) + return TRANSACTION_TYPE_ERROR; + SSTD_t *trans = &Transaction_table[sstd_index]; +#endif + cli(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#else + // send transaction table index + int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); + sync_send(); + _delay_sub_us(TID_SEND_ADJUST); + serial_write_chunk(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // check if the target is present (step2 high->low) + for( int i = 0; serial_read_pin(); i++ ) { + if (i > SLAVE_INT_ACK_WIDTH + 1) { + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // if the target is present syncronize with it + if( trans->target2initiator_buffer_size > 0 ) { + if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size) ) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#endif + +#endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/helix/serial.h b/keyboards/helix/local_drivers/serial.h similarity index 100% rename from keyboards/helix/serial.h rename to keyboards/helix/local_drivers/serial.h diff --git a/keyboards/helix/ssd1306.c b/keyboards/helix/local_drivers/ssd1306.c similarity index 100% rename from keyboards/helix/ssd1306.c rename to keyboards/helix/local_drivers/ssd1306.c diff --git a/keyboards/helix/ssd1306.h b/keyboards/helix/local_drivers/ssd1306.h similarity index 100% rename from keyboards/helix/ssd1306.h rename to keyboards/helix/local_drivers/ssd1306.h diff --git a/keyboards/helix/pico/back/rules.mk b/keyboards/helix/pico/back/rules.mk new file mode 100644 index 0000000000..066fffb74a --- /dev/null +++ b/keyboards/helix/pico/back/rules.mk @@ -0,0 +1 @@ +LED_BACK_ENABLE = yes diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index b377332efa..260560f556 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef PICO_CONFIG_H -#define PICO_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -35,6 +34,11 @@ along with this program. If not, see . #define USE_SERIAL //#define USE_MATRIX_I2C +/* Soft Serial defines */ +#define SOFT_SERIAL_PIN D2 +#define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_ROWS)/2) +#define SERIAL_MASTER_BUFFER_LENGTH ((MATRIX_ROWS)/2) + /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT @@ -138,5 +142,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/helix/pico/keymaps/biacco/keymap.c b/keyboards/helix/pico/keymaps/biacco/keymap.c index 36ef4394dd..a1d041c022 100644 --- a/keyboards/helix/pico/keymaps/biacco/keymap.c +++ b/keyboards/helix/pico/keymaps/biacco/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_LALT, 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, SFT_T(KC_RO) , \ - KC_LCTL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + KC_LCTL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DEL, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ ), /* META @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_LALT, 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, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DEL, KC_PSCR, _______, _______, KC_JYEN \ ) }; diff --git a/keyboards/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk index d6b36580e1..0c60c40f64 100644 --- a/keyboards/helix/pico/keymaps/biacco/rules.mk +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -1,125 +1,24 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port B5 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = no # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = no # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(AUDIO_ENABLE)),yes) - ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - Link_Time_Optimization = yes - endif - ifeq ($(strip $(OLED_ENABLE)),yes) - Link_Time_Optimization = yes - endif -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/keymaps/default/keymap.c b/keyboards/helix/pico/keymaps/default/keymap.c index c5ab84abe8..8d1de894fc 100644 --- a/keyboards/helix/pico/keymaps/default/keymap.c +++ b/keyboards/helix/pico/keymaps/default/keymap.c @@ -11,7 +11,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/helix/pico/keymaps/default/readme.md b/keyboards/helix/pico/keymaps/default/readme.md index 13948cf620..9013e31287 100644 --- a/keyboards/helix/pico/keymaps/default/readme.md +++ b/keyboards/helix/pico/keymaps/default/readme.md @@ -95,16 +95,15 @@ see `qmk_firmware/keyboards/helix/pico/keymaps/default/rules.mk` ``` -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## Compile @@ -116,11 +115,18 @@ $ cd qmk_firmware build ``` $ make helix/pico:default +$ make helix/pico/back:default # with backlight +$ make HELIX=no_ani helix/pico/back:default # with backlight without animation +$ make helix/pico/under:default # with underglow ``` flash to keyboard ``` -$ make helix/pico:default:avrdude +$ make helix/pico:default:flash +$ make helix/pico/back:default:flash # with backlight +$ make HELIX=no_ani helix/pico/back:default:flash # with backlight without animation +$ make helix/pico/under:default:flash # with underglow + ``` ## Link diff --git a/keyboards/helix/pico/keymaps/default/readme_jp.md b/keyboards/helix/pico/keymaps/default/readme_jp.md index 1e272f9e6a..28594dafcb 100644 --- a/keyboards/helix/pico/keymaps/default/readme_jp.md +++ b/keyboards/helix/pico/keymaps/default/readme_jp.md @@ -56,31 +56,6 @@ 他の配列(Colemak,Dvorak)は、[readme.md](readme.md) を参照 -## コンパイルの仕方 - -コンパイルは、qmk_firmware のトップディレクトリで行います。 - -``` -$ cd qmk_firmware -``` -qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 - -``` -$ make helix/pico:default -``` - -キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 - -``` -$ make helix/pico:default:avrdude -``` - -コンパイル結果と中間生成物を消去したい場合は以下のようにします。 - -``` -$ make helix/pico:default:clean -``` - ## カスタマイズ オプションの OLED をつけたり、 @@ -88,16 +63,15 @@ RGB バックライトまたは、RGB Underglow をつけた場合は、 `qmk_firmware/keyboards/helix/pico/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。 ``` -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## RGB バックライトを有効にする @@ -131,6 +105,43 @@ RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone に IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` +## コンパイルの仕方 + +コンパイルは、qmk_firmware のトップディレクトリで行います。 + +``` +$ cd qmk_firmware +``` +qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 + +``` +$ make helix/pico:default +``` + +キーボードへの書き込みまで同時に行うには下記のように`:flash`を付けます。 + +``` +$ make helix/pico:default:flash +``` + +コンパイル結果と中間生成物を消去したい場合は以下のようにします。 + +``` +$ make helix/pico:default:clean +``` + +上記の、rules.mk によるカスタマイズ項目の一部は下記のようにコマンド上で直接指定することも可能です。 + +RGB バックライトを有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/pico/back:default:flash +``` + +RGB Underglow を有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/pico/under:default:flash +``` + ## リンク * さらに詳細は、[こちら helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index 3b518ff881..764b073007 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -1,125 +1,24 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port B5 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +AUDIO_ENABLE = yes # Audio output on port B5 +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(AUDIO_ENABLE)),yes) - ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - Link_Time_Optimization = yes - endif - ifeq ($(strip $(OLED_ENABLE)),yes) - Link_Time_Optimization = yes - endif -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/keymaps/mtei/rules.mk b/keyboards/helix/pico/keymaps/mtei/rules.mk index 3b518ff881..764b073007 100644 --- a/keyboards/helix/pico/keymaps/mtei/rules.mk +++ b/keyboards/helix/pico/keymaps/mtei/rules.mk @@ -1,125 +1,24 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port B5 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +AUDIO_ENABLE = yes # Audio output on port B5 +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(AUDIO_ENABLE)),yes) - ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - Link_Time_Optimization = yes - endif - ifeq ($(strip $(OLED_ENABLE)),yes) - Link_Time_Optimization = yes - endif -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/local_features.mk b/keyboards/helix/pico/local_features.mk new file mode 100644 index 0000000000..47b928647b --- /dev/null +++ b/keyboards/helix/pico/local_features.mk @@ -0,0 +1,100 @@ +# +# local_features.mk contains post-processing rules for the Helix keyboard. +# +# Post-processing rules convert keyboard-specific shortcuts (that represent +# combinations of standard options) into QMK standard options. +# + +define HELIX_CUSTOMISE_MSG + $(info Helix Spacific Build Options) + $(info - OLED_ENABLE = $(OLED_ENABLE)) + $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION = $(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE)) + $(info ) +endef + + ifneq ($(strip $(HELIX)),) + ### Helix keyboard keymap: convenient command line option + ## make HELIX= helix/pico: + ## option= oled | back | under | no_ani | na | ios | verbose + ## ex. + ## make HELIX=oled helix/pico: + ## make HELIX=oled,back helix/pico: + ## make HELIX=oled,under helix/pico: + ## make HELIX=oled,back,na helix/pico: + ## make HELIX=oled,back,ios helix/pico: + ## + ifeq ($(findstring oled,$(HELIX)), oled) + OLED_ENABLE = yes + endif + ifeq ($(findstring back,$(HELIX)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(HELIX)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(HELIX)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring no_ani,$(HELIX)), no_ani) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(HELIX)), ios) + IOS_DEVICE_ENABLE = yes + endif + ifeq ($(findstring verbose,$(HELIX)), verbose) + SHOW_VERBOSE_INFO = yes + endif + SHOW_HELIX_OPTIONS = yes + endif + +######## +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +ifeq ($(strip $(AUDIO_ENABLE)),yes) + ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) + LINK_TIME_OPTIMIZATION_ENABLE = yes + endif + ifeq ($(strip $(OLED_ENABLE)),yes) + LINK_TIME_OPTIMIZATION_ENABLE = yes + endif +endif + +ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) + $(eval $(call HELIX_CUSTOMISE_MSG)) + ifneq ($(strip $(SHOW_VERBOSE_INFO)),) + $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) + $(info -- OPT_DEFS = $(OPT_DEFS)) + $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) + $(info ) + endif +endif diff --git a/keyboards/helix/pico/matrix.c b/keyboards/helix/pico/matrix.c index aba55da7c8..c2940e3b3e 100644 --- a/keyboards/helix/pico/matrix.c +++ b/keyboards/helix/pico/matrix.c @@ -202,18 +202,12 @@ uint8_t matrix_scan(void) }else{ matrix_slave_scan(); -// if(serial_slave_DATA_CORRUPT()){ -// TXLED0; int offset = (isLeftHand) ? ROWS_PER_HAND : 0; for (int i = 0; i < ROWS_PER_HAND; ++i) { matrix[offset+i] = serial_master_buffer[i]; } -// }else{ -// TXLED1; -// } - matrix_scan_quantum(); } return 1; diff --git a/keyboards/helix/pico/pico.h b/keyboards/helix/pico/pico.h index 153132775b..4360be2a9c 100644 --- a/keyboards/helix/pico/pico.h +++ b/keyboards/helix/pico/pico.h @@ -1,9 +1,7 @@ -#ifndef PICO_H -#define PICO_CONFIG_H +#pragma once #include "../helix.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef RGBLIGHT_ENABLE @@ -19,9 +17,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -74,6 +69,3 @@ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ ) - - -#endif diff --git a/keyboards/helix/pico/rules.mk b/keyboards/helix/pico/rules.mk index 75bf0a5ef8..e916f25f45 100644 --- a/keyboards/helix/pico/rules.mk +++ b/keyboards/helix/pico/rules.mk @@ -1,2 +1,19 @@ +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk + +SRC += local_drivers/i2c.c +SRC += local_drivers/serial.c +SRC += local_drivers/ssd1306.c +KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers + +CUSTOM_MATRIX = yes + SRC += pico/matrix.c SRC += pico/split_util.c + +# Helix Spacific Build Options default values +OLED_ENABLE = no # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) diff --git a/keyboards/helix/pico/serial_config.h b/keyboards/helix/pico/serial_config.h deleted file mode 100644 index fc8736d472..0000000000 --- a/keyboards/helix/pico/serial_config.h +++ /dev/null @@ -1,9 +0,0 @@ -//// #error rev2 serial config - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 -#endif diff --git a/keyboards/helix/pico/under/rules.mk b/keyboards/helix/pico/under/rules.mk new file mode 100644 index 0000000000..a37aa6fab3 --- /dev/null +++ b/keyboards/helix/pico/under/rules.mk @@ -0,0 +1 @@ +LED_UNDERGLOW_ENABLE = yes diff --git a/keyboards/helix/pro_micro.h b/keyboards/helix/pro_micro.h deleted file mode 100644 index f9e7ed75d9..0000000000 --- a/keyboards/helix/pro_micro.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ - -#ifndef Pins_Arduino_h -#define Pins_Arduino_h - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* Pins_Arduino_h */ diff --git a/keyboards/helix/readme.md b/keyboards/helix/readme.md index a535df0527..a994332264 100644 --- a/keyboards/helix/readme.md +++ b/keyboards/helix/readme.md @@ -7,7 +7,7 @@ A compact split ortholinear keyboard. Keyboard Maintainer: [Makoto Kurauchi](https://github.com/MakotoKurauchi/) [@pluis9](https://twitter.com/pluis9) Hardware Supported: Helix PCB Alpha, Beta, Pro Micro -Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix), [Yushakobo Shop](https://yushakobo.jp/shop/) +Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix), [Yushakobo Shop](https://yushakobo.jp/shop/), [Little Keyboards](https://littlekeyboards.com/collections/helix) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/helix/rev1/config.h b/keyboards/helix/rev1/config.h index 454e8ee628..1a5a266641 100644 --- a/keyboards/helix/rev1/config.h +++ b/keyboards/helix/rev1/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -27,32 +26,30 @@ along with this program. If not, see . #define PRODUCT Helix Alpha #define DESCRIPTION A split keyboard for the cheap makers +#include + #define HELIX_ROWS 5 /* key matrix size */ // Rows are doubled-up #if HELIX_ROWS == 3 #define MATRIX_ROWS 6 - #define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D7, E6, B4 } #elif HELIX_ROWS == 4 #define MATRIX_ROWS 8 - #define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #elif HELIX_ROWS == 5 #define MATRIX_ROWS 10 - #define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D7, E6, B4, B5, D4 } #else #error "expected HELIX_ROWS 3 or 4 or 5" #endif +#define MATRIX_COLS 6 // wiring of each half #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order -#define CATERINA_BOOTLOADER - /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -88,5 +85,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c index 637f1d1695..cc73e36fb6 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c +++ b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c @@ -41,16 +41,10 @@ enum custom_keycodes { RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, + M_SAMPLE }; -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - -//Macros -#define M_SAMPLE M(KC_SAMPLEMACRO) - -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -180,7 +174,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -423,6 +417,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case M_SAMPLE: + if (record->event.pressed) { + SEND_STRING("hello world"); + } + return false; } return true; } @@ -470,23 +469,3 @@ void music_scale_user(void) } #endif - -/* - * Macro definition - */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - - switch (id) { - case KC_SAMPLEMACRO: - if (record->event.pressed){ - return MACRO (I(10), T(H), T(E), T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } - - } - - return MACRO_NONE; -} diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk index 1347d3a7da..69170e35c3 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk +++ b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk @@ -1,20 +1,4 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +EXTRAKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +SWAP_HANDS_ENABLE = no diff --git a/keyboards/helix/rev1/keymaps/default/keymap.c b/keyboards/helix/rev1/keymaps/default/keymap.c index 43928a4185..85391f8f60 100644 --- a/keyboards/helix/rev1/keymaps/default/keymap.c +++ b/keyboards/helix/rev1/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -22,7 +21,7 @@ enum custom_keycodes { ADJUST, }; -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -152,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev1/rev1.h b/keyboards/helix/rev1/rev1.h index d7cd749e4d..b505845ada 100644 --- a/keyboards/helix/rev1/rev1.h +++ b/keyboards/helix/rev1/rev1.h @@ -1,12 +1,9 @@ -#ifndef REV1_H -#define REV1_CONFIG_H +#pragma once #include "../helix.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -15,10 +12,7 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - - -#if HELIX_ROWS == 3 +#if MATRIX_ROWS == 6 // HELIX_ROWS == 3 #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -52,7 +46,7 @@ { R20, R21, R22, R23, R24, R25 }, \ } #endif -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -92,7 +86,7 @@ { R30, R31, R32, R33, R34, R35 } \ } #endif -#elif HELIX_ROWS == 5 +#elif MATRIX_ROWS == 10 // HELIX_ROWS == 5 #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -143,7 +137,7 @@ #endif // Used to create a keymap using only KC_ prefixed keys -#if HELIX_ROWS == 3 +#if MATRIX_ROWS == 6 // HELIX_ROWS == 3 #define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -154,7 +148,7 @@ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25 \ ) -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -184,4 +178,3 @@ ) #endif -#endif diff --git a/keyboards/helix/rev1/rules.mk b/keyboards/helix/rev1/rules.mk index 13834f5da1..1418f01786 100644 --- a/keyboards/helix/rev1/rules.mk +++ b/keyboards/helix/rev1/rules.mk @@ -1,3 +1,10 @@ +SRC += local_drivers/i2c.c +SRC += local_drivers/serial.c +SRC += local_drivers/ssd1306.c +KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers + +CUSTOM_MATRIX = yes + SRC += rev1/matrix.c SRC += rev1/split_util.c diff --git a/keyboards/helix/rev2/back/oled/rules.mk b/keyboards/helix/rev2/back/oled/rules.mk new file mode 100644 index 0000000000..dd68e9d3b0 --- /dev/null +++ b/keyboards/helix/rev2/back/oled/rules.mk @@ -0,0 +1 @@ +OLED_ENABLE = yes diff --git a/keyboards/helix/rev2/back/rules.mk b/keyboards/helix/rev2/back/rules.mk new file mode 100644 index 0000000000..066fffb74a --- /dev/null +++ b/keyboards/helix/rev2/back/rules.mk @@ -0,0 +1 @@ +LED_BACK_ENABLE = yes diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index ec74458594..fe82ce140f 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -35,6 +34,10 @@ along with this program. If not, see . #define USE_SERIAL //#define USE_MATRIX_I2C +/* Soft Serial defines */ +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION + /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT @@ -88,7 +91,7 @@ along with this program. If not, see . //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes #ifdef RGBLED_BACK - #if HELIX_ROWS == 4 + #if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define RGBLED_NUM 25 #else #define RGBLED_NUM 32 @@ -101,7 +104,7 @@ along with this program. If not, see . #if RGBLED_NUM <= 6 #define RGBLIGHT_LIMIT_VAL 255 #else - #if HELIX_ROWS == 4 + #if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define RGBLIGHT_LIMIT_VAL 130 #else #define RGBLIGHT_LIMIT_VAL 120 @@ -112,7 +115,7 @@ along with this program. If not, see . #if RGBLED_NUM <= 6 #define RGBLIGHT_LIMIT_VAL 90 #else - #if HELIX_ROWS == 4 + #if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define RGBLIGHT_LIMIT_VAL 45 #else #define RGBLIGHT_LIMIT_VAL 35 @@ -155,4 +158,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index a64eed3e72..4b8b26ecd8 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -11,7 +11,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -53,7 +52,7 @@ enum macro_keycodes { //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -183,7 +182,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev2/keymaps/default/readme.md b/keyboards/helix/rev2/keymaps/default/readme.md index 2cdc5506ca..c618c47525 100644 --- a/keyboards/helix/rev2/keymaps/default/readme.md +++ b/keyboards/helix/rev2/keymaps/default/readme.md @@ -108,17 +108,16 @@ see `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` ``` -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## Compile @@ -130,11 +129,24 @@ $ cd qmk_firmware build ``` $ make helix:default +$ make helix/rev2/back:default # with backlight +$ make HELIX=no_ani helix/rev2/back:default # with backlight without animation +$ make helix/rev2/under:default # with underglow +$ make helix/rev2/oled:default # with oled +$ make helix/rev2/oled/back:default # with oled and backlight +$ make helix/rev2/oled/under:default # with oled and underglow ``` flash to keyboard ``` -$ make helix:default:avrdude +$ make helix:default:flash +$ make helix/rev2/back:default:flash # with backlight +$ make HELIX=no_ani helix/rev2/back:default:flash # with backlight without animation +$ make helix/rev2/under:default:flash # with underglow +$ make helix/rev2/oled:default:flash # with oled +$ make helix/rev2/oled/back:default:flash # with oled and backlight +$ make helix/rev2/oled/under:default:flash # with oled and underglow + ``` ## Link diff --git a/keyboards/helix/rev2/keymaps/default/readme_jp.md b/keyboards/helix/rev2/keymaps/default/readme_jp.md index 3eaeab48ec..2dfab351b0 100644 --- a/keyboards/helix/rev2/keymaps/default/readme_jp.md +++ b/keyboards/helix/rev2/keymaps/default/readme_jp.md @@ -19,31 +19,6 @@ 他の配列(Colemak,Dvorak)は、[readme.md](readme.md) を参照 -## コンパイルの仕方 - -コンパイルは、qmk_firmware のトップディレクトリで行います。 - -``` -$ cd qmk_firmware -``` -qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 - -``` -$ make helix:default -``` - -キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 - -``` -$ make helix:default:avrdude -``` - -コンパイル結果と中間生成物を消去したい場合は以下のようにします。 - -``` -$ make helix:default:clean -``` - ## カスタマイズ Helix キーボードを4行版として製作したり、オプションの OLED をつけたり、 @@ -51,17 +26,16 @@ RGB バックライトまたは、RGB Underglow をつけた場合は、 `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。 ``` -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## 4行版Helix に対応する @@ -103,6 +77,58 @@ RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone に IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` +## コンパイルの仕方 + +コンパイルは、qmk_firmware のトップディレクトリで行います。 + +``` +$ cd qmk_firmware +``` +qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 + +``` +$ make helix:default +``` + +キーボードへの書き込みまで同時に行うには下記のように`:flash`を付けます。 + +``` +$ make helix:default:flash +``` + +コンパイル結果と中間生成物を消去したい場合は以下のようにします。 + +``` +$ make helix:default:clean +``` + +上記の、rules.mk によるカスタマイズ項目の一部は下記のようにコマンド上で直接指定することも可能です。 + +OLED を有効にしてコンパイルしてキーボードへの書き込む。 +``` +$ make helix/rev2/oled:default:flash +``` + +RGB バックライトを有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/rev2/back:default:flash +``` + +RGB Underglow を有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/rev2/under:default:flash +``` + +OLED とRGB バックライトを有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/rev2/oled/back:default:flash +``` + +OLED とRGB Underglowを有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/rev2/oled/under:default:flash +``` + ## リンク * さらに詳細は、[こちら helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 37ef8632de..6a42fcf73f 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -1,124 +1,23 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk index 4a96517eb9..e30690029b 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk +++ b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk @@ -1,128 +1,38 @@ -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option TAP_DANCE_ENABLE = yes -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" instead of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" instead of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'edvorakjp' keymap: convenient command line option -## make HELIX= helix:edvorakjp -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:edvorakjp -## make HELIX=oled,back helix:edvorakjp -## make HELIX=oled,under helix:edvorakjp -## make HELIX=oled,back,na helix:edvorakjp -## make HELIX=oled,back,ios helix:edvorakjp -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) ifeq ($(strip $(HELIX_ROWS)), 4) SRC += keymap_4rows.c else ifeq ($(strip $(HELIX_ROWS)), 5) SRC += keymap_5rows.c -else - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes +ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE SRC += oled.c endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) diff --git a/keyboards/helix/rev2/keymaps/five_rows/keymap.c b/keyboards/helix/rev2/keymaps/five_rows/keymap.c index 7b7d573d6a..eb73881c6b 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows/keymap.c @@ -67,7 +67,7 @@ enum custom_keycodes { #define KC_LSLB LSFT(KC_LBRC) #define ___ _______ -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index a0bf21917b..fb564b6e04 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -1,131 +1,35 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# CONSOLE_ENABLE and COMMAND_ENABLE -# yes, no +1500 -# yes, yes +3200 -# no, yes +400 -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# + CONSOLE_ENABLE = no # Console for debug + COMMAND_ENABLE = no # Commands for debug and configuration + # CONSOLE_ENABLE and COMMAND_ENABLE + # yes, no +1500 + # yes, yes +3200 + # no, yes +400 +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'five_rows' keymap: convenient command line option -## make HELIX= helix:five_rows -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:five_rows -## make HELIX=oled,back helix:five_rows -## make HELIX=oled,under helix:five_rows -## make HELIX=oled,back,na helix:five_rows -## make HELIX=oled,back,ios helix:five_rows -## ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif ifeq ($(findstring console,$(HELIX)), console) CONSOLE_ENABLE = yes endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) endif -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) -ifneq ($(strip $(HELIX_ROWS)), 5) -$(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) -endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c index be76dffbe4..0dae2524d8 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c @@ -55,7 +55,7 @@ enum custom_keycodes { #define ML_RAIE MO(_RAI_E) #define ML_ADJ MO(_ADJUST) -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty JIS Normal * ,-----------------------------------------. ,-----------------------------------------. diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index 37ef8632de..6c2057cfd6 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk @@ -1,124 +1,23 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/froggy/keymap.c b/keyboards/helix/rev2/keymaps/froggy/keymap.c index c27c1320c4..15fe1afb0c 100644 --- a/keyboards/helix/rev2/keymaps/froggy/keymap.c +++ b/keyboards/helix/rev2/keymaps/froggy/keymap.c @@ -64,7 +64,7 @@ enum macro_keycodes { //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index 8cd0efdd4d..bea059ca16 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -1,124 +1,23 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = yes # OLED_ENABLE -LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) +OLED_ENABLE = yes # OLED_ENABLE +LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/led_test/README.md b/keyboards/helix/rev2/keymaps/led_test/README.md index a25f3f36fe..2fe6706452 100644 --- a/keyboards/helix/rev2/keymaps/led_test/README.md +++ b/keyboards/helix/rev2/keymaps/led_test/README.md @@ -23,5 +23,5 @@ $ make helix:led_test Execute the 'make' command and press the reset switch on the keyboard. ``` -$ make helix:led_test:avrdude +$ make helix:led_test:flash ``` diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index 2062d348d1..fb0b5a5476 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -1,126 +1,25 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 OLED_ENABLE = yes # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) SRC += led_test_init.c -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c index 5240ac800c..e5b5f57d97 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c +++ b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c @@ -49,7 +49,7 @@ enum macro_keycodes { //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk index 3f390b48f8..bc823e5e12 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk +++ b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk @@ -1,121 +1,24 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 4 # Helix Rows is 4 or 5 -OLED_ENABLE = yes # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = no # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option AUTO_SHIFT_ENABLE = yes -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +HELIX_ROWS = 4 # Helix Rows is 4 or 5 +OLED_ENABLE = yes # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = no # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/local_features.mk b/keyboards/helix/rev2/local_features.mk new file mode 100644 index 0000000000..0f4285eea9 --- /dev/null +++ b/keyboards/helix/rev2/local_features.mk @@ -0,0 +1,98 @@ +# +# local_features.mk contains post-processing rules for the Helix keyboard. +# +# Post-processing rules convert keyboard-specific shortcuts (that represent +# combinations of standard options) into QMK standard options. +# + +define HELIX_CUSTOMISE_MSG + $(info Helix Spacific Build Options) + $(info - OLED_ENABLE = $(OLED_ENABLE)) + $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION = $(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE)) + $(info ) +endef + + ifneq ($(strip $(HELIX)),) + ### Helix keyboard keymap: convenient command line option + ## make HELIX= helix: + ## option= oled | back | under | na | ios + ## ex. + ## make HELIX=oled helix: + ## make HELIX=oled,back helix: + ## make HELIX=oled,under helix: + ## make HELIX=oled,back,na helix: + ## make HELIX=oled,back,ios helix: + ## + ifeq ($(findstring oled,$(HELIX)), oled) + OLED_ENABLE = yes + endif + ifeq ($(findstring back,$(HELIX)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(HELIX)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(HELIX)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring no_ani,$(HELIX)), no_ani) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(HELIX)), ios) + IOS_DEVICE_ENABLE = yes + endif + ifeq ($(findstring verbose,$(HELIX)), verbose) + SHOW_VERBOSE_INFO = yes + endif + SHOW_HELIX_OPTIONS = yes + endif + +######## +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. + +ifneq ($(strip $(HELIX_ROWS)), 4) + ifneq ($(strip $(HELIX_ROWS)), 5) + $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) + endif +endif +OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) + $(eval $(call HELIX_CUSTOMISE_MSG)) + ifneq ($(strip $(SHOW_VERBOSE_INFO)),) + $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) + $(info -- OPT_DEFS = $(OPT_DEFS)) + $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) + $(info ) + endif +endif diff --git a/keyboards/helix/rev2/oled/back/rules.mk b/keyboards/helix/rev2/oled/back/rules.mk new file mode 100644 index 0000000000..066fffb74a --- /dev/null +++ b/keyboards/helix/rev2/oled/back/rules.mk @@ -0,0 +1 @@ +LED_BACK_ENABLE = yes diff --git a/keyboards/helix/rev2/oled/rules.mk b/keyboards/helix/rev2/oled/rules.mk new file mode 100644 index 0000000000..dd68e9d3b0 --- /dev/null +++ b/keyboards/helix/rev2/oled/rules.mk @@ -0,0 +1 @@ +OLED_ENABLE = yes diff --git a/keyboards/helix/rev2/oled/under/rules.mk b/keyboards/helix/rev2/oled/under/rules.mk new file mode 100644 index 0000000000..a37aa6fab3 --- /dev/null +++ b/keyboards/helix/rev2/oled/under/rules.mk @@ -0,0 +1 @@ +LED_UNDERGLOW_ENABLE = yes diff --git a/keyboards/helix/rev2/rev2.h b/keyboards/helix/rev2/rev2.h index a2a1fb746a..4e69daef50 100644 --- a/keyboards/helix/rev2/rev2.h +++ b/keyboards/helix/rev2/rev2.h @@ -1,9 +1,7 @@ -#ifndef REV2_H -#define REV2_CONFIG_H +#pragma once #include "../helix.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef RGBLIGHT_ENABLE @@ -19,10 +17,7 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - - -#if HELIX_ROWS == 4 +#if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -111,7 +106,7 @@ #endif // Used to create a keymap using only KC_ prefixed keys -#if HELIX_ROWS == 4 +#if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -140,5 +135,3 @@ KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \ ) #endif - -#endif diff --git a/keyboards/helix/rev2/rules.mk b/keyboards/helix/rev2/rules.mk index 5582a0f9c4..4db8f7da94 100644 --- a/keyboards/helix/rev2/rules.mk +++ b/keyboards/helix/rev2/rules.mk @@ -1,3 +1,21 @@ +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk + +SRC += local_drivers/i2c.c +SRC += local_drivers/serial.c +SRC += local_drivers/ssd1306.c +KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers + +CUSTOM_MATRIX = yes + SRC += rev2/matrix.c SRC += rev2/split_util.c SRC += rev2/split_scomm.c + +# Helix Spacific Build Options default values +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = no # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) diff --git a/keyboards/helix/rev2/serial_config.h b/keyboards/helix/rev2/serial_config.h deleted file mode 100644 index 37135213d5..0000000000 --- a/keyboards/helix/rev2/serial_config.h +++ /dev/null @@ -1,8 +0,0 @@ -//// #error rev2 serial config - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 - -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/helix/rev2/under/oled/rules.mk b/keyboards/helix/rev2/under/oled/rules.mk new file mode 100644 index 0000000000..dd68e9d3b0 --- /dev/null +++ b/keyboards/helix/rev2/under/oled/rules.mk @@ -0,0 +1 @@ +OLED_ENABLE = yes diff --git a/keyboards/helix/rev2/under/rules.mk b/keyboards/helix/rev2/under/rules.mk new file mode 100644 index 0000000000..a37aa6fab3 --- /dev/null +++ b/keyboards/helix/rev2/under/rules.mk @@ -0,0 +1 @@ +LED_UNDERGLOW_ENABLE = yes diff --git a/keyboards/helix/rules.mk b/keyboards/helix/rules.mk index be234e60ec..579262fe7c 100644 --- a/keyboards/helix/rules.mk +++ b/keyboards/helix/rules.mk @@ -1,73 +1,37 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = no -USE_I2C = yes +# See TOP/docs/config_options.md for more information. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -CUSTOM_MATRIX = yes +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend DEFAULT_FOLDER = helix/rev2 + +HELIX_TOP_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) diff --git a/keyboards/helix/serial.c b/keyboards/helix/serial.c deleted file mode 100644 index 6006ebf1bd..0000000000 --- a/keyboards/helix/serial.c +++ /dev/null @@ -1,590 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include -#include "serial.h" -//#include - -#ifdef SOFT_SERIAL_PIN - -#ifdef __AVR_ATmega32U4__ - // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. - #ifdef USE_I2C - #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 - #error Using ATmega32U4 I2C, so can not use PD0, PD1 - #endif - #endif - - #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 - #define SERIAL_PIN_DDR DDRD - #define SERIAL_PIN_PORT PORTD - #define SERIAL_PIN_INPUT PIND - #if SOFT_SERIAL_PIN == D0 - #define SERIAL_PIN_MASK _BV(PD0) - #define EIMSK_BIT _BV(INT0) - #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) - #define SERIAL_PIN_INTERRUPT INT0_vect - #elif SOFT_SERIAL_PIN == D1 - #define SERIAL_PIN_MASK _BV(PD1) - #define EIMSK_BIT _BV(INT1) - #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) - #define SERIAL_PIN_INTERRUPT INT1_vect - #elif SOFT_SERIAL_PIN == D2 - #define SERIAL_PIN_MASK _BV(PD2) - #define EIMSK_BIT _BV(INT2) - #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) - #define SERIAL_PIN_INTERRUPT INT2_vect - #elif SOFT_SERIAL_PIN == D3 - #define SERIAL_PIN_MASK _BV(PD3) - #define EIMSK_BIT _BV(INT3) - #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) - #define SERIAL_PIN_INTERRUPT INT3_vect - #endif - #elif SOFT_SERIAL_PIN == E6 - #define SERIAL_PIN_DDR DDRE - #define SERIAL_PIN_PORT PORTE - #define SERIAL_PIN_INPUT PINE - #define SERIAL_PIN_MASK _BV(PE6) - #define EIMSK_BIT _BV(INT6) - #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) - #define SERIAL_PIN_INTERRUPT INT6_vect - #else - #error invalid SOFT_SERIAL_PIN value - #endif - -#else - #error serial.c now support ATmega32U4 only -#endif - -//////////////// for backward compatibility //////////////////////////////// -#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) -/* --- USE OLD API (compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - #endif - uint8_t volatile status0 = 0; - -SSTD_t transactions[] = { - { (uint8_t *)&status0, - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - #else - 0, (uint8_t *)NULL, - #endif - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - #else - 0, (uint8_t *)NULL, - #endif - } -}; - -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers() -{ - int result; - result = soft_serial_transaction(); - return result; -} - -#endif // end of OLD API (compatible with let's split serial.c) -//////////////////////////////////////////////////////////////////////////// - -#define ALWAYS_INLINE __attribute__((always_inline)) -#define NO_INLINE __attribute__((noinline)) -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// parity check -#define ODD_PARITY 1 -#define EVEN_PARITY 0 -#define PARITY EVEN_PARITY - -#ifdef SERIAL_DELAY - // custom setup in config.h - // #define TID_SEND_ADJUST 2 - // #define SERIAL_DELAY 6 // micro sec - // #define READ_WRITE_START_ADJUST 30 // cycles - // #define READ_WRITE_WIDTH_ADJUST 8 // cycles -#else -// ============ Standard setups ============ - -#ifndef SELECT_SOFT_SERIAL_SPEED -#define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -#if __GNUC__ < 6 - #define TID_SEND_ADJUST 14 -#else - #define TID_SEND_ADJUST 2 -#endif - -#if SELECT_SOFT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 34 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 36 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 5 - // Ultra Low speed - #define SERIAL_DELAY 48 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#else -#error invalid SELECT_SOFT_SERIAL_SPEED value -#endif /* SELECT_SOFT_SERIAL_SPEED */ -#endif /* SERIAL_DELAY */ - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH_US 1 -#ifndef SERIAL_USE_MULTI_TRANSACTION - #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -#else - #define SLAVE_INT_ACK_WIDTH_UNIT 2 - #define SLAVE_INT_ACK_WIDTH 4 -#endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static void serial_output(void) ALWAYS_INLINE; -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static void serial_low(void) ALWAYS_INLINE; -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static void serial_high(void) ALWAYS_INLINE; -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT3,INT6 - EIMSK |= EIMSK_BIT; -#if SERIAL_PIN_MASK == _BV(PE6) - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -#else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static -void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { - serial_delay_half1(); // read the middle of pulses - if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; - } else { - byte = (byte << 1) | 0; p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb)? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if(p & 1) { serial_high(); } - else { serial_low(); } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data,8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static -void change_sender2reciver(void) { - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 -} - -inline static -void change_reciver2sender(void) { - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); //3 - serial_delay_half1(); //4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) -{ - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { - -#ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -#else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount,7); - tid = bits>>3; - bits = (bits&7) != nibble_bits_count(tid); - if( bits || pecount> 0 || tid > Transaction_table_size ) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -#endif - - // target send phase - if( trans->target2initiator_buffer_size > 0 ) - serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if( trans->initiator2target_buffer_size > 0 ) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); //weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -#else -int soft_serial_transaction(int sstd_index) { - if( sstd_index > Transaction_table_size ) - return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -#endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -#ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -#else - // send transaction table index - int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while( !serial_read_pin() ) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for( int i = 0; serial_read_pin(); i++ ) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -#endif - - // initiator recive phase - // if the target is present syncronize with it - if( trans->target2initiator_buffer_size > 0 ) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if( trans->initiator2target_buffer_size > 0 ) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0;; - sei(); - return retval; -} -#endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/hhkb/keymaps/default/keymap.c b/keyboards/hhkb/keymaps/default/keymap.c index af6102f108..c63ef6a579 100644 --- a/keyboards/hhkb/keymaps/default/keymap.c +++ b/keyboards/hhkb/keymaps/default/keymap.c @@ -54,22 +54,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch (id) - { - case 0: - if (record->event.pressed) - { - register_code(KC_RSFT); - } - else - { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/README.md b/keyboards/hhkb/keymaps/halfqwerty_jp/README.md new file mode 100644 index 0000000000..222ad898ef --- /dev/null +++ b/keyboards/hhkb/keymaps/halfqwerty_jp/README.md @@ -0,0 +1,49 @@ +# harfqwerty_jp + +half-QWERTY is a keyboard layout for one-handed typing on QWERTY keyboard. + +* When hold space bar, the keyboard enters mirror mode. +* To type a space, just tap the space bar. + +## BASE + + ,-----------------------------------------------------------. + |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + |-----------------------------------------------------------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + |------------------------------------------------------` Ent| + |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + |-----------------------------------------------------------| + |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + |-----------------------------------------------------------| + | ||Ctl|Alt|Cmd| | Spc | | | | ||Lft|Dwn|Rgh| + `-----------------------------------------------------------' + +## HHKB mode (HHKB Fn) + + ,-----------------------------------------------------------. + |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + |-----------------------------------------------------------| + |Caps | | | | | | | |Psc|Slk|Pus|Up | | | + |------------------------------------------------------` | + | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + |-----------------------------------------------------------| + | | | | | | | +| -|End|PgD|Dow| | | | + |-----------------------------------------------------------| + | || | | | | | | | | || | | | + `-----------------------------------------------------------' + + +## Mirror mode + + ,-----------------------------------------------------------. + | | 0| 9| 8| 7| 6| 5| 4| 3| 2| 1| | | | | + |-----------------------------------------------------------| + | | P| O| I| U| Y| T| R| E| W| Q| | | | + |------------------------------------------------------` | + | | ;| L| K| J| H| G| F| D| S| A| | | | + |-----------------------------------------------------------| + | | .| ,| M| N| B| V| C| X| Z| | | | | + |-----------------------------------------------------------| + | || | | | | | | | | || | | | + `-----------------------------------------------------------' diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c b/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c new file mode 100644 index 0000000000..0d4a24c60d --- /dev/null +++ b/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c @@ -0,0 +1,76 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_H + +enum +{ + BASE, + HHKB, + MIRROR, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE Level: Default Layer + ,-----------------------------------------------------------. + |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + |-----------------------------------------------------------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + |------------------------------------------------------` Ent| + |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + |-----------------------------------------------------------| + |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + |-----------------------------------------------------------| + | ||Ctl|Alt|Cmd| | Spc | | | | ||Lft|Dwn|Rgh| + `-----------------------------------------------------------' + */ + [BASE] = LAYOUT_JP( + 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_JYEN, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, + MO(HHKB), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, LT(MIRROR, KC_SPC), KC_HENK, KC_KANA, KC_RALT, MO(HHKB), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Layer HHKB: HHKB mode (HHKB Fn) + ,-----------------------------------------------------------. + |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + |-----------------------------------------------------------| + |Caps | | | | | | | |Psc|Slk|Pus|Up | | | + |------------------------------------------------------` | + | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + |-----------------------------------------------------------| + | | | | | | | +| -|End|PgD|Dow| | | | + |-----------------------------------------------------------| + | || | | | | | | | | || | | | + `-----------------------------------------------------------' + */ + + [HHKB] = LAYOUT_JP( + KC_PWR, 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_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Mirror Level: when hold space bar + ,-----------------------------------------------------------. + | | 0| 9| 8| 7| 6| 5| 4| 3| 2| 1| | | | | + |-----------------------------------------------------------| + | | P| O| I| U| Y| T| R| E| W| Q| | | | + |------------------------------------------------------` | + | | ;| L| K| J| H| G| F| D| S| A| | | | + |-----------------------------------------------------------| + | | .| ,| M| N| B| V| C| X| Z| | | | | + |-----------------------------------------------------------| + | || | | | | | | | | || | | | + `-----------------------------------------------------------' + */ + [MIRROR] = LAYOUT_JP( + _______, KC_0, KC_9, KC_8, KC_7, KC_6, KC_5, KC_4, KC_3, KC_2, KC_1, _______, _______, _______, _______, + _______, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, _______, _______, + _______, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_G, KC_F, KC_D, KC_S, KC_A, _______, _______, _______, + _______, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, _______, _______)}; + diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk b/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk new file mode 100644 index 0000000000..a7f700f019 --- /dev/null +++ b/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/keymaps/shela/keymap.c index 5f3881539a..dae85ad9ca 100644 --- a/keyboards/hhkb/keymaps/shela/keymap.c +++ b/keyboards/hhkb/keymaps/shela/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT(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_GRV, 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_ENT, - OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), KC_LALT, KC_LGUI, KC_FN2, KC_RGUI, KC_RALT), /* Layer 1: Pseudo US Layout Layer @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT(KC_ESC, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_BSPC, KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, - KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, KC_FN0, + KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, MO(HHKB), KC_LGUI, KC_FN3, KC_FN2, KC_FN4, KC_RGUI), /* Layer 2: Dvorak Layer @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_FN0, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), KC_LALT, KC_LGUI, KC_FN2, KC_RGUI, KC_RALT), /* Layer 3: Mouse layer @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT(KC_ESC, 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_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_NO, KC_NO, KC_TRNS, KC_FN0, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_NO, KC_NO, KC_TRNS, MO(HHKB), KC_TRNS, KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS), /* Layer 4: Tenkey layer @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_NO, KC_BSPC, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_PENT, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, KC_FN0, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, MO(HHKB), KC_TRNS, KC_TRNS, KC_FN2, KC_KP_0, KC_PDOT), /* Layer 5: HHKB mode (HHKB Fn) @@ -182,7 +182,6 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) * Fn action definition */ const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(HHKB), [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), [2] = ACTION_LAYER_TAP_KEY(SPACE_FN, KC_SPACE), [3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN), diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c b/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c new file mode 100644 index 0000000000..68e23b45df --- /dev/null +++ b/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +#define SPACE_FN LT(1, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( // default layer + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_RBRC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_NUHS, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NUBS, + KC_LALT, KC_LGUI, SPACE_FN, KC_RGUI, KC_RALT), + + [1] = LAYOUT( + 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_INS, KC_DEL, + KC_CAPS, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______) +}; diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md b/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md new file mode 100644 index 0000000000..0da9d96ee4 --- /dev/null +++ b/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md @@ -0,0 +1,22 @@ +# tobiasvl's ISO layout for HHKB + +This is my attempt to adapt my regular 60% Norwegian ISO layout to the physical HHKB layout, on the Happy Hacking Keyboard Pro 2 keyboard with the alternate QMK-compatible Hasu controller. + +## Base layer + +![HHKB ISO](https://i.imgur.com/8n4Kixw.png) + +The following changes have been made from standard HHKB: + +* The ] and \ keys are swapped so they're in the ISO locations, but a row higher. Whether or not this is a good idea depends heavily on what specific language layout you're using, but it makes sense for Norwegian, I think. +* The Fn key is replaced with the ISO key (ie. "non-US backslash"). It's gotta go somewhere! +* The spacebar doubles as space when tapped and Fn when held (ie. SpaceFN). This is a personal preference, but my second and more traditional choice would probably be to replace right GUI/Super with Fn. +* Grave Escape has been added (shift + Esc produces ~). + +## Function layer + +This is just how I personally prefer to set up my function layer, and doesn't have anything to do with ISO. You probably want to swap out this wholesale for your own function layer. + +* Navigation is moved: Arrow keys on WASD, Page Up and Page Down on QE, Home and End on the right (I have them to the left of the vertical Enter on ISO layouts). +* Grave Escape has been added (Fn + Esc produces \`). +* No media keys or anything. I don't use them. diff --git a/keyboards/hhkb/keymaps/tominabox1/.gitignore b/keyboards/hhkb/keymaps/tominabox1/.gitignore new file mode 100644 index 0000000000..4b8c99bfb8 --- /dev/null +++ b/keyboards/hhkb/keymaps/tominabox1/.gitignore @@ -0,0 +1,3 @@ +*.h +matrix.c +rules.mk diff --git a/keyboards/hhkb/keymaps/tominabox1/keymap.c b/keyboards/hhkb/keymaps/tominabox1/keymap.c new file mode 100644 index 0000000000..d7aea97736 --- /dev/null +++ b/keyboards/hhkb/keymaps/tominabox1/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, TD(TD_SFT_CPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2)), + + [1] = LAYOUT(KC_ESC, 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_INS, KC_DEL, KC_CAPS, KC_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS), + + [3] = LAYOUT(KC_GESC, KC_EXLM, KC_EML, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS) +}; diff --git a/keyboards/hhkb/rn42/rn42.c b/keyboards/hhkb/rn42/rn42.c index 154da4e101..06665425ce 100644 --- a/keyboards/hhkb/rn42/rn42.c +++ b/keyboards/hhkb/rn42/rn42.c @@ -26,10 +26,6 @@ host_driver_t rn42_driver = { void rn42_init(void) { - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/hid_liber/keymaps/default/rules.mk b/keyboards/hid_liber/keymaps/default/rules.mk index 0f131bce9b..15b7f725b2 100755 --- a/keyboards/hid_liber/keymaps/default/rules.mk +++ b/keyboards/hid_liber/keymaps/default/rules.mk @@ -1,33 +1 @@ -# Copyright 2013 Jun Wako -# -# 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 . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +CONSOLE_ENABLE = yes diff --git a/keyboards/hid_liber/matrix.c b/keyboards/hid_liber/matrix.c index de154890d5..05554a24c8 100755 --- a/keyboards/hid_liber/matrix.c +++ b/keyboards/hid_liber/matrix.c @@ -172,10 +172,6 @@ uint8_t matrix_cols(void) void matrix_init(void) { - // To use PORTF disable JTAG with writing JTD bit twice within four cycles. - MCUCR |= (1<. */ /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xECE9 #define DEVICE_VER 0x0001 -#define MANUFACTURER hineybush +#define MANUFACTURER hineybush keyboards #define PRODUCT h87a #define DESCRIPTION QMK-programmable TKL PCB for custom keyboards diff --git a/keyboards/hineybush/h87a/keymaps/default/keymap.c b/keyboards/hineybush/h87a/keymaps/default/keymap.c index 6382af1eec..974a7e35bc 100644 --- a/keyboards/hineybush/h87a/keymaps/default/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/default/keymap.c @@ -35,22 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/hineybush/h87a/rules.mk b/keyboards/hineybush/h87a/rules.mk index dac21d72c8..653ec1f9a2 100644 --- a/keyboards/hineybush/h87a/rules.mk +++ b/keyboards/hineybush/h87a/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -67,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -EXTRAFLAGS += -flto \ No newline at end of file +EXTRAFLAGS += -flto diff --git a/keyboards/hineybush/h88/config.h b/keyboards/hineybush/h88/config.h new file mode 100644 index 0000000000..26d5189eb3 --- /dev/null +++ b/keyboards/hineybush/h88/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2019 Josh Hinnebusch + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xECA2 +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT h88 +#define DESCRIPTION QMK-programmable TKL PCB for custom keyboards with an extra key in the F-row + + + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, D0, D1, B5, B6, D7, B4, D6, D4 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 24 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep +#endif diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c new file mode 100644 index 0000000000..46d6393907 --- /dev/null +++ b/keyboards/hineybush/h88/h88.c @@ -0,0 +1,69 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#include "h88.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +void led_init_ports(void) { + setPinOutput(D5); + setPinOutput(E6); +} + +void led_set_user(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(D5); + writePinLow(D5); + } else { + setPinInput(D5); + writePinLow(D5); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + setPinOutput(E6); + writePinLow(E6); + } else { + setPinInput(E6); + writePinLow(E6); + } + +} + diff --git a/keyboards/hineybush/h88/h88.h b/keyboards/hineybush/h88/h88.h new file mode 100644 index 0000000000..f701529d18 --- /dev/null +++ b/keyboards/hineybush/h88/h88.h @@ -0,0 +1,90 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_all(\ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, \ + K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K088, \ + K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \ + { K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + + +#define LAYOUT_tkl_ansi(\ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \ + K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K088, \ + K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, KC_NO, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + {KC_NO, K091, K092, K093, K094, K095, KC_NO, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \ + { K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + +#define LAYOUT_tkl_ansi_wkl(\ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \ + K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K088, \ + K100, K101, K113, K115, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, KC_NO, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + {KC_NO, K091, K092, K093, K094, K095, KC_NO, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, K108 }, \ + {KC_NO, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + diff --git a/keyboards/hineybush/h88/info.json b/keyboards/hineybush/h88/info.json new file mode 100644 index 0000000000..f36ac09f7f --- /dev/null +++ b/keyboards/hineybush/h88/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "h88a", + "url": "", + "maintainer": "hineybush", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"F13", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"label":"Bksp", "x":14, "y":1.25}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + }, + + "LAYOUT_tkl_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"F13", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Bksp", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + }, + "LAYOUT_tkl_ansi_wkl": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"F13", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Bksp", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"label":"Alt", "x":11, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + } + } +} + diff --git a/keyboards/hineybush/h88/keymaps/default/config.h b/keyboards/hineybush/h88/keymaps/default/config.h new file mode 100644 index 0000000000..dbb63d3d54 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + + +// place overrides here + diff --git a/keyboards/hineybush/h88/keymaps/default/keymap.c b/keyboards/hineybush/h88/keymaps/default/keymap.c new file mode 100644 index 0000000000..17035b4725 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 Josh Hinnebusch + + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, 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_0, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + 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_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_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + + diff --git a/keyboards/hineybush/h88/keymaps/default/readme.md b/keyboards/hineybush/h88/keymaps/default/readme.md new file mode 100644 index 0000000000..455a2e00e8 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h88a diff --git a/keyboards/hineybush/h88/keymaps/wkl/config.h b/keyboards/hineybush/h88/keymaps/wkl/config.h new file mode 100644 index 0000000000..dbb63d3d54 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/wkl/config.h @@ -0,0 +1,21 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + + +// place overrides here + diff --git a/keyboards/hineybush/h88/keymaps/wkl/keymap.c b/keyboards/hineybush/h88/keymaps/wkl/keymap.c new file mode 100644 index 0000000000..12f225289a --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/wkl/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 Josh Hinnebusch + + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_ansi_wkl( + KC_ESC, 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_0, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_tkl_ansi_wkl( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + diff --git a/keyboards/hineybush/h88/keymaps/wkl/readme.md b/keyboards/hineybush/h88/keymaps/wkl/readme.md new file mode 100644 index 0000000000..bc0d78f04e --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The wkl keymap for h88a diff --git a/keyboards/hineybush/h88/readme.md b/keyboards/hineybush/h88/readme.md new file mode 100644 index 0000000000..d12dbeec3a --- /dev/null +++ b/keyboards/hineybush/h88/readme.md @@ -0,0 +1,40 @@ +h88 +=== + +A QMK-powered replacement PCB for custom TKL keyboards that feature an extra key in the Fn row. This PCB is designed with the TGR Jane V2 CE in mind, however other keyboards with the same layout and a.87 USB positioning may work. + +Keyboard Maintainer: [hineybush](https://github.com/hineybush) +Hardware Supported: h88 ver 1.0 +Hardware Availability: hineybush.com + +Make example for this keyboard (after setting up your build environment): + + make hineybush/h88: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). + +## h88 hardware information + +Controller: Atmega32u4 + + /* Column pin configuration + * col: 0 1 2 3 4 5 6 7 8 + * pin: F0 F1 F4 F5 F6 F7 C7 C6 D2 + */ + + /* Row pin configuration + * row: 0 1 2 3 4 5 6 7 8 9 10 11 + * pin: B0 B1 B2 B3 D0 D1 B5 B6 D7 B4 D6 D4 (Rev 1) + */ + +The H88 PCB utilizes duplex matrix organization. + + Caps Lock LED: D5 + Scroll Lock LED: E6 + Num Lock LED: not supported + Backlight Pin: B7 + RGB Data Pin: D3 + + + +For in-switch indicator LEDs, bridge the center pad of the J1 and J2 3-pad jumpers follwing the small silk screen line. diff --git a/keyboards/hineybush/h88/rules.mk b/keyboards/hineybush/h88/rules.mk new file mode 100644 index 0000000000..62b2d7b8b3 --- /dev/null +++ b/keyboards/hineybush/h88/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/hineybush/hbcp/config.h b/keyboards/hineybush/hbcp/config.h new file mode 100644 index 0000000000..5bf426df7e --- /dev/null +++ b/keyboards/hineybush/hbcp/config.h @@ -0,0 +1,246 @@ +/* +Copyright 2019 Josh Hinnebusch + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xECE8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT hbcp +#define DESCRIPTION compact 1800 layout custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B1, B6, D0, C7, C6, C5 } +#define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, B5, B4, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 27 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/hbcp/hbcp.c b/keyboards/hineybush/hbcp/hbcp.c new file mode 100644 index 0000000000..cd5320f6e5 --- /dev/null +++ b/keyboards/hineybush/hbcp/hbcp.c @@ -0,0 +1,110 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#include "hbcp.h" + +// Indicator color definitions +#ifndef HSV_CAPS + #define HSV_CAPS 0, 0, 120 // Define caps lock color (H, S, V) +#endif + +#ifndef HSV_NLCK + #define HSV_NLCK 0, 0, 120 // Define num lock color (H, S, V) +#endif + +#ifndef HSV_SCRL + #define HSV_SCRL 0, 0, 120 // Define scroll lock color (H, S, V) +#endif + +#ifndef HSV_BLACK + #define HSV_BLACK 0, 0, 0 // Define 'black' color, more like 'LED off' (H, S, V) +#endif + +// #define HSV_custom_color H, S, V + + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +#ifdef RGBLIGHT_ENABLE + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + sethsv_raw(HSV_CAPS, (LED_TYPE *)&led[0]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[0]); + } + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + sethsv_raw(HSV_NLCK, (LED_TYPE *)&led[1]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[1]); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + sethsv_raw(HSV_SCRL, (LED_TYPE *)&led[2]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[2]); + } + rgblight_set(); +} + +__attribute__ ((weak)) +void keyboard_post_init_user(void) { + rgblight_set_effect_range(3, RGBLED_NUM-3); + led_set_user(_BV(USB_LED_CAPS_LOCK)|_BV(USB_LED_NUM_LOCK)|_BV(USB_LED_SCROLL_LOCK)); + wait_ms(300); + led_set_user(0); +} + +__attribute__ ((weak)) +void hbcp_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) { + LED_TYPE tmp_led; + sethsv_raw(hue, sat, val, &tmp_led); + for (uint8_t i = start; i < end; i++) { + led[i] = tmp_led; + } + rgblight_set(); +} + +#endif diff --git a/keyboards/hineybush/hbcp/hbcp.h b/keyboards/hineybush/hbcp/hbcp.h new file mode 100644 index 0000000000..0bcf7b7304 --- /dev/null +++ b/keyboards/hineybush/hbcp/hbcp.h @@ -0,0 +1,58 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017}, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217},\ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317},\ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417},\ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514, K515, K516, K517 }\ +} + +#define LAYOUT_wkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K317, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ + K500, K501, K505, K510, K511, K512, K513, K514, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, K116, K117 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315, K316, K317 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, KC_NO }, \ + { K500, K501, KC_NO,KC_NO,KC_NO,K505, KC_NO,KC_NO,KC_NO,KC_NO,K510, K511, K512, K513, K514, K515, K516, K517 } \ +} diff --git a/keyboards/hineybush/hbcp/info.json b/keyboards/hineybush/hbcp/info.json new file mode 100644 index 0000000000..8a8fd217f4 --- /dev/null +++ b/keyboards/hineybush/hbcp/info.json @@ -0,0 +1,219 @@ +{ + "keyboard_name": "hbcp", + "url": "", + "maintainer": "hineybush", + "width": 19.5, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "key_count": 103, + "layout": [ + {"label":"Esc (K000)", "x":0, "y":0}, + {"label":"F1 (K001)", "x":1.25, "y":0}, + {"label":"F2 (K002)", "x":2.25, "y":0}, + {"label":"F3 (K003)", "x":3.25, "y":0}, + {"label":"F4 (K004)", "x":4.25, "y":0}, + {"label":"F5 (K005)", "x":5.5, "y":0}, + {"label":"F6 (K006)", "x":6.5, "y":0}, + {"label":"F7 (K007)", "x":7.5, "y":0}, + {"label":"F8 (K008)", "x":8.5, "y":0}, + {"label":"F9 (K009)", "x":9.75, "y":0}, + {"label":"F10 (K010)", "x":10.75, "y":0}, + {"label":"F11 (K011)", "x":11.75, "y":0}, + {"label":"F12 (K012)", "x":12.75, "y":0}, + {"label":"Delete (K014)", "x":15.5, "y":0}, + {"label":"Insert (K015)", "x":16.5, "y":0}, + {"label":"PgUp (K016)", "x":17.5, "y":0}, + {"label":"PgDn (K017)", "x":18.5, "y":0}, + {"label":"~ (K100)", "x":0, "y":1.25}, + {"label":"! (K101)", "x":1, "y":1.25}, + {"label":"@ (K102)", "x":2, "y":1.25}, + {"label":"# (K103)", "x":3, "y":1.25}, + {"label":"$ (K104)", "x":4, "y":1.25}, + {"label":"% (K105)", "x":5, "y":1.25}, + {"label":"^ (K106)", "x":6, "y":1.25}, + {"label":"& (K107)", "x":7, "y":1.25}, + {"label":"* (K108)", "x":8, "y":1.25}, + {"label":"( (K109)", "x":9, "y":1.25}, + {"label":") (K110)", "x":10, "y":1.25}, + {"label":"_ (K111)", "x":11, "y":1.25}, + {"label":"+ (K112)", "x":12, "y":1.25}, + {"label":"~ (K113)", "x":13, "y":1.25}, + {"label":"Backspace (K013)", "x":14, "y":1.25}, + {"label":"Num Lock (K114)", "x":15.5, "y":1.25}, + {"label":"/ (K115)", "x":16.5, "y":1.25}, + {"label":"* (K116)", "x":17.5, "y":1.25}, + {"label":"Pause (K117)", "x":18.5, "y":1.25}, + {"label":"Tab (K200)", "x":0, "y":2.25, "w":1.5}, + {"label":"Q (K201)", "x":1.5, "y":2.25}, + {"label":"W (K202)", "x":2.5, "y":2.25}, + {"label":"E (K203)", "x":3.5, "y":2.25}, + {"label":"R (K204)", "x":4.5, "y":2.25}, + {"label":"T (K205)", "x":5.5, "y":2.25}, + {"label":"Y (K206)", "x":6.5, "y":2.25}, + {"label":"U (K207)", "x":7.5, "y":2.25}, + {"label":"I (K208)", "x":8.5, "y":2.25}, + {"label":"O (K209)", "x":9.5, "y":2.25}, + {"label":"P (K210)", "x":10.5, "y":2.25}, + {"label":"{ (K211)", "x":11.5, "y":2.25}, + {"label":"} (K212)", "x":12.5, "y":2.25}, + {"label":"| (K213)", "x":13.5, "y":2.25, "w":1.5}, + {"label":"7 (K214)", "x":15.5, "y":2.25}, + {"label":"8 (K215)", "x":16.5, "y":2.25}, + {"label":"9 (K216)", "x":17.5, "y":2.25}, + {"label":"- (K217)", "x":18.5, "y":2.25}, + {"label":"Caps Lock (K300)", "x":0, "y":3.25, "w":1.75}, + {"label":"A (K301)", "x":1.75, "y":3.25}, + {"label":"S (K302)", "x":2.75, "y":3.25}, + {"label":"D (K303)", "x":3.75, "y":3.25}, + {"label":"F (K304)", "x":4.75, "y":3.25}, + {"label":"G (K305)", "x":5.75, "y":3.25}, + {"label":"H (K306)", "x":6.75, "y":3.25}, + {"label":"J (K307)", "x":7.75, "y":3.25}, + {"label":"K (K308)", "x":8.75, "y":3.25}, + {"label":"L (K309)", "x":9.75, "y":3.25}, + {"label":": (K310)", "x":10.75, "y":3.25}, + {"label":"\" (K311)", "x":11.75, "y":3.25}, + {"label":"~ (K312)", "x":12.75, "y":3.25}, + {"label":"Enter (K313)", "x":13.75, "y":3.25, "w":1.25}, + {"label":"4 (K314)", "x":15.5, "y":3.25}, + {"label":"5 (K315)", "x":16.5, "y":3.25}, + {"label":"6 (K316)", "x":17.5, "y":3.25}, + {"label":"+ (K317)", "x":18.5, "y":3.25}, + {"label":"Shift (K400)", "x":0, "y":4.25, "w":1.25}, + {"label":"| (K401)", "x":1.25, "y":4.25}, + {"label":"Z (K402)", "x":2.25, "y":4.25}, + {"label":"X (K403)", "x":3.25, "y":4.25}, + {"label":"C (K404)", "x":4.25, "y":4.25}, + {"label":"V (K405)", "x":5.25, "y":4.25}, + {"label":"B (K406)", "x":6.25, "y":4.25}, + {"label":"N (K407)", "x":7.25, "y":4.25}, + {"label":"M (K408)", "x":8.25, "y":4.25}, + {"label":"< (K409)", "x":9.25, "y":4.25}, + {"label":"> (K410)", "x":10.25, "y":4.25}, + {"label":"? (K411)", "x":11.25, "y":4.25}, + {"label":"Shift (K412)", "x":12.25, "y":4.25, "w":1.75}, + {"label":"Up (K413)", "x":14.25, "y":4.5}, + {"label":"1 (K414)", "x":15.5, "y":4.25}, + {"label":"2 (K415)", "x":16.5, "y":4.25}, + {"label":"3 (K416)", "x":17.5, "y":4.25}, + {"label":"TRNS (K417)", "x":18.5, "y":4.25}, + {"label":"Ctrl (K500)", "x":0, "y":5.25, "w":1.25}, + {"label":"GUI (K501)", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt (K502)", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Space (K505)", "x":3.75, "y":5.25, "w":6.25}, + {"label":"Alt (K509)", "x":10, "y":5.25}, + {"label":"MO(1) (K510)", "x":11, "y":5.25}, + {"label":"GUI (K511)", "x":12, "y":5.25}, + {"label":"Left (K512)", "x":13.25, "y":5.5}, + {"label":"Down (K513)", "x":14.25, "y":5.5}, + {"label":"Right (K514)", "x":15.25, "y":5.5}, + {"label":"0 (K515)", "x":16.5, "y":5.25}, + {"label":". (K516)", "x":17.5, "y":5.25}, + {"label":"Enter (K517)", "x":18.5, "y":5.25} + ] + }, + "LAYOUT_wkl": { + "key_count": 97, + "layout": [ + {"label":"Esc (K000)", "x":0, "y":0}, + {"label":"F1 (K001)", "x":1.25, "y":0}, + {"label":"F2 (K002)", "x":2.25, "y":0}, + {"label":"F3 (K003)", "x":3.25, "y":0}, + {"label":"F4 (K004)", "x":4.25, "y":0}, + {"label":"F5 (K005)", "x":5.5, "y":0}, + {"label":"F6 (K006)", "x":6.5, "y":0}, + {"label":"F7 (K007)", "x":7.5, "y":0}, + {"label":"F8 (K008)", "x":8.5, "y":0}, + {"label":"F9 (K009)", "x":9.75, "y":0}, + {"label":"F10 (K010)", "x":10.75, "y":0}, + {"label":"F11 (K011)", "x":11.75, "y":0}, + {"label":"F12 (K012)", "x":12.75, "y":0}, + {"label":"Delete (K014)", "x":15.5, "y":0}, + {"label":"Insert (K015)", "x":16.5, "y":0}, + {"label":"PgUp (K016)", "x":17.5, "y":0}, + {"label":"PgDn (K017)", "x":18.5, "y":0}, + {"label":"~ (K100)", "x":0, "y":1.25}, + {"label":"! (K101)", "x":1, "y":1.25}, + {"label":"@ (K102)", "x":2, "y":1.25}, + {"label":"# (K103)", "x":3, "y":1.25}, + {"label":"$ (K104)", "x":4, "y":1.25}, + {"label":"% (K105)", "x":5, "y":1.25}, + {"label":"^ (K106)", "x":6, "y":1.25}, + {"label":"& (K107)", "x":7, "y":1.25}, + {"label":"* (K108)", "x":8, "y":1.25}, + {"label":"( (K109)", "x":9, "y":1.25}, + {"label":") (K110)", "x":10, "y":1.25}, + {"label":"_ (K111)", "x":11, "y":1.25}, + {"label":"+ (K112)", "x":12, "y":1.25}, + {"label":"Backspace (K013)", "x":13, "y":1.25, "w":2}, + {"label":"Num Lock (K114)", "x":15.5, "y":1.25}, + {"label":"/ (K115)", "x":16.5, "y":1.25}, + {"label":"* (K116)", "x":17.5, "y":1.25}, + {"label":"Pause (K117)", "x":18.5, "y":1.25}, + {"label":"Tab (K200)", "x":0, "y":2.25, "w":1.5}, + {"label":"Q (K201)", "x":1.5, "y":2.25}, + {"label":"W (K202)", "x":2.5, "y":2.25}, + {"label":"E (K203)", "x":3.5, "y":2.25}, + {"label":"R (K204)", "x":4.5, "y":2.25}, + {"label":"T (K205)", "x":5.5, "y":2.25}, + {"label":"Y (K206)", "x":6.5, "y":2.25}, + {"label":"U (K207)", "x":7.5, "y":2.25}, + {"label":"I (K208)", "x":8.5, "y":2.25}, + {"label":"O (K209)", "x":9.5, "y":2.25}, + {"label":"P (K210)", "x":10.5, "y":2.25}, + {"label":"{ (K211)", "x":11.5, "y":2.25}, + {"label":"} (K212)", "x":12.5, "y":2.25}, + {"label":"| (K213)", "x":13.5, "y":2.25, "w":1.5}, + {"label":"7 (K214)", "x":15.5, "y":2.25}, + {"label":"8 (K215)", "x":16.5, "y":2.25}, + {"label":"9 (K216)", "x":17.5, "y":2.25}, + {"label":"- (K217)", "x":18.5, "y":2.25}, + {"label":"Caps Lock (K300)", "x":0, "y":3.25, "w":1.75}, + {"label":"A (K301)", "x":1.75, "y":3.25}, + {"label":"S (K302)", "x":2.75, "y":3.25}, + {"label":"D (K303)", "x":3.75, "y":3.25}, + {"label":"F (K304)", "x":4.75, "y":3.25}, + {"label":"G (K305)", "x":5.75, "y":3.25}, + {"label":"H (K306)", "x":6.75, "y":3.25}, + {"label":"J (K307)", "x":7.75, "y":3.25}, + {"label":"K (K308)", "x":8.75, "y":3.25}, + {"label":"L (K309)", "x":9.75, "y":3.25}, + {"label":": (K310)", "x":10.75, "y":3.25}, + {"label":"\" (K311)", "x":11.75, "y":3.25}, + {"label":"Enter (K313)", "x":12.75, "y":3.25, "w":2.25}, + {"label":"4 (K314)", "x":15.5, "y":3.25}, + {"label":"5 (K315)", "x":16.5, "y":3.25}, + {"label":"6 (K316)", "x":17.5, "y":3.25}, + {"label":"+ (K317)", "x":18.5, "y":3.25}, + {"label":"Shift (K400)", "x":0, "y":4.25, "w":2.25}, + {"label":"Z (K402)", "x":2.25, "y":4.25}, + {"label":"X (K403)", "x":3.25, "y":4.25}, + {"label":"C (K404)", "x":4.25, "y":4.25}, + {"label":"V (K405)", "x":5.25, "y":4.25}, + {"label":"B (K406)", "x":6.25, "y":4.25}, + {"label":"N (K407)", "x":7.25, "y":4.25}, + {"label":"M (K408)", "x":8.25, "y":4.25}, + {"label":"< (K409)", "x":9.25, "y":4.25}, + {"label":"> (K410)", "x":10.25, "y":4.25}, + {"label":"? (K411)", "x":11.25, "y":4.25}, + {"label":"Shift (K412)", "x":12.25, "y":4.25, "w":1.75}, + {"label":"Up (K413)", "x":14.25, "y":4.5}, + {"label":"1 (K414)", "x":15.5, "y":4.25}, + {"label":"2 (K415)", "x":16.5, "y":4.25}, + {"label":"3 (K416)", "x":17.5, "y":4.25}, + {"label":"Ctrl (K500)", "x":0, "y":5.25, "w":1.5}, + {"label":"Alt (K501)", "x":1.5, "y":5.25, "w":1.5}, + {"label":"Space (K505)", "x":3, "y":5.25, "w":7}, + {"label":"MO(1) (K510)", "x":10, "y":5.25, "w":1.5}, + {"label":"GUI (K511)", "x":11.5, "y":5.25, "w":1.5}, + {"label":"Left (K512)", "x":13.25, "y":5.5}, + {"label":"Down (K513)", "x":14.25, "y":5.5}, + {"label":"Right (K514)", "x":15.25, "y":5.5}, + {"label":"0 (K515)", "x":16.5, "y":5.25}, + {"label":". (K516)", "x":17.5, "y":5.25}, + {"label":"Enter (K517)", "x":18.5, "y":4.25, "h":2} + ] + } + } +} diff --git a/keyboards/hineybush/hbcp/keymaps/default/config.h b/keyboards/hineybush/hbcp/keymaps/default/config.h new file mode 100644 index 0000000000..89865cef35 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hineybush/hbcp/keymaps/default/keymap.c b/keyboards/hineybush/hbcp/keymaps/default/keymap.c new file mode 100644 index 0000000000..b8ab480ba3 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/default/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( /* Base */ + + /*#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514, K515, K516, K517 \ +)*/ + KC_ESC, 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_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, + 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_P7, KC_P8, KC_P9, KC_PMNS, + 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_TRNS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + + ), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RESET ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS + + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} diff --git a/keyboards/hineybush/hbcp/keymaps/default/readme.md b/keyboards/hineybush/hbcp/keymaps/default/readme.md new file mode 100644 index 0000000000..8cbd45cd09 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default "all key" keymap for hbcp +# Somewhat dirty with ISO and split backspace, but has all keys diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/config.h b/keyboards/hineybush/hbcp/keymaps/hiney/config.h new file mode 100644 index 0000000000..b864d6a635 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/hiney/config.h @@ -0,0 +1,44 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + +// place overrides here + +#ifndef HSV_SOFT_PINK + #define HSV_SOFT_PINK 255, 110, 100 // Define custom "soft pink" color +#endif + +#ifndef HSV_SOFT_WHITE + #define HSV_SOFT_WHITE 0, 0, 90 // Define custom "soft white" color +#endif + +#ifndef HSV_WARM_WHITE + #define HSV_WARM_WHITE 41, 105, 90 // Define custom "warm white" color +#endif + +#ifndef HSV_SOFT_RED + #define HSV_SOFT_RED 0, 240, 160 // Define custom "soft red" color +#endif + +#ifndef HSV_SOFT_BLUE + #define HSV_SOFT_BLUE 159, 180, 160 // Define custom "soft blue" color +#endif + +#ifndef HSV_BLACK + #define HSV_BLACK 0, 0, 0 // Define 'black' color, more like 'LED off' (H, S, V) +#endif +// not sure why i need to also define this here, as it is already in hbcp.h diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c new file mode 100644 index 0000000000..bcfb9ed5bc --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c @@ -0,0 +1,106 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + ALTCUT, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_wkl( /* Base */ + + /*K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K317, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ + K500, K501, K505, K510, K511, K512, K513, K514, K515, K516, K517 \*/ + KC_ESC, 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_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_LNUM, KC_PSLS, KC_PAST, KC_PAUS, + 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_P7, KC_P8, KC_P9, KC_PMNS, + KC_LGUI, 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + + ), + + [1] = LAYOUT_wkl( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RESET ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS + + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case ALTCUT: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + send_string_with_delay_P(PSTR(SS_TAP(X_TAB)SS_TAP(X_T)SS_TAP(X_V)SS_TAP(X_B)), 20); // altium macro + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +#ifdef RGBLIGHT_ENABLE +// The first three LEDs are used as indicators for CAPS_LOCK, NUM_LOCK and SCROLL_LOCK. +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + sethsv_raw(HSV_SOFT_RED, (LED_TYPE *)&led[0]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[0]); + } + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + sethsv_raw(HSV_WARM_WHITE, (LED_TYPE *)&led[1]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[1]); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + sethsv_raw(HSV_SOFT_BLUE, (LED_TYPE *)&led[2]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[2]); + } + rgblight_set(); +} + +#endif diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/readme.md b/keyboards/hineybush/hbcp/keymaps/hiney/readme.md new file mode 100644 index 0000000000..2829d4b5ba --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/hiney/readme.md @@ -0,0 +1 @@ +# hineybush's keymap for hbcp diff --git a/keyboards/hineybush/hbcp/keymaps/wkl/config.h b/keyboards/hineybush/hbcp/keymaps/wkl/config.h new file mode 100644 index 0000000000..89865cef35 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hineybush/hbcp/keymaps/wkl/keymap.c b/keyboards/hineybush/hbcp/keymaps/wkl/keymap.c new file mode 100644 index 0000000000..09d5b6b33c --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/wkl/keymap.c @@ -0,0 +1,82 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_wkl( /* Base */ + + /*K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K317, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ + K500, K501, K505, K510, K511, K512, K513, K514, K515, K516, K517 \*/ + KC_ESC, 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_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, + 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_P7, KC_P8, KC_P9, KC_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + + ), + + [1] = LAYOUT_wkl( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RESET ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS + + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} diff --git a/keyboards/hineybush/hbcp/keymaps/wkl/readme.md b/keyboards/hineybush/hbcp/keymaps/wkl/readme.md new file mode 100644 index 0000000000..70f5936370 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The default WKL keymap for hbcp diff --git a/keyboards/hineybush/hbcp/readme.md b/keyboards/hineybush/hbcp/readme.md new file mode 100644 index 0000000000..712339413c --- /dev/null +++ b/keyboards/hineybush/hbcp/readme.md @@ -0,0 +1,15 @@ +# hbcp + +![hbcp](https://i.imgur.com/27Vkolf.png) + +A custom compact-1800 layout keyboard. + +Keyboard Maintainer: [hineybush](https://github.com/hineybush) +Hardware Supported: HBCP PCB featuring an AT90USB1286 +Hardware Availability: Group buy only + +Make example for this keyboard (after setting up your build environment): + + make hineybush/hbcp: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). diff --git a/keyboards/hineybush/hbcp/rules.mk b/keyboards/hineybush/hbcp/rules.mk new file mode 100644 index 0000000000..fa31c9e001 --- /dev/null +++ b/keyboards/hineybush/hbcp/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hineybush/hineyg80/rules.mk b/keyboards/hineybush/hineyg80/rules.mk index 383a3594b4..7218e1e1bf 100644 --- a/keyboards/hineybush/hineyg80/rules.mk +++ b/keyboards/hineybush/hineyg80/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/hineybush/sm68/config.h b/keyboards/hineybush/sm68/config.h new file mode 100644 index 0000000000..f41f5bc2d5 --- /dev/null +++ b/keyboards/hineybush/sm68/config.h @@ -0,0 +1,241 @@ +/* +Copyright 2019 hineybush + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEC9F +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT sm68 +#define DESCRIPTION PCB for switchmod keyboards projects + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B2, B1, B0, D4, D1 } +#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D3, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define RGB_DI_PIN D0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 16 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS + /*== or choose animations ==*/ + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST + #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/sm68/info.json b/keyboards/hineybush/sm68/info.json new file mode 100644 index 0000000000..1db400d663 --- /dev/null +++ b/keyboards/hineybush/sm68/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "sm68", + "url": "", + "maintainer": "hineybush", + "width": 17.5, + "height": 5, + "layouts": { + "LAYOUT_68_ansi_split_bs_rshift": { + "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.5, "y":0}, {"x":16.5, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.5, "y":1}, {"x":16.5, "y":1}, {"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":2.25}, {"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}, {"x":14, "y":3}, {"label":"\u2191", "x":15.5, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"\u2190", "x":14.5, "y":4}, {"label":"\u2193", "x":15.5, "y":4}, {"label":"\u2192", "x":16.5, "y":4}] + }, + "LAYOUT_68_ansi_split_rshift": { + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"x":15.5, "y":0}, {"x":16.5, "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":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"x":16.5, "y":1}, {"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":2.25}, {"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}, {"x":14, "y":3}, {"label":"\u2191", "x":15.5, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"\u2190", "x":14.5, "y":4}, {"label":"\u2193", "x":15.5, "y":4}, {"label":"\u2192", "x":16.5, "y":4}] + } + } +} diff --git a/keyboards/hineybush/sm68/keymaps/default/config.h b/keyboards/hineybush/sm68/keymaps/default/config.h new file mode 100644 index 0000000000..89865cef35 --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hineybush/sm68/keymaps/default/keymap.c b/keyboards/hineybush/sm68/keymaps/default/keymap.c new file mode 100644 index 0000000000..3d0a1a4e97 --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_68_ansi_split_rshift( + 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_HOME, KC_PGUP, + 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_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_68_ansi_split_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + + diff --git a/keyboards/hineybush/sm68/keymaps/default/readme.md b/keyboards/hineybush/sm68/keymaps/default/readme.md new file mode 100644 index 0000000000..90031c3b02 --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for sm68 diff --git a/keyboards/hineybush/sm68/readme.md b/keyboards/hineybush/sm68/readme.md new file mode 100644 index 0000000000..6c38158bc7 --- /dev/null +++ b/keyboards/hineybush/sm68/readme.md @@ -0,0 +1,15 @@ +# sm68 + +Image TBA + +Exact keyboard support TBA by switchmod keyboards + +* Keyboard Maintainer: [hineybush](https://github.com/hineybush) +* Hardware Supported: SM68 PCB +* Hardware Availability: TBA + +Make example for this keyboard (after setting up your build environment): + + make hineybush/sm68: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). diff --git a/keyboards/hineybush/sm68/rules.mk b/keyboards/hineybush/sm68/rules.mk new file mode 100644 index 0000000000..49f5ca7fdc --- /dev/null +++ b/keyboards/hineybush/sm68/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hineybush/sm68/sm68.c b/keyboards/hineybush/sm68/sm68.c new file mode 100644 index 0000000000..5aa3c85bbc --- /dev/null +++ b/keyboards/hineybush/sm68/sm68.c @@ -0,0 +1,50 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#include "sm68.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} +*/ diff --git a/keyboards/hineybush/sm68/sm68.h b/keyboards/hineybush/sm68/sm68.h new file mode 100644 index 0000000000..81d25c12fa --- /dev/null +++ b/keyboards/hineybush/sm68/sm68.h @@ -0,0 +1,59 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +// split backspace +#define LAYOUT_68_ansi_split_bs_rshift( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k404, k408, k409, k410, k413, k414, k415 \ +) \ +{ \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO, KC_NO}, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, KC_NO}, \ + { k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,k408, k409, k410, KC_NO, KC_NO, KC_NO,k413, k414, k415} \ +} + +// full backspace +#define LAYOUT_68_ansi_split_rshift( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k404, k408, k409, k410, k413, k414, k415 \ +) \ +{ \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012,KC_NO, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO, KC_NO}, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, KC_NO}, \ + { k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,k408, k409, k410, KC_NO, KC_NO, KC_NO,k413, k414, k415} \ +} diff --git a/keyboards/honeycomb/honeycomb.h b/keyboards/honeycomb/honeycomb.h index 9374a02c5c..ec54b59f20 100755 --- a/keyboards/honeycomb/honeycomb.h +++ b/keyboards/honeycomb/honeycomb.h @@ -1,11 +1,6 @@ #pragma once -#define HONEYCOMB_H - #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include #define RED_LED_OFF() writePinHigh(F6) #define RED_LED_ON() writePinLow(F6) diff --git a/keyboards/honeycomb/rules.mk b/keyboards/honeycomb/rules.mk index 90992bad72..05a3cff00d 100755 --- a/keyboards/honeycomb/rules.mk +++ b/keyboards/honeycomb/rules.mk @@ -1,47 +1,14 @@ -# # project specific files -SRC += matrix.c - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options @@ -62,6 +29,9 @@ NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +# # project specific files +SRC += matrix.c + USB = /dev/ttyACM0 #upload: build diff --git a/keyboards/hotdox/keymaps/default/keymap.c b/keyboards/hotdox/keymaps/default/keymap.c index 0ec7b352c1..daba6c3000 100644 --- a/keyboards/hotdox/keymaps/default/keymap.c +++ b/keyboards/hotdox/keymaps/default/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/keyboards/hotdox/keymaps/eozaki/keymap.c b/keyboards/hotdox/keymaps/eozaki/keymap.c index dc80e7a34e..3516f20303 100644 --- a/keyboards/hotdox/keymaps/eozaki/keymap.c +++ b/keyboards/hotdox/keymaps/eozaki/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_GRV), - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, LT(SYMB, KC_F2), KC_F4, KC_F5, KC_F6, KC_F11, diff --git a/keyboards/hotdox/keymaps/ninjonas/README.md b/keyboards/hotdox/keymaps/ninjonas/README.md new file mode 100644 index 0000000000..5cbfacf9f5 --- /dev/null +++ b/keyboards/hotdox/keymaps/ninjonas/README.md @@ -0,0 +1,106 @@ +# ninjonas Keymap for [ErgoDox (HotDox)](https://www.alpacakeyboards.com/) + +## Setup +- Ensure you've cloned the [qmk](https://github.com/qmk/qmk_firmware) repo +- Create directory `ninjonas` on `/keyboards/hotdox/keymaps/` +- Run `copy_keymap.sh`. This copies the contents of this repo into `%qmk_firmware%/ninjonas/` directory +- To push your keymap to your keyboard run this command `make clean hotdox:ninjonas:dfu` + - this compiles your keymap and creates a `hotdox_ninjonas.hex` file and will atempt to flash your board + - if you get the following message: + ``` + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + ``` + - Press the reset button underneath your ErgoDox keyboard + - The following messages should show up and your board has successfuly been flashed + ``` + Bootloader Version: 0x00 (0) + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. + Checking memory from 0x0 to 0x5D7F... Empty. + 0% 100% Programming 0x5D80 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5D80 bytes written into 0x7000 bytes memory (83.48%). + ``` + - The alterenative is follow the steps on [Hotdox flashing guide](https://www.alpacakeyboards.com/flash/hot-dox-ergodox-76-flashing-instructions) + +## Keymap +This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](https://github.com/ninjonas/qmk-yonas/tree/master/users/ninjonas). + +### QWERTY +```c +/* Keymap 0: QWERTY + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Esc | A | S | D | F | G |------| |-------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' + * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Up | Down | | Left | Right| + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Del |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `--------------------' + */ +``` + +### LOWER +```c +/* Keymap 1: LOWER + * + * ,--------------------------------------------------. ,----------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| + * | | | |KC_BRU| Play | Mute | | | | PgUp | Home | Up | End | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | | | |KC_BRD| Next |VolUp |------| |-------| PgDn | Left | Down |Right |K_LOCK | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | | | | | Prev |VolDn | | | | | | | | | | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' + * | | | | | | | | | |M_CODE | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +``` + +### RAISE +```c +/* Keymap 2: RAISE + * + * ,--------------------------------------------------. ,----------------------------------------------------. + * | | | | |K_CSCN| | | | | | | | | | | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| + * | M_MAKE | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | M_VRSN | | MS_L | MS_D | MS_R | WH_D |------| |-------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | M_FLSH | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +``` \ No newline at end of file diff --git a/keyboards/hotdox/keymaps/ninjonas/keymap.c b/keyboards/hotdox/keymaps/ninjonas/keymap.c new file mode 100644 index 0000000000..eea86200c7 --- /dev/null +++ b/keyboards/hotdox/keymaps/ninjonas/keymap.c @@ -0,0 +1,348 @@ +/* Copyright 2019 @ninjonas + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "ninjonas.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* QWERTY + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Esc | A | S | D | F | G |------| |-------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' + * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Up | Down | | Left | Right| + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Del |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `--------------------' + */ + [_QWERTY] = LAYOUT_ergodox_wrapper( + // LEFT HAND + _____________________NUM_LEFT_______________________, KC_MPLY, + _____________________QWERTY_L1______________________, KC_NO, + _____________________QWERTY_L2______________________, + _____________________QWERTY_L3______________________, T_LBRC, + M_SHFT, KC_NO, ________MOD_LEFT_________, + // LEFT THUMB + KC_UP, KC_DOWN, + KC_HOME, + LT_RAI, KC_BSPC, + KC_END, + + //RIGHT HAND + K_LOCK, _____________________NUM_RIGHT______________________, + KC_NO, _____________________QWERTY_R1______________________, + _____________________QWERTY_R2______________________, + T_RBRC, _____________________QWERTY_R3______________________, + ________MOD_RIGHT________, M_XXX1, M_PYNV, + // RIGHT THUMB + KC_LEFT, KC_RGHT, + KC_PGUP, + KC_PGDN, + MT_DEL, LT_LOW + ), + +/* DVORAK + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+------+--------| + * | Tab | ' | , | . | P | Y | | | | F | G | C | R | L | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Esc | A | O | E | U | I |------| |-------| D | H | T | N | S | / | + * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | = | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' + * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Up | Down | | Left | Right| + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Del |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `--------------------' + */ + [_DVORAK] = LAYOUT_ergodox_wrapper( + // LEFT HAND + _____________________NUM_LEFT_______________________, KC_MPLY, + _____________________DVORAK_L1______________________, KC_NO, + _____________________DVORAK_L2______________________, + _____________________DVORAK_L3______________________, T_LBRC, + M_SHFT, KC_NO, ________MOD_LEFT_________, + // LEFT THUMB + KC_UP, KC_DOWN, + KC_HOME, + LT_RAI, KC_BSPC, + KC_END, + + //RIGHT HAND + K_LOCK, _____________________NUM_RIGHT______________________, + KC_NO, _____________________DVORAK_R1______________________, + _____________________DVORAK_R2______________________, + T_RBRC, _____________________DVORAK_R3______________________, + ________MOD_RIGHT________, M_XXX1, M_PYNV, + // RIGHT THUMB + KC_LEFT, KC_RGHT, + KC_PGUP, + KC_PGDN, + MT_DEL, LT_LOW + ), + +/* COLEMAK + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Esc | A | R | S | T | D |------| |-------| H | N | E | I | O | ' | + * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | = | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' + * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Up | Down | | Left | Right| + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Del |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `--------------------' + */ + [_COLEMAK] = LAYOUT_ergodox_wrapper( + // LEFT HAND + _____________________NUM_LEFT_______________________, KC_MPLY, + _____________________COLEMAK_L1_____________________, KC_NO, + _____________________COLEMAK_L2_____________________, + _____________________COLEMAK_L3_____________________, T_LBRC, + M_SHFT, KC_NO, ________MOD_LEFT_________, + // LEFT THUMB + KC_UP, KC_DOWN, + KC_HOME, + LT_RAI, KC_BSPC, + KC_END, + + //RIGHT HAND + K_LOCK, _____________________NUM_RIGHT______________________, + KC_NO, _____________________COLEMAK_R1_____________________, + _____________________COLEMAK_R2_____________________, + T_RBRC, _____________________COLEMAK_R3_____________________, + ________MOD_RIGHT________, M_XXX1, M_PYNV, + // RIGHT THUMB + KC_LEFT, KC_RGHT, + KC_PGUP, + KC_PGDN, + MT_DEL, LT_LOW + ), + +/* LOWER + * + * ,--------------------------------------------------. ,----------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| + * | | | |KC_BRU| Play | Mute | | | | PgUp | Home | Up | End | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | | | |KC_BRD| Next |VolUp |------| |-------| PgDn | Left | Down |Right |K_LOCK | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | | | | | Prev |VolDn | | | | | | | | | | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' + * | | | | | | | | | |M_CODE | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [_LOWER] = LAYOUT_ergodox_wrapper( + //LEFT HAND + _____________________FUNC_LEFT______________________, _______, + _______, _______, _______, _________MEDIA_1_________, _______, + _______, _______, _______, _________MEDIA_2_________, + _______, _______, _______, _________MEDIA_3_________, _______, + _______, _______, _______, _______, _______, + // LEFT THUMB + _______, _______, + _______, + _______, _______, + _______, + + //RIGHT HAND + _______, _____________________FUNC_RIGHT_____________________, + _______, _______________NAV_1______________, _______, _______, + _______________NAV_2______________, K_LOCK, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, M_CODE, _______, + // RIGHT THUMB + _______, _______, + _______, + _______, + _______, _______ + ), + +/* RAISE + * + * ,--------------------------------------------------. ,----------------------------------------------------. + * | | | | |K_CSCN| | | | | | | | | | | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| + * | | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | | | MS_L | MS_D | MS_R | WH_D |------| |-------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [_RAISE] = LAYOUT_ergodox_wrapper( + //LEFT HAND + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, K_CSCN, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, + XXXXXXX, XXXXXXX, _____________MOUSE_2______________, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // LEFT THUMB + _______, _______, + _______, + _______, _______, + _______, + + //RIGHT HAND + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // RIGHT THUMB + _______, _______, + _______, + _______, + _______, _______ + ), + +/* ADJUST + * + * ,--------------------------------------------------. ,----------------------------------------------------. + * | | | | | | | | | | | | |COLMAK|DVORAK |QWERTY | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| + * | M_MAKE | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | M_VRSN | | | | | |------| |-------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | M_FLSH | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [_ADJUST] = LAYOUT_ergodox_wrapper( + //LEFT HAND + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + M_MAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // LEFT THUMB + _______, _______, + _______, + _______, _______, + _______, + + //RIGHT HAND + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // RIGHT THUMB + _______, _______, + _______, + _______, + _______, _______ + ), +/* Keymap XX: TEMPLATE + * + * ,--------------------------------------------------. ,----------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | | | | | | |------| |-------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' +[_XXLAYER] = LAYOUT_ergodox_wrapper( + //LEFT HAND + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + // LEFT THUMB + _______, _______, + _______, + _______, _______, + _______, + + //RIGHT HAND + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + // RIGHT THUMB + _______, _______, + _______, + _______, + _______, _______ + ), + + */ +}; \ No newline at end of file diff --git a/keyboards/hotdox/matrix.c b/keyboards/hotdox/matrix.c index 9d3a98db21..605be30220 100644 --- a/keyboards/hotdox/matrix.c +++ b/keyboards/hotdox/matrix.c @@ -9,9 +9,6 @@ #include "matrix.h" #include "hotdox.h" #include "left.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif /* * This constant define not debouncing time in msecs, but amount of matrix @@ -41,12 +38,6 @@ static void init_cols(void); static void unselect_rows(void); static void select_row(uint8_t row); -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -77,10 +68,6 @@ uint8_t matrix_cols(void) void matrix_init(void) { - // disable JTAG - MCUCR = (1<1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - matrix_print(); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); wait_us(30); // without this wait read unstable value. diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk index f785cdd060..be21552055 100644 --- a/keyboards/hotdox/rules.mk +++ b/keyboards/hotdox/rules.mk @@ -1,63 +1,14 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = matrix.c \ - i2c_master.c \ - left.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -79,4 +30,9 @@ SWAP_HANDS_ENABLE = no # Disable Onehand RGBLIGHT_ENABLE = no MIDI_ENABLE = no +# project specific files +SRC = matrix.c \ + i2c_master.c \ + left.c + LAYOUTS = ergodox diff --git a/keyboards/hs60/v1/rules.mk b/keyboards/hs60/v1/rules.mk index d552fc58f9..13f65b6ee4 100644 --- a/keyboards/hs60/v1/rules.mk +++ b/keyboards/hs60/v1/rules.mk @@ -1,47 +1,14 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# project specific files -#SRC = - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu # Do not put the microcontroller into power saving mode @@ -70,7 +37,7 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RGB_MATRIX_ENABLE = yes # Use RGB matrix RAW_ENABLE = yes -LAYOUTS = 60_ansi_split_bs_rshift +LAYOUTS = 60_ansi 60_iso # Experimental features for zealcmd please do no enable #RAW_ENABLE = yes diff --git a/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.c b/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100644 index 4331155df4..0000000000 --- a/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -#if HAL_USE_PAL || defined(__DOXYGEN__) -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -const PALConfig pal_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} -#endif -}; -#endif - -void enter_bootloader_mode_if_requested(void); - -/** - * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. - */ -void __early_init(void) { - enter_bootloader_mode_if_requested(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) { -} diff --git a/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.h b/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100644 index fb7283add9..0000000000 --- a/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null @@ -1,1187 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for Clueboard 60% Keyboard - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "HS60 V2.0 PCB" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_USB_DM 11U -#define GPIOA_USB_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#define LINE_USB_DM PAL_LINE(GPIOA, 11U) -#define LINE_USB_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) - -#define LINE_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - PIN_MODE_ALTERNATE(GPIOA_PIN1) | \ - PIN_MODE_INPUT(GPIOA_PIN2) | \ - PIN_MODE_INPUT(GPIOA_PIN3) | \ - PIN_MODE_INPUT(GPIOA_PIN4) | \ - PIN_MODE_INPUT(GPIOA_PIN5) | \ - PIN_MODE_INPUT(GPIOA_PIN6) | \ - PIN_MODE_INPUT(GPIOA_PIN7) | \ - PIN_MODE_INPUT(GPIOA_PIN8) | \ - PIN_MODE_INPUT(GPIOA_PIN9) | \ - PIN_MODE_INPUT(GPIOA_PIN10) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ - PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ - PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ - PIN_OSPEED_HIGH(GPIOA_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ - PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ - PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ - PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_PIN4) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_USB_DM) | \ - PIN_ODR_HIGH(GPIOA_USB_DP) | \ - PIN_ODR_HIGH(GPIOA_SWDIO) | \ - PIN_ODR_HIGH(GPIOA_SWCLK) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \ - PIN_AFIO_AF(GPIOA_PIN1, 1) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - PIN_MODE_OUTPUT(GPIOB_PIN7) | \ - PIN_MODE_INPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_HIGH(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_PIN3) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_LOW(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - PIN_MODE_INPUT(GPIOC_PIN1) | \ - PIN_MODE_INPUT(GPIOC_PIN2) | \ - PIN_MODE_INPUT(GPIOC_PIN3) | \ - PIN_MODE_INPUT(GPIOC_PIN4) | \ - PIN_MODE_INPUT(GPIOC_PIN5) | \ - PIN_MODE_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - PIN4 (input pullup). - * PD5 - PIN5 (input pullup). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD11 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - PIN12 (input pullup). - * PD13 - PIN13 (input pullup). - * PD14 - PIN14 (input pullup). - * PD15 - PIN15 (input pullup). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ - PIN_MODE_INPUT(GPIOD_PIN1) | \ - PIN_MODE_INPUT(GPIOD_PIN2) | \ - PIN_MODE_INPUT(GPIOD_PIN3) | \ - PIN_MODE_INPUT(GPIOD_PIN4) | \ - PIN_MODE_INPUT(GPIOD_PIN5) | \ - PIN_MODE_INPUT(GPIOD_PIN6) | \ - PIN_MODE_INPUT(GPIOD_PIN7) | \ - PIN_MODE_INPUT(GPIOD_PIN8) | \ - PIN_MODE_INPUT(GPIOD_PIN9) | \ - PIN_MODE_INPUT(GPIOD_PIN10) | \ - PIN_MODE_INPUT(GPIOD_PIN11) | \ - PIN_MODE_INPUT(GPIOD_PIN12) | \ - PIN_MODE_INPUT(GPIOD_PIN13) | \ - PIN_MODE_INPUT(GPIOD_PIN14) | \ - PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_PIN4) | \ - PIN_ODR_HIGH(GPIOD_PIN5) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_HIGH(GPIOD_PIN12) | \ - PIN_ODR_HIGH(GPIOD_PIN13) | \ - PIN_ODR_HIGH(GPIOD_PIN14) | \ - PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) |\ - PIN_MODE_OUTPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) |\ - PIN_MODE_INPUT(GPIOE_PIN5) |\ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_OUTPUT(GPIOE_PIN8) | \ - PIN_MODE_OUTPUT(GPIOE_PIN9) | \ - PIN_MODE_OUTPUT(GPIOE_PIN10) | \ - PIN_MODE_OUTPUT(GPIOE_PIN11) | \ - PIN_MODE_OUTPUT(GPIOE_PIN12) | \ - PIN_MODE_OUTPUT(GPIOE_PIN13) | \ - PIN_MODE_OUTPUT(GPIOE_PIN14) | \ - PIN_MODE_OUTPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\ - PIN_OSPEED_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN4) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN5) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_LOW(GPIOE_PIN8) | \ - PIN_ODR_LOW(GPIOE_PIN9) | \ - PIN_ODR_LOW(GPIOE_PIN10) | \ - PIN_ODR_LOW(GPIOE_PIN11) | \ - PIN_ODR_LOW(GPIOE_PIN12) | \ - PIN_ODR_LOW(GPIOE_PIN13) | \ - PIN_ODR_LOW(GPIOE_PIN14) | \ - PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0) |\ - PIN_AFIO_AF(GPIOE_PIN3, 0) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0) |\ - PIN_AFIO_AF(GPIOE_PIN5, 0) |\ - PIN_AFIO_AF(GPIOE_PIN6, 0) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (input floating). - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \ - PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ - PIN_MODE_INPUT(GPIOF_PIN2) | \ - PIN_MODE_INPUT(GPIOF_PIN3) | \ - PIN_MODE_INPUT(GPIOF_PIN4) | \ - PIN_MODE_INPUT(GPIOF_PIN5) | \ - PIN_MODE_INPUT(GPIOF_PIN6) | \ - PIN_MODE_INPUT(GPIOF_PIN7) | \ - PIN_MODE_INPUT(GPIOF_PIN8) | \ - PIN_MODE_INPUT(GPIOF_PIN9) | \ - PIN_MODE_INPUT(GPIOF_PIN10) | \ - PIN_MODE_INPUT(GPIOF_PIN11) | \ - PIN_MODE_INPUT(GPIOF_PIN12) | \ - PIN_MODE_INPUT(GPIOF_PIN13) | \ - PIN_MODE_INPUT(GPIOF_PIN14) | \ - PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \ - PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \ - PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \ - PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \ - PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \ - PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ - PIN_MODE_INPUT(GPIOG_PIN1) | \ - PIN_MODE_INPUT(GPIOG_PIN2) | \ - PIN_MODE_INPUT(GPIOG_PIN3) | \ - PIN_MODE_INPUT(GPIOG_PIN4) | \ - PIN_MODE_INPUT(GPIOG_PIN5) | \ - PIN_MODE_INPUT(GPIOG_PIN6) | \ - PIN_MODE_INPUT(GPIOG_PIN7) | \ - PIN_MODE_INPUT(GPIOG_PIN8) | \ - PIN_MODE_INPUT(GPIOG_PIN9) | \ - PIN_MODE_INPUT(GPIOG_PIN10) | \ - PIN_MODE_INPUT(GPIOG_PIN11) | \ - PIN_MODE_INPUT(GPIOG_PIN12) | \ - PIN_MODE_INPUT(GPIOG_PIN13) | \ - PIN_MODE_INPUT(GPIOG_PIN14) | \ - PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ - PIN_MODE_INPUT(GPIOH_PIN1) | \ - PIN_MODE_INPUT(GPIOH_PIN2) | \ - PIN_MODE_INPUT(GPIOH_PIN3) | \ - PIN_MODE_INPUT(GPIOH_PIN4) | \ - PIN_MODE_INPUT(GPIOH_PIN5) | \ - PIN_MODE_INPUT(GPIOH_PIN6) | \ - PIN_MODE_INPUT(GPIOH_PIN7) | \ - PIN_MODE_INPUT(GPIOH_PIN8) | \ - PIN_MODE_INPUT(GPIOH_PIN9) | \ - PIN_MODE_INPUT(GPIOH_PIN10) | \ - PIN_MODE_INPUT(GPIOH_PIN11) | \ - PIN_MODE_INPUT(GPIOH_PIN12) | \ - PIN_MODE_INPUT(GPIOH_PIN13) | \ - PIN_MODE_INPUT(GPIOH_PIN14) | \ - PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ - PIN_ODR_HIGH(GPIOH_PIN1) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ - PIN_AFIO_AF(GPIOH_PIN1, 0) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0)) - - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) -/* - * USB bus de-activation macro, required by the USB driver. - */ -// #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) -// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a3..0000000000 --- a/keyboards/hs60/v2/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/hs60/v2/bootloader_defs.h b/keyboards/hs60/v2/bootloader_defs.h deleted file mode 100644 index 3b0e9d20a6..0000000000 --- a/keyboards/hs60/v2/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here: - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 7169d846ba..02df0074cc 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -106,7 +106,7 @@ along with this program. If not, see . #define RGB_BACKLIGHT_BRIGHTNESS 255 // the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 +#define RGB_BACKLIGHT_EFFECT 6 // the default effect speed (0-3) #define RGB_BACKLIGHT_EFFECT_SPEED 0 @@ -136,19 +136,19 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+32) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 67 +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+32) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 69 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (67+(4*5*14*2)) = (67+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 627 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 +// Dynamic macro starts after dynamic keymaps (69+(4*5*14*2)) = (69+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 629 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk index deb4fc889b..b8311f5e7f 100644 --- a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/issi/is31fl3733.c \ quantum/color.c \ drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/keymaps/default_via/rules.mk b/keyboards/hs60/v2/keymaps/default_via/rules.mk index deb4fc889b..b8311f5e7f 100644 --- a/keyboards/hs60/v2/keymaps/default_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/default_via/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/issi/is31fl3733.c \ quantum/color.c \ drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk index deb4fc889b..b8311f5e7f 100644 --- a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk +++ b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/issi/is31fl3733.c \ quantum/color.c \ drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk index deb4fc889b..b8311f5e7f 100644 --- a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/issi/is31fl3733.c \ quantum/color.c \ drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk index deb4fc889b..b8311f5e7f 100644 --- a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk +++ b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/issi/is31fl3733.c \ quantum/color.c \ drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h index 5aab3098c7..d61e6bde4f 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/config.h +++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h @@ -7,7 +7,7 @@ // disable backlight after timeout in minutes, 0 = no timeout #undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT -#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 10 +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 20 #undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 #undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 @@ -39,3 +39,5 @@ #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } #define RGB_BACKLIGHT_COLOR_2 { .h = 150, .s = 255 } + +#define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk index 8d99391691..69592d06c7 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/issi/is31fl3733.c \ quantum/color.c \ drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk index 05193af4bb..1dc96d04be 100644 --- a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/issi/is31fl3733.c \ quantum/color.c \ drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/rules.mk index 64948c2e9a..6c32342589 100644 --- a/keyboards/hs60/v2/rules.mk +++ b/keyboards/hs60/v2/rules.mk @@ -1,52 +1,11 @@ -# project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ - drivers/issi/is31fl3733.c \ - quantum/color.c \ - drivers/arm/i2c_master.c - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = +# MCU name +MCU = STM32F303 # Do not put the microcontroller into power saving mode # when we get USB suspend event. We want it to keep updating # backlight effects. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - # Build Options # comment out to disable the options. # @@ -65,3 +24,12 @@ NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plu RAW_ENABLE = no DYNAMIC_KEYMAP_ENABLE = no CIE1931_CURVE = yes + +LAYOUTS = 60_ansi 60_iso + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/v2.h b/keyboards/hs60/v2/v2.h index 0a35acdea7..da32c3026a 100644 --- a/keyboards/hs60/v2/v2.h +++ b/keyboards/hs60/v2/v2.h @@ -18,8 +18,8 @@ #define XXX KC_NO #include "quantum.h" -#include "../../zeal60/rgb_backlight_keycodes.h" -#include "../../zeal60/zeal60_keycodes.h" +#include "../../wilba_tech/wt_rgb_backlight_keycodes.h" +#include "../../wilba_tech/via_keycodes.h" // This a shortcut to help you visually see your layout. diff --git a/keyboards/idb_60/config.h b/keyboards/idb_60/config.h index b85eb14af9..0120e470e5 100644 --- a/keyboards/idb_60/config.h +++ b/keyboards/idb_60/config.h @@ -155,16 +155,16 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 675 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 349 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/idb_60/rules.mk b/keyboards/idb_60/rules.mk index b5c9413470..b57f12db6a 100644 --- a/keyboards/idb_60/rules.mk +++ b/keyboards/idb_60/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # @@ -62,4 +26,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https: # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality # MIDI_ENABLE = YES # MIDI controls # UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/idobo/keymaps/default75/rules.mk b/keyboards/idobo/keymaps/default75/rules.mk deleted file mode 100644 index 7efceba50a..0000000000 --- a/keyboards/idobo/keymaps/default75/rules.mk +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2013 Jun Wako -# -# 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 . diff --git a/keyboards/idobo/keymaps/drewdobo/config.h b/keyboards/idobo/keymaps/drewdobo/config.h new file mode 100644 index 0000000000..58787ce12b --- /dev/null +++ b/keyboards/idobo/keymaps/drewdobo/config.h @@ -0,0 +1,23 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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 . + */ + +#pragma once + + +// place overrides here + + +#define TAPPING_TOGGLE 5 diff --git a/keyboards/idobo/keymaps/drewdobo/keymap.c b/keyboards/idobo/keymaps/drewdobo/keymap.c new file mode 100644 index 0000000000..9dfc335e82 --- /dev/null +++ b/keyboards/idobo/keymaps/drewdobo/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020 Drew Smathers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Keyboard Layers +enum layer_names { + _QW, + _QW_MAC, + _FN, + _MOUSE, +}; + +// Some short-cut aliases +#define Z_LALT LALT_T(KC_ESC) +#define Z_MAC DF(_QW_MAC) +#define Z_PC DF(_QW) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, \ + Z_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RALT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, XXXXXXX, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + TT(_FN), XXXXXXX, XXXXXXX, TT(_MOUSE), KC_EQL, KC_BSPC, KC_DEL, XXXXXXX, KC_ENT, KC_SPC, KC_MINUS, KC_GRAVE, KC_LBRC, KC_RBRC, XXXXXXX \ + ), + + [_QW_MAC] = LAYOUT_ortho_5x15( /* QWERTY MAC */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BRMU, KC_MUTE, KC__VOLUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRMD, XXXXXXX, KC__VOLDOWN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, \ + Z_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RALT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCMD, XXXXXXX, KC_RCMD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + TT(_FN), KC_LCTL, XXXXXXX, TT(_MOUSE), KC_EQL, KC_BSPC, KC_DEL, XXXXXXX, KC_ENT, KC_SPC, KC_MINUS, KC_GRAVE, KC_LBRC, KC_RBRC, KC_RCTL \ + ), + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, RESET, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, Z_MAC, _______, XXXXXXX, KC_HOME, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, \ + TT(_FN), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, Z_PC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + + [_MOUSE] = LAYOUT_ortho_5x15( /* MOUSE */ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + TT(_FN), XXXXXXX, XXXXXXX, TT(_MOUSE), XXXXXXX, KC_ACL1, KC_ACL2, XXXXXXX, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ) +}; diff --git a/keyboards/idobo/keymaps/drewdobo/readme.md b/keyboards/idobo/keymaps/drewdobo/readme.md new file mode 100644 index 0000000000..209808ca87 --- /dev/null +++ b/keyboards/idobo/keymaps/drewdobo/readme.md @@ -0,0 +1 @@ +# Drew's thumb-friendly keymap for idobo boards diff --git a/keyboards/idobo/keymaps/drewdobo/rules.mk b/keyboards/idobo/keymaps/drewdobo/rules.mk new file mode 100644 index 0000000000..f9bbfd4948 --- /dev/null +++ b/keyboards/idobo/keymaps/drewdobo/rules.mk @@ -0,0 +1,17 @@ +# Copyright 2013 Jun Wako +# +# 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 . + + +MOUSEKEY_ENABLE = yes diff --git a/keyboards/idobo/rules.mk b/keyboards/idobo/rules.mk index 721a2ef9bf..421a4eaae3 100644 --- a/keyboards/idobo/rules.mk +++ b/keyboards/idobo/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/illuminati/is0/config.h b/keyboards/illuminati/is0/config.h new file mode 100644 index 0000000000..e35b1500d3 --- /dev/null +++ b/keyboards/illuminati/is0/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 Ryota Goto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0012 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Illuminati Works +#define PRODUCT iS0 +#define DESCRIPTION no + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D2 } +#define MATRIX_COL_PINS { D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/illuminati/is0/info.json b/keyboards/illuminati/is0/info.json new file mode 100644 index 0000000000..0f3bb64eca --- /dev/null +++ b/keyboards/illuminati/is0/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "iS0", + "url": "", + "maintainer": "ai03", + "width": 1.5, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [{"x":0.25, "y":0, "w":1.25, "h":2}] + } + } +} diff --git a/keyboards/illuminati/is0/is0.c b/keyboards/illuminati/is0/is0.c new file mode 100644 index 0000000000..920277e6c9 --- /dev/null +++ b/keyboards/illuminati/is0/is0.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include "is0.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/illuminati/is0/is0.h b/keyboards/illuminati/is0/is0.h new file mode 100644 index 0000000000..a9fae5b40e --- /dev/null +++ b/keyboards/illuminati/is0/is0.h @@ -0,0 +1,33 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K0 \ +) \ +{ \ + { K0 } \ +} diff --git a/keyboards/illuminati/is0/keymaps/ctrlaltdel/keymap.c b/keyboards/illuminati/is0/keymaps/ctrlaltdel/keymap.c new file mode 100644 index 0000000000..e38df1e227 --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/ctrlaltdel/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + LCTL(LALT(KC_DEL)) + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/illuminati/is0/keymaps/ctrlaltdel/readme.md b/keyboards/illuminati/is0/keymaps/ctrlaltdel/readme.md new file mode 100644 index 0000000000..5d9e162c1c --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/ctrlaltdel/readme.md @@ -0,0 +1,3 @@ +# The ctrlaltdel keymap for is0 + +A simple keymap to send Ctrl + Alt + Del on keypress. \ No newline at end of file diff --git a/keyboards/illuminati/is0/keymaps/default/keymap.c b/keyboards/illuminati/is0/keymaps/default/keymap.c new file mode 100644 index 0000000000..68545add66 --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/default/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + KBINFO = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KBINFO + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KBINFO: + if (record->event.pressed) { + SEND_STRING("Hello from Illuminati Works"); + } else { + SEND_STRING("iS0 working properly"); + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/illuminati/is0/keymaps/default/readme.md b/keyboards/illuminati/is0/keymaps/default/readme.md new file mode 100644 index 0000000000..84110e663a --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for is0 + +Simply to verify that it works. \ No newline at end of file diff --git a/keyboards/illuminati/is0/readme.md b/keyboards/illuminati/is0/readme.md new file mode 100644 index 0000000000..ad287f788b --- /dev/null +++ b/keyboards/illuminati/is0/readme.md @@ -0,0 +1,15 @@ +# iS0 + +![is0](https://i.imgur.com/ObiNJ2O.jpg) + +Single-key macropad + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +Hardware Supported: iS0 by Illuminati Works +Hardware Availability: [Illuminati Works website](https://illuminati.works/is0/) + +Make example for this keyboard (after setting up your build environment): + + make illuminati/is0: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). diff --git a/keyboards/illuminati/is0/rules.mk b/keyboards/illuminati/is0/rules.mk new file mode 100644 index 0000000000..7baa8f4c3a --- /dev/null +++ b/keyboards/illuminati/is0/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index 1f02e05c84..6fb43dc752 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -53,6 +53,8 @@ ARMV = 7 # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 +BOOTLOADER = dfu + # Build Options # comment out to disable the options. # diff --git a/keyboards/ivy/config.h b/keyboards/ivy/config.h new file mode 100644 index 0000000000..1e6f5bc96e --- /dev/null +++ b/keyboards/ivy/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1337 +#define PRODUCT_ID 0x6012 +#define MANUFACTURER Maple Computing +#define PRODUCT Ivy +#define DESCRIPTION A 3 key macro pad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define BACKLIGHT_PIN D2 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/ivy/ivy.c b/keyboards/ivy/ivy.c new file mode 100644 index 0000000000..007ef67253 --- /dev/null +++ b/keyboards/ivy/ivy.c @@ -0,0 +1 @@ +#include "ivy.h" diff --git a/keyboards/ivy/ivy.h b/keyboards/ivy/ivy.h new file mode 100644 index 0000000000..2cba5f4956 --- /dev/null +++ b/keyboards/ivy/ivy.h @@ -0,0 +1,7 @@ +#pragma once + +#ifdef KEYBOARD_ivy_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" diff --git a/keyboards/ivy/keymaps/default/keymap.c b/keyboards/ivy/keymaps/default/keymap.c new file mode 100644 index 0000000000..c250fbdf8a --- /dev/null +++ b/keyboards/ivy/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum pad_layers { + _L1, + _FUNC +}; + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Layer 1 + * ,------. + * | 1 | + * |------| + * | 2 | + * |------| + * | FN | + * `------' + */ +[_L1] = LAYOUT( \ + KC_1, \ + KC_2, \ + MO(_FUNC) \ +), + +[_FUNC] = LAYOUT( \ + CALTDEL, \ + TSKMGR, \ + _______ \ +) + +}; + +void matrix_init_user(void) { + +} diff --git a/keyboards/ivy/readme.md b/keyboards/ivy/readme.md new file mode 100644 index 0000000000..f70630b52b --- /dev/null +++ b/keyboards/ivy/readme.md @@ -0,0 +1,15 @@ +IVY +=== + +![Ivy](https://i.imgur.com/fnVQet6.jpg) + +Make example for this keyboard (after setting up your build environment): + + make ivy/rev1:default + +Install examples: + + make ivy/rev1:default:dfu + +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). diff --git a/keyboards/ivy/rev1/config.h b/keyboards/ivy/rev1/config.h new file mode 100644 index 0000000000..9b88b89e5e --- /dev/null +++ b/keyboards/ivy/rev1/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#define DEVICE_VER 0x0001 + +/* Let's Macro V2 pin-out */ +#define MATRIX_ROW_PINS { F1, B2, D3 } +#define MATRIX_COL_PINS { F5, B3, D5 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ivy/rev1/rev1.c b/keyboards/ivy/rev1/rev1.c new file mode 100644 index 0000000000..c099e32c49 --- /dev/null +++ b/keyboards/ivy/rev1/rev1.c @@ -0,0 +1,5 @@ +#include "ivy.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/ivy/rev1/rev1.h b/keyboards/ivy/rev1/rev1.h new file mode 100644 index 0000000000..ac338368ed --- /dev/null +++ b/keyboards/ivy/rev1/rev1.h @@ -0,0 +1,14 @@ +#pragma once + +#include "ivy.h" + +#define LAYOUT( \ + K00, \ + K01, \ + K02 \ + ) \ + { \ + { K00, KC_NO, KC_NO }, \ + { KC_NO, K01, KC_NO }, \ + { KC_NO, KC_NO, K02 }, \ + } diff --git a/keyboards/christmas_tree/keymaps/default/rules.mk b/keyboards/ivy/rev1/rules.mk similarity index 100% rename from keyboards/christmas_tree/keymaps/default/rules.mk rename to keyboards/ivy/rev1/rules.mk diff --git a/keyboards/ivy/rules.mk b/keyboards/ivy/rules.mk new file mode 100644 index 0000000000..ae94bd3fb8 --- /dev/null +++ b/keyboards/ivy/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +DEFAULT_FOLDER = ivy/rev1 diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index a5ec23ae4d..444ebad077 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x1234 #define PRODUCT_ID 0x5679 +#define DEVICE_VER 0x0200 #define MANUFACTURER winkeyless.kr #define PRODUCT JC65 PS2AVRGB @@ -28,7 +29,6 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 16 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/jc65/v32a/i2c.c b/keyboards/jc65/v32a/i2c.c deleted file mode 100644 index a4f9521352..0000000000 --- a/keyboards/jc65/v32a/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/jc65/v32a/keymaps/rys/keymap.c b/keyboards/jc65/v32a/keymaps/rys/keymap.c new file mode 100644 index 0000000000..f946c8eebf --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/rys/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + 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_NUBS, KC_DEL, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, + KC_NUHS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_PGDN, + KC_LSFT, XXXXXXX, 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(_FUNC), + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FUNC] = LAYOUT( + RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, RESET, + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD + ) +}; diff --git a/keyboards/jc65/v32a/keymaps/rys/rules.mk b/keyboards/jc65/v32a/keymaps/rys/rules.mk new file mode 100644 index 0000000000..d7463419b4 --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/rys/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes diff --git a/keyboards/jc65/v32a/rules.mk b/keyboards/jc65/v32a/rules.mk index fac85172ec..18e7f1de9d 100644 --- a/keyboards/jc65/v32a/rules.mk +++ b/keyboards/jc65/v32a/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,13 +19,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c diff --git a/keyboards/jc65/v32a/usbconfig.h b/keyboards/jc65/v32a/usbconfig.h index d2d848fcdc..85a915bb46 100644 --- a/keyboards/jc65/v32a/usbconfig.h +++ b/keyboards/jc65/v32a/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index 8176ade0a1..9b1e07274c 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c @@ -16,56 +16,36 @@ along with this program. If not, see . */ #include "v32a.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} -#endif __attribute__ ((weak)) -void matrix_scan_user(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif -} +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } #endif diff --git a/keyboards/jc65/v32u4/rules.mk b/keyboards/jc65/v32u4/rules.mk index c2c02b6147..e1498325cc 100644 --- a/keyboards/jc65/v32u4/rules.mk +++ b/keyboards/jc65/v32u4/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/jd40/rules.mk b/keyboards/jd40/rules.mk index 2bce6d2a2d..439f885fea 100644 --- a/keyboards/jd40/rules.mk +++ b/keyboards/jd40/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -66,4 +27,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https: # MIDI_ENABLE = YES # MIDI controls # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable RGB Underglow \ No newline at end of file +RGBLIGHT_ENABLE = yes # Enable RGB Underglow diff --git a/keyboards/jd45/keymaps/justin/keymap.c b/keyboards/jd45/keymaps/justin/keymap.c index 4590374e9b..1c0e780724 100644 --- a/keyboards/jd45/keymaps/justin/keymap.c +++ b/keyboards/jd45/keymaps/justin/keymap.c @@ -1,11 +1,17 @@ #include QMK_KEYBOARD_H +#define KC_MO1 MO(1) +#define KC_MO2 MO(2) +#define KC_MO3 MO(3) + +#define KC_BLTG BL_TOGG + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_kc( ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC, FN8, A, R, S, T, D, H, N, E, I, O, ENT, LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6, - FN4, LGUI, FN7, FN2, FN1, SPC, FN5, RALT, FN3, FN0), + FN4, LGUI, FN7, MO2, MO1, SPC, FN5, RALT, MO3, FN0), [1] = LAYOUT_kc( TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT, @@ -15,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS, - TRNS, FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS), + TRNS, BLTG, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS), [3] = LAYOUT_kc( TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, @@ -25,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS, - TRNS, FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS), + TRNS, BLTG, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS), }; enum macro_id @@ -37,9 +43,6 @@ enum macro_id const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_MINS), - [1] = ACTION_LAYER_MOMENTARY(1), // FN1 - [2] = ACTION_LAYER_MOMENTARY(2), // FN2 - [3] = ACTION_LAYER_MOMENTARY(3), // FN3 [4] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_GRV), [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RGUI), [6] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_CAPS), @@ -48,12 +51,7 @@ const uint16_t PROGMEM fn_actions[] = { [10] = ACTION_MACRO(PSWD1), [11] = ACTION_MACRO(PSWD2), - [12] = ACTION_MACRO(PSWD3), - - [29] = ACTION_BACKLIGHT_TOGGLE(), - [30] = ACTION_BACKLIGHT_INCREASE(), - [31] = ACTION_BACKLIGHT_DECREASE() - + [12] = ACTION_MACRO(PSWD3) }; /* diff --git a/keyboards/jd45/keymaps/mjt/keymap.c b/keyboards/jd45/keymaps/mjt/keymap.c index 63563d6aaa..95f96066d3 100644 --- a/keyboards/jd45/keymaps/mjt/keymap.c +++ b/keyboards/jd45/keymaps/mjt/keymap.c @@ -4,6 +4,8 @@ */ #define KC_TT2 TT(2) +#define KC_BLST BL_STEP +#define KC_BLTG BL_TOGG const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_kc( @@ -15,9 +17,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC, TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS, TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS, - TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS), + TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, BLST, TRNS, TRNS), [2] = LAYOUT_kc( - TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4, + TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, BLST, BLTG, TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS, TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS, TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS) @@ -37,9 +39,8 @@ enum macro_id const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT), - [1] = ACTION_MACRO(M_LAYER1), - [3] = ACTION_BACKLIGHT_STEP(), - [4] = ACTION_BACKLIGHT_TOGGLE()}; + [1] = ACTION_MACRO(M_LAYER1) +}; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/jd45/rules.mk b/keyboards/jd45/rules.mk index fe8354e955..9ec5048aec 100644 --- a/keyboards/jd45/rules.mk +++ b/keyboards/jd45/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -64,4 +25,4 @@ COMMAND_ENABLE = yes # Commands for debug and configuration BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = YES # MIDI controls # UNICODE_ENABLE = YES # Unicode -BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file +BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index c068685a4a..2310ce87e2 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -18,6 +18,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 // TODO: share these strings with usbconfig.h // Edit usbconfig.h to change these. #define MANUFACTURER Kprepublic @@ -45,6 +46,7 @@ along with this program. If not, see . #define DEBOUNCE 5 #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ diff --git a/keyboards/jj40/jj40.c b/keyboards/jj40/jj40.c index 26cfa6c067..894ed49078 100644 --- a/keyboards/jj40/jj40.c +++ b/keyboards/jj40/jj40.c @@ -17,40 +17,3 @@ along with this program. If not, see . */ #include "jj40.h" - -#ifdef RGBLIGHT_ENABLE - -#include -#include "i2c_master.h" -#include "rgblight.h" - -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} - -#endif diff --git a/keyboards/jj40/keymaps/stevexyz/config.h b/keyboards/jj40/keymaps/stevexyz/config.h new file mode 100644 index 0000000000..4d4825f9b6 --- /dev/null +++ b/keyboards/jj40/keymaps/stevexyz/config.h @@ -0,0 +1,45 @@ + +// Behaviors That Can Be Configured + +#define TAPPING_TERM 250 + // how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too + +#define PERMISSIVE_HOLD + // makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM +#define IGNORE_MOD_TAP_INTERRUPT + // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. + +/* + #define TAPPING_TERM_PER_KEY + // enables handling for per key TAPPING_TERM settings + #define RETRO_TAPPING + // tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release + // See Retro Tapping for details + #define TAPPING_TOGGLE 2 + // how many taps before triggering the toggle + #define TAPPING_FORCE_HOLD + // makes it possible to use a dual role key as modifier shortly after having been tapped + // See Hold after tap + // Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) + #define LEADER_TIMEOUT 300 + // how long before the leader key times out + // If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. + #define LEADER_PER_KEY_TIMING + // sets the timer for leader key chords to run on each key press rather than overall + #define LEADER_KEY_STRICT_KEY_PROCESSING + // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. + #define ONESHOT_TIMEOUT 300 + // how long before oneshot times out + #define ONESHOT_TAP_TOGGLE 2 + // how many taps before oneshot toggle is triggered + #define QMK_KEYS_PER_SCAN 4 + // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. + #define COMBO_COUNT 2 + // Set this to the number of combos that you're using in the Combo feature. + #define COMBO_TERM 200 + // how long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. + #define TAP_CODE_DELAY 100 + // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. + #define TAP_HOLD_CAPS_DELAY 80 + // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPSLOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. +*/ diff --git a/keyboards/jj40/keymaps/stevexyz/keyboard-layout-editor-raw-data.txt b/keyboards/jj40/keymaps/stevexyz/keyboard-layout-editor-raw-data.txt new file mode 100644 index 0000000000..0117b5e2ee --- /dev/null +++ b/keyboards/jj40/keymaps/stevexyz/keyboard-layout-editor-raw-data.txt @@ -0,0 +1,4 @@ +[{c:"#eeddcc",g:true,a:7},"","","","","","","","","","","",""], +["",{c:"#cccccc",g:false,a:4,fa:[2,1,5,5,8]},"F11\nF1\n!\n1\nQ","F12\nF2\n@\n2\nW","Layer Num\nF3\n#\n3\nE","Layer Light\nF4\n$\n4\nR","\nF5\n%\n5\nT","\nF6\n^\n6\nY","\nF7\n&\n7\nU","\nF8\n*\n8\nI","Layer Mouse\nF9\n(\n9\nO","\nF10\n)\n0\nP",{c:"#eeddcc",g:true,a:7},""], +["",{c:"#cccccc",t:"#000000\n\n\n\n\n\n\n\n\n\n#804020",g:false,a:4,fa:[2,1,5,5,8,0,2,2,0,0,1]},"Caps\n\n\n\nA\n\nEsc\nTab\n\n\nshift",{fa:[2,2,5,5,8,0,2,2,0,0,1]},"\n\n~\n`\nS\n\n\n\n\n\nfn","\n\n_\n-\nD\n\n\n\n\n\nnum",{t:"#000000"},"\n\n+\n=\nF",{t:"#000000\n\n\n\n\n\n\n\n\n\n#804020"},"\n\n{\n[\nG\n\n\n\n\n\n","\n\n}\n]\nH\n\n\n\n\n\n",{t:"#000000"},"\n\n|\n\\\nJ",{t:"#000000\n\n\n\n\n\n\n\n\n\n#804020"},"\n\n:\n;\nK\n\n\n\n\n\nfn","\n\n\"\n'\nL\n\n\n\n\n\nnum",{c:"#eeddcc",f:1,fa:[2,2,5,5,8,0,2,2,0,0,0]},"Ins\n\n\n\n\n\nBS\nDel\n\n\nshift",{t:"#000000",g:true,a:7,f:3},""], +["","",{c:"#cccccc",t:"#000000\n#804020",g:false,a:5,fa:[0,1,0,0,8]},"\nctrl\n\n\nZ","\nalt\n\n\nX",{t:"#000000\n\n\n\n\n\n\n\n\n\n#804020",a:4,fa:[2,1,0,0,8,0,0,0,0,0,1]},"^\n\n\n\nC\n\n\n\n\n\nfn","^\n\n\n\nV\n\n\n\n\n\nnum",{fa:[2,1,5,5,8,0,0,0,0,0,1]},"Prnt Scrn\n\n<\n,\nB\n\n\n\n\n\nshift","Scr Lock\n\n>\n.\nN\n\n\n\n\n\nalt","Paus\n\n?\n/\nM\n\n\n\n\n\nctrl",{t:"#000000\n#804020",a:5},"\nshift",{c:"#eeddcc",t:"#000000",g:true,a:7},"",""] diff --git a/keyboards/jj40/keymaps/stevexyz/keymap.c b/keyboards/jj40/keymaps/stevexyz/keymap.c new file mode 100644 index 0000000000..4045d07109 --- /dev/null +++ b/keyboards/jj40/keymaps/stevexyz/keymap.c @@ -0,0 +1,292 @@ +/* Copyright 2019 Stefano Marago' + * + * 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 . + */ + + +/* + * This file is the QMK keymap to configure an ortholinear 40% keyboard + * (with 48 keys) into an ortholinear alpha-vderm 28 keys inspired layout + * "rules.mk" and "config.h" complete the configuration + */ + + +#include QMK_KEYBOARD_H + +enum layers { + LAYER_HOME, // home base layer + LAYER_FUNC, // function keys and cursors + LAYER_NUMSYM, // numbers and other characters + LAYER_SYST, // media and other system keys + LAYER_NUMONLY, // numeric keypad + LAYER_LIGHTS, // numeric keypad + LAYER_MOUSE, // mouse layer +}; + +enum custom_keycodes { + CK_TRIPLEZERO = SAFE_RANGE, +}; + +enum { + TD_ENT_BSPC = 0, + TD_KPENT_BSPC, + TD_E_GRAVE, + TD_A_GRAVE, + TD_O_GRAVE, + TD_U_GRAVE, + TD_I_GRAVE, + TD_E_ACUTE, +}; +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ENT_BSPC] = ACTION_TAP_DANCE_DOUBLE(KC_ENT, KC_BSPC), + [TD_KPENT_BSPC] = ACTION_TAP_DANCE_DOUBLE(KC_KP_ENTER, KC_BSPC), + [TD_E_GRAVE] = ACTION_TAP_DANCE_DOUBLE(KC_E, KC_E), +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * LEGEND: + * + * ,--------------------------------. + * | Top row: shifted character | + * | Central row: standard char | + * | Bottom row: hold modifier | + * `--------------------------------' + * + * "____" means free to be assigned + * + */ + + +/* Qwerty Home Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | Q | W | E | R | T | Y | U | I | O | P | | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | A | S | D | F | G | H | J | K | L | Enter| | + * | | Shift| FnNav|NumSym| ____ | OSkey| OSkey| ____ | FnNav|NumSym| Shift| | + * |------+------+------+------+------+------+------|------+------+------+------+------+ + * | | | | | | | | | | | | | + * | | | Z | X | C | V | B | N | M | Space| | | + * | | | Ctrl | Alt | FnNav|NumSym| Shift| Alt | Ctrl | Shift| | | + * `-----------------------------------------------------------------------------------' + */ + [LAYER_HOME] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, XXXXXXX, + XXXXXXX, MT(MOD_LSFT, KC_A), LT(LAYER_FUNC, KC_S), LT(LAYER_NUMSYM, KC_D), KC_F, MT(MOD_LGUI, KC_G), MT(MOD_RGUI, KC_H), KC_J, LT(LAYER_FUNC, KC_K), LT(LAYER_NUMSYM, KC_L), MT(MOD_RSFT, KC_ENT), XXXXXXX, + XXXXXXX, XXXXXXX, MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(LAYER_FUNC, KC_C), LT(LAYER_NUMSYM, KC_V), MT(MOD_LSFT, KC_B), MT(MOD_RALT, KC_N), MT(MOD_RCTL, KC_M), MT(MOD_RSFT, KC_SPC), XXXXXXX, XXXXXXX ), + +/* Function and Navigation Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | ESC | Home | PgDn | PgUp | End | Left | Down | Up | Right| Baksp| | + * | | Shift|xxxxxx|SysLay| ____ | ____ | ____ | ____ |xxxxxx|SysLay| Shift| | + * |------+------+------+------+------+------+------|------+------+------+------+------+ + * | | | | | | | | | | | | | + * | | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | | + * | | | Ctrl | Alt |xxxxxx|SysLay| Shift| Alt | Ctrl | Shift| | | + * `-----------------------------------------------------------------------------------' + */ + [LAYER_FUNC] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + XXXXXXX, MT(MOD_LSFT, KC_ESC), KC_HOME, LT(LAYER_SYST, KC_PGDN), KC_PGUP, KC_END, KC_LEFT, KC_DOWN, KC_UP, LT(LAYER_SYST, KC_RGHT), MT(MOD_RSFT, KC_BSPC), XXXXXXX, + XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, KC_TRNS, MO(LAYER_SYST), KC_LSFT, KC_RALT, KC_RCTL, MT(MOD_RSFT, KC_SPC), XXXXXXX, XXXXXXX ), + +/* Number and Symbols Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | ~ | _ | + | { | } | | | : | " | | | + * | | TAB | ` | - | = | [ | ] | \ | ; | ' | | | + * | | Shift|SysLay|xxxxxx| ____ | ____ | ____ | ____ |SysLay|xxxxxx| Shift| | + * |------+------+------+------+------+------+------|------+------+------+------+------+ + * | | | | | | | < | > | ? | | | | + * | | | ____ | ____ | ____ | ____ | , | . | / | ____ | | | + * | | | Ctrl | Alt |SysLay|xxxxxx| Shift| ____ | ____ | Shift| | | + * `-----------------------------------------------------------------------------------' + */ + [LAYER_NUMSYM] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, + XXXXXXX, MT(MOD_LSFT, KC_TAB), LT(LAYER_SYST, KC_GRV), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, LT(LAYER_SYST, KC_SCLN), KC_QUOT, MT(MOD_RSFT, KC_DEL), XXXXXXX, + XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, MO(LAYER_SYST), KC_TRNS, MT(MOD_LSFT, KC_COMM), KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_SPC), XXXXXXX, XXXXXXX ), + +/* System Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | F11 | F12 |NumLay|LghLay| ____ | ____ | ____ | ____ |MouLay|Backsp| | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | Caps | Mute | Vol- | Vol+ | Play | Next | ____ | ____ | ____ | Ins | | + * | | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift| | + * |------+------+------+------+------+------+------|------+------+------+------+------+ + * | | | | | | | | | | | | | + * | | | ____ | ____ | ____ | ____ |PrnScr|ScrLck|Pause | ____ | | | + * | | | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | Shift| | | + * `-----------------------------------------------------------------------------------' + */ + [LAYER_SYST] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F11, KC_F12, TG(LAYER_NUMONLY), TG(LAYER_LIGHTS), KC_NO, KC_NO, KC_NO, KC_NO, TG(LAYER_MOUSE), KC_BSPC, XXXXXXX, + XXXXXXX, MT(MOD_LSFT, KC_CAPS), KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, MT(MOD_RSFT, KC_INS), XXXXXXX, + XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, MT(MOD_RSFT, KC_SPC), XXXXXXX, XXXXXXX ), + +/* Numeric Keypad + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | |NumLck| ____ |NumLay| / | * | - | 7 | 8 | 9 |Backsp| | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | Tab | ( | ) | = | , | + | 4 | 5 | 6 | Enter| | + * | | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift| | + * |------+------+------+------+------+------+------|------+------+------+------+------+ + * | | | | | | | | | | | | | + * | | | ____ | ____ | 000 | . | 0 | 1 | 2 | 3 | | | + * | | | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | Shift| | | + * `-----------------------------------------------------------------------------------' + */ + [LAYER_NUMONLY] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_NLCK, KC_NO, TG(LAYER_NUMONLY), KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_P7, KC_P8, KC_P9, KC_BSPC, XXXXXXX, + XXXXXXX, MT(MOD_LSFT, KC_TAB), KC_LPRN, KC_RPRN, KC_EQUAL, KC_KP_COMMA, KC_KP_PLUS, KC_P4, KC_P5, KC_P6, MT(MOD_LSFT, KC_KP_ENTER), XXXXXXX, + XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, CK_TRIPLEZERO, KC_KP_DOT, KC_P0, KC_P1, KC_P2, MT(MOD_LSFT, KC_P3), XXXXXXX, XXXXXXX ), + +/* Backlight adjustment Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | ____ | ____ | ____ |LghLay| ____ | Hue+ | Sat+ | Val+ | ____ | Plain| | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | ____ | ____ |ModeFw|ModeBw| ____ | Hue- | Sat- | Val- | ____ |Toggle| | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+------+------|------+------+------+------+------+ + * | | | | | | | | | | | | | + * | | |Breath|Rainbw| Swirl| Snake|Knight| XMas |Gradnt| Test | | | + * | | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | | + * `-----------------------------------------------------------------------------------' + */ + [LAYER_LIGHTS] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_NO, KC_NO, KC_NO, TG(LAYER_LIGHTS), KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, RGB_M_P, XXXXXXX, + XXXXXXX, KC_NO, KC_NO, RGB_MOD, RGB_RMOD, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, RGB_TOG, XXXXXXX, + XXXXXXX, XXXXXXX, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_XMAS, RGB_MODE_GRADIENT, RGB_MODE_RGBTEST, XXXXXXX, XXXXXXX ), + +/* Mouse emulation Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | Btn1 | Up | Btn2 | Whl+ | Accl0| Accl1| Accl2| ____ |MouLay| ____ | | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | Left | Down | Right| Whl- | ____ | ____ | ____ | ____ | ____ | Enter| | + * | | ____ | ____ | ____ | ____ | OSkey| OSkey| ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+------+------|------+------+------+------+------+ + * | | | | | | | | | | | | | + * | | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Space| | | + * | | | Ctrl | Alt | ____ | ____ | Shift| Alt | Ctrl | Shift| | | + * `-----------------------------------------------------------------------------------' + */ + [LAYER_MOUSE] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_MS_WH_UP, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, KC_NO, TG(LAYER_MOUSE), KC_NO, XXXXXXX, + XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, KC_LGUI, KC_RGUI, KC_NO, KC_NO, KC_NO, KC_ENT, XXXXXXX, + XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_LSFT, KC_RALT, KC_RCTL, MT(MOD_RSFT, KC_SPC), XXXXXXX, XXXXXXX ), + +}; + + +void matrix_init_user(void) { + // set num lock on at start independently of state (for numonly layer to work) + if (!(host_keyboard_leds() & (1<event.pressed) { + SEND_STRING("000"); + } // else { when released... } + break; + } + return true; +}; + + +/* Empty keyboard template + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | + * |------+------+------+------+------+------+------|------+------+------+------+------+ + * | | | | | | | | | | | | | + * | | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | | + * | | | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | | | + * `-----------------------------------------------------------------------------------' + */ diff --git a/keyboards/jj40/keymaps/stevexyz/readme.md b/keyboards/jj40/keymaps/stevexyz/readme.md new file mode 100644 index 0000000000..d404bcc0bd --- /dev/null +++ b/keyboards/jj40/keymaps/stevexyz/readme.md @@ -0,0 +1,20 @@ +# jj28 (aka jj40 super micro edition :)) + +With this configuration a 4x12 jj40 (with 48 keys) is transformed into an ortholinear PyroL-vderm 28 keys inspired layout one. This keyboard can be actually called jj28! + +![Bare layout](https://i.ibb.co/7GK1LY7/layout-0.jpg) + +![Fully described](https://i.ibb.co/kxTfTXH/layout-4.jpg) + +Why you should want to do something like this? +There are many valid reasons. +The main one to me might just be to be able to test such an "extreme" configuration for real if you have this easily available board on hand. +But also because this setup might be even more confortable than the original 2u space one (for muscle memory having bnm letters nearer to zxcv). +Or just more nice looking. +Surely you have an additional option, and personally, after using it as a daily driver, I liked it, even if I was a bit slower in processing complicated sequences! :) + +Notes on layout: +After few tests I found out that the space at the end is the best for people that are very used to “standard” keyboards (basically almost everybody), retaining years of muscle memory. +Moreover, also shift, fn and numsym layer keys are good to be replicated on central line (and also keeping in the order will allow a single finger shift+fn on the left and also shift+num on the right). + +[Keyboard layout editor](http://www.keyboard-layout-editor.com/#/) raw data in keyboard-layout-editor-raw-data.txt file. diff --git a/keyboards/jj40/keymaps/stevexyz/rules.mk b/keyboards/jj40/keymaps/stevexyz/rules.mk new file mode 100644 index 0000000000..612e5d7750 --- /dev/null +++ b/keyboards/jj40/keymaps/stevexyz/rules.mk @@ -0,0 +1,22 @@ +# Build Options (yes/no) +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover (see: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_CUSTOM_DRIVER = yes +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +TAP_DANCE_ENABLE = yes + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/jj40/keymaps/waples/README.md b/keyboards/jj40/keymaps/waples/README.md deleted file mode 100644 index 3394971b96..0000000000 --- a/keyboards/jj40/keymaps/waples/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Waples jj40 keymap -> based heavily on my lets split -[Waples](https://www.github.com/Waples) - -### Layers -I currently have the following layers in my keymap: -* Qwerty (as default) -* Dvorak (still learning this type of layout, so not really used much) -* Gaming (WIP! I tried some I found, but didn't like them, so I'm in the progress of making my own) -* Lefty (lower) -* Righty (raise) -* Dual (adjust) - -#### QWERTY - | Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp | - |C_Esc| A | S | D | F | G | H | J | K | L | ; |S_Ent| - | Sft | Z | X | C | V | B | N | M | , | . | / | " | - |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | Spc | ^R^ | Lft | Dwn | Up! | Rgt | - - -#### DVORAK - | Tab | " | , | . | P | Y | F | G | C | R | L | Bsp | - |C_Esc| A | O | E | U | I | D | H | T | N | S |S_Ent| - | Sft | ; | Q | J | K | X | B | M | W | V | Z | / | - |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | Spc | ^R^ | Lft | Dwn | Up! | Rgt | - - -#### GAMING - | Tab | Q | W | E | R | T | | | | | |QWERT| - | Esc | A | S | D | F | G | | | | | | | - | Sft | Z | X | C | V | B | | | | | | | - | Ctl | 1 | 2 | 3 | ^L^ | Spc | Bsp | ^R^ | Lft | Dwn | Up | Rgt | - - -#### LEFTY (lower) - | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bsp | - | Del | | | | | | | ( | ) | [ | ] | | - | | | | | | | | | | | | | - | | | | | | | Ins | | Hme | PgD | PgU | End | - - -#### RIGHTY (raise) - | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bsp | - | Del | F1 | F2 | F3 | F4 | | = | - | \ | / | | | - | | F5 | F6 | F7 | F8 | | | | | | | | - | | F9 | F10 | F11 | | | | | | | | | - - -#### DUAL - |Reset| | | | |QWERT| GAME| | | | |Reset| - | | Prv | Stp | Tog | Nxt | Nrm | Swp | | | | | | - | | | Mte | Vol-| Vol+| | NKRO| | | | | | - | | | | | | |DVORK| | | | | | - - diff --git a/keyboards/jj40/keymaps/waples/keymap.c b/keyboards/jj40/keymaps/waples/keymap.c index 79acada28c..1c8d58f792 100644 --- a/keyboards/jj40/keymaps/waples/keymap.c +++ b/keyboards/jj40/keymaps/waples/keymap.c @@ -4,15 +4,13 @@ extern keymap_config_t keymap_config; #define _QWERTY 0 #define _DVORAK 1 -#define _GAME 2 -#define _LEFTY 3 -#define _RIGHTY 4 -#define _DUAL 5 +#define _LEFTY 2 +#define _RIGHTY 3 +#define _DUAL 4 enum jj40_keycodes { QWERTY = SAFE_RANGE, DVORAK, - GAME, LEFTY, RIGHTY, DUAL, @@ -28,21 +26,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SHFTENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ - KC_PSCR, KC_BSPC, KC_LALT, _______, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_PSCR, KC_BSPC, KC_CAPS, KC_LALT, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), [_DVORAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, SHFTENT, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, \ - KC_PSCR, KC_LGUI, KC_LALT, KC_CAPS, LEFTY, KC_BSPC, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -[_GAME] = LAYOUT_ortho_4x12( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, _______, _______, QWERTY, \ - CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, _______, _______, \ - KC_LCTL, KC_1, KC_2, KC_3, LEFTY, KC_SPC, KC_BSPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + KC_PSCR, KC_BSPC, KC_CAPS, KC_LALT, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), [_LEFTY] = LAYOUT_ortho_4x12( \ @@ -59,11 +50,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______ \ ), -[_DUAL] = LAYOUT_ortho_4x12( \ - RESET, _______, _______, _______, _______, QWERTY, GAME, _______, _______, _______, BL_BRTG, RESET, \ - _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, _______, BL_TOGG, _______, \ - _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, DVORAK, _______, _______, _______, _______, _______ \ +[_DUAL] = LAYOUT_ortho_4x12( \ + RESET, _______, _______, _______, _______, QWERTY, DVORAK, _______, _______, RGB_HUD, RGB_TOG, RESET, \ + _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, RGB_HUI, RGB_MOD, _______, \ + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, RGB_SAD, RGB_VAD, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_VAI, _______ \ ) }; @@ -86,12 +77,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case GAME: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_GAME); - } - return false; - break; case LEFTY: if (record->event.pressed) { layer_on(_LEFTY); diff --git a/keyboards/jj40/keymaps/waples/readme.md b/keyboards/jj40/keymaps/waples/readme.md new file mode 100644 index 0000000000..91b1094e57 --- /dev/null +++ b/keyboards/jj40/keymaps/waples/readme.md @@ -0,0 +1,49 @@ +# Waples jj40 keymap +> based heavily on my lets split +[Waples](https://www.github.com/Waples) + +### Layers +I currently have the following layers in my keymap: +* Qwerty (as default) +* Dvorak (still learning this type of layout, so not really used much) +* Lefty (lower) +* Righty (raise) +* Dual (adjust) + +### Note to self: +YOU NEED TO USE [bootloadHID -r jj40_waples.hex](https://github.com/qmk/qmk_firmware/tree/master/keyboards/jj40) + +## the stuff below is out of date and I think about removing them from this readme + +#### QWERTY + | Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp | + |C_Esc| A | S | D | F | G | H | J | K | L | ; |S_Ent| + | Sft | Z | X | C | V | B | N | M | , | . | / | " | + |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | Spc | ^R^ | Lft | Dwn | Up! | Rgt | + + +#### DVORAK + | Tab | " | , | . | P | Y | F | G | C | R | L | Bsp | + |C_Esc| A | O | E | U | I | D | H | T | N | S |S_Ent| + | Sft | ; | Q | J | K | X | B | M | W | V | Z | / | + |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | Spc | ^R^ | Lft | Dwn | Up! | Rgt | + +#### LEFTY (lower) + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bsp | + | Del | | | | | | | ( | ) | [ | ] | | + | | | | | | | | | | | | | + | | | | | | | Ins | | Hme | PgD | PgU | End | + + +#### RIGHTY (raise) + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bsp | + | Del | F1 | F2 | F3 | F4 | | = | - | \ | / | | | + | | F5 | F6 | F7 | F8 | | | | | | | | + | | F9 | F10 | F11 | | | | | | | | | + + +#### DUAL + |Reset| | | | |QWERT| GAME| | | | |Reset| + | | Prv | Stp | Tog | Nxt | Nrm | Swp | | | | | | + | | | Mte | Vol-| Vol+| | NKRO| | | | | | + | | | | | | |DVORK| | | | | | diff --git a/keyboards/jj40/keymaps/waples/rules.mk b/keyboards/jj40/keymaps/waples/rules.mk index 18c5638d00..69b7c18d4e 100644 --- a/keyboards/jj40/keymaps/waples/rules.mk +++ b/keyboards/jj40/keymaps/waples/rules.mk @@ -5,7 +5,6 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes -BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes RGBLIGHT_CUSTOM_DRIVER = yes KEY_LOCK_ENABLE = yes diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index 3e496f97e9..8e0e8c8647 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -15,19 +15,15 @@ # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # Build Options @@ -44,7 +40,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -52,9 +48,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -SRC += i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/jj40/usbconfig.h b/keyboards/jj40/usbconfig.h index ad97e7f0a3..4599c03dc9 100644 --- a/keyboards/jj40/usbconfig.h +++ b/keyboards/jj40/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -239,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index 80fa07d3bb..8918e60dad 100644 --- a/keyboards/jj4x4/config.h +++ b/keyboards/jj4x4/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 // TODO: share these strings with usbconfig.h // Edit usbconfig.h to change these. #define MANUFACTURER Kprepublic @@ -48,6 +49,7 @@ along with this program. If not, see . #define DEBOUNCE 5 #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ diff --git a/keyboards/jj4x4/jj4x4.c b/keyboards/jj4x4/jj4x4.c index 265508b2d5..6330c89de5 100644 --- a/keyboards/jj4x4/jj4x4.c +++ b/keyboards/jj4x4/jj4x4.c @@ -17,40 +17,3 @@ along with this program. If not, see . */ #include "jj4x4.h" - -#ifdef RGBLIGHT_ENABLE - -#include -#include "i2c_master.h" -#include "rgblight.h" - -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} - -#endif diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk index 3ac2cc0432..aa74cc7c92 100644 --- a/keyboards/jj4x4/rules.mk +++ b/keyboards/jj4x4/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # Build Options @@ -44,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -52,9 +33,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -SRC += i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - LAYOUTS = ortho_4x4 diff --git a/keyboards/jj4x4/usbconfig.h b/keyboards/jj4x4/usbconfig.h index a7653bde86..96bf2eda8f 100644 --- a/keyboards/jj4x4/usbconfig.h +++ b/keyboards/jj4x4/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -239,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h index 0f09f02ff8..dfd8a4a8fb 100644 --- a/keyboards/jj50/config.h +++ b/keyboards/jj50/config.h @@ -24,6 +24,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 // TODO: share these strings with usbconfig.h // Edit usbconfig.h to change these. #define MANUFACTURER kprepublic @@ -46,6 +47,5 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 18 #define NO_UART 1 -#define BOOTLOADHID_BOOTLOADER 1 #endif diff --git a/keyboards/jj50/i2c.c b/keyboards/jj50/i2c.c deleted file mode 100644 index c27f3e3d17..0000000000 --- a/keyboards/jj50/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/jj50/jj50.c b/keyboards/jj50/jj50.c index d4a70f68d0..7c3cee95d1 100644 --- a/keyboards/jj50/jj50.c +++ b/keyboards/jj50/jj50.c @@ -17,24 +17,20 @@ along with this program. If not, see . #include "jj50.h" -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - #include "backlight.h" #include "backlight_custom.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__ ((weak)) +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` void backlight_init_ports(void) { b_led_init_ports(); } @@ -47,48 +43,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i -# Modified 2018 Wayne Jones (WarmCatUK) - -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -39,25 +19,18 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work - -DISABLE_WS2812 = no - KEY_LOCK_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - #OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c backlight.c LAYOUTS = ortho_5x12 diff --git a/keyboards/jj50/usbconfig.h b/keyboards/jj50/usbconfig.h index 59f29d04dd..b05fc975e7 100644 --- a/keyboards/jj50/usbconfig.h +++ b/keyboards/jj50/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'K', 'P', 'R', 'e', 'p', 'u', 'b', 'l', 'i', 'c' diff --git a/keyboards/jnao/config.h b/keyboards/jnao/config.h new file mode 100644 index 0000000000..f14aa4bb14 --- /dev/null +++ b/keyboards/jnao/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1337 +#define PRODUCT_ID 0x6017 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maple Computing +#define PRODUCT JNAO Keyboard +#define DESCRIPTION A no-frills ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { E6, F0, F5, F6, F7 } +#define MATRIX_COL_PINS { F1, F4, B1, B2, B3, B7, D1, D2, D4, D6, D7, B4 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN D0 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/jnao/info.json b/keyboards/jnao/info.json new file mode 100644 index 0000000000..177ae41571 --- /dev/null +++ b/keyboards/jnao/info.json @@ -0,0 +1,125 @@ +{ + "keyboard_name": "JNAO", + "url": "", + "maintainer": "That-Canadian", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"Backspace", "x":11, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":6, "y":1}, + {"label":"U", "x":7, "y":1}, + {"label":"I", "x":8, "y":1}, + {"label":"O", "x":9, "y":1}, + {"label":"P", "x":10, "y":1}, + {"label":"Delete", "x":11, "y":1}, + {"label":"Esc", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":"H", "x":6, "y":2}, + {"label":"J", "x":7, "y":2}, + {"label":"K", "x":8, "y":2}, + {"label":"L", "x":9, "y":2}, + {"label":";", "x":10, "y":2}, + {"label":"'", "x":11, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"B", "x":5, "y":3}, + {"label":"N", "x":6, "y":3}, + {"label":"M", "x":7, "y":3}, + {"label":",", "x":8, "y":3}, + {"label":".", "x":9, "y":3}, + {"label":"/", "x":10, "y":3}, + {"label":"Enter", "x":11, "y":3}, + {"label":"Fn", "x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4}, + {"label":"Alt", "x":2, "y":4}, + {"label":"Meta", "x":3, "y":4}, + {"label":"Lower", "x":4, "y":4}, + {"label":"Space", "x":5, "y":4}, + {"label":"Space", "x":6, "y":4}, + {"label":"Raise", "x":7, "y":4}, + {"label":"Left", "x":8, "y":4}, + {"label":"Down", "x":9, "y":4}, + {"label":"Up", "x":10, "y":4}, + {"label":"Right", "x":11, "y":4} + ] + }, + "LAYOUT_ortho_4x12": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"Delete", "x":11, "y":0}, + {"label":"Esc", "x":0, "y":1}, + {"label":"A", "x":1, "y":1}, + {"label":"S", "x":2, "y":1}, + {"label":"D", "x":3, "y":1}, + {"label":"F", "x":4, "y":1}, + {"label":"G", "x":5, "y":1}, + {"label":"H", "x":6, "y":1}, + {"label":"J", "x":7, "y":1}, + {"label":"K", "x":8, "y":1}, + {"label":"L", "x":9, "y":1}, + {"label":";", "x":10, "y":1}, + {"label":"'", "x":11, "y":1}, + {"label":"Shift", "x":0, "y":2}, + {"label":"Z", "x":1, "y":2}, + {"label":"X", "x":2, "y":2}, + {"label":"C", "x":3, "y":2}, + {"label":"V", "x":4, "y":2}, + {"label":"B", "x":5, "y":2}, + {"label":"N", "x":6, "y":2}, + {"label":"M", "x":7, "y":2}, + {"label":",", "x":8, "y":2}, + {"label":".", "x":9, "y":2}, + {"label":"/", "x":10, "y":2}, + {"label":"Enter", "x":11, "y":2}, + {"label":"Fn", "x":0, "y":3}, + {"label":"Ctrl", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"label":"Meta", "x":3, "y":3}, + {"label":"Lower", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3}, + {"label":"Space", "x":6, "y":3}, + {"label":"Raise", "x":7, "y":3}, + {"label":"Left", "x":8, "y":3}, + {"label":"Down", "x":9, "y":3}, + {"label":"Up", "x":10, "y":3}, + {"label":"Right", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/jnao/jnao.c b/keyboards/jnao/jnao.c new file mode 100644 index 0000000000..8a49c747a1 --- /dev/null +++ b/keyboards/jnao/jnao.c @@ -0,0 +1 @@ +#include "jnao.h" diff --git a/keyboards/jnao/jnao.h b/keyboards/jnao/jnao.h new file mode 100644 index 0000000000..357a025f91 --- /dev/null +++ b/keyboards/jnao/jnao.h @@ -0,0 +1,32 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x12( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412 \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312 }, \ + { k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412 } \ +} + +#define LAYOUT_ortho_4x12( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312 \ +) \ +{ \ + {k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012}, \ + {k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112}, \ + {k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212}, \ + {k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312}, \ + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} \ +} diff --git a/keyboards/jnao/keymaps/default/keymap.c b/keyboards/jnao/keymaps/default/keymap.c new file mode 100644 index 0000000000..04f410057e --- /dev/null +++ b/keyboards/jnao/keymaps/default/keymap.c @@ -0,0 +1,155 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION, + _ADJUST, +}; + +enum jnao_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, +}; + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Func | A | S | D | F | G | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ` | GUI | ALT |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSPC, \ + MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( \ + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, \ + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( \ + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, \ + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 |ALTF4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Taskmg| | | | | | | | | | |caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | |RESET | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( \ + KC_ESC, KC_F1, KC_F2, KC_F3, LALT(KC_F4), KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \ +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCTION] = LAYOUT_ortho_5x12( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/jnao/keymaps/default_4x12/keymap.c b/keyboards/jnao/keymaps/default_4x12/keymap.c new file mode 100644 index 0000000000..8861a36b23 --- /dev/null +++ b/keyboards/jnao/keymaps/default_4x12/keymap.c @@ -0,0 +1,150 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION, + _ADJUST, +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Func | A | S | D | F | G | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Taskmg| | | | | | | | | | |caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | RESET| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCTION] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/jnao/readme.md b/keyboards/jnao/readme.md new file mode 100644 index 0000000000..08cf10acaa --- /dev/null +++ b/keyboards/jnao/readme.md @@ -0,0 +1,14 @@ +JNAO +==== + +An no-frills 5x12 or 4x12 ortholinear keyboard + +Keyboard Maintainer: [That-Canadian](https://github.com/that-canadian) +Hardware Supported: JNAO PCB +Hardware Availability: [SpaceCat](https://spacecat.design) and [Keebio](https://keeb.io/) + +Make example for this keyboard (after setting up your build environment): + + make jnao: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). diff --git a/keyboards/jnao/rules.mk b/keyboards/jnao/rules.mk new file mode 100644 index 0000000000..913ba4d1ee --- /dev/null +++ b/keyboards/jnao/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_5x12 ortho_4x12 +LAYOUTS_HAS_RGB = no diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index 7762f18682..43579fcc71 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -59,6 +59,8 @@ OPT_DEFS = DFU_ARGS = -d 1c11:b007 DFU_SUFFIX_ARGS = -p b007 -v 1c11 +BOOTLOADER = dfu + # Build Options # comment out to disable the options. # diff --git a/keyboards/kagamidget/config.h b/keyboards/kagamidget/config.h index 00e09530e1..7fe67ffd33 100644 --- a/keyboards/kagamidget/config.h +++ b/keyboards/kagamidget/config.h @@ -107,11 +107,6 @@ along with this program. If not, see . * */ -/* key combination for magic key command */ -/*#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -)*/ - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kagamidget/rules.mk b/keyboards/kagamidget/rules.mk index 50608d9857..93c64e7357 100644 --- a/keyboards/kagamidget/rules.mk +++ b/keyboards/kagamidget/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -80,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/katana60/keymaps/default/keymap.c b/keyboards/katana60/keymaps/default/keymap.c index 04ea6fbc6e..989c7c16b3 100644 --- a/keyboards/katana60/keymaps/default/keymap.c +++ b/keyboards/katana60/keymaps/default/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( /* Base */ - KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, @@ -64,22 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/katana60/rules.mk b/keyboards/katana60/rules.mk index ca2a2a5f80..ef5ef06851 100644 --- a/keyboards/katana60/rules.mk +++ b/keyboards/katana60/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index d722dc2615..3fcda998c2 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -47,11 +47,10 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - #define BACKLIGHT_PIN B6 -// #define BACKLIGHT_BREATHING +#ifdef BACKLIGHT_PIN #define BACKLIGHT_LEVELS 3 - +#endif #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS @@ -59,6 +58,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/kbdfans/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk index b7a08f241c..eb9b5fe7b2 100644 --- a/keyboards/kbdfans/kbd19x/rules.mk +++ b/keyboards/kbdfans/kbd19x/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -69,7 +22,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) diff --git a/keyboards/kbdfans/kbd4x/config.h b/keyboards/kbdfans/kbd4x/config.h index 07bc4b9901..6928ea8ff9 100644 --- a/keyboards/kbdfans/kbd4x/config.h +++ b/keyboards/kbdfans/kbd4x/config.h @@ -47,11 +47,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - #define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - +#endif #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS @@ -59,6 +59,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/kbdfans/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk index 639546d6c2..eccc6ebbed 100644 --- a/keyboards/kbdfans/kbd4x/rules.mk +++ b/keyboards/kbdfans/kbd4x/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -70,7 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) diff --git a/keyboards/kbdfans/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h index a2666a6197..5d6cab4586 100644 --- a/keyboards/kbdfans/kbd66/config.h +++ b/keyboards/kbdfans/kbd66/config.h @@ -47,12 +47,12 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - #define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_LEVELS 3 #define BACKLIGHT_BREATHING #define BREATHING_PERIOD 6 - +#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/kbdfans/kbd66/keymaps/ansi/keymap.c b/keyboards/kbdfans/kbd66/keymaps/ansi/keymap.c index d73e5aec8a..984d68971d 100644 --- a/keyboards/kbdfans/kbd66/keymaps/ansi/keymap.c +++ b/keyboards/kbdfans/kbd66/keymaps/ansi/keymap.c @@ -66,22 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/kbdfans/kbd66/keymaps/default/keymap.c b/keyboards/kbdfans/kbd66/keymaps/default/keymap.c index a969d65101..60ef36390a 100644 --- a/keyboards/kbdfans/kbd66/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd66/keymaps/default/keymap.c @@ -66,22 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/kbdfans/kbd66/keymaps/iso/keymap.c b/keyboards/kbdfans/kbd66/keymaps/iso/keymap.c index 5ee64e3522..b330abaf9c 100644 --- a/keyboards/kbdfans/kbd66/keymaps/iso/keymap.c +++ b/keyboards/kbdfans/kbd66/keymaps/iso/keymap.c @@ -66,22 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/kbdfans/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk index 764bdf424f..4a96ef03fe 100644 --- a/keyboards/kbdfans/kbd66/rules.mk +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -59,7 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode diff --git a/keyboards/kbdfans/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h index fca9916ed9..589d76da36 100644 --- a/keyboards/kbdfans/kbd67/hotswap/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/config.h @@ -54,9 +54,10 @@ along with this program. If not, see . #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 #define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - +#endif #define RGB_DI_PIN B4 #ifdef RGB_DI_PIN #define RGBLED_NUM 8 @@ -67,6 +68,7 @@ along with this program. If not, see . // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ // /*== all animations enable ==*/ #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP // /*== or choose animations ==*/ // #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/kbdfans/kbd67/hotswap/hotswap.h b/keyboards/kbdfans/kbd67/hotswap/hotswap.h index 57220050b6..45cf537cbe 100644 --- a/keyboards/kbdfans/kbd67/hotswap/hotswap.h +++ b/keyboards/kbdfans/kbd67/hotswap/hotswap.h @@ -40,4 +40,3 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, K3E}, \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, K4D, K4E}, \ } - diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c index 6cb6afaea6..71aed2b37b 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c @@ -5,25 +5,24 @@ enum layer { LAYER_FUNCTION, }; -/* Switch to function layer when held. */ -#define LY_FUNC MO(LAYER_FUNCTION) +#define LY_FUNC LT(LAYER_FUNCTION, KC_APP) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988 */ [LAYER_DEFAULT] = LAYOUT( 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_BSLS, KC_GRV, KC_HOME, - 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_BSPC, KC_PGUP, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT + 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_BSPC, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ [LAYER_FUNCTION] = LAYOUT( _______, 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_INS, KC_DEL, _______, - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, - KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, KC_APP, _______, _______, _______, _______ + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md index d1779152f8..a0c2d97dfe 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md @@ -1,13 +1,17 @@ -# bcat's Quefrency 65% layout +# bcat's KBD67 hotswap layout This is pretty much a stock 65% split keyboard layout, with an HHKB-style -(split) backspace and media keys in the function layer centered around the WASD +(split) backspace and media keys in the function layer centered around the ESDF cluster. ## Default layer -![Default layer layout](https://i.imgur.com/stwELz3.png) +![Default layer layout](https://i.imgur.com/QNJ0HhY.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988)) ## Function layer -![Function layer layout](https://i.imgur.com/urDnuTC.png) +![Function layer layout](https://i.imgur.com/E7Pf1gS.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44)) diff --git a/keyboards/kbdfans/kbd67/hotswap/rules.mk b/keyboards/kbdfans/kbd67/hotswap/rules.mk index f8667d280f..74a62a22bb 100644 --- a/keyboards/kbdfans/kbd67/hotswap/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -69,7 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/config.h b/keyboards/kbdfans/kbd67/mkii_soldered/config.h new file mode 100644 index 0000000000..df0607b249 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2019 Ryota Goto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0013 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDfans +#define PRODUCT KBD67-MKII +#define DESCRIPTION 65% Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B3, D0, D1, D2, D3 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#endif +//#define RGB_DI_PIN B3 +//#ifdef RGB_DI_PIN +// #define RGBLED_NUM 20 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/info.json b/keyboards/kbdfans/kbd67/mkii_soldered/info.json new file mode 100644 index 0000000000..6440a007ee --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "KBD67 MKII Soldered Variant", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "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":"Back Space", "x":13, "y":0}, + {"label":"Delete", "x":14, "y":0}, + {"label":"Home", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"End", "x":15, "y":1}, + {"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":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"Hi", "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":"↑", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"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}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"←", "x":13, "y":4}, + {"label":"↓", "x":14, "y":4}, + {"label":"→", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/keymap.c new file mode 100644 index 0000000000..0e6cdf776a --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +/* K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + * K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + * K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + * K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + * K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + 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_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_END, + MO(1), 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_PGUP, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PSCR, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_GRV, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + KC_CAPS, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, BL_INC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, BL_DEC, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/readme.md new file mode 100644 index 0000000000..91306e82af --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/readme.md @@ -0,0 +1,3 @@ +# The ai03 keymap for KBD67 MKII + +Tweaked slightly for more functionality closer to home position. diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c new file mode 100644 index 0000000000..6dcbf00dd2 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +/* K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + * K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + * K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + * K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + * K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + 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_HOME, + 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_END, + MO(1), 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_PGUP, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_INC, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/readme.md new file mode 100644 index 0000000000..dec2b04862 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for KBD67 MKII + +A basic 65% keymap. diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.c b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.c new file mode 100644 index 0000000000..c36a84e75f --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.c @@ -0,0 +1,48 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include "mkii_soldered.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + + matrix_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + + led_set_user(usb_led); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +*/ diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h new file mode 100644 index 0000000000..7eb11f1ff0 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} + + diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/readme.md new file mode 100644 index 0000000000..313f244e14 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/readme.md @@ -0,0 +1,16 @@ +# KBD67 MKII - Soldered Variant + +![Render](https://i.imgur.com/W8jBycQ.png) + +A simple 65% keyboard +This is for the solderable PCB for the MKII. For hotswap PCB firmware, please check the other directories. + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) / [KBDfans](https://kbdfans.cn/) +Hardware Supported: KBD67 MKII Soldered PCB (Not hotswap) +Hardware Availability: KBDfans + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd67/mkii_soldered: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). diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk new file mode 100644 index 0000000000..a945af726a --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/kbdfans/kbd67/mkiirgb/config.h b/keyboards/kbdfans/kbd67/mkiirgb/config.h new file mode 100644 index 0000000000..b60685e2b0 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/config.h @@ -0,0 +1,45 @@ +#pragma once +#include "config_common.h" +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1224 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDfans +#define PRODUCT kbd67mkiirgb +#define DESCRIPTION kbd67mkii rgb keyboard + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } +#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14, C15 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DEBOUNCE 3 +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_BAND_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 35 +#define DRIVER_2_LED_TOTAL 32 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) \ No newline at end of file diff --git a/keyboards/kbdfans/kbd67/mkiirgb/info.json b/keyboards/kbdfans/kbd67/mkiirgb/info.json new file mode 100644 index 0000000000..eac1159712 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "kbd67mkiirgb", + "url": "", + "maintainer": "moyi4681", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "key_count": 67, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/default/keymap.c new file mode 100644 index 0000000000..99556b7ef0 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +#define _LAYER1 1 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_65_ansi_blocker( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,\ + 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_BSLASH, KC_PGUP,\ + CTL_T(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_PGDN,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), + [_LAYER1] = LAYOUT_65_ansi_blocker( /* FN */ + KC_GESC, 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_DEL, KC_HOME,\ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,\ + CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN,\ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), +}; +void matrix_init_user(void) +{ + //user initialization +} + +void matrix_scan_user(void) +{ + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + return true; +} diff --git a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c new file mode 100644 index 0000000000..526949e6fe --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c @@ -0,0 +1,131 @@ +#include "mkiirgb.h" +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + + {0, C8_8, C7_8, C6_8}, // LA17 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C1_15, C2_15, C3_15}, // LB7 + + {0, C1_8, C2_8, C3_8}, // LA8 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {0, C1_16, C2_16, C3_16}, // LB8 + + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {0, C9_15, C8_15, C6_14}, // LB15 + + {1, C8_8, C7_8, C6_8}, // LC17 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C8_16, C7_16, C6_16}, // LD17 + {0, C8_16, C7_16, C6_16}, // LB17 + {0, C9_16, C7_15, C6_15}, // LB16 + +}; + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED,42, 43 }, + { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED,56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED, 63, 64, NO_LED, 65, 66 } +}, { + {0,0},{15,0},{30,0},{45,0},{60,0},{75,0},{90,0},{105,0},{120,0},{135,0},{150,0},{165,0},{180,0},{203,0},{224,0}, + {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, + {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, + {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, + {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1 +} }; +#endif + +void matrix_init_kb(void) { + matrix_init_user(); +} +void matrix_scan_kb(void) { + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); + } +} + + + diff --git a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.h b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.h new file mode 100644 index 0000000000..e61ff96839 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.h @@ -0,0 +1,16 @@ +#pragma once +#define XXX KC_NO +#include "quantum.h" +#define LAYOUT_65_ansi_blocker( \ + 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, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K42, K45, 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, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, K48, XXX, K4A, K4B, XXX, K4D, K4E } \ +} diff --git a/keyboards/kbdfans/kbd67/mkiirgb/readme.md b/keyboards/kbdfans/kbd67/mkiirgb/readme.md new file mode 100644 index 0000000000..71c2ffad2b --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/readme.md @@ -0,0 +1,14 @@ +# KBD67 Mk.II RGB + +A customizable 65% RGB keyboard. + +Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +Hardware Supported: KBD67 Mk.II RGB +Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd67/mkiirgb: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). diff --git a/keyboards/kbdfans/kbd67/mkiirgb/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/rules.mk new file mode 100644 index 0000000000..ea3746069f --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/rules.mk @@ -0,0 +1,14 @@ +# MCU name +MCU = STM32F303 + +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = yes # Use RGB matrix + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index 1fa2458817..f1490d5bf1 100644 --- a/keyboards/kbdfans/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -1,16 +1,15 @@ # KBD67 -A 65% keyboard sold in three variants. -1. Rev1: Typical keyboard that had to be soldered together, supporting multiple layouts. +A 65% keyboard sold in four variants. +1. Rev1: Typical keyboard that had to be soldered together, supporting multiple layouts. The rev1 PCB is sold under the name "KBD65". 2. HotSwap: Released in late 2018, Hotswap single layout keyboard. 3. Rev2: Released in April/May 2019, the Rev2 also needs to be soldered together and supports multiple layouts. +4. MKII RGB: Released in September 2019. ARM powered hotswap board. - **Firmware files are SPECIFIC to each board. Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. + **Firmware files are SPECIFIC to each board. Firmware files from one, will not work on the other.** Please use the `.hex` or `.bin` appropriate for your board. -The rev1 PCB is sold under the name "KBD65". - -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67 rev1, rev2, hotswap +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [moyi4681](https://github.com/moyi4681) +Hardware Supported: KBD67 rev1, rev2, hotswap, mkiirgb Hardware Availability: KBDFans Make examples for this keyboard (after setting up your build environment): @@ -18,5 +17,6 @@ Make examples for this keyboard (after setting up your build environment): make kbdfans/kbd67/rev1:default make kbdfans/kbd67/rev2:default make kbdfans/kbd67/hotswap:default + make kbdfans/kbd67/mkiirgb: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). diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index 7a26192f4a..d20dcb1c57 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -49,9 +49,10 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - +#endif #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 20 @@ -62,6 +63,7 @@ along with this program. If not, see . // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== all animations enable ==*/ #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP /*== or choose animations ==*/ // #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c index b00805e9e7..3ce6afce21 100644 --- a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c @@ -33,7 +33,7 @@ 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, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, 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, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \ KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \ KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PSCR, \ diff --git a/keyboards/kbdfans/kbd67/rev1/rules.mk b/keyboards/kbdfans/kbd67/rev1/rules.mk index 0d7c14ad45..a29ca53ecf 100644 --- a/keyboards/kbdfans/kbd67/rev1/rules.mk +++ b/keyboards/kbdfans/kbd67/rev1/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -69,7 +22,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) diff --git a/keyboards/kbdfans/kbd67/rev2/config.h b/keyboards/kbdfans/kbd67/rev2/config.h index d4e200fa8e..931f5714b8 100644 --- a/keyboards/kbdfans/kbd67/rev2/config.h +++ b/keyboards/kbdfans/kbd67/rev2/config.h @@ -61,4 +61,5 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_LIMIT_VAL 240 +#define RGBLIGHT_SLEEP #endif diff --git a/keyboards/kbdfans/kbd67/rev2/info.json b/keyboards/kbdfans/kbd67/rev2/info.json index 4b7b5e8b3f..8cf2d39151 100644 --- a/keyboards/kbdfans/kbd67/rev2/info.json +++ b/keyboards/kbdfans/kbd67/rev2/info.json @@ -1,16 +1,242 @@ { - "keyboard_name": "kbd67v2", - "url": "", - "maintainer": "qmk", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT_all": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - }, + "keyboard_name": "kbd67v2", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, - "LAYOUT_65_ansi": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - } - } + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.75}, + {"x":6.5, "y":4, "w":1.25}, + {"x":7.75, "y":4, "w":2.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_65_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_65_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } } diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c index b00805e9e7..3ce6afce21 100644 --- a/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c @@ -33,7 +33,7 @@ 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, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, 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, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \ KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \ KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PSCR, \ diff --git a/keyboards/kbdfans/kbd67/rev2/rev2.h b/keyboards/kbdfans/kbd67/rev2/rev2.h index f27a00191a..4f68e810aa 100644 --- a/keyboards/kbdfans/kbd67/rev2/rev2.h +++ b/keyboards/kbdfans/kbd67/rev2/rev2.h @@ -55,3 +55,17 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ } +#define LAYOUT_65_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1D, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ +} diff --git a/keyboards/kbdfans/kbd67/rev2/rules.mk b/keyboards/kbdfans/kbd67/rev2/rules.mk index 5e874a041a..7f66fc0c84 100644 --- a/keyboards/kbdfans/kbd67/rev2/rules.mk +++ b/keyboards/kbdfans/kbd67/rev2/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -69,7 +22,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) @@ -79,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = 65_ansi +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/kbdfans/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index 1ee31e5690..61d086fbd5 100644 --- a/keyboards/kbdfans/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -47,11 +47,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - #define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - +#endif #define RGB_DI_PIN F0 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS @@ -59,6 +59,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 12 #define RGBLIGHT_SAT_STEP 12 #define RGBLIGHT_VAL_STEP 12 +#define RGBLIGHT_SLEEP #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/keymap.c new file mode 100644 index 0000000000..7fe2a9f4d3 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2019 Devinceble AKA Vimwarrior + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RCTL, MO(2), KC_RGUI + ), + [1] = LAYOUT( + KC_ESC, 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_INS, KC_DEL, \ + KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, \ + KC_CAPS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/readme.md b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/readme.md new file mode 100644 index 0000000000..ebd416aea5 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/readme.md @@ -0,0 +1,9 @@ +# Devinceble AKA Vimwarrior HHKB Tofu Keymap + +Build Hex File: + + make kbdfans/kbd6x:devinceble_hhkb_tofu + +Flash Keyboard + + make kbdfans/kbd6x:devinceble_hhkb_tofu:flash diff --git a/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/rules.mk new file mode 100644 index 0000000000..23f4c56744 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/rules.mk @@ -0,0 +1,2 @@ +BOOTLOADER = atmel-dfu +MOUSEKEY_ENABLE = yes diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h index 16387fa2f6..4b511eb848 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h @@ -1,4 +1,3 @@ #pragma once #define LAYER_FN -#define SEND_STRING_CLEAN diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index b348b0b7bf..d002322056 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -10,7 +10,7 @@ enum layers_keymap { }; void eeconfig_init_keymap(void) { - rgblight_sethsv(MODERN_DOLCH_RED.h, MODERN_DOLCH_RED.s, MODERN_DOLCH_RED.v); + rgblight_sethsv(MODERN_DOLCH_RED); rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); } @@ -24,11 +24,66 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { unregister_code(KC_RCTRL); layer_off(L_RCTRL); } - return false; - - default: - return true; + break; } + + return true; +} + +static inline void fn_light(void) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val()); +} + +static inline void caps_light(void) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val()); +} + +static inline void restore_light(void) { + rgblight_config_t saved = { .raw = eeconfig_read_rgblight() }; + rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val); + rgblight_mode_noeeprom(saved.mode); +} + +static void check_light_layer(uint32_t state) { + if (IS_LAYER_ON_STATE(state, L_FN)) { + fn_light(); + } else if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + caps_light(); + } else { + restore_light(); + } +} + +static void check_light_led(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + caps_light(); + } else if (IS_LAYER_ON(L_FN)) { + fn_light(); + } else { + restore_light(); + } +} + +static bool skip_led = false; + +uint32_t layer_state_set_keymap(uint32_t state) { + static uint32_t prev_state = L_BASE; + if (IS_LAYER_ON_STATE(state, L_FN) != IS_LAYER_ON_STATE(prev_state, L_FN)) { + check_light_layer(state); // Fn state changed since last time + skip_led = IS_LAYER_ON_STATE(state, L_FN); + // led_set_keymap will be called automatically after this + } + return prev_state = state; +} + +void led_set_keymap(uint8_t usb_led) { + if (skip_led) { + skip_led = false; + return; // Skip calls triggered by the Fn layer turning on + } + check_light_led(usb_led); } const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -40,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ * │LCtCps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │LShiftFn│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│FnL│ + * │LShiftFn│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│FnF│ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ * │LGu│LAlt │ Space │RAlGu│RCt│ * └───┴─────┴───────────────────────────┴─────┴───┘ @@ -50,28 +105,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSPC, LCT_CPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, LSFT_FN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_FNLK, - XXXXXXX, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, RCTRL, XXXXXXX + XXXXXXX, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, RCTRL, XXXXXXX ), - /* Function layer + /* Fn layer * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │Hom│ ↑ │End│PgU│ │ │ │ │M3 │M1 │M↑ │M2 │ Del │ + * │ │Hom│ ↑ │End│PgU│ │ │ │ │M1 │M↑ │М2 │M3 │ Del │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ ← │ ↓ │ → │PgD│ │ │ │ │MW↑│M← │M→ │ │ + * │ │ ← │ ↓ │ → │PgD│ │ │ │ │M← │M↓ │M→ │ │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│App│MW←│MW→│M↓ │ │ │ + * │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│App│MW↑│M4 │М5 │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ * │ │ │ MW↓ │MAcl2│ │ * └───┴─────┴───────────────────────────┴─────┴───┘ */ [L_FN] = LAYOUT( _______, 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_PSCR, KC_INS, - _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_R, _______, - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_APP, KC_WH_L, KC_WH_R, KC_MS_D, _______, _______, - XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_APP, KC_WH_U, KC_BTN4, KC_BTN5, _______, _______, + XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX ), /* RCtrl layer @@ -82,7 +137,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ * │ │Mv←│Mv↓│Mv→│TNx│ │ │ │ │ │ │ │ │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │RTg│RV-│RV+│RMd│ │ │ │M4 │M5 │ │ │ │ + * │ │RTg│RV-│RV+│RMd│ │ │ │ │ │ │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ * │DPR│DstNA│ │ │ │ * └───┴─────┴───────────────────────────┴─────┴───┘ @@ -91,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, _______, TOP, MV_UP, BOTTOM, TAB_PRV, _______, _______, _______, _______, _______, _______, _______, _______, DEL_NXT, _______, MV_LEFT, MV_DOWN, MV_RGHT, TAB_NXT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, _______, _______, _______, KC_BTN4, KC_BTN5, _______, _______, _______, - XXXXXXX, DST_P_R, DST_N_A, _______, _______, _______, XXXXXXX + _______, RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, + XXXXXXX, DST_P_R, DST_N_A, _______, _______, _______, XXXXXXX ), }; diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index f7cf0758b7..64428383cf 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk @@ -1,11 +1,11 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = no -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODEMAP_ENABLE = no - -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +SPACE_CADET_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = no diff --git a/keyboards/kbdfans/kbd6x/keymaps/mekberg/config.h b/keyboards/kbdfans/kbd6x/keymaps/mekberg/config.h new file mode 100644 index 0000000000..d29180a5af --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/mekberg/config.h @@ -0,0 +1,5 @@ +#pragma once + +// Define some configuration for modtap behavior +// #define TAPPING_TERM 150 +#define PERMISSIVE_HOLD diff --git a/keyboards/kbdfans/kbd6x/keymaps/mekberg/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/mekberg/keymap.c new file mode 100644 index 0000000000..f3be992639 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/mekberg/keymap.c @@ -0,0 +1,98 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// #define MY_LOCK C(A(KC_L)) // Mac: Custom lock hotkey in BTT +#define MY_LOCK C(LCMD(KC_L)) // Mac: Custom lock hotkey in BTT (when Alt/Command have been swapped in macOS) + +/* +KBD6x ANSI physical layout +1u == 8chars + ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ + | | | | | | | | | | | | | | | | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 1,5u | | | | | | | | | | | | | 1,5u | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 1,75u | | | | | | | | | | | | 1,25u | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 2,25u | | | | | | | | | | | 1,75u | | + └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + | | 1,25u | | 1,25u | | + └────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + 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_NUBS,KC_NUHS, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + LT(2,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_BSPC, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), + +// Fn layer, left hand free +// F-keys, RGB controls, media controls, Keyboard functions + [1] = LAYOUT( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + 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, _______, RESET, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + KC_RCTL, KC_VOLD, KC_VOLU, KC_MUTE, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, MY_LOCK, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + _______, BL_TOGG, BL_INC, BL_DEC, BL_STEP, _______, _______, _______, KC_MRWD, KC_MFFD, _______, _______, _______, +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, _______, _______, KC_MPLY, _______, _______, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), + +// Left Tab-Hold layer, right hand free +// Nav-keys + [2] = LAYOUT( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_BSPC, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, _______, _______, KC_DEL, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), +}; diff --git a/keyboards/kbdfans/kbd6x/keymaps/mekberg/readme.md b/keyboards/kbdfans/kbd6x/keymaps/mekberg/readme.md new file mode 100644 index 0000000000..febe2e1d68 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/mekberg/readme.md @@ -0,0 +1,14 @@ +# General Information + +This is more or less a HHKB base layout, but with completely different Fn layers. I don't use most of the HHKB secondary key positions because, honestly, they make no sense to me at all. + +Fn key layer is focused mostly on keyboard firmware features (like RGB) as well as some of the necessary alternate functions. It also hold media controls, F-keys and Reset. + +Left Tab-Hold layer is focused on nav cluster functionality, and turns Backspace into Delete (and moves Backspace up into the top right 1u position). + + +# Build instructions + +To simply build the firmware file: `make clean && make kbdfans/kbd6x:mekberg` + +To build and immediately flash: `make clean && make kbdfans/kbd6x:mekberg:dfu` diff --git a/keyboards/kbdfans/kbd6x/keymaps/mekberg/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/mekberg/rules.mk new file mode 100644 index 0000000000..257214607e --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/mekberg/rules.mk @@ -0,0 +1,2 @@ +NKRO_ENABLE = yes # USB Nkey Rollover +CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd6x/rules.mk b/keyboards/kbdfans/kbd6x/rules.mk index e9b61a76d6..ae63197e71 100644 --- a/keyboards/kbdfans/kbd6x/rules.mk +++ b/keyboards/kbdfans/kbd6x/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -59,7 +22,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode diff --git a/keyboards/kbdfans/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h index 611e682e54..09ef6a2f31 100644 --- a/keyboards/kbdfans/kbd75/config.h +++ b/keyboards/kbdfans/kbd75/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,6 +44,7 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#endif - +#define RGBLIGHT_SLEEP +/* If defined, the RGB lighting will be switched off when the host goes to sleep */ +#define RGBLIGHT_SLEEP #endif diff --git a/keyboards/kbdfans/kbd75/kbd75.h b/keyboards/kbdfans/kbd75/kbd75.h index ad8706ba97..e412242878 100644 --- a/keyboards/kbdfans/kbd75/kbd75.h +++ b/keyboards/kbdfans/kbd75/kbd75.h @@ -2,12 +2,8 @@ #include "quantum.h" -#ifdef KEYBOARD_kbdfans_kbd75_rev1 +#if defined(KEYBOARD_kbdfans_kbd75_rev1) #include "rev1.h" -#endif - -#ifdef KEYBOARD_kbdfans_kbd75_rev2 - #include "../rev1/rev1.h" +#elif defined(KEYBOARD_kbdfans_kbd75_rev2) #include "rev2.h" #endif - diff --git a/keyboards/kbdfans/kbd75/keymaps/broswen/README.md b/keyboards/kbdfans/kbd75/keymaps/broswen/README.md new file mode 100644 index 0000000000..d95b3f2805 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/broswen/README.md @@ -0,0 +1,7 @@ +# KBD75 broswen keymap + +Almost default keymap for KBD75. + +- Top right extra keys are media keys. + +- Vim style motion keys on layer 1 diff --git a/keyboards/kbdfans/kbd75/keymaps/broswen/keymap.c b/keyboards/kbdfans/kbd75/keymaps/broswen/keymap.c new file mode 100644 index 0000000000..3828cb4a1f --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/broswen/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_VOLD, KC_VOLU, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/kbdfans/kbd75/rev1/info.json b/keyboards/kbdfans/kbd75/rev1/info.json index 4f963c2d80..7f9e04fdfc 100644 --- a/keyboards/kbdfans/kbd75/rev1/info.json +++ b/keyboards/kbdfans/kbd75/rev1/info.json @@ -28,6 +28,96 @@ "LAYOUT_iso": { "key_count": 84, "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"\u00ac", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"AltGr", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + }, + + "LAYOUT_75_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"Scroll Lock", "x":14, "y":0}, + {"label":"Pause", "x":15, "y":0}, + {"label":"`", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"-", "x":11, "y":1}, + {"label":"=", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"[", "x":11.5, "y":2}, + {"label":"]", "x":12.5, "y":2}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":";", "x":10.75, "y":3}, + {"label":"'", "x":11.75, "y":3}, + {"label":"ISO #", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"ISO \\", "x":1.25, "y":4}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":",", "x":9.25, "y":4}, + {"label":".", "x":10.25, "y":4}, + {"label":"/", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"Up", "x":14, "y":4}, + {"label":"End", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5}, + {"label":"Fn", "x":11, "y":5}, + {"label":"Ctrl", "x":12, "y":5}, + {"label":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] } } } diff --git a/keyboards/kbdfans/kbd75/rev1/rev1.h b/keyboards/kbdfans/kbd75/rev1/rev1.h index fd3e6e4882..97474f16b1 100644 --- a/keyboards/kbdfans/kbd75/rev1/rev1.h +++ b/keyboards/kbdfans/kbd75/rev1/rev1.h @@ -1,8 +1,6 @@ -#ifndef REV1_H -#define REV1_H +#pragma once -#include "quantum.h" -#include "../kbd75.h" +#include "kbd75.h" /* LAYOUT * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ @@ -20,7 +18,7 @@ * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───┴───┴───┘ */ -// LAYOUT for all possible switch positions on a KBD75 +// LAYOUT for all possible switch positions on a KBD75 rev 1 #define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ @@ -44,7 +42,7 @@ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - #define LAYOUT_ansi_1u( \ +#define LAYOUT_ansi_1u( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ @@ -53,13 +51,15 @@ K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \ } +#define LAYOUT_75_ansi LAYOUT_ansi_1u + #define LAYOUT_iso_1u( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ @@ -76,6 +76,22 @@ { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \ } +#define LAYOUT_75_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ +) LAYOUT_iso_1u( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K313, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ +) + /* normal bottom row ──────────────────────── ↓ ─── ↓ * ┌────┬────┬────┬────────────────────────┬─────┬─────┬───┬───┬───┐ @@ -83,7 +99,7 @@ * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ */ - #define LAYOUT_ansi( \ +#define LAYOUT_ansi( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ @@ -114,5 +130,3 @@ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ } - -#endif diff --git a/keyboards/kbdfans/kbd75/rev1/rules.mk b/keyboards/kbdfans/kbd75/rev1/rules.mk index 9c4082da29..de0af62b87 100644 --- a/keyboards/kbdfans/kbd75/rev1/rules.mk +++ b/keyboards/kbdfans/kbd75/rev1/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes + +LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/kbdfans/kbd75/rev2/info.json b/keyboards/kbdfans/kbd75/rev2/info.json index 31a5d3117c..c6ff35e9d8 100644 --- a/keyboards/kbdfans/kbd75/rev2/info.json +++ b/keyboards/kbdfans/kbd75/rev2/info.json @@ -32,6 +32,96 @@ "LAYOUT_numpad": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"label":"Home", "x":13, "y":1}, {"label":"_", "x":14, "y":1}, {"label":"+", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"|", "x":11.5, "y":2, "w":1.5}, {"label":"Page Up", "x":13, "y":2}, {"label":"{", "x":14, "y":2}, {"label":"}", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":"Enter", "x":10.75, "y":3, "w":2.25}, {"label":"Page Down", "x":13, "y":3}, {"label":":", "x":14, "y":3}, {"label":"\"", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"?", "x":9.25, "y":4}, {"label":"Shift", "x":10.25, "y":4, "w":1.75}, {"label":"\u2191", "x":12, "y":4}, {"label":"End", "x":13, "y":4}, {"label":"<", "x":14, "y":4}, {"label":">", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":1.25}, {"x":5, "y":5, "w":2.25}, {"x":7.25, "y":5, "w":1.75}, {"x":9, "y":5}, {"label":"Alt", "x":10, "y":5}, {"label":"\u2190", "x":11, "y":5}, {"label":"\u2193", "x":12, "y":5}, {"label":"\u2192", "x":13, "y":5}, {"label":"Fn", "x":14, "y":5}, {"label":"Ctrl", "x":15, "y":5}] + }, + + "LAYOUT_75_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"Scroll Lock", "x":14, "y":0}, + {"label":"Pause", "x":15, "y":0}, + {"label":"`", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"-", "x":11, "y":1}, + {"label":"=", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"[", "x":11.5, "y":2}, + {"label":"]", "x":12.5, "y":2}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":";", "x":10.75, "y":3}, + {"label":"'", "x":11.75, "y":3}, + {"label":"ISO #", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"ISO \\", "x":1.25, "y":4}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":",", "x":9.25, "y":4}, + {"label":".", "x":10.25, "y":4}, + {"label":"/", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"Up", "x":14, "y":4}, + {"label":"End", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5}, + {"label":"Fn", "x":11, "y":5}, + {"label":"Ctrl", "x":12, "y":5}, + {"label":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] } } } diff --git a/keyboards/kbdfans/kbd75/rev2/rev2.h b/keyboards/kbdfans/kbd75/rev2/rev2.h index f2a1fead29..73baf31d37 100644 --- a/keyboards/kbdfans/kbd75/rev2/rev2.h +++ b/keyboards/kbdfans/kbd75/rev2/rev2.h @@ -1,9 +1,135 @@ -#ifndef REV2_H -#define REV2_H +#pragma once -#include "quantum.h" -#include "../kbd75.h" +#include "kbd75.h" +/* LAYOUT + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │1.5U │ │ │ │ │ │ │ │ │ │ │ │ │1.5U │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │1.75U │ │ │ │ │ │ │ │ │ │ │ │2.25U │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │2.25U │ │ │ │ │ │ │ │ │ │ │1.75U │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │1.25│1.25│1.25│2.25U │1.25│2.75U │ │ │ │ │ │ │ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───┴───┴───┘ + */ + +// LAYOUT for all possible switch positions on a KBD75 rev 1 +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K504, K506, K508, K510, K511, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, K504, KC_NO, K506, KC_NO, K508, KC_NO, K510, K511, K512, K513, K514, K515 } \ +} + + +/* 1U bottom row ─────────────────────────── ↓ ─ ↓ ─ ↓ + * ┌────┬────┬────┬────────────────────────┬───┬───┬───┬───┬───┬───┐ + * │1.25│1.25│1.25│6.25U │1U │1U │1U │1U │1U │1U │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + +#define LAYOUT_ansi_1u( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \ +} + +#define LAYOUT_75_ansi LAYOUT_ansi_1u + +#define LAYOUT_iso_1u( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K313, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \ +} + +#define LAYOUT_75_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ +) LAYOUT_iso_1u( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K313, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ +) + + +/* normal bottom row ──────────────────────── ↓ ─── ↓ + * ┌────┬────┬────┬────────────────────────┬─────┬─────┬───┬───┬───┐ + * │1.25│1.25│1.25│6.25U │1.5U │1.5U │1U │1U │1U │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ + +#define LAYOUT_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +#define LAYOUT_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K313, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} // LAYOUT for all possible switch positions on a KBD75 rev 2 #define LAYOUT_numpad( \ @@ -21,5 +147,3 @@ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ { K500, K501, KC_NO, K503, K504, KC_NO, K506, KC_NO, K508, K509, K510, K511, K512, K513, K514, K515 } \ } - -#endif diff --git a/keyboards/kbdfans/kbd75/rev2/rules.mk b/keyboards/kbdfans/kbd75/rev2/rules.mk index 9c4082da29..de0af62b87 100644 --- a/keyboards/kbdfans/kbd75/rev2/rules.mk +++ b/keyboards/kbdfans/kbd75/rev2/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes + +LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/kbdfans/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h index bdd3104407..5c16274942 100644 --- a/keyboards/kbdfans/kbd8x/config.h +++ b/keyboards/kbdfans/kbd8x/config.h @@ -47,11 +47,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - #define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - +#endif #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS @@ -59,6 +59,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/kbdfans/kbd8x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd8x/keymaps/default/keymap.c index a7dcd5518c..6d87bc8893 100644 --- a/keyboards/kbdfans/kbd8x/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd8x/keymaps/default/keymap.c @@ -35,22 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/keymap.c b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/keymap.c index e664575d5f..69b09d0a03 100644 --- a/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/keymap.c +++ b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/keymap.c @@ -34,22 +34,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk deleted file mode 100644 index d98bb1cb17..0000000000 --- a/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk +++ /dev/null @@ -1 +0,0 @@ -#Build Options diff --git a/keyboards/kbdfans/kbd8x/rules.mk b/keyboards/kbdfans/kbd8x/rules.mk index be75775641..fcc28884f3 100644 --- a/keyboards/kbdfans/kbd8x/rules.mk +++ b/keyboards/kbdfans/kbd8x/rules.mk @@ -1,53 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -59,7 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) diff --git a/keyboards/kbdfans/kbd8x_mk2/config.h b/keyboards/kbdfans/kbd8x_mk2/config.h index 4c6900b6ca..3e07ad60c6 100644 --- a/keyboards/kbdfans/kbd8x_mk2/config.h +++ b/keyboards/kbdfans/kbd8x_mk2/config.h @@ -52,11 +52,11 @@ along with this program. If not, see . * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 - #define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - +#endif #define RGB_DI_PIN B3 #ifdef RGB_DI_PIN #define RGBLED_NUM 20 diff --git a/keyboards/kbdfans/kbd8x_mk2/rules.mk b/keyboards/kbdfans/kbd8x_mk2/rules.mk index 43e0dcf40f..ba8b8ee875 100644 --- a/keyboards/kbdfans/kbd8x_mk2/rules.mk +++ b/keyboards/kbdfans/kbd8x_mk2/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h new file mode 100644 index 0000000000..0fc7b5acb8 --- /dev/null +++ b/keyboards/kbdfans/kbdmini/config.h @@ -0,0 +1,47 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x2001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DZTECH + +#define PRODUCT KBDMINI +#define DESCRIPTION KBDMINI RGB keyboard +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +#define MATRIX_ROW_PINS {B7, E6, F5, F4} +#define MATRIX_COL_PINS {B3, B2, B1, B0, F1, F0, C6, B6, B5, B4, D7, D6, D4} +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 3 +#ifdef RGB_MATRIX_ENABLE +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_BAND_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 52 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#endif \ No newline at end of file diff --git a/keyboards/kbdfans/kbdmini/kbdmini.c b/keyboards/kbdfans/kbdmini/kbdmini.c new file mode 100644 index 0000000000..b402eed64f --- /dev/null +++ b/keyboards/kbdfans/kbdmini/kbdmini.c @@ -0,0 +1,96 @@ +#include "kbdmini.h" +#include "config.h" +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, B_9, A_9, C_9}, //LA33 + {0, B_10, A_10, C_10}, //LA37 + {0, B_11, A_11, C_11}, //LA41 + {0, B_12, A_12, C_12}, //LA45 + {0, B_13, A_13, C_13}, //LA49 + {0, B_14, A_14, C_14}, //LA53 + {0, B_15, A_15, C_15}, //LA57 + {0, B_6, A_6, C_6}, //LA21 + {0, B_5, A_5, C_5}, //LA17 + {0, B_4, A_4, C_4}, //LA13 + {0, B_3, A_3, C_3}, //LA9 + {0, B_2, A_2, C_2}, //LA5 + {0, B_1, A_1, C_1}, //LA1 + + {0, E_9, D_9, F_9}, //LA34 + {0, E_10, D_10, F_10}, //LA38 + {0, E_11, D_11, F_11}, //LA42 + {0, E_12, D_12, F_12}, //LA46 + {0, E_13, D_13, F_13}, //LA50 + {0, E_14, D_14, F_14}, //LA54 + {0, E_15, D_15, F_15}, //LA58 + {0, E_6, D_6, F_6}, //LA22 + {0, E_5, D_5, F_5}, //LA18 + {0, E_4, D_4, F_4}, //LA14 + {0, E_3, D_3, F_3}, //LA10 + {0, E_2, D_2, F_2}, //LA6 + {0, E_1, D_1, F_1}, //LA2 + + {0, H_9, G_9, I_9}, //LA35 + {0, H_10, G_10, I_10}, //LA39 + {0, H_11, G_11, I_11}, //LA43 + {0, H_12, G_12, I_12}, //LA47 + {0, H_13, G_13, I_13}, //LA51 + {0, H_14, G_14, I_14}, //LA55 + {0, H_15, G_15, I_15}, //LA59 + {0, H_6, G_6, I_6}, //LA23 + {0, H_5, G_5, I_5}, //LA19 + {0, H_4, G_4, I_4}, //LA15 + {0, H_3, G_3, I_3}, //LA11 + {0, H_2, G_2, I_2}, //LA7 + {0, H_1, G_1, I_1}, //LA3 + + {0, K_9, J_9, L_9}, //LA36 + {0, K_10, J_10, L_10}, //LA40 + {0, K_11, J_11, L_11}, //LA44 + {0, K_12, J_12, L_12}, //LA48 + {0, K_13, J_13, L_13}, //LA52 + {0, K_14, J_14, L_14}, //LA56 + {0, K_15, J_15, L_15}, //LA60 + {0, K_6, J_6, L_6}, //LA24 + {0, K_5, J_5, L_5}, //LA20 + {0, K_4, J_4, L_4}, //LA16 + {0, K_3, J_3, L_3}, //LA12 + {0, K_2, J_2, L_2}, //LA8 + {0, K_1, J_1, L_1}//LA4 +}; + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, + { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}, + { 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, + { 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51} +}, { + { 0, 0 }, { 19, 0 }, { 38, 0 }, { 57, 0 }, { 76, 0 }, { 95, 0 }, { 114, 0 }, { 133, 0 }, { 152, 0 }, { 171, 0 }, { 190, 0 }, { 209, 0 }, { 224, 0 }, + { 0, 21 }, { 19, 21 }, { 38, 21 }, { 57, 21 }, { 76, 21 }, { 95, 21 }, { 114, 21 }, { 133, 21 }, { 152, 21 }, { 171, 21 }, { 190, 21 }, { 209, 21 }, { 224, 21 }, + { 0, 42 }, { 19, 42 }, { 38, 42 }, { 57, 42 }, { 76, 42 }, { 95, 42 }, { 114, 42 }, { 133, 42 }, { 152, 42 }, { 171, 42 }, { 190, 42 }, { 209, 42 }, { 224, 42 }, + { 0, 64 }, { 19, 64 }, { 38, 64 }, { 57, 64 }, { 76, 64 }, { 95, 64 }, { 114, 64 }, { 133, 64 }, { 152, 64 }, { 171, 64 }, { 190, 64 }, { 209, 64 }, { 224, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +} }; +void matrix_init_kb(void) { + matrix_init_user(); +} +void matrix_scan_kb(void) { + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} diff --git a/keyboards/kbdfans/kbdmini/kbdmini.h b/keyboards/kbdfans/kbdmini/kbdmini.h new file mode 100644 index 0000000000..38596a569e --- /dev/null +++ b/keyboards/kbdfans/kbdmini/kbdmini.h @@ -0,0 +1,15 @@ +#pragma once +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C,\ + 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,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { 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 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C } \ +} + diff --git a/keyboards/kbdfans/kbdmini/keymaps/default/keymap.c b/keyboards/kbdfans/kbdmini/keymaps/default/keymap.c new file mode 100644 index 0000000000..9c8267147c --- /dev/null +++ b/keyboards/kbdfans/kbdmini/keymaps/default/keymap.c @@ -0,0 +1,9 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( + 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSPC, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, + KC_F5, KC_CAPS, KC_LCTL, KC_LGUI, KC_F1, KC_SPC,KC_F2, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), +}; diff --git a/keyboards/kbdfans/kbdmini/readme.md b/keyboards/kbdfans/kbdmini/readme.md new file mode 100644 index 0000000000..e01684f138 --- /dev/null +++ b/keyboards/kbdfans/kbdmini/readme.md @@ -0,0 +1,13 @@ +# KBDMINI + +![KBDMINI](imgur.com image replace me!) + +Keyboard Maintainer: [DZTECH](https://github.com/moyi4681) +Hardware Supported: KBDMINI +Hardware Availability: [KBDFans](https://kbdfans.cn/) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbdmini: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). diff --git a/keyboards/kbdfans/kbdmini/rules.mk b/keyboards/kbdfans/kbdmini/rules.mk new file mode 100644 index 0000000000..28178d6584 --- /dev/null +++ b/keyboards/kbdfans/kbdmini/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/kbdfans/kbdpad/mk1/config.h b/keyboards/kbdfans/kbdpad/mk1/config.h new file mode 100644 index 0000000000..d41ec6001e --- /dev/null +++ b/keyboards/kbdfans/kbdpad/mk1/config.h @@ -0,0 +1,40 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 +#define MANUFACTURER KBDfans +#define PRODUCT KBDPAD-MKI + +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { A0, A1, A2, A3 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_BREATHING + +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 diff --git a/keyboards/kbdfans/kbdpad/mk1/info.json b/keyboards/kbdfans/kbdpad/mk1/info.json new file mode 100644 index 0000000000..4f0da62e83 --- /dev/null +++ b/keyboards/kbdfans/kbdpad/mk1/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "KBDfans KBDPad MKI", + "url": "https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit", + "maintainer": "qmk", + "width": 4, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "y":3.25}, {"x":3, "y":2.25, "h":2}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":0, "y":5.25, "w":2}, {"x":2, "y":5.25}, {"x":3, "y":4.25, "h":2}] + } + } +} diff --git a/keyboards/kbdfans/kbdpad/mk1/keymaps/default/keymap.c b/keyboards/kbdfans/kbdpad/mk1/keymaps/default/keymap.c new file mode 100644 index 0000000000..2d5053e0b6 --- /dev/null +++ b/keyboards/kbdfans/kbdpad/mk1/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT(\ + KC_DEL, KC_BSPC, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, KC_PDOT, KC_PENT) \ +}; diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.c b/keyboards/kbdfans/kbdpad/mk1/mk1.c new file mode 100644 index 0000000000..aa781875ce --- /dev/null +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.c @@ -0,0 +1,29 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "mk1.h" + +#define NUMLOCK_PIN D0 + +void matrix_init_kb(void) { + setPinOutput(NUMLOCK_PIN); + matrix_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + writePin(NUMLOCK_PIN, IS_LED_ON(usb_led, USB_LED_NUM_LOCK)); + led_set_user(usb_led); +} diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.h b/keyboards/kbdfans/kbdpad/mk1/mk1.h new file mode 100644 index 0000000000..ace7466f54 --- /dev/null +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.h @@ -0,0 +1,38 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT( \ + k52, k53, \ + k40, k41, k42, k43, \ + k30, k31, k32, \ + k20, k21, k22, k23, \ + k10, k11, k12, \ + k00, k02, k03 \ +){ \ + { k00, KC_NO, k02, k03 }, \ + { k10, k11, k12, KC_NO }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43 }, \ + { KC_NO, KC_NO, k52, k53 }, \ +} diff --git a/keyboards/kbdfans/kbdpad/mk1/readme.md b/keyboards/kbdfans/kbdpad/mk1/readme.md new file mode 100644 index 0000000000..e808d89347 --- /dev/null +++ b/keyboards/kbdfans/kbdpad/mk1/readme.md @@ -0,0 +1,47 @@ +# KBDPad MKI + +Custom numpad. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: KBDPad MKI +Hardware Availability: [KBDfans](https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit) + + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbdpad/mk1:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as `0` while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). diff --git a/keyboards/kbdfans/kbdpad/mk1/rules.mk b/keyboards/kbdfans/kbdpad/mk1/rules.mk new file mode 100644 index 0000000000..b4cd885b1a --- /dev/null +++ b/keyboards/kbdfans/kbdpad/mk1/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = no +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no # PCB has underglow LEDs, but case doesn't let them show. +WS2812_DRIVER = i2c + +OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/kbdfans/kbdpad/mk1/usbconfig.h b/keyboards/kbdfans/kbdpad/mk1/usbconfig.h new file mode 100644 index 0000000000..e65d210ace --- /dev/null +++ b/keyboards/kbdfans/kbdpad/mk1/usbconfig.h @@ -0,0 +1,383 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/kbdfans/kbdpad_mk2/config.h b/keyboards/kbdfans/kbdpad_mk2/config.h index e3b91e1a1b..a7dae0a703 100644 --- a/keyboards/kbdfans/kbdpad_mk2/config.h +++ b/keyboards/kbdfans/kbdpad_mk2/config.h @@ -54,9 +54,10 @@ along with this program. If not, see . #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 #define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 - +#endif #define RGB_DI_PIN B5 #ifdef RGB_DI_PIN #define RGBLED_NUM 16 diff --git a/keyboards/kbdfans/kbdpad_mk2/rules.mk b/keyboards/kbdfans/kbdpad_mk2/rules.mk index 90614e9409..cfb65f5edf 100644 --- a/keyboards/kbdfans/kbdpad_mk2/rules.mk +++ b/keyboards/kbdfans/kbdpad_mk2/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index a70e1017e2..f7aa36dabb 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -8,18 +8,6 @@ // Fillers to make layering more clear #define ______ KC_TRNS -// Func macro definitions. -#define S_LED FUNC(0) -#define S_LEDI FUNC(1) -#define S_LEDD FUNC(2) - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_BACKLIGHT_TOGGLE(), - [1] = ACTION_BACKLIGHT_INCREASE(), - [2] = ACTION_BACKLIGHT_DECREASE() - }; - /* * | | | * | | | @@ -67,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, 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_INS, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, KC_PSCR,______, ______, ______, ______, ______, ______, \ - ______, ______, S_LED, S_LEDI, S_LEDD,______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY, \ + ______, ______, BL_TOGG, BL_INC, BL_DEC, ______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY, \ ______, ______, ______, ______, KC_DEL, ______, KC_MPRV, KC_MSTP, KC_MNXT \ ), diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c index af758ae16a..fe5a9c4a87 100644 --- a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c @@ -7,18 +7,6 @@ // Fillers to make layering more clear #define ______ KC_TRNS -// Func macro definitions. -#define S_LED FUNC(0) -#define S_LEDI FUNC(1) -#define S_LEDD FUNC(2) - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_BACKLIGHT_TOGGLE(), - [1] = ACTION_BACKLIGHT_INCREASE(), - [2] = ACTION_BACKLIGHT_DECREASE() - }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------------. @@ -56,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = LAYOUT( /* Layer 1 */ ______, 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_INS, \ - KC_CAPS, S_LED, S_LEDI, S_LEDD, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ + KC_CAPS, BL_TOGG, BL_INC, BL_DEC, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, ______, \ ______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______,______,KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______,______, \ ______, ______, ______, ______, KC_DEL, KC_MSTP, ______, ______, ______ \ diff --git a/keyboards/kc60/keymaps/default/keymap.c b/keyboards/kc60/keymaps/default/keymap.c index 073ae9c4a5..a96b9d3770 100644 --- a/keyboards/kc60/keymaps/default/keymap.c +++ b/keyboards/kc60/keymaps/default/keymap.c @@ -10,9 +10,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_RCTL, RESET \ ), }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - return MACRO_NONE; -}; diff --git a/keyboards/kc60/keymaps/noroadsleft/config.h b/keyboards/kc60/keymaps/noroadsleft/config.h index e216d050b1..4490a3bb76 100644 --- a/keyboards/kc60/keymaps/noroadsleft/config.h +++ b/keyboards/kc60/keymaps/noroadsleft/config.h @@ -6,3 +6,12 @@ #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 #define BREATHING_PERIOD 4 + +#ifdef LOCKING_SUPPORT_ENABLE +# undef LOCKING_SUPPORT_ENABLE +#endif +#ifdef LOCKING_RESYNC_ENABLE +# undef LOCKING_RESYNC_ENABLE +#endif + +#define NO_ACTION_ONESHOT diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c index 98d7353568..84aeb482d6 100644 --- a/keyboards/kc60/keymaps/noroadsleft/keymap.c +++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c @@ -8,42 +8,39 @@ /********************** ** LAYER DEFINITIONS ** **********************/ -enum layers_keymap { +enum layer_names { // BASE LAYERS + // SHORT CODES _QWERTY = 0, + _QW = _QWERTY, _DVORAK, + _DV = _DVORAK, _COLEMAK, + _CM = _COLEMAK, _MAC, + _MC = _MAC, _QUAKE2, + _Q2 = _QUAKE2, _QUAKE2_DVORAK, + _QD = _QUAKE2_DVORAK, _QUAKE2_CONSOLE, - + _QC = _QUAKE2_CONSOLE, // FUNCTION LAYERS _FUNCWIN, + _FW = _FUNCWIN, _FUNCMAC, + _FM = _FUNCMAC, _FUNCQ2, - + _FQ = _FUNCQ2, // OTHER LAYERS _NUMPAD, + _NP = _NUMPAD, _MACROS, - _SYSTEM + _MA = _MACROS, + _SYSTEM, + _SY = _SYSTEM, }; -// LAYER SHORT CODES -#define _QW _QWERTY -#define _DV _DVORAK -#define _CM _COLEMAK -#define _MC _MAC -#define _Q2 _QUAKE2 -#define _QD _QUAKE2_DVORAK -#define _QC _QUAKE2_CONSOLE -#define _FW _FUNCWIN -#define _FM _FUNCMAC -#define _FQ _FUNCQ2 -#define _NP _NUMPAD -#define _MA _MACROS -#define _SY _SYSTEM - // KEYCODE DEFINITIONS #define NO_CHNG KC_TRNS // Note for me for keys I need to leave as Pass-through @@ -58,6 +55,8 @@ enum layers_keymap { #define WN_COPY LCTL(DV_C) // Windows/Linux Copy #define WN_PSTE LCTL(DV_V) // Windows/Linux Paste +#define CTL_GRV MT(MOD_LCTL, KC_GRV) // Left Control when held, Grave accent when tapped + #define MC_PSCR LGUI(LSFT(KC_3)) // MacOS Print Screen (Command + Shift + 3) #define MC_HOME LGUI(KC_LEFT) // MacOS Home (Command + Left Arrow) #define MC_END LGUI(KC_RGHT) // MacOS End (Command + Right Arrow) @@ -252,6 +251,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; + case KC_F1 ... KC_F12: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_RALT ) { + register_code( keycode + 0x2E ); + } else { + register_code( keycode ); + } + } else { + if ( get_mods() & MOD_MASK_RALT ) { + unregister_code( keycode + 0x2E ); + } else { + unregister_code( keycode ); + } + } + return false; } // switch() return true; }; @@ -267,31 +281,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY */ [_QWERTY] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_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, \ FW_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, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \ ), /* Dvorak */ [_DVORAK] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \ ), /* Colemak */ [_COLEMAK] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \ FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \ ), /**************** @@ -391,9 +405,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Macro layer */ [_MACROS] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ + TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DM_REC1, DM_REC2, _______, \ + _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_RSTP, \ + _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ ), diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md index c9db4f8de2..6a7ad6f65e 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme.md @@ -1,12 +1,24 @@ # @noroadsleft's KC60 keymap -### Last updated: April 7, 2019, 2:26 AM UTC-0700 +### Last updated: November 5, 2019, 12:07 AM UTC-0800 ![](https://i.imgur.com/tzhXQYI.jpg) I am a full-time Dvorak typist, and occasional semi-serious FPS gamer. The layers are oriented towards a mix of typing and gaming. +---- + +# Preface + +Images in this readme follow the following format: + +![Legend](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/legend.png) +*Legend* + +Descriptions of the physical locations of keys will use the key's function in a US QWERTY layout, even if the layout itself is not QWERTY. + + ---- # Outline diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md index fff80760e5..3872232f5a 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md @@ -12,21 +12,14 @@ ## Layer 0: QWERTY - `_QW` -Standard QWERTY layout, with three QMK features: +Standard QWERTY layout, with four QMK features: - The `Menu` key has been replaced by `MO(_FW)`, which moves to my Windows Fn layer when held. +- The Right `GUI` key has been replaced with a `MO(_MA)` key, which moves to the Macro layer when held. - The `Caps Lock` key has been replaced with a dual function `LT()` key, which opens the Windows Fn layer when held, and is `Caps Lock` when tapped -- The `Escape` key has been replaced with a `KC_GESC` `` ` ~ `` key when used with a `Fn` key or a `Shift` key +- The Left `Control` key has been replaced with a `MT(MOD_CTRL, KC_GRV)` key, which is ` ~ when tapped and `Ctrl` when held. -###### For the rest of this readme, the physical location of keys will be referred to by their function in a US QWERTY layout. - -![QWERTY layer](https://i.imgur.com/2eVsefw.png) - -Keycode(s) Sent | Notes -:---------------------------------------------------- | :---- -[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. -`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. -`MO(_FW)` | Opens the Windows Fn layer when held. +![QWERTY layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_00.png) ---- @@ -37,13 +30,7 @@ Keycode(s) Sent | Notes A hardware-based Dvorak Simplified layout. At my weekend job, I use a shared computer that runs MacOS Sierra, in US QWERTY layout. In this layer, I can leave the system in QWERTY, plug my keyboard in, and still type in Dvorak. -![Hardware Dvorak layer](https://i.imgur.com/a6hYedB.png) - -Keycode(s) Sent | Notes -:---------------------------------------------------- | :---- -[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. -`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. -`MO(_FW)` | Opens the Windows Fn layer when held. +![Hardware Dvorak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_01.png) ---- @@ -54,13 +41,7 @@ Keycode(s) Sent | Notes A hardware-based Colemak layout. Been thinking of trying it, so it's here. -![Hardware Colemak layer](https://i.imgur.com/dbQ6HDW.png) - -Keycode(s) Sent | Notes -:---------------------------------------------------- | :---- -[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. -`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. -`MO(_FW)` | Opens the Windows Fn layer when held. +![Hardware Colemak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_02.png) ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md index 142fe302fd..76ab510153 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md @@ -16,7 +16,7 @@ This layer overrides the `Fn` keys on whichever base layer is currently enabled, sending the keyboard to the MacOS-oriented Fn layer `_FM`, instead of the Windows Fn layer `_FW`. -![MacOS Overlay](https://i.imgur.com/lxsEVpm.png) +![MacOS Overlay](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_03.png) ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md index b9dc556e4e..93c43fbf91 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md @@ -16,20 +16,20 @@ These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method. -I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L404), is a [macro](./keymap.c#L165-L172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. +I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L418), is a [macro](./keymap.c#L164-L171) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. -When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L173-L179) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L180-L186) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L187-L193) that cancels the sending of the message, and undoes the layers. +When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L172-L178) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L179-L185) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L186-L192) that cancels the sending of the message, and undoes the layers. I have been testing this configuration for a few months. Sometimes I end up still in Dvorak mode without any text input systems (in-game chat or the console) running, but it pretty much always happens when I'm focused on the game, so I don't know the cause yet. ### Layer 4: Quake 2 -![Quake 2](https://i.imgur.com/WEZ9p2u.png) +![Quake 2](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_04.png) ### Layer 5: Quake 2 Dvorak -![Quake 2 Dvorak](https://i.imgur.com/rhugHN4.png) +![Quake 2 Dvorak](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_05.png) ### Layer 6: Quake 2 Console -![Quake 2 Console](https://i.imgur.com/dRTAjcy.png) +![Quake 2 Console](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_06.png) ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md index 00e6b781b4..32ca82ce9d 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md @@ -16,7 +16,7 @@ Arrows, Navigation keys (Insert, Home, Page Up, etc.), and Function keys are here. Also has keys for Calculator, Menu, Volume Control, and shortcuts for Select All, Undo, Cut, Copy, and Paste. Numpad Enter for when I'm working in Adobe Photoshop, because it treats Numpad Enter differently from the regular Enter key. -![Windows Fn layer](https://i.imgur.com/XwCshcz.png) +![Windows Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_07.png) ---- @@ -27,7 +27,7 @@ Arrows, Navigation keys (Insert, Home, Page Up, etc.), and Function keys are her Based on my Windows Fn layer, but swaps a few functions for a MacOS environment. Arrow, Navigation, and Function keys are basically unchanged from Layer 2. This layer enables using either `Fn` key as a sort of simulated `Command` key, which I find easier to reach and use. -![MacOS-oriented Fn layer](https://i.imgur.com/Z11kRu2.png) +![MacOS-oriented Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_08.png) ---- @@ -38,11 +38,11 @@ Based on my Windows Fn layer, but swaps a few functions for a MacOS environment. Based on the Windows function layer, but removes some functions that are pointless to have while in the game. -![Quake 2 Fn layer](https://i.imgur.com/9PG7yWb.png) +![Quake 2 Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_09.png) Keycode(s) Sent | Notes :-------------------------------- | :---- -[`Q2_GRV`](./keymap.c#L194-L201) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. +[`Q2_GRV`](./keymap.c#L193-L200) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md index a65b3acbeb..cb2abbd6dd 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md @@ -16,7 +16,7 @@ Puts a Numpad on the right-hand side of the keyboard. A through F included for hexadecimal input. Tapping `Space` returns to the previous Base Layer. -![Numpad layer](https://i.imgur.com/fKVRkGH.png) +![Numpad layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_10.png) ---- @@ -25,42 +25,35 @@ Puts a Numpad on the right-hand side of the keyboard. A through F included for h ### Accessed by holding the `Fn` key and tapping the right-side `Win` key -Has some macros that I use in Git, and some frequently-typed strings. +Has some macros that I use in Git, some frequently-typed strings, and keys for use with the [Dynamic Macros feature](https://docs.qmk.fm/#/feature_dynamic_macros). Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatically. -![Macro layer](https://i.imgur.com/wgbsluI.png) +![Macro layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_11.png) ### Macros -#### [T_L3DED](./keymap.c#L122-L126) - -Output: `lavak3DED ` - -Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). -![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0) - -#### [G_PUSH](./keymap.c#L127-L131) +#### [G_PUSH](./keymap.c#L126-L130) Output: `git push origin ` Everything from here down is related to Git or GitHub. -#### [G_FTCH](./keymap.c#L132-L141) +#### [G_FTCH](./keymap.c#L131-L140) | Condition | Output | | :-------- | :----- | | If Shift is active | `git pull upstream ` | | Otherwise | `git fetch upstream ` | -#### [G_COMM](./keymap.c#L142-L147) +#### [G_COMM](./keymap.c#L141-L146) Output: `git commit -m ""` Left Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer. -#### [G_BRCH](./keymap.c#L148-L158) +#### [G_BRCH](./keymap.c#L147-L157) | Condition | Output | | :-------- | :----- | @@ -69,13 +62,13 @@ Readies a `git commit` command, moves the cursor between the quotation marks, th `$(git branch-name)` is a [git alias](./readme_git.md) that returns the name of the current branch. This macro disables the Macro layer when finished. -#### [SIGNA](./keymap.c#L159-L164) +#### [SIGNA](./keymap.c#L158-L163) Output: `\- @noroadsleft` Enter Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key. Disables the Macro layer when finished. -#### [MC_UNDO](./keymap.c#L202-L210) +#### [MC_UNDO](./keymap.c#L201-L209) | Condition | Output | | :-------- | :----- | @@ -84,7 +77,7 @@ Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax An Undo shortcut that turns to Redo if Shift is being held. I'm not sure that part is required to get that behavior, but it works as desired, so I'm not messing with it. -#### [MC_PSTE](./keymap.c#L211-L219) +#### [MC_PSTE](./keymap.c#L210-L218) | Condition | Output | | :-------- | :----- | @@ -93,7 +86,7 @@ An Undo shortcut that turns to Redo if Shift is being held. I'm not s The program I use this in uses Shift + Command + Option + V to paste while maintaining formatting (typeface, text size, etc.). Sometimes I want this and sometimes I don't. Using Shift changes the behavior. -#### [NUBS_Z](./keymap.c#L220-L234) +#### [NUBS_Z](./keymap.c#L219-L233) | Condition | Output | | :-------- | :----- | @@ -102,16 +95,20 @@ The program I use this in uses Shift + Command + Opti Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z. -#### [VRSN](./keymap.c#L235-L239) +#### [VRSN](./keymap.c#L234-L238) Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like: kc60/noroadsleft @ 0.6.326-6-gae6d7b-dirty -#### [Emulated Numeric Keypad](./keymap.c#L240-L254) +#### [Emulated Numeric Keypad](./keymap.c#L239-L253) If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °. +#### [Emulated Extended Function Keys](./keymap.c#L254-L268) + +Similar to the emulated numpad, if I hold the Right Alt key with the Fn key, the function row (`KC_F1` through `KC_F12`) will output keycodes `KC_F13` throught `KC_F24`. + ---- ### Layer 12: System layer - `_SY` @@ -120,7 +117,7 @@ If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output This is where I change my keyboard function. Base layer select on `1` through `3`, Backlight controls on `C` through `N`, Reset on `8*`, Debug on `0)`. -![System layer](https://i.imgur.com/95ovTBn.png) +![System layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_12.png) ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_git.md b/keyboards/kc60/keymaps/noroadsleft/readme_git.md index b81bb9409d..432f1abc7e 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_git.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_git.md @@ -11,7 +11,8 @@ # Cherry Pick cp = cherry-pick - # Check out a Pull Request + # Check out a Pull Request locally + # e.g. `git cop 351` fetches the commits from Pull Request #351 and saves it to local branch 'pr/351'. cop = "!f() { git fetch upstream pull/$1/head:pr/$1; git checkout pr/$1; }; f" # Sync master branch @@ -39,13 +40,17 @@ # Short-form status st = "!git status --short --untracked-files=no" + stu = "!git ls-files --others -x '*/*'" # Returns the name of the current branch branch-name = "!git rev-parse --abbrev-ref HEAD" bn = "!git branch-name" # short-form of the above + # List branches by the date of their last commit, newest to oldest + bbd = "for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(objectname) %(objecttype) %(refname:short) (%(authordate))'" # Compare commit counts between current branch and QMK master - cc = "!f() { git fetch upstream; echo \"$(git branch-name) vs. upstream/master\"; git rev-list --left-right --count $(git branch-name)...upstream/master; }; f" + # e.g. `git cc dev_branch upstream/master` returns how many commits are on `dev_branch` and not on `upstream/master`, and vice versa. + cc = "!f() { git fetch upstream; echo \"$(git branch-name) vs. $2\"; git rev-list --left-right --count $1...$2; }; f" # Push to origin repo po = "push origin $(git branch-name)" @@ -71,6 +76,4 @@ # Force push without overwriting established history pushf = push --force-with-lease - - ``` diff --git a/keyboards/kc60/keymaps/noroadsleft/rules.mk b/keyboards/kc60/keymaps/noroadsleft/rules.mk index 9d78fc0fb3..c9805878d2 100644 --- a/keyboards/kc60/keymaps/noroadsleft/rules.mk +++ b/keyboards/kc60/keymaps/noroadsleft/rules.mk @@ -1,2 +1,8 @@ # https://github.com/qmk/qmk_firmware/issues/3448#issuecomment-406636125 -EXTRAFLAGS += -flto +# EXTRAFLAGS += -flto +LINK_TIME_OPTIMIZATION_ENABLE = yes + +MOUSEKEY_ENABLE = no # Mouse keys +# COMMAND_ENABLE = no # Commands for debug and configuration +SPACE_CADET_ENABLE = no # Space Cadet +DYNAMIC_MACRO_ENABLE = yes diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index e4f590b1b1..3e7e4797c6 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -67,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = 60_ansi \ No newline at end of file +LAYOUTS = 60_ansi diff --git a/keyboards/kc60se/rules.mk b/keyboards/kc60se/rules.mk index c32a9b6109..1685cb7423 100644 --- a/keyboards/kc60se/rules.mk +++ b/keyboards/kc60se/rules.mk @@ -1,53 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # change yes to no to disable diff --git a/keyboards/keebio/bdn9/config.h b/keyboards/keebio/bdn9/config.h index 19e625348d..40c8a1d77a 100644 --- a/keyboards/keebio/bdn9/config.h +++ b/keyboards/keebio/bdn9/config.h @@ -38,7 +38,6 @@ along with this program. If not, see . { E6, B4, B2 } \ } -#define NUMBER_OF_ENCODERS 2 #define ENCODERS_PAD_A { D1, F5 } #define ENCODERS_PAD_B { D0, F6 } @@ -65,4 +64,4 @@ along with this program. If not, see . /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +#define LOCKING_RESYNC_ENABLE \ No newline at end of file diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c index 3507aaedec..05d324034c 100644 --- a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c @@ -5,20 +5,17 @@ enum layer { LAYER_SECOND, }; -/* Switch to second layer when held. */ #define LY_SECND MO(LAYER_SECOND) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* First layer (F1-F6) */ [LAYER_FIRST] = LAYOUT( - KC_MUTE, LY_SECND, BL_TOGG, + KC_MUTE, LY_SECND, BL_BRTG, KC_F4, KC_F5, KC_F6, KC_F1, KC_F2, KC_F3 ), - /* Second layer (F7-F12) */ [LAYER_SECOND] = LAYOUT( - _______, _______, _______, + EEP_RST, _______, RESET, KC_F10, KC_F11, KC_F12, KC_F7, KC_F8, KC_F9 ), @@ -26,12 +23,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void encoder_update_user(uint8_t index, bool clockwise) { switch (index) { - /* Top-left encoder (volume): */ + /* Top-left encoder (volume) */ case 0: tap_code(clockwise ? KC_VOLU : KC_VOLD); break; - /* Top-right encoder (backlight brightness): */ + /* Top-right encoder (backlight brightness) */ case 1: if (clockwise) { backlight_increase(); diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h b/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h new file mode 100644 index 0000000000..5b8b369bc3 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h @@ -0,0 +1,12 @@ +#pragma once + +/* For USB nonsense in various OSs */ +#define TAP_CODE_DELAY 10 + +/* For constant mouse speed */ +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_MAX_SPEED 1 +#define MOUSEKEY_TIME_TO_MAX 0 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c new file mode 100644 index 0000000000..9747dbf223 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2019 Danny Nguyen + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + | Knob 1: Scrl Dn/Up | | Knob 2: Vol Dn/Up | + | Press: Mute | Up | Press: Play/Pause | + | Left | Down | Right | + | Media Previous | MO(1)| Media Next | + */ + [0] = LAYOUT( + KC_MUTE, KC_UP, KC_MPLY, + KC_LEFT, KC_DOWN, KC_RIGHT, + KC_MPRV, MO(1), KC_MNXT + ), + /* + | RESET | Home | Media Stop | + | | End | | + | CTRL_END | | CTRL_HOME | + */ + [1] = LAYOUT( + RESET , KC_HOME, KC_STOP, + _______, KC_END, _______, + LCTL(KC_END), _______, LCTL(KC_HOME) + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk b/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk new file mode 100644 index 0000000000..e910b7bea5 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes +CTPC = yes \ No newline at end of file diff --git a/keyboards/keebio/bdn9/keymaps/eosti/config.h b/keyboards/keebio/bdn9/keymaps/eosti/config.h new file mode 100644 index 0000000000..4ba28f26a8 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/eosti/config.h @@ -0,0 +1 @@ +#define TAPPING_TERM 175 diff --git a/keyboards/keebio/bdn9/keymaps/eosti/keymap.c b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c new file mode 100644 index 0000000000..adec3984bc --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c @@ -0,0 +1,161 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _MACRO, + _MOD +}; + +enum custom_keycodes { + M801 = SAFE_RANGE, + M802, + M803, + M804, + M805, + M806, + MAIL_C +}; + +// tapdance keycodes +enum td_keycodes { + LAY // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance. +}; + +// define a type containing as many tapdance states as you need +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, +} td_state_t; + +// create a global instance of the tapdance state type +static td_state_t td_state; + +// declare your tapdance functions: + +// function to determine the current tapdance state +int cur_dance (qk_tap_dance_state_t *state); + +// `finished` and `reset` functions for each tapdance keycode +void altlp_finished (qk_tap_dance_state_t *state, void *user_data); +void altlp_reset (qk_tap_dance_state_t *state, void *user_data); + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M801: + if (record->event.pressed) { + SEND_STRING("M801" SS_TAP(X_ENTER)); + } + break; + case M802: + if (record->event.pressed) { + SEND_STRING("M802" SS_TAP(X_ENTER)); + } + break; + case M803: + if (record->event.pressed) { + SEND_STRING("M803" SS_TAP(X_ENTER)); + } + break; + case M804: + if (record->event.pressed) { + SEND_STRING("M804" SS_TAP(X_ENTER)); + } + break; + case M805: + if (record->event.pressed) { + SEND_STRING("M805" SS_TAP(X_ENTER)); + } + break; + case M806: + if (record->event.pressed) { + SEND_STRING("M806" SS_TAP(X_ENTER)); + } + break; + case MAIL_C: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ENTER) SS_TAP(X_DOWN) SS_TAP(X_DOWN) SS_TAP(X_ENTER)); + } + break; + } + + return true; +}; + +#define EX_ARR LCTL(LSFT(KC_ENTER)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + // ┌────────┬────────┬────────┐ + KC_MUTE, KC_UP, TD(LAY), + // ├────────┼────────┼────────┤ + KC_LEFT, KC_DOWN, KC_RGHT, + // ├────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO + // └────────┴────────┴────────┘ + ), + [_MACRO] = LAYOUT( + // ┌────────┬────────┬────────┐ + _______, KC_SPC, TG(_MACRO), + // ├────────┼────────┼────────┤ + M801, M802, M803, + // ├────────┼────────┼────────┤ + MAIL_C, KC_NO, EX_ARR + // └────────┴────────┴────────┘ + ), + [_MOD] = LAYOUT( + // ┌────────┬────────┬────────┐ + _______, BL_STEP,TG(_MOD), + // ├────────┼────────┼────────┤ + KC_NO, RGB_MOD, KC_NO, + // ├────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO + // └────────┴────────┴────────┘ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} + +// determine the tapdance state to return +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { return SINGLE_TAP; } + else { return SINGLE_HOLD; } + } else { return 3; } // any number higher than the maximum state value you return above +} + +// handle the possible states for each tapdance keycode you define: + +void altlp_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + layer_on(_MACRO); + break; + case SINGLE_HOLD: + layer_on(_MOD); + break; + } +} + +void altlp_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + layer_off(_MOD); + break; + } +} + +// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions +qk_tap_dance_action_t tap_dance_actions[] = { + [LAY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset) +}; diff --git a/keyboards/keebio/bdn9/keymaps/eosti/readme.md b/keyboards/keebio/bdn9/keymaps/eosti/readme.md new file mode 100644 index 0000000000..d93ce1e5f4 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/eosti/readme.md @@ -0,0 +1,9 @@ +# EosTi's BDN9 Macropad Layout + +## Features + +- Single encoder in the top left to control volume, push to mute +- Arrow keys on home layer +- Tap upper right to toggle to macro layer +- Hold upper right to change keyboard functions (aka RGB) +- 520 entire bytes free! diff --git a/keyboards/keebio/bdn9/keymaps/eosti/rules.mk b/keyboards/keebio/bdn9/keymaps/eosti/rules.mk new file mode 100644 index 0000000000..31e0fcf293 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/eosti/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE=yes diff --git a/keyboards/keebio/bdn9/keymaps/rishka/config.h b/keyboards/keebio/bdn9/keymaps/rishka/config.h new file mode 100644 index 0000000000..05f1bada99 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/rishka/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define QMK_ESC_OUTPUT B4 +#define QMK_ESC_INPUT F7 +#define QMK_LED B0 diff --git a/keyboards/keebio/bdn9/keymaps/rishka/keymap.c b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c new file mode 100644 index 0000000000..dec371d173 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2019 Danny Nguyen + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + | Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up | + | Press: Mute | Home | Press: Play/Pause | + | Hold: Layer 2 | Up | RGB Mode | + | Left | Down | Right | + */ + [0] = LAYOUT( + KC_MUTE, KC_UP, TO(0), + KC_F12 , _______ , KC_F1, + KC_LEFT, KC_DOWN, KC_RGHT + ), + /* + | RESET | N/A | Media Stop | + | Held: Layer 2 | Home | RGB Mode | + | Media Previous | End | Media Next | + */ + [1] = LAYOUT( + RESET , KC_HOME, _______, + _______, _______, _______, + KC_MPRV, KC_END , KC_MNXT + ), +}; +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } + else if (index == 1) { + int mod = 0; + if (clockwise) { + mod = 1; + } else { + mod = -1; + } + int n = 2; //sizeof(PROGMEM); + int new_layer = ((layer_state + mod) % n + n) % n; + uprintf("new: %d\n", new_layer); + layer_on(new_layer); + for(int i=0; i < n; i++) { + if (new_layer != i) { + layer_off(i); + } + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/rishka/rules.mk b/keyboards/keebio/bdn9/keymaps/rishka/rules.mk new file mode 100644 index 0000000000..0613ea8667 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/rishka/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = qmk-dfu diff --git a/keyboards/keebio/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk index 3ab8491089..a548334074 100644 --- a/keyboards/keebio/bdn9/rules.mk +++ b/keyboards/keebio/bdn9/rules.mk @@ -1,11 +1,5 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -13,20 +7,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -47,4 +31,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -ENCODER_ENABLE = yes +ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/rules.mk b/keyboards/keebio/bfo9000/rules.mk index 3ebe39a902..c0f4ed42dd 100644 --- a/keyboards/keebio/bfo9000/rules.mk +++ b/keyboards/keebio/bfo9000/rules.mk @@ -1,48 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/keebio/chocopad/rules.mk b/keyboards/keebio/chocopad/rules.mk index 39ce38e100..ac68b66523 100644 --- a/keyboards/keebio/chocopad/rules.mk +++ b/keyboards/keebio/chocopad/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. diff --git a/keyboards/keebio/dilly/keymaps/default/keymap.c b/keyboards/keebio/dilly/keymaps/default/keymap.c index dc92afbd0d..f81aa6d446 100644 --- a/keyboards/keebio/dilly/keymaps/default/keymap.c +++ b/keyboards/keebio/dilly/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _BASE 0 #define _FN1 1 diff --git a/keyboards/keebio/dilly/rules.mk b/keyboards/keebio/dilly/rules.mk index 812362567e..14f62bd8f7 100644 --- a/keyboards/keebio/dilly/rules.mk +++ b/keyboards/keebio/dilly/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. diff --git a/keyboards/keebio/ergodicity/config.h b/keyboards/keebio/ergodicity/config.h new file mode 100644 index 0000000000..a743816276 --- /dev/null +++ b/keyboards/keebio/ergodicity/config.h @@ -0,0 +1,233 @@ +/* +Copyright 2019 Keebio + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x125F +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keebio +#define PRODUCT Ergodicity +#define DESCRIPTION Low-profile ergo keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, B1, C7, B6, B4 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D7, D6, D4, D3, D2, D1, D0, B7, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 7 + +#define RGB_DI_PIN B2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 12 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/keebio/ergodicity/ergodicity.c b/keyboards/keebio/ergodicity/ergodicity.c new file mode 100644 index 0000000000..0bbcf61178 --- /dev/null +++ b/keyboards/keebio/ergodicity/ergodicity.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Keebio + * + * 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 . + */ +#include "ergodicity.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/keebio/ergodicity/ergodicity.h b/keyboards/keebio/ergodicity/ergodicity.h new file mode 100644 index 0000000000..156ad828a3 --- /dev/null +++ b/keyboards/keebio/ergodicity/ergodicity.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Keebio + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + kA1, kA2, kA3, kE3, kA4, kA5, kA6, kA7, kA8, kA9, kA10, kA11, kA12, kA13, kA15, \ + kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8, kB9, kB10, kB11, kB12, kB13, kB14, kB15, \ + kC1, kC2, kC3, kC4, kC5, kC6, kC7, kC8, kC9, kC10, kC11, kC12, kC13, kC15, \ + kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kD10, kD11, kD12, kD13, kD14, kD15, \ + kE2, kE4, kE6, kE7, kE9, kE11, kE15 \ +) \ +{ \ + { kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kA10, kA11, kA12, kA13, KC_NO, kA15 }, \ + { kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8, kB9, kB10, kB11, kB12, kB13, kB14, kB15 }, \ + { kC1, kC2, kC3, kC4, kC5, kC6, kC7, kC8, kC9, kC10, kC11, kC12, kC13, KC_NO, kC15 }, \ + { KC_NO, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kD10, kD11, kD12, kD13, kD14, kD15 }, \ + { KC_NO, kE2, kE3, kE4, KC_NO, kE6, kE7, KC_NO, kE9, KC_NO, kE11, KC_NO, KC_NO, kE15 } \ +} diff --git a/keyboards/keebio/ergodicity/info.json b/keyboards/keebio/ergodicity/info.json new file mode 100644 index 0000000000..b019da3aae --- /dev/null +++ b/keyboards/keebio/ergodicity/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Ergodicity", + "url": "https://keeb.io", + "maintainer": "Keebio", + "width": 19.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"`", "x":1.75, "y":0.25}, + {"label":"1", "x":2.75, "y":0.25}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0.25}, + {"label":"4", "x":5.75, "y":0.25}, + {"label":"5", "x":6.75, "y":0.25}, + {"label":"6", "x":7.75, "y":0.25}, + {"label":"7", "x":11, "y":0.25}, + {"label":"8", "x":12, "y":0.25}, + {"label":"9", "x":13, "y":0.25}, + {"label":"0", "x":14, "y":0.25}, + {"label":"-", "x":15, "y":0}, + {"label":"=", "x":16, "y":0.25}, + {"label":"Backspace", "x":17, "y":0.25, "w":2}, + + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1.25, "w":1.5}, + {"label":"Q", "x":3, "y":1.25}, + {"label":"W", "x":4.25, "y":1.25}, + {"label":"E", "x":5.25, "y":1.25}, + {"label":"R", "x":6.25, "y":1.25}, + {"label":"T", "x":7.25, "y":1.25}, + {"label":"Y", "x":10.5, "y":1.25}, + {"label":"U", "x":11.5, "y":1.25}, + {"label":"I", "x":12.5, "y":1.25}, + {"label":"O", "x":13.5, "y":1.25}, + {"label":"P", "x":14.75, "y":1.25}, + {"label":"[", "x":15.75, "y":1.25}, + {"label":"]", "x":16.75, "y":1.25}, + {"label":"Backslash", "x":17.75, "y":1.25, "w":1.5}, + + {"label":"PgDn", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.25, "y":2.25, "w":2}, + {"label":"A", "x":3.25, "y":2.25}, + {"label":"S", "x":4.5, "y":2.25}, + {"label":"D", "x":5.5, "y":2.25}, + {"label":"F", "x":6.5, "y":2.25}, + {"label":"G", "x":7.5, "y":2.25}, + {"label":"H", "x":10.75, "y":2.25}, + {"label":"J", "x":11.75, "y":2.25}, + {"label":"K", "x":12.75, "y":2.25}, + {"label":"L", "x":13.75, "y":2.25}, + {"label":";", "x":15.25, "y":2.25}, + {"label":"'", "x":16.25, "y":2.25}, + {"label":"Enter", "x":17.25, "y":2.25, "w":2}, + + {"label":"Shift", "x":1.25, "y":3.25, "w":2.5}, + {"label":"Z", "x":3.75, "y":3.25}, + {"label":"X", "x":5, "y":3.25}, + {"label":"C", "x":6, "y":3.25}, + {"label":"V", "x":7, "y":3.25}, + {"label":"B", "x":8, "y":3.25}, + {"label":"B", "x":10.25, "y":3.25}, + {"label":"N", "x":11.25, "y":3.25}, + {"label":"M", "x":12.25, "y":3.25}, + {"label":",", "x":13.25, "y":3.25}, + {"label":".", "x":14.75, "y":3.25}, + {"label":"/", "x":15.75, "y":3.25}, + {"label":"Shift", "x":16.75, "y":3.25, "w":1.5}, + {"label":"Fn", "x":18.25, "y":3.25}, + + {"label":"Alt", "x":1.25, "y":4.25, "w":1.5}, + {"label":"Gui", "x":5, "y":4.25, "w":1.5}, + {"label":"Space", "x":6.5, "y":4.25, "w":2}, + {"label":"Menu", "x":8.5, "y":4.25}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.5}, + {"label":"Alt", "x":12.75, "y":4.25, "w":1.5}, + {"label":"Fn", "x":17.75, "y":4.25, "w":1.5} + ] + } + } +} diff --git a/keyboards/keebio/ergodicity/keymaps/default/config.h b/keyboards/keebio/ergodicity/keymaps/default/config.h new file mode 100644 index 0000000000..6079c0b0f3 --- /dev/null +++ b/keyboards/keebio/ergodicity/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Keebio + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/keebio/ergodicity/keymaps/default/keymap.c b/keyboards/keebio/ergodicity/keymaps/default/keymap.c new file mode 100644 index 0000000000..b33031ca5e --- /dev/null +++ b/keyboards/keebio/ergodicity/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2019 Keebio + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_PGUP, 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_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL \ + ), + [1] = LAYOUT( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, \ + RGB_MOD, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_STEP, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/keebio/ergodicity/keymaps/default/readme.md b/keyboards/keebio/ergodicity/keymaps/default/readme.md new file mode 100644 index 0000000000..906b26c649 --- /dev/null +++ b/keyboards/keebio/ergodicity/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for ergodicity diff --git a/keyboards/keebio/ergodicity/readme.md b/keyboards/keebio/ergodicity/readme.md new file mode 100644 index 0000000000..0f841d6e3e --- /dev/null +++ b/keyboards/keebio/ergodicity/readme.md @@ -0,0 +1,15 @@ +# Ergodicity + +![ergodicity](imgur.com image replace me!) + +A short description of the keyboard/project + +Keyboard Maintainer: [nooges/bakingpy](https://github.com/nooges) +Hardware Supported: Ergodicity PCB w/ATmega32u4 +Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make keebio/ergodicity:default:dfu + +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). diff --git a/keyboards/keebio/ergodicity/rules.mk b/keyboards/keebio/ergodicity/rules.mk new file mode 100644 index 0000000000..0c794fb751 --- /dev/null +++ b/keyboards/keebio/ergodicity/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/keebio/fourier/keymaps/xyverz/config.h b/keyboards/keebio/fourier/keymaps/xyverz/config.h deleted file mode 100644 index 9b46a61ccd..0000000000 --- a/keyboards/keebio/fourier/keymaps/xyverz/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert - -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 . -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -#define EE_HANDS - -#endif diff --git a/keyboards/keebio/fourier/keymaps/xyverz/keymap.c b/keyboards/keebio/fourier/keymaps/xyverz/keymap.c deleted file mode 100644 index 4e864cdef7..0000000000 --- a/keyboards/keebio/fourier/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,84 +0,0 @@ -#include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BASE 0 -#define _FN1 1 -#define _FN2 2 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, -}; - -#define KC_ KC_TRNS -#define KC_FN1 MO(_FN1) -#define KC_FN2 MO(_FN2) -#define KC_ESFN1 LT(_FN1, KC_ESC) -#define KC_SPFN1 LT(_FN1, KC_SPACE) -#define KC_SPFN2 LT(_FN2, KC_SPACE) -#define KC_BSFN1 LT(_FN1, KC_BSPC) -#define KC_BSFN2 LT(_FN2, KC_BSPC) -#define KC_RST RESET -#define KC_DBUG DEBUG -#define KC_RTOG RGB_TOG -#define KC_RMOD RGB_MOD -#define KC_RHUI RGB_HUI -#define KC_RHUD RGB_HUD -#define KC_RSAI RGB_SAI -#define KC_RSAD RGB_SAD -#define KC_RVAI RGB_VAI -#define KC_RVAD RGB_VAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_kc( - //,----+----+----+----+----+----|----+----+----+----+----+----+----. - TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,MINS, - //|----`----`----`----`----`----|----`----`----`----`----`----`----| - ESC , A , O , E , U , I , D , H , T , N , S , ENTER , - //|-----`----`----`----`----`----|----`----`----`----`----`--------| - LSFT ,SCLN, Q , J , K , X , B , M , W , V , Z , RSFT , - //|-------`----`----`----`----`----|----`----`----`----`----`------| - LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL - //`-----+----+-----+----+--------|--------+-----+-----+-----+------' - ), - - [_FN1] = LAYOUT_kc( - //,----+----+----+----+----+----|----+----+----+----+----+----+----. - GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , - //|----`----`----`----`----`----|----`----`----`----`----`----`----| - CAPS ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, , , ,SCLN, , - //|-----`----`----`----`----`----|----`----`----`----`----`--------| - RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, , , , UP , , - //|-------`----`----`----`----`----|----`----`----`----`----`------| - RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT - //`-----+----+-----+----+--------|--------+-----+-----+-----+------' - ), - - [_FN2] = LAYOUT_kc( - //,----+----+----+----+----+----|----+----+----+----+----+----+----. - TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS, - //|----`----`----`----`----`----|----`----`----`----`----`----`----| - CAPS , , ,INS ,PGUP,HOME, F1 , F2 , F3 , F4 , F5 , F6 , - //|-----`----`----`----`----`----|----`----`----`----`----`--------| - , , ,DEL ,PGDN,END , F7 , F8 , F9 ,F10 ,F11 , F12 , - //|-------`----`----`----`----`----|----`----`----`----`----`------| - , , , , DEL , INS , , , , - //`-----+----+-----+----+--------|--------+-----+-----+-----+------' - ) - -}; - -void matrix_init_user(void) { - // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); -}; - diff --git a/keyboards/keebio/fourier/rules.mk b/keyboards/keebio/fourier/rules.mk index 9512c0f648..9bd9e1dccc 100644 --- a/keyboards/keebio/fourier/rules.mk +++ b/keyboards/keebio/fourier/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/keebio/iris/iris.h b/keyboards/keebio/iris/iris.h index ec78efc220..5e6bc5b582 100644 --- a/keyboards/keebio/iris/iris.h +++ b/keyboards/keebio/iris/iris.h @@ -6,12 +6,14 @@ #include "rev1_led.h" #elif KEYBOARD_keebio_iris_rev2 #include "rev2.h" -#else +#elif KEYBOARD_keebio_iris_rev3 #include "rev3.h" +#elif KEYBOARD_keebio_iris_rev4 + #include "rev4.h" #endif #include "quantum.h" -#include "../../zeal60/zeal60_keycodes.h" +#include "../../wilba_tech/via_keycodes.h" // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/config.h b/keyboards/keebio/iris/keymaps/antonlindstrom/config.h new file mode 100644 index 0000000000..0997e72512 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2019 Anton Lindström + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS + +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SLEEP // Turn off RGB light when host is asleep. +#endif + +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c new file mode 100644 index 0000000000..fd953bab3d --- /dev/null +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c @@ -0,0 +1,66 @@ +#include QMK_KEYBOARD_H +#include "keymap_swedish.h" + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +#define KC_ KC_TRNS + +#define RGB + +#define KC_LOWR MO(_LOWER) +#define KC_RASE MO(_RAISE) +#define KC_RST RESET + +#define KC_AA SE_AA +#define KC_AE SE_AE +#define KC_OE SE_OSLH + +#define KC_LBR SE_LBRC +#define KC_RBR SE_RBRC + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P , AA , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, A , S , D , F , G , H , J , K , L , OE , AE , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LCTL, Z , X , C , V , B ,LBR ,RBR , N , M ,COMM,DOT ,SLSH,MINS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR,SPC , ENT ,RASE,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + SE_TILD,KC_EXLM,SE_AT ,KC_HASH,SE_DLR ,KC_PERC, SE_CIRC,SE_AMPR,SE_ASTR,SE_SLSH,SE_LPRN,SE_RPRN, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + SE_ACUT,RGB_TOG,RGB_MOD,RGB_M_B,RGB_M_K,_______, _______,_______,_______,_______,_______,SE_ASTR, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,SE_LESS,SE_GRTR,SE_PIPE,SE_SLSH, SE_BSLS,SE_LCBR,SE_RCBR,SE_LBRC,SE_RBRC,SE_APOS, + //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------| + _______,KC_NUBS,_______,_______,_______,_______,SE_LCBR, SE_RCBR,_______,_______,_______,_______,_______,_______, + //`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------' + _______,_______,_______, _______,_______,_______ + // `-------+-------+-------' `-------+-------+-------' + ), + + [_RAISE] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + SE_GRV ,_______,_______,_______,_______,_______, _______,KC_PGUP,KC_UP ,KC_PGDN,KC_PSCR,KC_PAUS, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS ,KC_DEL , + //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______,KC_VOLU, KC_VOLD,_______,_______,_______,_______,_______,_______, + //`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------' + _______,_______,_______, _______,_______,_______ + // `-------+-------+-------' `-------+-------+-------' + ) +}; diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/readme.md b/keyboards/keebio/iris/keymaps/antonlindstrom/readme.md new file mode 100644 index 0000000000..ac929068e5 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/readme.md @@ -0,0 +1,5 @@ +# Iris rev3 + +Layout for Iris rev3 with a layer for programming and one for navigation. The +keymap is based on a swedish one and contains the åäö characters and the +swedish mappings. diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/rules.mk b/keyboards/keebio/iris/keymaps/antonlindstrom/rules.mk new file mode 100644 index 0000000000..d7463419b4 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes diff --git a/keyboards/keebio/iris/keymaps/blucky/config.h b/keyboards/keebio/iris/keymaps/blucky/config.h new file mode 100644 index 0000000000..213445dd3f --- /dev/null +++ b/keyboards/keebio/iris/keymaps/blucky/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2019 Brian Luckenbill + +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 . +*/ + +#pragma once + +#define C6_AUDIO + +#undef RGBLED_NUM +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_ANIMATIONS + +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_MAX_SPEED 10 +#define MOUSEKEY_TIME_TO_MAX 20 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 diff --git a/keyboards/keebio/iris/keymaps/blucky/keymap.c b/keyboards/keebio/iris/keymaps/blucky/keymap.c new file mode 100644 index 0000000000..f7ede3f220 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/blucky/keymap.c @@ -0,0 +1,86 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LAYER1, + _LAYER2, + _LAYER3 +}; + +#define WM_0 LGUI(KC_ENT) +#define WM_1 LGUI(KC_BSPC) +#define WM_2 LGUI(KC_DEL) +#define WM_3 SGUI(KC_ENT) +#define WM_4 SGUI(KC_BSPC) +#define WM_5 SGUI(KC_DEL) +#define WM_6 SGUI(KC_TAB) + +#define LAYER1 TT(_LAYER1) +#define LAYER2 TT(_LAYER2) + +#define CS_U C(S(KC_UP)) +#define CS_D C(S(KC_DOWN)) +#define CS_SPC C(S(KC_SPC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + LAYER1, 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_LGUI, KC_RGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LAYER2, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LCTL, KC_LALT, KC_SPC, KC_ENT, KC_RGUI, WM_0 + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + + [_LAYER1] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MINS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_SLCK, KC_PSCR, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_NO, KC_DEL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, KC_NO, C(KC_LEFT), KC_NO, C(KC_RGHT), KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_INS, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_RSFT, KC_NO, WM_5, WM_4, WM_3, WM_2, MU_TOG, AU_TOG, KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_BSLS, KC_NO, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + WM_1, KC_LGUI, KC_PIPE, KC_UNDS, KC_RCTL, KC_RALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + + [_LAYER2] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO, CS_SPC, CS_U, S(KC_PGUP), RGB_VAI, RGB_HUI, RGB_SAI, RGB_M_SW,RGB_M_R, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO, KC_NO, CS_D, S(KC_PGDN), RGB_VAD, RGB_HUD, RGB_SAD, KC_NO, KC_NO, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_VOLD, KC_VOLU, KC_MUTE, KC_BRID, KC_BRIU, MU_MOD, AU_OFF, KC_RCTL, KC_LCTL, KC_RALT, KC_LALT, KC_DEL, KC_NO, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + WM_6, VLK_TOG, RGB_MOD, RGB_TOG, BL_TOGG, BL_STEP + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + + [_LAYER3] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/keebio/iris/keymaps/blucky/rules.md b/keyboards/keebio/iris/keymaps/blucky/rules.md new file mode 100644 index 0000000000..5c1458faee --- /dev/null +++ b/keyboards/keebio/iris/keymaps/blucky/rules.md @@ -0,0 +1,7 @@ +# blucky's keymap for iris rev 2 w/ speaker, backlight and RGB and rev 3 + +```shell +make keebio/iris/rev2:blucky + +make keebio/iris/rev3:blucky +``` diff --git a/keyboards/keebio/iris/keymaps/blucky/rules.mk b/keyboards/keebio/iris/keymaps/blucky/rules.mk new file mode 100644 index 0000000000..5fdc528057 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/blucky/rules.mk @@ -0,0 +1,5 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes +VELOCIKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +AUDIO_ENABLE = no diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c index 758b842f75..3102dd2dae 100644 --- a/keyboards/keebio/iris/keymaps/default/keymap.c +++ b/keyboards/keebio/iris/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 @@ -112,3 +111,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index 1a937b4b7c..25678bd67d 100644 --- a/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h @@ -29,33 +29,39 @@ along with this program. If not, see . #define EE_HANDS #ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 18 // Number of LEDs -# define RGBLED_SPLIT { 9, 9 } -# define RGBLIGHT_HUE_STEP 12 -# define RGBLIGHT_SAT_STEP 12 -# define RGBLIGHT_VAL_STEP 12 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +# undef RGBLED_NUM +# define RGBLED_NUM 18 // Number of LEDs +# undef RGBLED_SPLIT +# define RGBLED_SPLIT \ + { 9, 9 } +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -# define RGBLIGHT_LIMIT_VAL 225 -#endif // RGBLIGHT_ENABLE +# define RGBLIGHT_LIMIT_VAL 225 +#endif // RGBLIGHT_ENABLE #ifdef AUDIO_ENABLE -# define C6_AUDIO -# ifdef RGBLIGHT_ENABLE -# define NO_MUSIC_MODE -# endif //RGBLIGHT_ENABLE -#endif //AUDIO_ENABLE +# define C6_AUDIO +# ifdef RGBLIGHT_ENABLE +# define NO_MUSIC_MODE +# endif // RGBLIGHT_ENABLE +#endif // AUDIO_ENABLE -#define QMK_ESC_OUTPUT F6 // usually COL -#define QMK_ESC_INPUT D7 // usually ROW -#define QMK_LED B0 -#define QMK_SPEAKER C6 +#ifndef KEYBOARD_keebio_iris_rev3 +# define QMK_ESC_OUTPUT F6 // usually COL +# define QMK_ESC_INPUT D7 // usually ROW +# define QMK_LED B0 +# define QMK_SPEAKER C6 +#endif #undef PRODUCT #ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris Rev.2 +# define PRODUCT Drashna Hacked Iris Rev .2 +#elif defined(KEYBOARD_keebio_iris_rev3) +# define PRODUCT Drashna Hacked Iris Rev .3 #endif #define SHFT_LED1 6 diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index 44ffb59f6a..edfcd23e79 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -1,8 +1,14 @@ - -#include QMK_KEYBOARD_H #include "drashna.h" +/* + * The `LAYOUT_iris_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ +// clang-format off #define LAYOUT_iris_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -10,8 +16,8 @@ ) \ LAYOUT_wrapper( \ KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ - KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ - KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + LALT_T(KC_TAB), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) @@ -77,11 +83,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_GAMEPAD] = LAYOUT_wrapper( - KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_P, _______, _______, _______, _______, _______, _______, + KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, _______, _______, _______, _______, _______, _______, KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, TG_GAME, _______, _______, _______, _______, _______, _______, _______, - LOWER, KC_V, KC_SPC, _______, _______, _______ + KC_GRV, KC_V, KC_SPC, _______, _______, _______ ), @@ -110,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - +// clang-format on void matrix_init_keymap(void) { #ifndef CONVERT_TO_PROTON_C @@ -122,13 +128,12 @@ void matrix_init_keymap(void) { #endif } - void keyboard_post_init_keymap(void) { #if BACKLIGHT_ENABLE backlight_enable(); backlight_level(5); - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif +# ifdef BACKLIGHT_BREATHING + breathing_enable(); +# endif #endif } diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index a315e1a0b1..cb398cd4eb 100644 --- a/keyboards/keebio/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk @@ -5,15 +5,14 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = yes +AUDIO_ENABLE = no NKRO_ENABLE = yes BACKLIGHT_ENABLE = no SWAP_HANDS_ENABLE = no SPACE_CADET_ENABLE = no INDICATOR_LIGHTS = no -MACROS_ENABLED = no RGBLIGHT_TWINKLE = no -RGBLIGHT_STARTUP_ANIMATION = yes +RGBLIGHT_STARTUP_ANIMATION = no BOOTLOADER = qmk-dfu diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/config.h b/keyboards/keebio/iris/keymaps/drashna_lp/config.h index d59890b46a..5370d88ed4 100644 --- a/keyboards/keebio/iris/keymaps/drashna_lp/config.h +++ b/keyboards/keebio/iris/keymaps/drashna_lp/config.h @@ -21,15 +21,16 @@ along with this program. If not, see . #include "../drashna/config.h" #ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 16 // Number of LEDs -# undef RGBLED_SPLIT -# define RGBLED_SPLIT { 8, 8 } +# undef RGBLED_NUM +# define RGBLED_NUM 16 // Number of LEDs +# undef RGBLED_SPLIT +# define RGBLED_SPLIT \ + { 8, 8 } #endif #undef PRODUCT #ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit) +# define PRODUCT Drashna Hacked Iris LP Rev .2(Backlit) #endif #undef SHFT_LED1 @@ -46,3 +47,5 @@ along with this program. If not, see . #define ALT_LED1 7 #undef GUI_LED1 #define GUI_LED1 8 + +#define DRASHNA_LP diff --git a/keyboards/keebio/iris/keymaps/eosti/config.h b/keyboards/keebio/iris/keymaps/eosti/config.h new file mode 100644 index 0000000000..01bb31a6e1 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/eosti/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/eosti/keymap.c b/keyboards/keebio/iris/keymaps/eosti/keymap.c new file mode 100644 index 0000000000..34f7512027 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/eosti/keymap.c @@ -0,0 +1,101 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _GAME, + _UPPER, + _LOWER +}; + +enum custom_keycodes { + TMUX_WN = SAFE_RANGE, + TMUX_WL +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TMUX_WN: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") "n"); + } + break; + + case TMUX_WL: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") "l"); + } + break; + + } + return true; +}; + +#define UPPER MO(_UPPER) +#define LOWER MO(_LOWER) +#define GAME TG(_GAME) + +#define WM_R LCTL(KC_RGHT) +#define WM_L LCTL(KC_LEFT) +#define WM_MC LCTL(KC_UP) +#define WEB_R LGUI(KC_RCBR) +#define WEB_L LGUI(KC_LCBR) +#define TMUX_ESC LCTL(KC_A) +#define TMUX_U RALT(KC_UP) +#define TMUX_D RALT(KC_DOWN) +#define TMUX_R RALT(KC_RGHT) +#define TMUX_L RALT(KC_LEFT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + 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_LCTL, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LGUI, UPPER, KC_ENT, KC_SPC, LOWER, KC_NO + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_GAME] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_SPC, KC_ENT, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_UPPER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_TILD, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC , KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + TMUX_ESC, KC_NO, KC_NO, KC_NO, WEB_L, WEB_R, TMUX_L, TMUX_D, TMUX_U, TMUX_R, KC_NO, KC_BSLS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_NO, KC_VOLU, WM_MC, WM_L, WM_R, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_MUTE, KC_VOLD, KC_LBRC, KC_LPRN, KC_LCBR,_______, _______, KC_RCBR, KC_RPRN, KC_RBRC, KC_NO, KC_PGDN,_______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, KC_NO, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_NO, GAME, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_SLEP, KC_DEL, KC_END, KC_PGDN, KC_NO, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, TMUX_WL, TMUX_WN,_______, KC_LBRC, KC_LPRN, KC_LCBR, _______, KC_RCBR, KC_RPRN, KC_RBRC, KC_NO, KC_NO, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, KC_NO, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/keebio/iris/keymaps/eosti/readme.md b/keyboards/keebio/iris/keymaps/eosti/readme.md new file mode 100644 index 0000000000..0fc61a443c --- /dev/null +++ b/keyboards/keebio/iris/keymaps/eosti/readme.md @@ -0,0 +1,11 @@ +# EosTi's Iris Layout + +## Features + +- QWERTY base layer with right thumb space and left thumb enter +- Gaming layer to swap enter and space so that WASD and space can all be on the same hand +- MacOS navigation keys for switching windows and entering Mission Control +- Google Chrome navigation keys for cycling tabs +- HJKL arrow keys +- tmux navigation keys for switching focus, panes, and the leader key +- Probably other stuff too? diff --git a/keyboards/keebio/iris/keymaps/eosti/rules.mk b/keyboards/keebio/iris/keymaps/eosti/rules.mk new file mode 100644 index 0000000000..d7463419b4 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/eosti/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes diff --git a/keyboards/keebio/iris/keymaps/gary/README.md b/keyboards/keebio/iris/keymaps/gary/README.md new file mode 100644 index 0000000000..fd50751d89 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/gary/README.md @@ -0,0 +1,18 @@ +# Gary's Iris Layout + +My personal keymap for my Iris. + +Copyright 2019 Gary @garyjzhao + +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 . diff --git a/keyboards/keebio/iris/keymaps/gary/config.h b/keyboards/keebio/iris/keymaps/gary/config.h new file mode 100644 index 0000000000..186aee502c --- /dev/null +++ b/keyboards/keebio/iris/keymaps/gary/config.h @@ -0,0 +1,12 @@ +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/keebio/iris/keymaps/gary/keymap.c b/keyboards/keebio/iris/keymaps/gary/keymap.c new file mode 100644 index 0000000000..41ac9207b8 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/gary/keymap.c @@ -0,0 +1,47 @@ +#include "gary.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+---- +----+----+----. ,----|----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,NEXT, FULL , N , M ,COMM,DOT ,SLSH,SFTENT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR,SPC , GARY, ENT,LALT + // `----+----+----' `----+----+----' + ), + + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CLTB, ,CNTR,UPLF,UPRG, , , ,PLUS,LBRC,RBRC,OPASS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,LHLF,RHLF,DNLF,DNRG, , , ,MINS, , ,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|` + , , ,CTLC, , , , , , , ,EQL , ,UNDS , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,DEL , BSPC , , + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD, F1 , F2 , F3 ,SHOT, F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MPRV,MPLY,MNXT, , , ,PGUP, UP ,PGDN, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,VOLD,VOLU,MUTE, , ,LEFT,DOWN,RGHT, , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , RST, , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + ,LALT, , , , + // `----+----+----' `----+----+----' + ), +}; diff --git a/keyboards/keebio/iris/keymaps/gary/rules.mk b/keyboards/keebio/iris/keymaps/gary/rules.mk new file mode 100644 index 0000000000..2df7e9a203 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/gary/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no +EXTRAKEY_ENABLE = yes diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/config.h b/keyboards/keebio/iris/keymaps/jerryhcooke/config.h new file mode 100644 index 0000000000..58f33d3716 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 2 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#ifndef NO_DEBUG +# define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) +# define NO_PRINT +#endif // !NO_PRINT diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c b/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c new file mode 100644 index 0000000000..1e512540aa --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, LCTL_T(KC_LGUI), KC_Z, KC_X, KC_C, KC_D, KC_V, LGUI(KC_L), MEH_T(KC_MINS), KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LGUI, LT(1, KC_QUOT), KC_SFTENT, KC_SPC, LT(2, KC_BSLS), LALT_T(KC_APP)), + [1] = LAYOUT(KC_MPLY, KC_NO, KC_DQUO, KC_NO, LALT(KC_F4), KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_NO, RESET, KC_MPRV, KC_END, KC_UP, KC_HOME, KC_PGUP, KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, RGB_SAI, RGB_SAD, KC_MNXT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P1, KC_P2, KC_P3, KC_PAST, RGB_HUI, RGB_HUD, KC_NO, KC_WBAK, KC_WFWD, KC_WSTP, KC_WREF, KC_NO, LCA(KC_DEL), KC_NLCK, KC_P0, KC_P0, KC_PDOT, KC_PENT, RGB_SPI, RGB_SPD, KC_PSCR, KC_NO, KC_LGUI, RGB_TOG, RGB_VAI, RGB_VAD), + [2] = LAYOUT(KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_K, KC_NO, KC_WH_D, KC_MS_U, KC_WH_U, KC_NO, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (biton32(layer_state)) { + case _LOWER: + clockwise ? tap_code(KC_MS_WH_UP) : tap_code(KC_MS_WH_DOWN); + break; + case _RAISE: + clockwise ? rgblight_increase_hue() : rgblight_decrease_hue(); + break; + default: + clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); + break; + } + } else if (index == 1) { + switch (biton32(layer_state)) { + case _LOWER: + clockwise ? tap_code(KC_UP) : tap_code(KC_DOWN); + break; + case _RAISE: + clockwise ? tap_code(KC_MEDIA_NEXT_TRACK) : tap_code(KC_MEDIA_PREV_TRACK); + break; + default: + clockwise ? tap_code(KC_RIGHT) : tap_code(KC_LEFT); + break; + } + } +} +#endif // ENCODER_ENABLE diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/readme.md b/keyboards/keebio/iris/keymaps/jerryhcooke/readme.md new file mode 100644 index 0000000000..8c2a6efef7 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/readme.md @@ -0,0 +1,3 @@ +[Jerry's Iris R4 Layout](https://imgur.com/a/JLytcqS) + +This is a fairly modified version of the default keymap that I tinkered with to allow the rotary encoder to carry out a different function on each layer. diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/rules.mk b/keyboards/keebio/iris/keymaps/jerryhcooke/rules.mk new file mode 100644 index 0000000000..8e5cd7a485 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = yes diff --git a/keyboards/keebio/iris/keymaps/mattly/keymap.c b/keyboards/keebio/iris/keymaps/mattly/keymap.c index 4f4ff225ee..b7713a0146 100644 --- a/keyboards/keebio/iris/keymaps/mattly/keymap.c +++ b/keyboards/keebio/iris/keymaps/mattly/keymap.c @@ -6,18 +6,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( - KC_ESC, 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_SCLN, + KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, + KC_BSPC, KC_Q, W_CTRL, E_ALT, R_GUI, KC_T, KC_Y, U_GUI, I_ALT, O_CTRL, KC_P, KC_SCLN, KC_CAPS, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, - XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, SPC_SFT, BSP_NUM, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - ESC_HYP, BSP_NUM, ENT_SFT, SPC_SFT, TAB_SYM, DEL_WRP + NAVLOCK, KC_Z, KC_X, KC_C, KC_V, KC_B, ENT_SYM, TAB_NUM, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + ESC_HYP, TAB_NUM, SPC_SFT, SPC_SFT, BSP_SYM, DEL_WRP ), [_SYMBOL] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, _______, _______, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_UNDS, _______, - RESET, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, KC_QUES, _______, + _______, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, KC_QUES, _______, _______, _______, _______, _______, _______, _______ ), @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XNOTIFY, XXXXXXX, XPRVSPC, NWIN, XNXTSPC, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX, XALLWIN, NAVFWD, BWORD, KC_UP, FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX, XDESKTP, NAVBACK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX, - RESET, PTAB, KC_HOME, PWIN, KC_END, NTAB, _______, _______, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_ENT, XXXXXXX, + _______, PTAB, KC_HOME, PWIN, KC_END, NTAB, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_COMM, _______, _______, _______, _______, _______, _______, KC_P0 ), diff --git a/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c index 65ed6d289b..115b70640e 100644 --- a/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c +++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c @@ -22,9 +22,9 @@ enum custom_keycodes { #define KC_ADJ ADJUST #define KC_RST RESET -#define KC_AA NO_AA -#define KC_AE NO_AE -#define KC_OE NO_OSLH +#define KC_AA SE_AA +#define KC_AE SE_AE +#define KC_OE SE_OSLH const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -44,13 +44,13 @@ LT(_LOWER, KC_TAB),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - NO_TILD, KC_EXLM, NO_AT, KC_HASH, NO_DLR, KC_PERC, NO_CIRC, NO_AMPR, NO_ASTR, NO_SLSH, NO_LPRN, NO_RPRN, + SE_TILD, KC_EXLM, SE_AT, KC_HASH, SE_DLR, KC_PERC, SE_CIRC, SE_AMPR, SE_ASTR, SE_SLSH, SE_LPRN, SE_RPRN, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDOWN, NO_LCBR, NO_RCBR, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDOWN, SE_LCBR, SE_RCBR, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, NO_BSLS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, NO_LBRC, NO_RBRC, + KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, SE_BSLS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, SE_LBRC, SE_RBRC, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_GRAVE, KC_CIRC, KC_QUOTE, NO_LESS, NO_GRTR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_GRAVE, KC_CIRC, KC_QUOTE, SE_LESS, SE_GRTR, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS // └────────┴────────┴────────┘ └────────┴────────┴────────┘ @@ -60,9 +60,9 @@ LT(_LOWER, KC_TAB),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - NO_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, NO_MINS, NO_ASTR, + SE_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, SE_MINS, SE_ASTR, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, NO_PLUS, NO_SLSH, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, SE_PLUS, SE_SLSH, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_0, KC_TRNS, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ diff --git a/keyboards/keebio/iris/keymaps/osiris/keymap.c b/keyboards/keebio/iris/keymaps/osiris/keymap.c index 4bf65dd6e2..a777c8a351 100644 --- a/keyboards/keebio/iris/keymaps/osiris/keymap.c +++ b/keyboards/keebio/iris/keymaps/osiris/keymap.c @@ -4,7 +4,7 @@ extern keymap_config_t keymap_config; enum layer_names { _QWERTY, - _WORKMAN, + _COLEMAK, _LOWER, _RAISE, _ADJUST @@ -12,7 +12,7 @@ enum layer_names { enum custom_keycodes { QWERTY = SAFE_RANGE, - WORKMAN, + COLEMAK, LOWER, RAISE }; @@ -24,8 +24,8 @@ enum custom_keycodes { #define KC_RST RESET #define KC_BL_S BL_STEP -// left control as a left key too - makes perfect sense -#define KC_LECL LCTL_T(KC_LEFT) +// left shift as a left key too - makes perfect sense +#define KC_LESF LSFT_T(KC_LEFT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -36,23 +36,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS, //|----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - LECL, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,RGHT, + LESF, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,RGHT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LGUI,LOWR,ENT , SPC ,RASE,RALT // `----+----+----' `----+----+----' ), - [_WORKMAN] = LAYOUT_kc( + [_COLEMAK] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| - TAB , Q , D , R , W , B , J , F , U , P ,SCLN,BSLS, + TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSLS, //|----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT, A , S , H , T , G , Y , N , E , O ,I ,QUOT, + LCTL, A , R , S , T , D , H , N , E , I , O ,QUOT, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - LECL, Z , X , M , C , V ,LBRC, RBRC, K , L ,COMM,DOT ,SLSH,RGHT, + LESF, Z , X , C , V , B ,LBRC, RBRC, K , M ,COMM,DOT ,SLSH,RGHT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LGUI,LOWR,ENT , SPC ,RASE,RALT // `----+----+----' `----+----+----' @@ -60,13 +60,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL , + GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL , //|----+----+----+----+----+----| |----+----+----+----+----+----| , , , , , , , ,BTN1, , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| , , , , , , MS_L,MS_D,MS_U,MS_R, , , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , UP , , , , , , , , , + , , , , , UP , , ,DOWN, , , , , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , , , // `----+----+----' `----+----+----' @@ -80,32 +80,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,MPLY,VOLD,MNXT, ,LPRN, RPRN,MINS,EQL , , , , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , ,DOWN, , , , , , + , , , , , , , , , , , , , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , , , // `----+----+----' `----+----+----' ), [_ADJUST] = LAYOUT( - //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - _______, _______, _______, _______, _______, QWERTY, WORKMAN, _______, _______, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| - BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' - _______, _______, _______, _______, _______, _______ - // `--------+--------+--------' `--------+--------+--------' + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + _______,_______,_______,_______,_______, QWERTY, COLEMAK,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI, _______,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + RESET ,DEBUG ,_______,RGB_HUD,RGB_SAD,RGB_VAD, _______,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------| + BL_STEP,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______, + //`--------+-------+-------+----+--+-------+-------+-------/ \-------+-------+-------+---+---+-------+-------+-------' + _______,_______,_______, _______,_______,_______ + // `-------+-------+-------' `-------+-------+-------' ) }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: @@ -113,9 +109,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_single_persistent_default_layer(_QWERTY); } return false; - case WORKMAN: + case COLEMAK: if (record->event.pressed) { - set_single_persistent_default_layer(_WORKMAN); + set_single_persistent_default_layer(_COLEMAK); } return false; case LOWER: diff --git a/keyboards/keebio/iris/keymaps/osiris/readme.md b/keyboards/keebio/iris/keymaps/osiris/readme.md index 7db30591e7..58469ef164 100644 --- a/keyboards/keebio/iris/keymaps/osiris/readme.md +++ b/keyboards/keebio/iris/keymaps/osiris/readme.md @@ -3,9 +3,10 @@ ![My Iris Rev3](https://i.imgur.com/7oXacel.jpg) - mouse keys enabled -- includes a QWERTY and a WORKMAN layout now +- includes a QWERTY and a COLEMAK layout now - keys that I need, while removing keys that I don't - more updates with the layout coming soon - the enter needs to move elsewhere, not yet sure where +- support for VIA Configurator See keymap.c for layouts diff --git a/keyboards/keebio/iris/keymaps/osiris/rules.mk b/keyboards/keebio/iris/keymaps/osiris/rules.mk index 45c570a3b6..f2788b5f75 100644 --- a/keyboards/keebio/iris/keymaps/osiris/rules.mk +++ b/keyboards/keebio/iris/keymaps/osiris/rules.mk @@ -1,3 +1,8 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes MOUSEKEY_ENABLE = yes + +# VIA Support - Comment these 3 lines out to disable +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes +# SRC += keyboards/wilba_tech/wt_main.c \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/config.h b/keyboards/keebio/iris/keymaps/sethBarberee/config.h new file mode 100644 index 0000000000..fd5bda8666 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/sethBarberee/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +//#define USE_I2C + +/* Select hand configuration */ + +//#define MASTER_LEFT +//#define MASTER_RIGHT +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLED_NUM 8 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLED_SPLIT { RGBLED_NUM, 0} // defined to sync animations + +#define FORCE_NKRO // force NKRO on by default + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + + +#if !defined(NO_DEBUG) && !defined(CONSOLE_ENABLE) +#define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) +#define NO_PRINT +#endif // !NO_PRINT + +#define NO_MUSIC_MODE + +// Override caps lock indication from my userspace +//#undef NORMAL_MODE +//#define NORMAL_MODE 1 + +//#undef CAPS_LOCK_MODE +//#define CAPS_LOCK_MODE 28 diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c b/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c new file mode 100644 index 0000000000..1e39c33d18 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c @@ -0,0 +1,179 @@ +#include QMK_KEYBOARD_H +#include "sethBarberee.h" + +extern backlight_config_t backlight_config; + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define KC_ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD +#define KC_VK VLK_TOG + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ECAP, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LCTL, Z , X , C , V , B , SPC, RASE, N , M ,COMM,DOT ,SLSH,RSFT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR, SPC, BSPC ,ENT,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RST , , , UP , , , GRV , P7 , P8 , P9 , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , ,LEFT,DOWN,RGHT,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S, , , , ,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,LPRN , DEL , , P0 + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + VK, ,RHUD,RSAD,RVAD, , , , , , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S,RST , , , , , , , , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ) + +}; + +void keyboard_pre_init_user(void) { + // Make sure the red LEDs don't light + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); +} + +void keyboard_post_init_user(void){ + rgblight_enable_noeeprom(); // enable the RGBs + rgblight_sethsv_noeeprom_red(); // set to red + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // set to breathing +} + +void suspend_power_down_user(void){ + backlight_config.enable = false; // disable LED backlight +} + +void suspend_wakeup_init_user(void){ + backlight_config.enable = true; // enable LED backlight +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state){ + switch(biton32(state)) { + case _QWERTY: + rgblight_sethsv_noeeprom(HSV_RED); + break; + case _LOWER: + rgblight_sethsv_noeeprom(HSV_GREEN); + break; + case _RAISE: + rgblight_sethsv_noeeprom(HSV_BLUE); + break; + case _ADJUST: + rgblight_sethsv_noeeprom(HSV_ORANGE); + break; + default: + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); + break; + + } + return state; +} diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk b/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk new file mode 100644 index 0000000000..d7bc1927dc --- /dev/null +++ b/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk @@ -0,0 +1,8 @@ +BOOTMAGIC_ENABLE = no +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable my Red LEDS +RGBLIGHT_ENABLE = yes # Enable my RGBS +VELOCIKEY_ENABLE = yes # I like RGB +TAP_DANCE_ENABLE = yes # fancy fancy Caps +LINK_TIME_OPTIMIZATION = yes # Enable link time optimization diff --git a/keyboards/keebio/iris/keymaps/swedish/keymap.c b/keyboards/keebio/iris/keymaps/swedish/keymap.c index 26e28479e8..c6b7f6afd2 100644 --- a/keyboards/keebio/iris/keymaps/swedish/keymap.c +++ b/keyboards/keebio/iris/keymaps/swedish/keymap.c @@ -22,9 +22,9 @@ enum custom_keycodes { #define KC_RASE RAISE #define KC_RST RESET -#define KC_AA NO_AA -#define KC_AE NO_AE -#define KC_OE NO_OSLH +#define KC_AA SE_AA +#define KC_AE SE_AE +#define KC_OE SE_OSLH const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -44,13 +44,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. - NO_TILD,KC_EXLM,NO_AT ,KC_HASH,NO_DLR ,KC_PERC, NO_CIRC,NO_AMPR,NO_ASTR,NO_SLSH,NO_LPRN,NO_RPRN, + SE_TILD,KC_EXLM,SE_AT ,KC_HASH,SE_DLR ,KC_PERC, SE_CIRC,SE_AMPR,SE_ASTR,SE_SLSH,SE_LPRN,SE_RPRN, //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| - NO_ACUT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,NO_PIPE,NO_LCBR,NO_RCBR, + SE_ACUT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,SE_PIPE,SE_LCBR,SE_RCBR, //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_BSLS, KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,NO_LBRC,NO_RBRC, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,SE_BSLS, KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,SE_LBRC,SE_RBRC, //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------| - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_LESS,NO_GRTR, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,SE_LESS,SE_GRTR, //`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------' KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS // `-------+-------+-------' `-------+-------+-------' @@ -60,11 +60,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| - NO_GRV ,KC_7 ,KC_8 ,KC_9 ,NO_MINS,NO_ASTR, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_PIPE, + SE_GRV ,KC_7 ,KC_8 ,KC_9 ,SE_MINS,SE_ASTR, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,SE_PIPE, //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| - KC_TRNS,KC_4 ,KC_5 ,KC_6 ,NO_PLUS,NO_SLSH, KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_TRNS,NO_BSLS, + KC_TRNS,KC_4 ,KC_5 ,KC_6 ,SE_PLUS,SE_SLSH, KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_TRNS,SE_BSLS, //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------| - KC_TRNS,KC_1 ,KC_2 ,KC_3 ,KC_0 ,NO_EQL ,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_1 ,KC_2 ,KC_3 ,KC_0 ,SE_EQL ,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, //`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------' KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS // `-------+-------+-------' `-------+-------+-------' diff --git a/keyboards/keebio/iris/keymaps/xyverz/keymap.c b/keyboards/keebio/iris/keymaps/xyverz/keymap.c index 53bf32ac36..cc120c1585 100644 --- a/keyboards/keebio/iris/keymaps/xyverz/keymap.c +++ b/keyboards/keebio/iris/keymaps/xyverz/keymap.c @@ -1,23 +1,26 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 + +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _WOW, + _LOWER, + _RAISE, + _ADJUST +}; enum custom_keycodes { - QWERTY = SAFE_RANGE, + DVORAK = SAFE_RANGE, + QWERTY, COLEMAK, - DVORAK, + WOW, LOWER, RAISE, - ADJUST, + ADJUST }; #define KC_____ KC_TRNS @@ -28,10 +31,23 @@ enum custom_keycodes { #define KC_QWRT QWERTY #define KC_CLMK COLEMAK #define KC_DVRK DVORAK +#define KC_WOW WOW #define KC_BSLT ALT_T(KC_BSPC) +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DVORAK] = LAYOUT_kc ( + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSLS, + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, + ESC , A , O , E , U , I , D , H , T , N , S ,MINS, + LSFT,SCLN, Q , J , K , X ,LOWR, RASE, B , M , W , V , Z ,RSFT, + LCTL,BSLT,LGUI, ENT ,SPC ,LALT + ), + [_QWERTY] = LAYOUT_kc ( EQL , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS, @@ -48,12 +64,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LCTL,BSPC,LGUI, ENT ,SPC ,LALT ), - [_DVORAK] = LAYOUT_kc ( + [_WOW] = LAYOUT_kc ( GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSLS, TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, ESC , A , O , E , U , I , D , H , T , N , S ,MINS, - LSFT,SCLN, Q , J , K , X ,LOWR, RASE, B , M , W , V , Z ,RSFT, - LCTL,BSLT,LGUI, ENT ,SPC ,LALT + LSFT,SCLN, Q , J , K , X ,LALT, RGUI, B , M , W , V , Z ,RSFT, + LOWR,BSPC,LCTL, ENT ,SPC ,RASE ), [_LOWER] = LAYOUT_kc ( @@ -75,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_kc ( F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 , ____,RST ,____,____,____,____, ____,____,____,____,____,____, - ____,____,____,____,____,____, ____,QWRT,CLMK,DVRK,____,____, + ____,____,____,____,____,____, ____,QWRT,CLMK,DVRK,WOW ,____, ____,____,____,____,____,____,____, ____,____,____,____,____,____,____, ____,____,____, ____,____,____ ) @@ -86,76 +102,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float tone_qwerty[][2] = SONG(QWERTY_SOUND); #endif -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - void matrix_init_user(void) { // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(D5); + writePinLow(D5); + setPinOutput(B0); + writePinLow(B0); }; +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; - break; - case LOWER: + case COLEMAK: if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + set_single_persistent_default_layer(_COLEMAK); } return false; - break; - case RAISE: + case QWERTY: if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + set_single_persistent_default_layer(_QWERTY); } return false; - break; - case ADJUST: + case WOW: if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); + set_single_persistent_default_layer(_WOW); } return false; - break; } return true; -} +} \ No newline at end of file diff --git a/keyboards/keebio/iris/readme.md b/keyboards/keebio/iris/readme.md index 6d166e7564..00126a3908 100644 --- a/keyboards/keebio/iris/readme.md +++ b/keyboards/keebio/iris/readme.md @@ -4,16 +4,16 @@ Iris A split ergo 4x6 keyboard with 3 or 4 thumb keys made and sold by Keebio. [More info at Keebio](https://keeb.io). Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro +Hardware Supported: Pro Micro, ATmega32u4 Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make keebio/iris/rev2:default + make keebio/iris/rev4:default Example of flashing this keyboard: - make keebio/iris/rev2:default:avrdude + make keebio/iris/rev4:default:flash See [build environment setup](https://docs.qmk.fm/#/newbs_getting_started) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/keebio/iris/rev1/config.h b/keyboards/keebio/iris/rev1/config.h index 2a21861a1c..12b4e098b3 100644 --- a/keyboards/keebio/iris/rev1/config.h +++ b/keyboards/keebio/iris/rev1/config.h @@ -69,16 +69,16 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev1/rev1.h b/keyboards/keebio/iris/rev1/rev1.h index da5c9cdc03..19df105c2e 100644 --- a/keyboards/keebio/iris/rev1/rev1.h +++ b/keyboards/keebio/iris/rev1/rev1.h @@ -2,10 +2,8 @@ #include "iris.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ diff --git a/keyboards/keebio/iris/rev1/rules.mk b/keyboards/keebio/iris/rev1/rules.mk index 7b30c0beff..2d7155bf8f 100644 --- a/keyboards/keebio/iris/rev1/rules.mk +++ b/keyboards/keebio/iris/rev1/rules.mk @@ -1 +1,34 @@ -BACKLIGHT_ENABLE = no +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes diff --git a/keyboards/keebio/iris/rev1_led/config.h b/keyboards/keebio/iris/rev1_led/config.h index b3629354e9..3b3c999b82 100644 --- a/keyboards/keebio/iris/rev1_led/config.h +++ b/keyboards/keebio/iris/rev1_led/config.h @@ -69,16 +69,16 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev1_led/rev1_led.h b/keyboards/keebio/iris/rev1_led/rev1_led.h index da5c9cdc03..19df105c2e 100644 --- a/keyboards/keebio/iris/rev1_led/rev1_led.h +++ b/keyboards/keebio/iris/rev1_led/rev1_led.h @@ -2,10 +2,8 @@ #include "iris.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ diff --git a/keyboards/keebio/iris/rev1_led/rules.mk b/keyboards/keebio/iris/rev1_led/rules.mk index 7b30c0beff..2d7155bf8f 100644 --- a/keyboards/keebio/iris/rev1_led/rules.mk +++ b/keyboards/keebio/iris/rev1_led/rules.mk @@ -1 +1,34 @@ -BACKLIGHT_ENABLE = no +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes diff --git a/keyboards/keebio/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h index a46328b94b..938ff05f09 100644 --- a/keyboards/keebio/iris/rev2/config.h +++ b/keyboards/keebio/iris/rev2/config.h @@ -69,16 +69,16 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev2/rev2.h b/keyboards/keebio/iris/rev2/rev2.h index da5c9cdc03..19df105c2e 100644 --- a/keyboards/keebio/iris/rev2/rev2.h +++ b/keyboards/keebio/iris/rev2/rev2.h @@ -2,10 +2,8 @@ #include "iris.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ diff --git a/keyboards/keebio/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk index d7463419b4..3178988543 100644 --- a/keyboards/keebio/iris/rev2/rules.mk +++ b/keyboards/keebio/iris/rev2/rules.mk @@ -1,2 +1,34 @@ -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index 720695b60c..6576ff6838 100644 --- a/keyboards/keebio/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -41,7 +41,6 @@ along with this program. If not, see . #define QMK_LED B0 #define QMK_SPEAKER C6 -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B5 } #define ENCODERS_PAD_B { B7 } @@ -79,16 +78,16 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk index d7e0da9367..f3c90a0784 100644 --- a/keyboards/keebio/iris/rev3/rules.mk +++ b/keyboards/keebio/iris/rev3/rules.mk @@ -1,3 +1,35 @@ -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes diff --git a/keyboards/keebio/iris/rev4/config.h b/keyboards/keebio/iris/rev4/config.h new file mode 100644 index 0000000000..b4bcd6139b --- /dev/null +++ b/keyboards/keebio/iris/rev4/config.h @@ -0,0 +1,95 @@ +/* +Copyright 2019 Danny Nguyen + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1256 +#define DEVICE_VER 0x0400 +#define MANUFACTURER Keebio +#define PRODUCT Iris Keyboard +#define DESCRIPTION Split 50 percent ergonomic keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B1, F0, F5, F6, F7 } +#define MATRIX_COL_PINS { F1, F4, D3, D2, B7, D4 } +#define MATRIX_ROW_PINS_RIGHT { B1, B2, D2, F1, F4 } +#define MATRIX_COL_PINS_RIGHT { D4, D7, D3, B7, F0, B3 } +#define SPLIT_HAND_PIN D5 +#define QMK_ESC_OUTPUT F1 +#define QMK_ESC_INPUT B1 +#define QMK_LED B0 +#define QMK_SPEAKER C6 + +#define ENCODERS_PAD_A { B2 } +#define ENCODERS_PAD_B { B3 } +#define ENCODERS_PAD_A_RIGHT { F7 } +#define ENCODERS_PAD_B_RIGHT { F6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D6 +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev4/rev4.c b/keyboards/keebio/iris/rev4/rev4.c new file mode 100644 index 0000000000..bd0989acb3 --- /dev/null +++ b/keyboards/keebio/iris/rev4/rev4.c @@ -0,0 +1 @@ +#include "rev4.h" diff --git a/keyboards/keebio/iris/rev4/rev4.h b/keyboards/keebio/iris/rev4/rev4.h new file mode 100644 index 0000000000..d8623348e4 --- /dev/null +++ b/keyboards/keebio/iris/rev4/rev4.h @@ -0,0 +1,33 @@ +#pragma once + +#include "iris.h" +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + LA1, LA2, LA3, LA4, LA5, LA6, RA6, RA5, RA4, RA3, RA2, RA1, \ + LB1, LB2, LB3, LB4, LB5, LB6, RB6, RB5, RB4, RB3, RB2, RB1, \ + LC1, LC2, LC3, LC4, LC5, LC6, RC6, RC5, RC4, RC3, RC2, RC1, \ + LD1, LD2, LD3, LD4, LD5, LD6, LE6, RE6, RD6, RD5, RD4, RD3, RD2, RD1, \ + LE3, LE4, LE5, RE5, RE4, RE3 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6 }, \ + { LC1, LC2, LC3, LC4, LC5, LC6 }, \ + { LD1, LD2, LD3, LD4, LD5, LD6 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6 }, \ + { RD1, RD2, RD3, RD4, RD5, RD6 }, \ + { KC_NO, KC_NO, RE3, RE4, RE5, RE6 } \ + } diff --git a/keyboards/keebio/iris/rev4/rules.mk b/keyboards/keebio/iris/rev4/rules.mk new file mode 100644 index 0000000000..f3c90a0784 --- /dev/null +++ b/keyboards/keebio/iris/rev4/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes +ENCODER_ENABLE = yes diff --git a/keyboards/keebio/iris/rules.mk b/keyboards/keebio/iris/rules.mk deleted file mode 100644 index b0012e1611..0000000000 --- a/keyboards/keebio/iris/rules.mk +++ /dev/null @@ -1,41 +0,0 @@ -MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -ifneq (, $(findstring rev3, $(KEYBOARD))) - BOOTLOADER = qmk-dfu -else - BOOTLOADER = caterina -endif - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# - -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -SPLIT_KEYBOARD = yes - -DEFAULT_FOLDER = keebio/iris/rev2 diff --git a/keyboards/keebio/laplace/rules.mk b/keyboards/keebio/laplace/rules.mk index fe22161cb9..01efe96f65 100644 --- a/keyboards/keebio/laplace/rules.mk +++ b/keyboards/keebio/laplace/rules.mk @@ -1,50 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keebio/levinson/keymaps/atreus/keymap.c b/keyboards/keebio/levinson/keymaps/atreus/keymap.c index 61ad04ef74..1eb12669ac 100644 --- a/keyboards/keebio/levinson/keymaps/atreus/keymap.c +++ b/keyboards/keebio/levinson/keymaps/atreus/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT_ortho_4x12( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_NO, KC_NO, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_NO, KC_NO, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; diff --git a/keyboards/keebio/levinson/keymaps/default/keymap.c b/keyboards/keebio/levinson/keymaps/default/keymap.c index abf253380b..270a4ffb58 100644 --- a/keyboards/keebio/levinson/keymaps/default/keymap.c +++ b/keyboards/keebio/levinson/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/README.md b/keyboards/keebio/levinson/keymaps/issmirnov/README.md new file mode 100644 index 0000000000..1e03e58e71 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/README.md @@ -0,0 +1,15 @@ +# Levinson + +## Colors + +- https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgblight.md + - main docs. +- https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h + - list of colors +- https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h + - list of functions for RGB manipulation + +## Troubleshooting + +- When in doubt, flash both sides of the keyboard. For some reason that helps with LEDs and reponsiveness. + - `cd qmk_firmware && make keebio/levinson/rev2:issmirnov:dfu-split-right` diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/asci-keymap.txt b/keyboards/keebio/levinson/keymaps/issmirnov/asci-keymap.txt new file mode 100644 index 0000000000..aa5bd08b3d --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/asci-keymap.txt @@ -0,0 +1,55 @@ + Qwerty +,-----------------------------------. ,-----------------------------------. +| Esc | Q | W | E | R | T | | Y | U | I | O | P |⌘ + d| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| Tab | A | S | D | F | G | | H | J | K | L |TapTo|Mo(Na| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|⇧(1) | Z | X | C | V | B | | N | M | . |Comma|Tg(Nu| ' | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|Ctrl | ⌘⇧ | Alt | Mod | ⌫ | Spc | |Enter| Tab | ↑ | ↓ | ← | → | +`-----------------------------------' ------------------------------------' + + Symb +,-----------------------------------. ,-----------------------------------. +| | - | @ | { | } | ` | | * | ! | | | % | + | Esc | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | ^ | _ | ( | ) | $ | | # | = | : | ; |TapTo| " | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | < | > | [ | ] | ~ | | & | ? | / | \ |Tg(Nu| ' | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | | | | | | | Esc | : | % | 🔒 | +`-----------------------------------' ------------------------------------' + + Nump +,-----------------------------------. ,-----------------------------------. +| | No | No |Lgui(| | | | , | 7 | 8 | 9 | |Reset| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | |Lgui(|Lgui(|Lgui(| | | 0 | 4 | 5 | 6 |To(Sy| | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | |Audio|Audio| | . | 1 | 2 | 3 |To(Qw| | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | | | | | | | | |To(Ov| | +`-----------------------------------' ------------------------------------' + + Overwatch +,-----------------------------------. ,-----------------------------------. +| Tab | Q | W | E | R | T | |To(0)| | | | |Clear| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|Ctrl | A | S | D | F | P | |RgbMo|RgbMo|RgbVa|RgbVa| |RgbTo| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|Lshif| Z | X | C | V |Grave| |RgbMo|RgbMo|RgbMo|RgbMo|RgbMo|RgbMo| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|Ctrl | F9 |Pscre| H | R | ⎵ | |RgbHu|RgbHu|RgbSa|RgbSa|RgbMo|RgbMo| +`-----------------------------------' ------------------------------------' + + Navi +,-----------------------------------. ,-----------------------------------. +| | | | ↑ | | | | | | | | | | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | ← | ↓ | → | | | |Ctrl | | | | | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | | | | | | | | | | | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | | |⌘ + d| | Mod | ⌘⇧ | | | | | +`-----------------------------------' ------------------------------------' + diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/build.sh b/keyboards/keebio/levinson/keymaps/issmirnov/build.sh new file mode 100755 index 0000000000..d013083910 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +make keebio/levinson/rev2:issmirnov diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/config.h b/keyboards/keebio/levinson/keymaps/issmirnov/config.h new file mode 100644 index 0000000000..89c2f5ebe8 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/config.h @@ -0,0 +1,34 @@ +#pragma once + +// Use serial comms for split keyboard +// DO NOT enable USE_IDC - board will not respond. +#define USE_SERIAL +//#define USE_I2C + +#ifdef RGBLIGHT_ENABLE + // Enable animations. +5500 bytes + #define RGBLIGHT_ANIMATIONS + + // Map my custom number of LED's + #undef RGBLED_NUM + #define RGBLED_NUM 16 + #define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8 } // When changed, BE SURE to flash EEPROM on both halves and clear it. + + // DO NOT USE RGBLED_SPLIT - the slave board will stop responding. + + // Turn off RGB when computer sleeps + #define RGBLIGHT_SLEEP + + // custom colors + #define RGB_CLEAR 0x00, 0x00, 0x00 + + // MOD indicators + #define SHFT_LED1 7 + #define GUI_LED1 8 +#endif + +#ifdef AUDIO_ENABLE + #define QMK_SPEAKER C6 + #define C6_AUDIO + #define NO_MUSIC_MODE // Save 2000 bytes +#endif diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c b/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c new file mode 100644 index 0000000000..0023b8424f --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c @@ -0,0 +1,124 @@ +#include "tap_tog.h" + +#ifdef AUDIO_ENABLE + #include "audio.h" + #include "sounds.h" +#endif + + +#ifdef RGBLIGHT_ENABLE + #include "rgb.h" +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Run `./qmk show levinson` from parent dir to see this layer. +[_QWERTY] = LAYOUT_ortho_4x12_wrapper( +KC_ESC , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________ , APPS , +KC_TAB , _________________QWERTY_L2_________________, _________________QWERTY_R2_________________ , MO(_NAVI) , +OSMSFT , _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ , KC_QUOTE , +KC_LCTL , MODSFT , KC_LALT , KC_LGUI , KC_BSPACE , KC_SPC , KC_ENTER , KC_TAB , KC_UP , KC_DOWN , KC_LEFT , KC_RGHT +), // Note: visualizer expects this closing parens to be right at the start of the line. + +// Run `./qmk show levinson` from parent dir to see this layer. +[_SYMB] = LAYOUT_ortho_4x12_wrapper( +_______ , _________________SYMB_L1___________________, _________________SYMB_R1___________________ , KC_ESC , +_______ , _________________SYMB_L2___________________, _________________SYMB_R2___________________ , KC_DQT , +_______ , _________________SYMB_L3___________________, _________________SYMB_R3___________________ , KC_QUOTE , +_______ , ___________________BLANK___________________, _______ , _______ , KC_ESC , KC_COLN , KC_PERC , LOCK +), // Note: visualizer expects this closing parens to be right at the start of the line. + +// Run `./qmk show levinson` from parent dir to see this layer. +[_NUMP] = LAYOUT_ortho_4x12_wrapper( +_______ , _________________NUMP_L1___________________ , _________________NUMP_R1___________________ , RESET , +_______ , _________________NUMP_L2___________________ , _________________NUMP_R2___________________ , _______ , +_______ , _________________NUMP_L3___________________ , _________________NUMP_R3___________________ , _______ , +_______ , ___________________BLANK___________________ , _______ , _______ , _______ , _______ , TO(_OVERWATCH) , _______ +), // Note: visualizer expects this closing parens to be right at the start of the line. + +// Run `./qmk show levinson` from parent dir to see this layer. +[_OVERWATCH] = LAYOUT_ortho_4x12_wrapper( +______________OVERWATCH_L1_________________ , TO(0) , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , EEP_RST , +______________OVERWATCH_L2_________________ , RGB_MODE_FORWARD , RGB_MODE_REVERSE , RGB_VAI , RGB_VAD , XXXXXXX , RGB_TOG , +______________OVERWATCH_L3_________________ , RGB_MODE_PLAIN , RGB_MODE_BREATHE , RGB_MODE_RAINBOW , RGB_MODE_SWIRL , RGB_MODE_SNAKE , RGB_MODE_XMAS , +______________OVERWATCH_L4_________________ , KC_SPACE, RGB_HUI , RGB_HUD , RGB_SAI , RGB_SAD , RGB_MODE_RGBTEST , RGB_MODE_GRADIENT +), // Note: visualizer expects this closing parens to be right at the start of the line. + +// Run `./qmk show levinson` from parent dir to see this layer. +[_NAVI] = LAYOUT_ortho_4x12_wrapper( +XXXXXXX , _________________NAVI_L1___________________ , _________________NAVI_R1___________________ , XXXXXXX , +XXXXXXX , _________________NAVI_L2___________________ , _________________NAVI_R2___________________ , XXXXXXX , +XXXXXXX , _________________NAVI_L3___________________ , _________________NAVI_R3___________________ , XXXXXXX , +XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , APPS , KC_LGUI , MODSFT , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX +), // Note: visualizer expects this closing parens to be right at the start of the line. + +}; + +// called by QMK during key processing before the actual key event is handled. Useful for macros. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOCK: + if (record->event.pressed) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); + } + return true; // Let QMK send the press/release events + break; + + case TAP_TOG_LAYER: + process_tap_tog(_SYMB,record); + return false; + break; + default: + tap_tog_count = 0; // reset counter. + tap_tog_layer_other_key_pressed = true; // always set this to true, TAP_TOG_LAYER handlers will handle interpreting this + break; + } + return true; +} + + +// Runs constantly in the background, in a loop every 100ms or so. +// Best used for LED status output triggered when user isn't actively typing. +void matrix_scan_user(void) { + #ifdef RGBLIGHT_ENABLE + matrix_scan_rgb(); + #endif // RGBLIGHT_ENABLE +} + +// only runs when when the layer is changed, good for updating LED's and clearing sticky state +// RGB modes: https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h +uint32_t layer_state_set_user(uint32_t state) { + #ifdef RGBLIGHT_ENABLE + layer_state_set_rgb(state); + #endif + uint8_t layer = biton32(state); + combo_enable(); // by default, enable combos. + switch (layer) { + case 0: + break; + case 1: + clear_mods(); + break; + case 2: + clear_mods(); + break; + case _OVERWATCH: + clear_mods(); + combo_disable(); // We don't want combos in overwatch + #ifdef AUDIO_ENABLE + // PLAY_SONG(song_overwatch); + #endif + break; + default: + break; + } + return state; +}; + +// Runs boot tasks for keyboard. +// Plays a welcome song and clears RGB state. +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + keyboard_post_init_rgb(); + #endif +} diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/push.sh b/keyboards/keebio/levinson/keymaps/issmirnov/push.sh new file mode 100755 index 0000000000..58eb115f89 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/push.sh @@ -0,0 +1,2 @@ +#!/bin/bash +make keebio/levinson/rev2:issmirnov:dfu-split-left diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c new file mode 100644 index 0000000000..de3a5342c0 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c @@ -0,0 +1,61 @@ +#include "rgb.h" + +// TODO gate this debugging header +#include + +// Wired up in layer_state_set_user in keymap.c +layer_state_t layer_state_set_rgb(layer_state_t state) { + switch (get_highest_layer(state)) { + case _QWERTY: + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_sethsv_noeeprom(RGB_CLEAR); + break; + case _SYMB: + rgblight_sethsv_noeeprom_red(); + break; + case _NUMP: + rgblight_sethsv_noeeprom_green(); + break; + case _OVERWATCH: + rgblight_sethsv_noeeprom_blue(); + // TODO set up animated rainbow swirl with overwatch colors. + // rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + // rgblight_effect_breathing(&animation_status); + // rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + break; + case _NAVI: + rgblight_sethsv_noeeprom(HSV_AZURE); + break; + default: // for any other layers, or the default layer + break; + } + return state; +} + + +void keyboard_post_init_rgb(void) { + rgblight_enable(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_setrgb(RGB_CLEAR); + uprintf("Reset RGB colors"); +} + +void matrix_scan_rgb(void) { + set_rgb_indicators(get_mods(), get_oneshot_mods()); +} + +void set_rgb_indicators(uint8_t this_mod, uint8_t this_osm) { + if (biton32(layer_state) == _QWERTY) { + if ((this_mod | this_osm) & MOD_MASK_SHIFT) { + rgblight_setrgb_gold_at(SHFT_LED1); + } else { + rgblight_setrgb_at(RGB_CLEAR, SHFT_LED1); + } + + if ((this_mod | this_osm) & MOD_MASK_GUI) { + rgblight_setrgb_purple_at(GUI_LED1); + } else { + rgblight_setrgb_at(RGB_CLEAR, GUI_LED1); + } + } +} diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h new file mode 100644 index 0000000000..254d3cbac0 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h @@ -0,0 +1,15 @@ +#pragma once +#include "quantum.h" +#include "issmirnov.h" + +// Welcome animation when keyboard boots +void keyboard_post_init_rgb(void); + +// If rgb enabled, set underglow for layer +uint32_t layer_state_set_rgb(uint32_t state); + +// Enhance matrix scan code. Note: keep this light, since it runs every 100ms +void matrix_scan_rgb(void); + +// Light up SHIFT and GUI indicator when pressed. +void set_rgb_indicators(uint8_t this_mod, uint8_t this_osm); diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/rules.mk b/keyboards/keebio/levinson/keymaps/issmirnov/rules.mk new file mode 100644 index 0000000000..6cbed2f770 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/rules.mk @@ -0,0 +1,14 @@ +# Enable RGB underglow +# https://beta.docs.qmk.fm/features/feature_rgblight +RGBLIGHT_ENABLE = yes # +5500 bytes +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + # Include my fancy rgb functions source here + SRC += rgb.c +endif + +# Disable backlight, since I use RGB underglow. +# https://beta.docs.qmk.fm/features/feature_backlight +BACKLIGHT_ENABLE = no + +# Control piezo speaker on C6 +AUDIO_ENABLE = yes # +4000 bytes diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/sounds.h b/keyboards/keebio/levinson/keymaps/issmirnov/sounds.h new file mode 100644 index 0000000000..dac9d276c1 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/sounds.h @@ -0,0 +1,9 @@ +// ................................................................ Audio Sounds +#pragma once +#ifdef AUDIO_ENABLE +// Songs come from quantum/audio/song_list.h +float song_startup [][2] = SONG(STARTUP_SOUND); +float song_goodbye [][2] = SONG(GOODBYE_SOUND); +float song_overwatch[][2] = SONG(OVERWATCH_THEME); +#undef AUDIO_VOICES +#endif diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/template.txt b/keyboards/keebio/levinson/keymaps/issmirnov/template.txt new file mode 100644 index 0000000000..8787cee7b5 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/template.txt @@ -0,0 +1,9 @@ +,-----------------------------------. ,-----------------------------------. +| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 10 | 11 | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| 12 | 13 | 14 | 15 | 16 | 17 | | 18 | 19 | 20 | 21 | 22 | 23 | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| 24 | 25 | 26 | 27 | 28 | 29 | | 30 | 31 | 32 | 33 | 34 | 35 | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| 36 | 37 | 38 | 39 | 40 | 41 | | 42 | 43 | 44 | 45 | 46 | 47 | +`-----------------------------------' ------------------------------------' diff --git a/keyboards/keebio/levinson/keymaps/treadwell/keymap.c b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c index 2f0da0f525..4d3d9a4f64 100644 --- a/keyboards/keebio/levinson/keymaps/treadwell/keymap.c +++ b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c @@ -61,9 +61,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, //|----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 , + LSFT, Z , X , C , V , B , N , M ,COMM,DOT , UP ,ENT , //|----+----+----+----+----+----| |----+----+----+----+----+----| - X3 ,LCTL,LALT,LGUI, X2 , SPC, SPC , X1 ,LEFT,DOWN, UP ,RGHT + LCTL, X3 ,LGUI,LALT,SPC , X2 , BSPC, X1 ,SLSH,LEFT,DOWN,RGHT //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+------+----+----+----+----| |----+----+----+----+----+----| CAPS,SELECT,LEFT,DOWN,RGHT,DEL , PGDN, END,LBRC,RBRC,MINS,UNDS, //|----+------+----+----+----+----| |----+----+----+----+----+----| - LSFT, UNDO ,CUT ,COPY,PASTE, , LEFT,RGHT,LCBR,RCBR,PLUS,PEQL, + LSFT, UNDO ,CUT ,COPY,PASTE, , LEFT,RGHT,LCBR,RCBR,PLUS, EQL, //|----+------+----+----+----+----| |----+----+----+----+----+----| , , , , ,LALT, , , , , , //`----+------+----+----+----+----' `----+----+----+----+----+----' diff --git a/keyboards/keebio/levinson/rev1/rev1.h b/keyboards/keebio/levinson/rev1/rev1.h index 2120bb0fa9..1c555b6775 100644 --- a/keyboards/keebio/levinson/rev1/rev1.h +++ b/keyboards/keebio/levinson/rev1/rev1.h @@ -2,10 +2,8 @@ #include "levinson.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/keebio/levinson/rev2/rev2.h b/keyboards/keebio/levinson/rev2/rev2.h index 2120bb0fa9..1c555b6775 100644 --- a/keyboards/keebio/levinson/rev2/rev2.h +++ b/keyboards/keebio/levinson/rev2/rev2.h @@ -2,10 +2,8 @@ #include "levinson.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/keebio/levinson/rev3/rev3.h b/keyboards/keebio/levinson/rev3/rev3.h index a31bfd15c3..da7349d2e7 100644 --- a/keyboards/keebio/levinson/rev3/rev3.h +++ b/keyboards/keebio/levinson/rev3/rev3.h @@ -2,10 +2,8 @@ #include "levinson.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ diff --git a/keyboards/keebio/levinson/rules.mk b/keyboards/keebio/levinson/rules.mk index cdaef48890..c7446445f3 100644 --- a/keyboards/keebio/levinson/rules.mk +++ b/keyboards/keebio/levinson/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keebio/nyquist/info.json b/keyboards/keebio/nyquist/info.json index 295864cfc9..6e44d98a1b 100644 --- a/keyboards/keebio/nyquist/info.json +++ b/keyboards/keebio/nyquist/info.json @@ -10,6 +10,10 @@ }, "LAYOUT_ortho_5x12": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "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":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}] + }, + "LAYOUT_ortho_4x12": { + "height": 4, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "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":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}] } } } diff --git a/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c index c0c1760cd1..ba12e1bf53 100644 --- a/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c @@ -47,13 +47,11 @@ enum { const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, - [2] = ACTION_LAYER_MOMENTARY(_FUNCTION), //Hold for momentary Function - [3] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE }; #define SPC_LW FUNC(0) #define ENT_RS FUNC(1) -#define FNC FUNC(2) -#define MSE FUNC(3) +#define FNC MO(_FUNCTION) +#define MSE MO(_MOUSE) #define PIPE M(R_PIPE) #define POINT M(R_POINT) diff --git a/keyboards/keebio/nyquist/keymaps/default/keymap.c b/keyboards/keebio/nyquist/keymaps/default/keymap.c index ecaad49bb2..db4b53962b 100644 --- a/keyboards/keebio/nyquist/keymaps/default/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/nyquist/keymaps/default_4x12/keymap.c b/keyboards/keebio/nyquist/keymaps/default_4x12/keymap.c new file mode 100644 index 0000000000..78eb393162 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/default_4x12/keymap.c @@ -0,0 +1,139 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION, + _ADJUST, +}; + +enum planck_keycodes { + LOWER = SAFE_RANGE, + RAISE +}; + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Func | A | S | D | F | G | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Taskmg| | | | | | | | | | |caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | RESET| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCTION] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri/keymap.c b/keyboards/keebio/nyquist/keymaps/georgepetri/keymap.c index 6564e2a7f4..6b427e06d5 100644 --- a/keyboards/keebio/nyquist/keymaps/georgepetri/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/georgepetri/keymap.c @@ -34,9 +34,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______, 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_F11 , KC_F12 , _______, _______, _______, _______, KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, KC_BSLS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri/readme.md b/keyboards/keebio/nyquist/keymaps/georgepetri/readme.md index a773c98947..a659905f8f 100644 --- a/keyboards/keebio/nyquist/keymaps/georgepetri/readme.md +++ b/keyboards/keebio/nyquist/keymaps/georgepetri/readme.md @@ -26,9 +26,9 @@ Features a dedicated navigation layer on rise and current layer status on rgb un ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ │ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │ │ ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ -│ │ F11 │ F12 │ │ │ │ │ │ │ │ │ │ │ +│ │ F11 │ F12 │ │ │ │ │ │ MINS│ EQL │ LBRC│ RBRC│ BSLS │ ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ -│ │ │ │ │ │ │ │ │ MINS│ EQL │ LBRC│ RBRC│ BSLS │ +│ │ │ │ │ │ │ │ LEFT │ DOWN │ UP │ RGHT │ │ │ ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ │ │ │ │ │ │ │ │ │ PGDN│ PGUP │ HOME│ END │ │ ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ diff --git a/keyboards/keebio/nyquist/keymaps/skug/keymap.c b/keyboards/keebio/nyquist/keymaps/skug/keymap.c index 2d511fee3c..be77cb24b6 100644 --- a/keyboards/keebio/nyquist/keymaps/skug/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/skug/keymap.c @@ -19,22 +19,21 @@ extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define BASE 0 -#define SYMB 1 -#define MDIA 2 -#define ARRW 3 -#define _ADJUST 16 +#define CT_APOS CTL_T(SE_APOS) +#define CT_TILD CTL_T(SE_TILD) +#define MD_OSLH LT(MDIA, SE_OSLH) +#define SM_AE LT(SYMB, SE_AE) +#define SE_LT SE_LESS +#define SE_GT LSFT(SE_LESS) -#define CT_APOS CTL_T(NO_APOS) -#define CT_TILD CTL_T(NO_TILD) -#define MD_OSLH LT(MDIA, NO_OSLH) -#define SM_AE LT(SYMB, NO_AE) -#define NO_LT NO_LESS -#define NO_GT LSFT(NO_LESS) +enum layer_names { + BASE, + GAME, + SYMB, + MDIA, + ARRW, + _ADJUST, +}; enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, @@ -61,11 +60,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT( \ // LEFT HAND RIGHT HAND - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, \ MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_OSLH, SM_AE, \ - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSPC, \ - CT_APOS, NO_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, NO_ASTR, CT_TILD \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSPC, \ + CT_APOS, SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, CT_TILD \ +), + +/* Gaming layer + * ,-----------------------------------------. .-----------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Å | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ARRW | A | S | D | F | G | | H | J | K | L | Ö | Ä | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | | N | M | , | . | - | Shift| + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | Ctrl | ´ | Alt | Bsp |Space | Win | | Entr | Space| Bsb | AlGr | * | Ctrl | + * `-----------------------------------------' '-----------------------------------------' + */ +[GAME] = LAYOUT( \ + // LEFT HAND RIGHT HAND + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, \ + MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_OSLH, SM_AE, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT, \ + KC_LCTL, SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, KC_RCTL \ ), /* Symbols layer @@ -83,10 +104,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [SYMB] = LAYOUT( \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ - _______, KC_EXLM, NO_AT, NO_LCBR, NO_RCBR, NO_PIPE, KC_UP, KC_7, KC_8, KC_9, NO_ASTR, KC_F12, \ - _______, KC_HASH, NO_DLR, NO_LPRN, NO_RPRN, NO_GRV, KC_DOWN, KC_4, KC_5, KC_6, NO_PLUS, _______, \ - _______, KC_PERC, NO_CIRC, NO_LBRC, NO_RBRC, NO_TILD, NO_AMPR, KC_1, KC_2, KC_3, NO_MINS, _______, \ - _______, _______, _______, NO_LT, NO_GT, _______, _______, _______, KC_DOT, KC_0, NO_EQL, _______ \ + _______, KC_EXLM, SE_AT, SE_LCBR, SE_RCBR, SE_PIPE, KC_UP, KC_7, KC_8, KC_9, SE_ASTR, KC_F12, \ + _______, KC_HASH, SE_DLR, SE_LPRN, SE_RPRN, SE_GRV, KC_DOWN, KC_4, KC_5, KC_6, SE_PLUS, _______, \ + _______, KC_PERC, SE_CIRC, SE_LBRC, SE_RBRC, SE_TILD, SE_AMPR, KC_1, KC_2, KC_3, SE_MINS, _______, \ + _______, _______, _______, SE_LT, SE_GT, _______, _______, _______, KC_DOT, KC_0, SE_EQL, _______ \ ), /* Media layer @@ -112,9 +133,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Arrow layer * ,-----------------------------------------. .-----------------------------------------. - * | §/½ | | | | | | | | | | Ins | Home | PgUp | + * | §/½ | | | | | | | | | BASE | Ins | Home | PgUp | * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * | | | Up | | | | | | | | Del | End | PgDn | + * | | | Up | | | | | | | GAME | Del | End | PgDn | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | Left | Down | Right| | Back | | Fwd | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -124,8 +145,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' '-----------------------------------------' */ [ARRW] = LAYOUT( \ - NO_HALF, _______, _______, _______ , _______, _______, _______, _______, _______, KC_INS , KC_HOME, KC_PGUP, \ - _______, _______, KC_UP , _______ , _______, _______, _______, _______, _______, KC_DEL , KC_END , KC_PGDN, \ + SE_HALF, _______, _______, _______ , _______, _______, _______, _______, DF(BASE), KC_INS , KC_HOME, KC_PGUP, \ + _______, _______, KC_UP , _______ , _______, _______, _______, _______, DF(GAME), KC_DEL , KC_END , KC_PGDN, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, \ _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______ \ diff --git a/keyboards/keebio/nyquist/nyquist.h b/keyboards/keebio/nyquist/nyquist.h index 7b0ecf5423..f261c2994d 100644 --- a/keyboards/keebio/nyquist/nyquist.h +++ b/keyboards/keebio/nyquist/nyquist.h @@ -29,3 +29,17 @@ ) #define LAYOUT_kc_ortho_5x12 LAYOUT_kc + +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + LAYOUT_ortho_5x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ + ) diff --git a/keyboards/keebio/nyquist/readme.md b/keyboards/keebio/nyquist/readme.md index 9fa7259d87..40e7ebf3d2 100644 --- a/keyboards/keebio/nyquist/readme.md +++ b/keyboards/keebio/nyquist/readme.md @@ -4,16 +4,16 @@ Nyquist A split 60% split 5x12 ortholinear keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro +Hardware Supported: Pro Micro, ATmega32u4 Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make keebio/nyquist/rev2:default + make keebio/nyquist/rev3:default Example of flashing this keyboard: - make keebio/nyquist/rev2:default:avrdude + make keebio/nyquist/rev3:default:flash See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/keebio/nyquist/rev1/rev1.h b/keyboards/keebio/nyquist/rev1/rev1.h index 6d3a23383b..20f53b3b44 100644 --- a/keyboards/keebio/nyquist/rev1/rev1.h +++ b/keyboards/keebio/nyquist/rev1/rev1.h @@ -2,10 +2,8 @@ #include "nyquist.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/keebio/nyquist/rev1/rules.mk b/keyboards/keebio/nyquist/rev1/rules.mk index 7b30c0beff..c377644bae 100644 --- a/keyboards/keebio/nyquist/rev1/rules.mk +++ b/keyboards/keebio/nyquist/rev1/rules.mk @@ -1 +1,33 @@ -BACKLIGHT_ENABLE = no +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes +LAYOUTS = ortho_5x12 ortho_4x12 diff --git a/keyboards/keebio/nyquist/rev2/rev2.h b/keyboards/keebio/nyquist/rev2/rev2.h index 6d3a23383b..20f53b3b44 100644 --- a/keyboards/keebio/nyquist/rev2/rev2.h +++ b/keyboards/keebio/nyquist/rev2/rev2.h @@ -2,10 +2,8 @@ #include "nyquist.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/keebio/nyquist/rev2/rules.mk b/keyboards/keebio/nyquist/rev2/rules.mk index bd518d8f27..a6131ae528 100644 --- a/keyboards/keebio/nyquist/rev2/rules.mk +++ b/keyboards/keebio/nyquist/rev2/rules.mk @@ -1 +1,33 @@ -BACKLIGHT_ENABLE = yes +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes +LAYOUTS = ortho_5x12 ortho_4x12 diff --git a/keyboards/keebio/nyquist/rev3/rules.mk b/keyboards/keebio/nyquist/rev3/rules.mk index 31077066a3..740ff80024 100644 --- a/keyboards/keebio/nyquist/rev3/rules.mk +++ b/keyboards/keebio/nyquist/rev3/rules.mk @@ -1,2 +1,33 @@ -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes +LAYOUTS = ortho_5x12 ortho_4x12 diff --git a/keyboards/keebio/nyquist/rules.mk b/keyboards/keebio/nyquist/rules.mk deleted file mode 100644 index 04d92bc7e1..0000000000 --- a/keyboards/keebio/nyquist/rules.mk +++ /dev/null @@ -1,71 +0,0 @@ -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -ifneq (, $(findstring rev3, $(KEYBOARD))) - BOOTLOADER = qmk-dfu -else - BOOTLOADER = caterina -endif - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -SPLIT_KEYBOARD = yes -LAYOUTS = ortho_5x12 -DEFAULT_FOLDER = keebio/nyquist/rev2 diff --git a/keyboards/keebio/quefrency/keymaps/bcat/config.h b/keyboards/keebio/quefrency/keymaps/bcat/config.h index c9e836597a..071856f10b 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/config.h +++ b/keyboards/keebio/quefrency/keymaps/bcat/config.h @@ -1,16 +1,10 @@ #pragma once /* - * I2C seems to randomly drop keystrokes. Not sure why. It seems a bit like - * https://github.com/qmk/qmk_firmware/issues/5037, but that issue is closed, - * and our problems happen even with underglow disabled. - * - * This issue occurs with multiple TRRS cables of different lengths from - * different companies, so it's most likely not a cable issue. It may be that - * we are running into issues with long I2C runs, in which case stronger - * pull-up resistors might help: - * https://hackaday.com/2017/02/08/taking-the-leap-off-board-an-introduction-to-i2c-over-long-wires/. - * For now, just don't use I2C. + * Quefrency lacks I2C resistors on the right PCB, so the right half doesn't + * work independently. (Presumably the floating I2C lines cause a problem.) + * Using serial seems sufficiently fast in practice and allows both halves to + * be used independently. */ #define USE_SERIAL diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index 9dc98f5a1d..d74a55b4b1 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -5,25 +5,24 @@ enum layer { LAYER_FUNCTION, }; -/* Switch to function layer when held. */ #define LY_FUNC MO(LAYER_FUNCTION) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b */ [LAYER_DEFAULT] = LAYOUT_65( 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_BSLS, KC_GRV, KC_HOME, - 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_BSPC, KC_PGUP, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT + 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_BSPC, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ [LAYER_FUNCTION] = LAYOUT_65( _______, 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_INS, KC_DEL, RGB_HUI, - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, - KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD ), }; diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 793e8833a4..0436e1d2ce 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -1,13 +1,17 @@ # bcat's Quefrency 65% layout This is pretty much a stock 65% split keyboard layout, with an HHKB-style -(split) backspace, media keys in the function layer centered around the WASD +(split) backspace, media keys in the function layer centered around the ESDF cluster, and RGB controls in the function layer on the arrow/nav keys. ## Default layer ![Default layer layout](https://i.imgur.com/CU2fxDg.png) +([KLE](http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b)) + ## Function layer -![Function layer layout](https://i.imgur.com/4R1F72M.png) +![Function layer layout](https://i.imgur.com/xE4CuH0.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d)) diff --git a/keyboards/keebio/quefrency/keymaps/default/keymap.c b/keyboards/keebio/quefrency/keymaps/default/keymap.c index 744a8d32a4..8b30a1174c 100644 --- a/keyboards/keebio/quefrency/keymaps/default/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h b/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h new file mode 100644 index 0000000000..ec2a2ea164 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS + + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_SPLIT + #undef RGBLED_NUM + #define RGBLED_NUM 17 + #define RGBLED_SPLIT { 9, 8 } + #define RGBLIGHT_SLEEP +#endif + +#ifdef AUDIO_ENABLE + #define B7_AUDIO + #define AUDIO_CLICKY +#endif diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/keymap.c b/keyboards/keebio/quefrency/keymaps/drashna_ms/keymap.c new file mode 100644 index 0000000000..445709bc3d --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +enum layers { + _BASE, + _FN1, +}; + +enum custom_keycodes { + KC_MAKE = SAFE_RANGE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_65_with_macro( + KC_F1, KC_F2, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_HOME, \ + KC_F3, KC_F4, 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_END, \ + KC_F5, KC_F6, 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_PGUP, \ + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_65_with_macro( + _______, _______, KC_GESC, 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_DEL, KC_BSPC, RESET, \ + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP ":dfu" SS_TAP(X_ENTER)), 10); + + break; + } + return true; +} diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk b/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk new file mode 100644 index 0000000000..1b8b582abc --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk @@ -0,0 +1,5 @@ +LINK_TIME_OPTIMIZATION_ENABLE = yes +RGBLIGHT_ENABLE = yes +EXTRAKEY_ENABLE = yes +AUDIO_ENABLE = yes +BOOTLOADER = qmk-dfu diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/config.h b/keyboards/keebio/quefrency/keymaps/georgepetri/config.h index d72d7760ef..c3063d6da6 100644 --- a/keyboards/keebio/quefrency/keymaps/georgepetri/config.h +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/config.h @@ -21,4 +21,4 @@ along with this program. If not, see . #pragma once -#define USE_I2C \ No newline at end of file +#undef RGBLIGHT_ANIMATIONS diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c index f08ab4f834..9ee3eb8102 100644 --- a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c @@ -2,43 +2,90 @@ extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. #define _BASE 0 -#define _FN1 1 +#define _L 1 +#define _R 2 enum custom_keycodes { QWERTY = SAFE_RANGE, }; +#define KC_TL LCTL(KC_PGUP) +#define KC_TR LCTL(KC_PGDN) +#define KC_TC LCTL(KC_W) +#define KC_TRO LCTL(LSFT(KC_T)) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65( // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ - 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_HOME,\ + 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_DEL ,KC_MINS ,KC_EQL ,KC_HOME, // ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ - 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_END, \ + 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_END , // ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ - 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_PGUP,\ + 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_ENT ,KC_PGUP , // ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _______, KC_PGDN,\ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT, _______ ,KC_PGDN , // ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤ - KC_LCTL, KC_LGUI, KC_LALT, MO(_FN1), KC_SPC, KC_SPC ,_______, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_CAPS ,KC_LCTL ,KC_LALT ,MO(_L) ,KC_SPC , KC_SPC ,_______ ,KC_LGUI ,TG(_R) ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT // └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘ ), - [_FN1] = LAYOUT_65( + [_L] = LAYOUT_65( // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ - 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_BSPC, KC_DEL, KC_INS, \ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 , KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ ,_______ ,_______ ,_______ ,KC_INS , // ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS,\ + _______ ,KC_F11 ,KC_F12 ,_______ ,_______ ,_______ , _______ ,KC_MINS ,KC_EQL ,_______ ,_______ ,_______ ,_______ ,_______, KC_PAUS , // ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ ,_______ ,_______ ,_______ , // ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,KC_PGDN ,KC_PGUP ,KC_HOME ,KC_END ,_______ ,_______ ,_______ , // ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ +// └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_R] = LAYOUT_65( +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , +// ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ + _______ ,KC_TL ,KC_TR ,KC_TC ,KC_TRO ,_______ , _______ ,KC_TL , KC_TR , KC_TC , KC_TRO ,_______ ,_______ ,_______, _______ , +// ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ + _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ ,_______ ,_______ ,_______ , +// ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ + _______ ,KC_PGDN ,KC_PGUP ,KC_HOME ,KC_END ,_______ , _______ ,KC_PGDN ,KC_PGUP ,KC_HOME ,KC_END ,_______ ,_______ ,_______ , +// ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ // └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘ ) }; + +void keyboard_post_init_user(void) { + rgblight_sethsv_noeeprom(HSV_BLUE); +} + +void update_led(void) { + switch (biton32(layer_state)) { + case _BASE: + rgblight_sethsv_noeeprom(HSV_BLUE); + break; + case _L: + rgblight_sethsv_noeeprom(HSV_CORAL); + break; + case _R: + rgblight_sethsv_noeeprom(HSV_MAGENTA); + break; + } + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgblight_sethsv_range(HSV_WHITE,0,4); + rgblight_sethsv_range(HSV_WHITE,12,16); + } +} + +uint32_t layer_state_set_user(uint32_t state) { + update_led(); + return state; +} + +void led_set_user(uint8_t usb_led) { + update_led(); +} diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md b/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md index 425190d198..bb4e75c27b 100644 --- a/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md @@ -1,48 +1,64 @@ # George Petri's Quefrency 65 layout ``` -make keebio/quefrency:georgepetri +make keebio/quefrency/rev1:georgepetri ``` -Based on the default querty layout with minor tweaks. -The position of the arrow keys in a line in the bottom right. -The backspace key is 1u and to the left of the delete key. -Grave, pause and insert are on the function layer. +Querty layout with minor changes and dedicated navigation layer. ### Base Layer ``` ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ -│ ESC ││ 1 ││ 2 ││ 3 ││ 4 ││ 5 ││ 6 │ │ 7 ││ 8 ││ 9 ││ 0 ││ MINS││ EQL ││ BSPC││ DEL ││ HOME│ +│ GRV ││ 1 ││ 2 ││ 3 ││ 4 ││ 5 ││ 6 │ │ 7 ││ 8 ││ 9 ││ 0 ││ BSPC││ DEL ││ MINS││ EQL ││ HOME│ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ ┌──────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────────┐┌──────┐ │ TAB ││ Q ││ W ││ E ││ R ││ T │ │ Y ││ U ││ I ││ O ││ P ││ LBRC││ RBRC││ BSLS ││ END │ └──────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────────┘└──────┘ ┌────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────┐┌──────┐ -│ CAPS ││ A ││ S ││ D ││ F ││ G │ │ H ││ J ││ K ││ L ││ SCLN││ QUOT││ ENT ││ PGUP│ +│ ESC ││ A ││ S ││ D ││ F ││ G │ │ H ││ J ││ K ││ L ││ SCLN││ QUOT││ ENT ││ PGUP│ └────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└────────────────┘└──────┘ ┌────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────────┐┌──────┐ │ LSFT ││ Z ││ X ││ C ││ V ││ B │ │ N ││ M ││ COMM││ DOT ││ SLSH││ RSFT ││ PGDN│ └────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└────────────────────┘└──────┘ ┌────────┐┌────────┐┌────────┐┌────────┐┌────────────────┐ ┌────────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ -│ LCTL ││ LGUI ││ LALT ││MO(_FN1)││ SPC │ │ SPC ││ RALT││ RCTL││ LEFT││ DOWN││ UP ││ RGHT│ +│ CAPS ││ LCTL ││ LALT ││MO(_L) ││ SPC │ │ SPC ││ LGUI││TG(_R)││ LEFT││ DOWN││ UP ││ RGHT│ └────────┘└────────┘└────────┘└────────┘└────────────────┘ └────────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ ``` -### Function +### Raise ``` ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ -│ GRV ││ F1 ││ F2 ││ F3 ││ F4 ││ F5 ││ F6 │ │ F7 ││ F8 ││ F9 ││ F10 ││ F11 ││ F12 ││ BSPC││ DEL ││ INS │ +│ ││ F1 ││ F2 ││ F3 ││ F4 ││ F5 ││ F6 │ │ F7 ││ F8 ││ F9 ││ F10 ││ F11 ││ F12 ││ BSPC││ DEL ││ INS │ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ ┌──────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────────┐┌──────┐ -│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ ││ ││ PAUS│ +│ ││ F1 ││ F12 ││ ││ ││ │ │ ││ MINS││ EQL ││ ││ ││ ││ ││ ││ PAUS│ └──────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────────┘└──────┘ ┌────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────┐┌──────┐ -│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ ││ │ +│ ││ ││ ││ ││ ││ │ │ LEFT││ DOWN││ UP ││ RGHT││ ││ ││ ││ │ └────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└────────────────┘└──────┘ ┌────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────────┐┌──────┐ -│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ │ +│ ││ ││ ││ ││ ││ │ │ ││ PGDN││ PGUP││ HOME││ END ││ ││ │ └────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└────────────────────┘└──────┘ ┌────────┐┌────────┐┌────────┐┌────────┐┌────────────────┐ ┌────────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ │ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ │ └────────┘└────────┘└────────┘└────────┘└────────────────┘ └────────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ -``` \ No newline at end of file +``` + +### Lower +``` +┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ +│ ││ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ ││ ││ │ +└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ +┌──────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────────┐┌──────┐ +│ ││ TAB_L││ TAB_R││ TAB_C││ TAB_R││ │ │ ││ TAB_L││ TAB_R││ TAB_C││ TAB_R││ ││ ││ ││ │ +└──────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────────┘└──────┘ +┌────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────┐┌──────┐ +│ ││ LEFT││ DOWN││ UP ││ RGHT││ │ │ LEFT││ DOWN││ UP ││ RGHT││ ││ ││ ││ │ +└────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└────────────────┘└──────┘ +┌────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────────┐┌──────┐ +│ ││ PGDN││ PGUP││ HOME││ END ││ │ │ ││ PGDN││ PGUP││ HOME││ END ││ ││ │ +└────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└────────────────────┘└──────┘ +┌────────┐┌────────┐┌────────┐┌────────┐┌────────────────┐ ┌────────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ +│ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ │ +└────────┘└────────┘└────────┘└────────┘└────────────────┘ └────────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ +``` diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk b/keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk index e69de29bb2..5bc0b70454 100644 --- a/keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk @@ -0,0 +1 @@ +EXTRAKEY_ENABLE = no diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk index c28696c08e..284a0def32 100644 --- a/keyboards/keebio/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keebio/rorschach/keymaps/default/keymap.c b/keyboards/keebio/rorschach/keymaps/default/keymap.c index 736d4d353c..431f7d3a91 100644 --- a/keyboards/keebio/rorschach/keymaps/default/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/readme.md b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/readme.md new file mode 100644 index 0000000000..152c8ba01a --- /dev/null +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/readme.md @@ -0,0 +1 @@ +## I've changed my folder name to match my GitHub username. Please see https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/rorschach/keymaps/tuesdayjohn for my current keymap files. diff --git a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h new file mode 100644 index 0000000000..2048232c9c --- /dev/null +++ b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h @@ -0,0 +1,23 @@ +#pragma once + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 175 +#define TAPPING_TOGGLE 2 + +// #undef RGBLED_NUM +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 12 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/keymap.c b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/keymap.c new file mode 100644 index 0000000000..19de124f87 --- /dev/null +++ b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/keymap.c @@ -0,0 +1,296 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum rorschach_layers { + _COLEMAK, // Colemak (default layer) + _QWERTY, // Qwerty + _NUMBERS, // Numbers & Symbols + _NUMBERS2, // Numbers & Function Keys (similar to _NUMBERS; used with _NUMBERS for tri-layer access to _ADJUST) + _FUNCTION, // Function + _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) + _NUMPAD, // Numpad + _ADJUST, // Adjust layer, accessed via tri-layer feature) + _ADJUST2 // Second Adjust layer, accessed outside of tri-layer feature) +}; + +enum rorschach_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY +}; + +//Tap Dance Declarations +enum { + ADJ = 0, + LBCB, + RBCB, + EQPL, + PLEQ, + MNUN, + SLAS, + GVTL, + PPEQ, + PMUN, + PSPA +}; + +void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_on(_ADJUST2); + set_oneshot_layer(_ADJUST2, ONESHOT_START); + } +} +void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_off(_ADJUST2); + clear_oneshot_layer_state(ONESHOT_PRESSED); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap +[RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap +[EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap +[PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQL), // Equal sign on a single-tap, plus sign on a double-tap +[MNUN] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), // Minus sign on a single-tap, underscore on a double-tap +[SLAS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ASTR), // Slash in a single-tap, asterisk in a double-tap +[GVTL] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), // Grave on a single-tap, tilde on a double-tap +[PPEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_EQL), // Numpad plus sign on a single-tap, equal sign on a double-tap +[PMUN] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_UNDS), // Numpad minus sign on a single-tap, underscore on a double-tap +[PSPA] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST) // Numpad slash on a single-tap, numpad asterisk on a double-tap +}; + +//Aliases for longer keycodes +#define NUMPAD TG(_NUMPAD) +#define ADJUST MO(_ADJUST2) +#define SPCFN LT(_FUNCTION, KC_SPC) +#define BSPCFN LT(_FUNCTION2, KC_BSPC) +#define ENTNS LT(_NUMBERS, KC_ENT) +#define DELNS LT(_NUMBERS2, KC_DEL) +#define CTLESC CTL_T(KC_ESC) +#define ALTAPP ALT_T(KC_APP) +#define CTL_A LCTL(KC_A) +#define CTL_C LCTL(KC_C) +#define CTL_V LCTL(KC_V) +#define CTL_X LCTL(KC_X) +#define CTL_Z LCTL(KC_Z) +#define CTL_Y LCTL(KC_Y) +#define CA_TAB LCA(KC_TAB) +#define HYPER ALL_T(KC_NO) +#define TD_ADJ TD(ADJ) +#define TD_LBCB TD(LBCB) +#define TD_RBCB TD(RBCB) +#define TD_EQPL TD(EQPL) +#define TD_PLEQ TD(PLEQ) +#define TD_MNUN TD(MNUN) +#define TD_SLAS TD(SLAS) +#define TD_GVTL TD(GVTL) +#define TD_PPEQ TD(PPEQ) +#define TD_PMUN TD(PMUN) +#define TD_PSPA TD(PSPA) +#define NKROTG MAGIC_TOGGLE_NKRO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +Colemak +(Defauit layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | Esc/Ctl| A | R | S | T | D | | H | N | E | I | O | ' | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------' + | Ins | ` | [ | ] | App/Alt| Spc/FN | | Bsp/Fn2| RGUI | Left | Down | Up | Right | + `--------------------------------------------+--------+--------. ,--------+--------+--------------------------------------------' + | Ent/NS | Bspc | | Enter | Del/NS2| + `-----------------' `-----------------' +*/ +[_COLEMAK] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + ENTNS, KC_BSPC, KC_ENT, DELNS +), + +/* +QWERTY +(Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | Esc/Ctl| A | S | D | F | G | | H | J | K | L | ; | ' | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + |SC Shift| Z | X | C | V | B | | N | M | , | . | / |SC Shift| + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------' + | Ins | ` | [ | ] | App/Alt| Spc/FN | | Bsp/Fn2| RGUI | Left | Down | Up | Right | + `--------------------------------------------+--------+--------. ,--------+--------+--------------------------------------------' + | Ent/NS | Bspc | | Enter | Del/NS2| + `-----------------' `-----------------' +*/ +[_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + ENTNS, KC_BSPC, KC_ENT, DELNS +), + +/* +Number/symbol layer +(Multiple characters: single-tap for first, double-tap for second) + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | ( | ) | [ { | ] } | | | | | | | | | | + `--------------------------------------------+--------+--------. ,--------+--------+--------------------------------------------' + | | | | | | + `-----------------' `-----------------' +*/ +[_NUMBERS] = LAYOUT( + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +/* +Number/Function Key layer +(Multiple characters: single-tap for first, double-tap for second) + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | 6 | 7 | 8 | 9 | 0 | | F7 | F8 | F9 | F10 | F11 | F12 | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | 1 | 2 | 3 | 4 | 5 | | F1 | F2 | F3 | F4 | F5 | F6 | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | ( | ) | [ { | ] } | | | | | | | | | | + `--------------------------------------------+--------+--------. ,--------+--------+--------------------------------------------' + | | | | | | + `-----------------' `-----------------' +*/ +[_NUMBERS2] = LAYOUT( + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +/* +Function layer + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | | | Up | | | | | | Up | Ctrl+Y | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | Ctrl+A | Left | Down | Right | C+A+Tab| | PgUp | Right | Down | Left | Home | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | Ctrl+Z | Ctrl+X | Ctrl+C | Ctrl+V | Bspc | | PgDn | Mute | Vol- | Vol+ | End | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | Prev | Play | Next | Stop | + `--------------------------------------------+--------+--------. ,--------+--------+--------------------------------------------' + | | | | | | + `-----------------' `-----------------' +*/ +[_FUNCTION] = LAYOUT( + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, + _______, _______, _______, _______ +), + +[_FUNCTION2] = LAYOUT( + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, + _______, _______, _______, _______ +), + +/* +Numpad layer +(Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | NumLk | KP 7 | KP 8 | KP 9 | KP / | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | Tab | KP 4 | KP 5 | KP 6 | KP * | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | NumLk | KP . | KP/ KP*| KP- _ | KP+ = | | | KP 1 | KP 2 | KP 3 | KP - | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | ( | ) | [ { | ] } | | | | | KP 0 | = | KP . | KP + | | + `--------------------------------------------+--------+--------. ,--------+--------+--------------------------------------------' + | | | | KP Ent | | + `-----------------' `-----------------' +*/ +[_NUMPAD] = LAYOUT( + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_NLCK, KC_PDOT, TD_PSPA, TD_PMUN, TD_PPEQ, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, KC_P0, KC_EQL, KC_PDOT, KC_PPLS, _______, + _______, _______, KC_PENT, _______ +), + +/* +Adjust layer +(Enter/Number + Delete/Number2 to access; Numpad is a toggle) + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | Colemak| Qwerty | | | | | Numpad | | | | | RESET | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | |NKRO Tog| | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + `--------------------------------------------+--------+--------. ,--------+--------+--------------------------------------------' + | | | | | | + `-----------------' `-----------------' +*/ +[_ADJUST] = LAYOUT( + _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_ADJUST2] = LAYOUT( + _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { + default_layer_set(1UL << _COLEMAK); + layer_move (_COLEMAK); + + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + default_layer_set(1UL << _QWERTY); + layer_move (_QWERTY); + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/rules.mk b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/rules.mk new file mode 100644 index 0000000000..cf63c44f4f --- /dev/null +++ b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/rules.mk @@ -0,0 +1,19 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dancing function diff --git a/keyboards/keebio/rorschach/rev1/rev1.h b/keyboards/keebio/rorschach/rev1/rev1.h index 583f0efc44..278bf8186e 100644 --- a/keyboards/keebio/rorschach/rev1/rev1.h +++ b/keyboards/keebio/rorschach/rev1/rev1.h @@ -2,10 +2,8 @@ #include "rorschach.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ diff --git a/keyboards/keebio/rorschach/rules.mk b/keyboards/keebio/rorschach/rules.mk index b500740522..f6007e4422 100644 --- a/keyboards/keebio/rorschach/rules.mk +++ b/keyboards/keebio/rorschach/rules.mk @@ -1,10 +1,15 @@ # MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/keebio/tragicforce68/rules.mk b/keyboards/keebio/tragicforce68/rules.mk index a652f1fac6..2118d3fc27 100644 --- a/keyboards/keebio/tragicforce68/rules.mk +++ b/keyboards/keebio/tragicforce68/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/keebio/tukey/config.h b/keyboards/keebio/tukey/config.h new file mode 100644 index 0000000000..d298794f1f --- /dev/null +++ b/keyboards/keebio/tukey/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2019 Keebio + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1112 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Tukey +#define DESCRIPTION 1x2 board for the Big Switch + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 2 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { { D4, F6 } } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_ANIMATIONS + +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + diff --git a/keyboards/keebio/tukey/info.json b/keyboards/keebio/tukey/info.json new file mode 100644 index 0000000000..a43d1dbbf4 --- /dev/null +++ b/keyboards/keebio/tukey/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Tukey", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 2, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0} + ] + } + } + } diff --git a/keyboards/keebio/tukey/keymaps/default/config.h b/keyboards/keebio/tukey/keymaps/default/config.h new file mode 100644 index 0000000000..6079c0b0f3 --- /dev/null +++ b/keyboards/keebio/tukey/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Keebio + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/keebio/tukey/keymaps/default/keymap.c b/keyboards/keebio/tukey/keymaps/default/keymap.c new file mode 100644 index 0000000000..6a0e29e9f0 --- /dev/null +++ b/keyboards/keebio/tukey/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +/* Copyright 2019 Keebio + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(RGB_MOD, KC_ENTER), +}; diff --git a/keyboards/keebio/tukey/keymaps/default/readme.md b/keyboards/keebio/tukey/keymaps/default/readme.md new file mode 100644 index 0000000000..7112da958a --- /dev/null +++ b/keyboards/keebio/tukey/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for tukey diff --git a/keyboards/keebio/tukey/readme.md b/keyboards/keebio/tukey/readme.md new file mode 100644 index 0000000000..21527b6bf4 --- /dev/null +++ b/keyboards/keebio/tukey/readme.md @@ -0,0 +1,13 @@ +# Tukey + +2-key keyboard for Big Switches + +Keyboard Maintainer: [nooges/Keebio](https://github.com/nooges) +Hardware Supported: Pro Micro, Elite-C +Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make keebio/tukey: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). diff --git a/keyboards/keebio/tukey/rules.mk b/keyboards/keebio/tukey/rules.mk new file mode 100644 index 0000000000..c74f169961 --- /dev/null +++ b/keyboards/keebio/tukey/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/keebio/tukey/tukey.c b/keyboards/keebio/tukey/tukey.c new file mode 100644 index 0000000000..a4582370e4 --- /dev/null +++ b/keyboards/keebio/tukey/tukey.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Keebio + * + * 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 . + */ +#include "tukey.h" diff --git a/keyboards/keebio/tukey/tukey.h b/keyboards/keebio/tukey/tukey.h new file mode 100644 index 0000000000..b8e40bb04d --- /dev/null +++ b/keyboards/keebio/tukey/tukey.h @@ -0,0 +1,20 @@ +/* Copyright 2019 Keebio + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT(k00, k01) { {k00, k01} } diff --git a/keyboards/keebio/viterbi/keymaps/default/keymap.c b/keyboards/keebio/viterbi/keymaps/default/keymap.c index c4ae0a5987..78ae83a824 100644 --- a/keyboards/keebio/viterbi/keymaps/default/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h index 201c02e419..40a5bbd0e8 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/config.h +++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h @@ -21,27 +21,25 @@ along with this program. If not, see . #define MATRIX_ROWS 5 #ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 16 - -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#endif // RGBLIGHT_ENABLE - - +# undef RGBLED_NUM +# define RGBLED_NUM 16 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#endif // RGBLIGHT_ENABLE #undef PRODUCT -#define PRODUCT Drashnas Viterbi Macro Pad +#define PRODUCT Drashnas Viterbi Macro Pad #ifdef AUDIO_ENABLE -# define C6_AUDIO -# define NO_MUSIC_MODE +# define C6_AUDIO +# define NO_MUSIC_MODE #endif +// clang-format off #define LAYOUT_ortho_5x7( \ L00, L01, L02, L03, L04, L05, L06, \ L10, L11, L12, L13, L14, L15, L16, \ @@ -56,8 +54,9 @@ along with this program. If not, see . { L30, L31, L32, L33, L34, L35, L36 }, \ { L40, L41, L42, L43, L44, L45, L46 }, \ } +// clang-format on -#define QMK_ESC_OUTPUT F5 // usually COL -#define QMK_ESC_INPUT D4 // usually ROW +#define QMK_ESC_OUTPUT F5 // usually COL +#define QMK_ESC_INPUT D4 // usually ROW #define QMK_LED B0 #define QMK_SPEAKER C6 diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 1afc59fb90..3b213418d6 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c @@ -1,29 +1,19 @@ -#include QMK_KEYBOARD_H #include "drashna.h" -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. - - // Fillers to make layering more clear -#define LMACRO OSL(_MACROS) -#define DIABLO TG(_DIABLO) -#define GAMEPAD TG(_GAMEPAD) -#define MEDIA TT(_MEDIA) +#define DIABLO TG(_DIABLO) +#define GAMEPAD TG(_GAMEPAD) +#define MEDIA TT(_MEDIA) - -//enum more_custom_keycodes { +// enum more_custom_keycodes { // KC_P00 = NEW_SAFE_RANGE //}; +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMLOCK] = LAYOUT_ortho_5x7( - LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, + KC_NO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, @@ -39,22 +29,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch - LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, + KC_NO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V ), - [_MACROS] = LAYOUT_ortho_5x7( - LMACRO, KC_OVERWATCH,GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_C9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_SYMM, KC_TORB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_GLHF, KC_GOODGAME, KC_GGEZ, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, KC_PENT - ), - - [_MEDIA] = LAYOUT_ortho_5x7( KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD, MEDIA, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, @@ -65,32 +46,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - - +// clang-format on bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - - //switch (keycode) { - //case KC_P00: - // if (!record->event.pressed) { - // tap(KC_KP_0); - // tap(KC_KP_0); - // } - // return false; - // break; - //} - return true; + // switch (keycode) { + // case KC_P00: + // if (!record->event.pressed) { + // tap(KC_KP_0); + // tap(KC_KP_0); + // } + // return false; + // break; + //} + return true; } - - - void matrix_init_keymap(void) { - #ifndef CONVERT_TO_PROTON_C +#ifndef CONVERT_TO_PROTON_C setPinOutput(D5); writePinHigh(D5); setPinOutput(B0); writePinHigh(B0); - #endif +#endif } diff --git a/keyboards/keebio/viterbi/keymaps/drashna/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk index f42e065d51..3246c18078 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk @@ -11,7 +11,6 @@ SPLIT_KEYBOARD = no SPACE_CADET_ENABLE = no NO_SECRETS = yes -MACROS_ENABLED = yes INDICATOR_LIGHTS = no RGBLIGHT_TWINKLE = no LAYOUTS = ortho_5x7 diff --git a/keyboards/keebio/viterbi/rev1/rev1.h b/keyboards/keebio/viterbi/rev1/rev1.h index f31373f02e..88a3200f6b 100644 --- a/keyboards/keebio/viterbi/rev1/rev1.h +++ b/keyboards/keebio/viterbi/rev1/rev1.h @@ -3,7 +3,6 @@ #include "viterbi.h" #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -12,8 +11,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk index 811f57fdbc..0759ab925e 100644 --- a/keyboards/keebio/viterbi/rules.mk +++ b/keyboards/keebio/viterbi/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keebio/wavelet/keymaps/default/keymap.c b/keyboards/keebio/wavelet/keymaps/default/keymap.c index abf253380b..270a4ffb58 100644 --- a/keyboards/keebio/wavelet/keymaps/default/keymap.c +++ b/keyboards/keebio/wavelet/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/wavelet/rules.mk b/keyboards/keebio/wavelet/rules.mk index cfff50a41d..f924db62b8 100644 --- a/keyboards/keebio/wavelet/rules.mk +++ b/keyboards/keebio/wavelet/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keycapsss/o4l_5x12/rules.mk b/keyboards/keycapsss/o4l_5x12/rules.mk index 36c30f309f..0703535375 100644 --- a/keyboards/keycapsss/o4l_5x12/rules.mk +++ b/keyboards/keycapsss/o4l_5x12/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) diff --git a/keyboards/keyhive/maypad/info.json b/keyboards/keyhive/maypad/info.json index 547cc8b6ef..8936717310 100644 --- a/keyboards/keyhive/maypad/info.json +++ b/keyboards/keyhive/maypad/info.json @@ -9,7 +9,7 @@ "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":3, "h":2}] }, "LAYOUT_ortho_5x4": { - "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}] + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"0", "x":0, "y":4}, {"label":"00", "x":1, "y":4}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}] } } diff --git a/keyboards/keyhive/maypad/rules.mk b/keyboards/keyhive/maypad/rules.mk index d34236a16e..f76179af65 100644 --- a/keyboards/keyhive/maypad/rules.mk +++ b/keyboards/keyhive/maypad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kinesis/alvicstep/rules.mk b/keyboards/kinesis/alvicstep/rules.mk index 76e69d0278..e69de29bb2 100644 --- a/keyboards/kinesis/alvicstep/rules.mk +++ b/keyboards/kinesis/alvicstep/rules.mk @@ -1,6 +0,0 @@ -# just silently stop, since we need to upload with teensy uploader -# upload: build - - - - diff --git a/keyboards/kinesis/keymaps/default/keymap.c b/keyboards/kinesis/keymaps/default/keymap.c index 98de455e58..dd85cdbe28 100644 --- a/keyboards/kinesis/keymaps/default/keymap.c +++ b/keyboards/kinesis/keymaps/default/keymap.c @@ -52,22 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/kinesis/keymaps/default_pretty/keymap.c b/keyboards/kinesis/keymaps/default_pretty/keymap.c index cb4cb6f26a..3d2a538a2e 100644 --- a/keyboards/kinesis/keymaps/default_pretty/keymap.c +++ b/keyboards/kinesis/keymaps/default_pretty/keymap.c @@ -45,22 +45,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/kinesis/keymaps/tw1t611/keymap.c b/keyboards/kinesis/keymaps/tw1t611/keymap.c index ceb9d5e7d0..afeaf77114 100644 --- a/keyboards/kinesis/keymaps/tw1t611/keymap.c +++ b/keyboards/kinesis/keymaps/tw1t611/keymap.c @@ -8,38 +8,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [QWERTZ] = LAYOUT( _______,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, _______,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , - KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , - DE_HASH,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , - DE_TILD,DE_PIPE,DE_BSLS,DE_GRV, + KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , + KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , + DE_PIPE,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , + _______,_______,_______,_______, KC_RCTL,KC_LALT, KC_HOME, - KC_LSFT,MO(MOD),KC_BSPC , + KC_SPC ,KC_LSFT,KC_BSPC , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_FN0 ,RESET, - KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_AUDIO_MUTE, - KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_EQL , - KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_QUOT, - KC_N ,KC_M ,DE_COMM,DE_DOT ,DE_MINS,DE_PLUS, - DE_AE ,DE_OE, DE_UE, DE_SS, + KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,DE_SS , + KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_AE , + KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_OE , + KC_N ,KC_M ,DE_COMM,DE_DOT ,DE_MINS,DE_UE , + _______,_______,_______,_______, KC_LGUI,KC_LCTL, KC_END , - KC_DEL,KC_ENTER ,KC_SPC + KC_DEL,MO(MOD),KC_ENTER ), [MOD] = LAYOUT( _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, - _______,DE_AT ,DE_EURO,DE_LBRC,DE_RBRC,_______, - _______,DE_EXLM,DE_DLR ,DE_LPRN,DE_RPRN,_______, - _______,DE_CIRC,DE_AMPR,DE_LCBR,DE_RCBR,_______, - _______,_______,DE_LESS,DE_MORE, + DE_CIRC,DE_QUOT,DE_DQOT,DE_LCBR,DE_RCBR,DE_GRV , + DE_TILD,DE_EXLM,DE_DLR ,DE_LPRN,DE_RPRN,DE_AMPR, + DE_BSLS,DE_HASH,DE_LESS,DE_LBRC,DE_RBRC,DE_MORE, + _______,_______,_______,_______, _______,_______, _______, _______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, - _______,KC_PGDOWN,KC_PGUP,_______,_______,DE_PERC, - KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,DE_QST ,DE_DQOT, - _______,_______,DE_SCLN,DE_COLN,DE_UNDS,DE_ASTR, + KC_HOME,KC_PGDN,KC_PGUP,KC_END ,DE_EQL ,DE_PERC, + KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,DE_QST ,DE_ASTR, + DE_AT ,DE_EURO,DE_SCLN,DE_COLN,DE_UNDS,DE_PLUS, _______,_______,_______,_______, _______,_______, _______, diff --git a/keyboards/kinesis/keymaps/tw1t611/readme.md b/keyboards/kinesis/keymaps/tw1t611/readme.md index da033be1e9..41b0caa7e2 100644 --- a/keyboards/kinesis/keymaps/tw1t611/readme.md +++ b/keyboards/kinesis/keymaps/tw1t611/readme.md @@ -1 +1 @@ -# The default keymap for kinesis-advantage +This is a german keymap for the Kinesis Advantage. diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index 842645d905..1144d7924a 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -1,26 +1,20 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - -#define _DVORAK 0 // Dvorak layer -#define _QWERTY 1 // Qwerty layer -#define _COLEMAK 2 // Colemak layer -#define _MEDIA 3 // Media Layer -#define _KEYPAD 4 // Keypad Layer - -enum custom_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - MEDIA, - KEYPAD +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _KEYPAD, }; +enum custom_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, KEYPAD }; + // Aliases to make the keymap more uniform #define GUI_END GUI_T(KC_END) -#define MED_DEL LT(_MEDIA, KC_DEL) #define KPD_ENT LT(_KEYPAD, KC_ENT) +// clang-format off + /* Function Keys on All Layers (Keypad toggles): @@ -46,9 +40,9 @@ enum custom_keycodes { ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' QWERTY layer: @@ -66,9 +60,9 @@ enum custom_keycodes { ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' Colemak layer: @@ -86,31 +80,11 @@ enum custom_keycodes { ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' - Media layer: - ,-------------------------------------------.,-------------------------------------------. - | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | Mute | Vol- | Vol+ | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | Stop | Prev | Play | Next | Sel || | | | | | | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | | | | | | | | | | - `---------------------------' `---------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' - Keypad layer: ,-------------------------------------------.,-------------------------------------------. | Power | | | | | || | NmLk | KP = | KP / | KP * | | @@ -145,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Left Thumb KC_LCTL, KC_LALT, KC_HOME, - KC_BSPC, MED_DEL, GUI_END, + KC_BSPC, KC_DEL, GUI_END, // Right Hand KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET, @@ -171,12 +145,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Left Thumb KC_LCTL, KC_LALT, KC_HOME, - KC_BSPC, MED_DEL, KC_END, + KC_BSPC, KC_DEL, KC_END, // Right Hand KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET, - KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, - KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL , + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS , KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, @@ -197,12 +171,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Left Thumb KC_LCTL, KC_LALT, KC_HOME, - KC_BSPC, MED_DEL, KC_END, + KC_BSPC, KC_DEL, KC_END, // Right Hand KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, @@ -212,32 +186,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, KPD_ENT, KC_SPC ), -[_MEDIA] = LAYOUT ( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, _______, _______, _______, _______, _______, - _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, - _______, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, - _______, _______, _______, _______, - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - // Right Thumb - _______, _______, - _______, - _______, _______, _______ - ), - [_KEYPAD] = LAYOUT ( // Left Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -251,7 +199,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, - // Right Hand */ + // Right Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, @@ -263,38 +211,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, KC_P0 ) - }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +// clang-format on bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - } + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + } + } return true; }; // Runs just one time when the keyboard initializes. -void matrix_init_user(void) { -}; +void matrix_init_user(void){}; diff --git a/keyboards/kinesis/keymaps/xyverz/readme.md b/keyboards/kinesis/keymaps/xyverz/readme.md index b55100d25b..f8896934c0 100644 --- a/keyboards/kinesis/keymaps/xyverz/readme.md +++ b/keyboards/kinesis/keymaps/xyverz/readme.md @@ -10,6 +10,8 @@ I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar t Depending on the OS, most of the LEDs are now working in this keymap, but I still have yet to get the Num Pad LED working when switching to the Numpad layer. +Removed the Media layer 2018-12-07 + ## Still to do: * Figure out how to make the Numpad LED work properly. @@ -38,9 +40,9 @@ Depending on the OS, most of the LEDs are now working in this keymap, but I stil ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' ### Layer 1: QWERTY layer @@ -59,9 +61,9 @@ Depending on the OS, most of the LEDs are now working in this keymap, but I stil ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' ### Keymap 2: Colemak layer @@ -80,35 +82,12 @@ Depending on the OS, most of the LEDs are now working in this keymap, but I stil ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' -### layer 3 : Media layer - - ,-------------------------------------------.,-------------------------------------------. - | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | Mute | Vol- | Vol+ | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | Stop | Prev | Play | Next | Sel || | | | | | | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | | | | | | | | | | - `---------------------------' `---------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' - - - -### Keymap 4: Keypad layer +### layer 3 : Keypad layer ,-------------------------------------------.,-------------------------------------------. | Power | | | | | || | NmLk | KP = | KP / | KP * | | diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk index c8646449bd..295054d755 100644 --- a/keyboards/kinesis/rules.mk +++ b/keyboards/kinesis/rules.mk @@ -1,57 +1,15 @@ - -## Project specific files - -SRC= matrix.c - # MCU name MCU = at90usb1286 -#MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 2048 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable @@ -72,4 +30,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output should be port E6, current quantum library hardcodes C6, which we use for programming CUSTOM_MATRIX=yes # need to do our own thing with the matrix -DEFAULT_FOLDER = kinesis/alvicstep \ No newline at end of file +DEFAULT_FOLDER = kinesis/alvicstep + +# Project specific files +SRC = matrix.c diff --git a/keyboards/kinesis/stapelberg/readme.md b/keyboards/kinesis/stapelberg/readme.md index 37b26623f2..dc6041e5a1 100644 --- a/keyboards/kinesis/stapelberg/readme.md +++ b/keyboards/kinesis/stapelberg/readme.md @@ -22,8 +22,8 @@ If you want to perform this customization, these parts may be helpful. | 10 pin headers for thumb clusters | 4 | Digi-Key | 609-3250-ND | | 8 pin cable for thumb clusters | 2 | Digi-Key | SAM8928-ND | | Teensy++ 2.0 | 1 | Digi-Key | 1528-1056-ND | -| 2 pin right angle header for reset | 1 | Digi-Key | 3M9467-ND | -| Reset cables | 2 | Sparkfun | PRT-09140 | +| 2 pin right angle header for reset | 1 | Digi-Key | 952-2244-ND | +| Reset cables | 1 | Digi-Key | PRT-08672-ND | The board and connections are shown here ![controller board](https://i.imgur.com/2ZPMwvZ.jpg) diff --git a/keyboards/kinesis/stapelberg/rules.mk b/keyboards/kinesis/stapelberg/rules.mk index 3f2ff2d6cc..e69de29bb2 100644 --- a/keyboards/kinesis/stapelberg/rules.mk +++ b/keyboards/kinesis/stapelberg/rules.mk @@ -1,5 +0,0 @@ - - - - - diff --git a/keyboards/kingly_keys/little_foot/config.h b/keyboards/kingly_keys/little_foot/config.h new file mode 100644 index 0000000000..e0bd0daf99 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/config.h @@ -0,0 +1,58 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 .#pragma once + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kingly-Keys +#define PRODUCT The Little Foot +#define DESCRIPTION A Mighty Small, 45-Percent, Ortholinear Keyboard. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F6, B6, B2, B3, B1 } +#define MATRIX_COL_PINS { F5, F7, B5, B4, E6, D7, C6, D4, D0, D1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 +#define FORCE_NKRO + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN F4 +#define RGBLED_NUM 10 // Number of LEDs + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/kingly_keys/little_foot/info.json b/keyboards/kingly_keys/little_foot/info.json new file mode 100644 index 0000000000..d8fa905521 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "Little Foot", + "url": "", + "maintainer": "TheRoyalSweatshirt", + "width": 10, + "height": 5, + "layouts": { + "LAYOUT_split_space_base": { + "key_count": 44, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":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":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":2}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1.5}] + }, + "LAYOUT_big_space_base": { + "key_count": 41, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":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":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":1.5, "y":4, "w":7}] + } + } +} diff --git a/keyboards/kingly_keys/little_foot/keymaps/default/keymap.c b/keyboards/kingly_keys/little_foot/keymaps/default/keymap.c new file mode 100644 index 0000000000..e85e0d6c47 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/keymaps/default/keymap.c @@ -0,0 +1,40 @@ + +#include QMK_KEYBOARD_H + +// Layer names +enum{ + // - Base layer: + _BASE, + // - Symbols, numbers, and functions: + _FN, + // - Alternate Function layer: + _LN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_split_space_base( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, + MO(_FN), KC_LSHIFT, KC_SPACE, RGB_MOD + ), + + [_FN] = LAYOUT_split_space_base( + LT(_LN, KC_ESC), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_BSPC, + KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LSFT(KC_MINS), KC_BSLS, + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LALT, KC_TRNS, KC_LCTRL + ), + + [_LN] = LAYOUT_split_space_base( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, + KC_TRNS, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, + KC_TRNS, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kingly_keys/little_foot/little_foot.c b/keyboards/kingly_keys/little_foot/little_foot.c new file mode 100644 index 0000000000..5513b113a0 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/little_foot.c @@ -0,0 +1 @@ +#include "little_foot.h" diff --git a/keyboards/kingly_keys/little_foot/little_foot.h b/keyboards/kingly_keys/little_foot/little_foot.h new file mode 100644 index 0000000000..860eaeb8f0 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/little_foot.h @@ -0,0 +1,35 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_split_space_base( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, \ + k42, k46, k47, k49 \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310 }, \ + { XXX, k42, XXX, XXX, XXX, k46, k47, XXX, k49, XXX } \ +} + +#define LAYOUT_big_space_base( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, \ + k46 \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310 }, \ + { XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, XXX } \ +} diff --git a/keyboards/kingly_keys/little_foot/readme.md b/keyboards/kingly_keys/little_foot/readme.md new file mode 100644 index 0000000000..1052952cda --- /dev/null +++ b/keyboards/kingly_keys/little_foot/readme.md @@ -0,0 +1,17 @@ +# Little Foot + +![Little_Foot](https://i.imgur.com/M0Usdtg.jpg) +=== + +A mighty small keyboard. + +Keyboard Maintainer: Garret G. - a.k.a. [The_Royal](https://www.reddit.com/user/The_Royal/) on Reddit, and [TheRoyalSweatshirt](https://github.com/TheRoyalSweatshirt) on GitHub +Hardware Supported: Little_Foot Rev1.2 & Rev1.4, Pro-Micro, and Elite-C +Hardware Availability: Through GB or Direct Message + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/little_foot: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). + diff --git a/keyboards/kingly_keys/little_foot/rules.mk b/keyboards/kingly_keys/little_foot/rules.mk new file mode 100644 index 0000000000..d360340c56 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/romac/config.h b/keyboards/kingly_keys/romac/config.h similarity index 100% rename from keyboards/romac/config.h rename to keyboards/kingly_keys/romac/config.h diff --git a/keyboards/romac/info.json b/keyboards/kingly_keys/romac/info.json similarity index 100% rename from keyboards/romac/info.json rename to keyboards/kingly_keys/romac/info.json diff --git a/keyboards/kingly_keys/romac/keymaps/default/keymap.c b/keyboards/kingly_keys/romac/keymaps/default/keymap.c new file mode 100644 index 0000000000..44263453d0 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2018 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_7, KC_8, KC_9, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + MO(1), KC_0, KC_DOT \ + ), + + [_FN1] = LAYOUT( + KC_TRNS, KC_HOME, KC_PGUP, \ + KC_TRNS, KC_END, KC_PGDN, \ + KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_ENT \ + ) +}; diff --git a/keyboards/kingly_keys/romac/keymaps/jarred/keymap.c b/keyboards/kingly_keys/romac/keymaps/jarred/keymap.c new file mode 100644 index 0000000000..472e99004f --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/jarred/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 Jarred Steenvoorden + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_7, KC_8, KC_9, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + LT(_FN1, KC_0), KC_ENT, KC_DOT \ + ), + + [_FN1] = LAYOUT( + KC_HOME, KC_UP , KC_PGUP , \ + KC_LEFT, KC_DOWN, KC_RIGHT, \ + KC_END , KC_BSPC, KC_PGDN , \ + KC_TRNS, XXXXXXX, KC_DEL \ + ) +}; diff --git a/keyboards/romac/keymaps/stanrc85/config.h b/keyboards/kingly_keys/romac/keymaps/stanrc85/config.h similarity index 100% rename from keyboards/romac/keymaps/stanrc85/config.h rename to keyboards/kingly_keys/romac/keymaps/stanrc85/config.h diff --git a/keyboards/romac/keymaps/stanrc85/keymap.c b/keyboards/kingly_keys/romac/keymaps/stanrc85/keymap.c similarity index 100% rename from keyboards/romac/keymaps/stanrc85/keymap.c rename to keyboards/kingly_keys/romac/keymaps/stanrc85/keymap.c diff --git a/keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk b/keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/kingly_keys/romac/readme.md b/keyboards/kingly_keys/romac/readme.md new file mode 100644 index 0000000000..bc01d14f22 --- /dev/null +++ b/keyboards/kingly_keys/romac/readme.md @@ -0,0 +1,16 @@ + +# RoMac + +![RoMac](https://i.imgur.com/hAOyoqj.jpg) + +A “Plaid” Inspired 12-Key (3x4) Macropad. + +- Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) +- Hardware Supported: RoMac rev.1, rev.2, Pro Micro, Elite-C, Proton C, BlueMicro. +- Hardware Availability: Through GB or Direct Message (If extra stock is available). + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/romac: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). diff --git a/keyboards/romac/romac.c b/keyboards/kingly_keys/romac/romac.c similarity index 100% rename from keyboards/romac/romac.c rename to keyboards/kingly_keys/romac/romac.c diff --git a/keyboards/romac/romac.h b/keyboards/kingly_keys/romac/romac.h similarity index 100% rename from keyboards/romac/romac.h rename to keyboards/kingly_keys/romac/romac.h diff --git a/keyboards/kingly_keys/romac/rules.mk b/keyboards/kingly_keys/romac/rules.mk new file mode 100644 index 0000000000..a3da8aa834 --- /dev/null +++ b/keyboards/kingly_keys/romac/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + diff --git a/keyboards/kingly_keys/romac_plus/config.h b/keyboards/kingly_keys/romac_plus/config.h new file mode 100644 index 0000000000..503a463f51 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/config.h @@ -0,0 +1,46 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheRoyalSweatshirt +#define PRODUCT RoMac+ +#define DESCRIPTION A *Plaid inspired twelve-key macropad with upgraded features +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, D4, D2, D3 } +#define MATRIX_COL_PINS { F6, F5, F4 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { B3 } +#define ENCODERS_PAD_B { B2 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN F7 +#define RGBLED_NUM 4 // Number of LEDs + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/kingly_keys/romac_plus/info.json b/keyboards/kingly_keys/romac_plus/info.json new file mode 100644 index 0000000000..5c73db5b27 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "RoMac+", + "url": "", + "maintainer": "TheRoyalSweatshirt", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 12, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}] + } + } +} diff --git a/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c new file mode 100644 index 0000000000..556af1d1e0 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2018 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +#define BASE 0 +#define FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3, + MO(1), KC_0, KC_DOT + ), + + [FN] = LAYOUT( + KC_TRNS, KC_HOME, KC_PGUP, + KC_TRNS, KC_END, KC_PGDN, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_ENT + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; // flips the display 180 degrees if offhand +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Let's\nbuild\nsome-\nthing\nto-\nget-\nher!"), false); + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_ln_P(PSTR(""), false); + break; + case FN: + oled_write_ln_P(PSTR("FN"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undef"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPS ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); +} +#endif diff --git a/keyboards/kingly_keys/romac_plus/readme.md b/keyboards/kingly_keys/romac_plus/readme.md new file mode 100644 index 0000000000..aede33b142 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/readme.md @@ -0,0 +1,16 @@ + +# RoMac+ + +![RoMac+](https://i.imgur.com/YJ2nCrS.png) + +An Upgraded “Plaid” Inspired 12-Key (3x4) Macropad With Fancy Features. + +- Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) +- Hardware Supported: RoMac+ Rev3.0, Pro Micro, Elite-C, Proton C, BlueMicro. +- Hardware Availability: Through Online Store [Kingly-Keys](https://kingly-keys.xyz/) (Stock Varies). + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/romac_plus: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). diff --git a/keyboards/kingly_keys/romac_plus/romac_plus.c b/keyboards/kingly_keys/romac_plus/romac_plus.c new file mode 100644 index 0000000000..1e95f36c78 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/romac_plus.c @@ -0,0 +1,2 @@ +#include "romac_plus.h" + \ No newline at end of file diff --git a/keyboards/kingly_keys/romac_plus/romac_plus.h b/keyboards/kingly_keys/romac_plus/romac_plus.h new file mode 100644 index 0000000000..e6fb9694d2 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/romac_plus.h @@ -0,0 +1,16 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 } \ +} diff --git a/keyboards/kingly_keys/romac_plus/rules.mk b/keyboards/kingly_keys/romac_plus/rules.mk new file mode 100644 index 0000000000..ce00f6166c --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +ENCODER_ENABLE = yes # Enable support for EC11 Rotary Encoder +OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/keyboards/kingly_keys/ropro/config.h b/keyboards/kingly_keys/ropro/config.h new file mode 100644 index 0000000000..3784ebc625 --- /dev/null +++ b/keyboards/kingly_keys/ropro/config.h @@ -0,0 +1,60 @@ +#pragma once + +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 .#pragma once + */ + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kingly-Keys +#define PRODUCT The_RoPro +#define DESCRIPTION A 75-key ortholinear keyboard with rotary encoder + + /* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 14 + +#define ENCODERS_PAD_A { B7 } +#define ENCODERS_PAD_B { D5 } + + /* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, F1, NO_PIN } +#define MATRIX_COL_PINS { F0, D1, D0, D4, C6, D7, E6, B4, B5, B3, B2, B6, D2, C7 } +#define UNUSED_PINS + + /* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + /* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + + /* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED --- DIN Pin Routed to VIA on main PCB marked "RGB" */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 18 + +#define RGBLIGHT_ANIMATIONS + + diff --git a/keyboards/ropro/info.json b/keyboards/kingly_keys/ropro/info.json similarity index 100% rename from keyboards/ropro/info.json rename to keyboards/kingly_keys/ropro/info.json diff --git a/keyboards/kingly_keys/ropro/keymaps/default/keymap.c b/keyboards/kingly_keys/ropro/keymaps/default/keymap.c new file mode 100644 index 0000000000..1bbe1c2623 --- /dev/null +++ b/keyboards/kingly_keys/ropro/keymaps/default/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER +}; + +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |+------+------+------+------+-----+------+------+------+------+------+------+------| + * RotEn | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | Ctrl | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+-------------+------+------+------+------+------| + * | Lower| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Del | Ctrl | GUI | ALT |Lower |SPACE |SPACE | End | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_PGUP, KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_HOME, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PGDN, KC_DEL, KC_RCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* LOWER + * ,-----------------------------------------------------------------------------------. + * |TOGRGB| | | |Sat(-)|Hue(-)|Hue(+)|Sat(+)| | |Brght-|Brght+| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | | | | | | | | | = | + * |+------+------+------+------+-----+------+------+------+------+------+------+------| + * RotEn | | | Up | | | | | | | [ | ] | \ | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | | Left | Down |Right | | | | | | | | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | End | | | | | | | | | | | |PrScn | + * `------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, + KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL, + KC_NLCK, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, + KC_HOME, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_WH_L); + } else { + tap_code(KC_WH_R); + } + } +} diff --git a/keyboards/ropro/keymaps/default/readme.md b/keyboards/kingly_keys/ropro/keymaps/default/readme.md similarity index 100% rename from keyboards/ropro/keymaps/default/readme.md rename to keyboards/kingly_keys/ropro/keymaps/default/readme.md diff --git a/keyboards/kingly_keys/ropro/keymaps/jdayton3/README.md b/keyboards/kingly_keys/ropro/keymaps/jdayton3/README.md new file mode 100644 index 0000000000..b62ea79e10 --- /dev/null +++ b/keyboards/kingly_keys/ropro/keymaps/jdayton3/README.md @@ -0,0 +1,19 @@ +``` + ,-----------------------------------------------------------------------------------. + | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + |------+------+------+------+------+------+------+------+------+------+------+------| + RotEn | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + ,------+------+------+------+------+------+------+------+------+------+------+------+------| + | PgUp | Esc | A | S | D | F | G | H | J | K | L | ; | " | + |------+------+------+------+------+------+-------------+------+------+------+------+------| + | Home | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------+------| + | PgDn | Brite| Ctrl | ALT | GUI |Lower |SPACE |SPACE |Raise | Left | Down | Up |Right | + `------------------------------------------------------------------------------------------' +``` + +# A Planck-based RoPro layout + +Basically all the layers from the default Planck layout, plus a number row, a function row, 3 extra keys, and a rotary encoder. diff --git a/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c b/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c new file mode 100644 index 0000000000..0c6db75142 --- /dev/null +++ b/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c @@ -0,0 +1,286 @@ +/* Copyright 2019 Jonathan Dayton (jdayton3) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum layer_names { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * RotEn | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+-------------+------+------+------+------+------| + * | Home | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Brite| Ctrl | ALT | GUI |Lower |SPACE |SPACE |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_PGUP, 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_HOME, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PGDN, RGB_TOG, KC_RCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |-----------------------------------------------------------------------------------| + * RotEn | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * ,------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC, + KC_PGUP, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_HOME, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PGDN, RGB_TOG, KC_RCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |-----------------------------------------------------------------------------------. + * RotEn | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * ,------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_PGUP, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_HOME, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + KC_PGDN, RGB_TOG, KC_RCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* LOWER + * ,-----------------------------------------------------------------------------------. + * |TOGRGB| | | |Sat(-)|Hue(-)|Hue(+)|Sat(+)| | |Brght-|Brght+| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | | | | | | | | | = | + * |-----------------------------------------------------------------------------------. + * RotEn | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | End | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, + KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL, + KC_NLCK, 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_HOME, 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_TRNS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + KC_END, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* RAISE + * ,-----------------------------------------------------------------------------------. + * |TOGRGB| | | |Sat(-)|Hue(-)|Hue(+)|Sat(+)| | |Brght-|Brght+| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | | | | | | | | | = | + * |-----------------------------------------------------------------------------------. + * RotEn | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | End | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( + RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, + KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL, + KC_NLCK, 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_HOME, 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_TRNS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + KC_END, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |-----------------------------------------------------------------------------------. + * RotEn | # | # | # | # | # | # | # | # | # | # | # | # | + * ,------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | | S | T | P | H | * | * | F | P | L | T | D | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | | S | K | W | R | * | * | R | B | G | S | Z | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Exit | | | A | O | | E | U | | | | + * `------------------------------------------------------------------------------------------' + */ + [_PLOVER] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + KC_PGUP, XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_HOME, XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_PGDN, EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |-----------------------------------------------------------------------------------. + * RotEn | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * ,------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | | | | | | | | | | | | + * `------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + KC_PGUP, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + KC_HOME, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_WH_L); + } else { + tap_code(KC_WH_R); + } + } +} + + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} diff --git a/keyboards/kingly_keys/ropro/readme.md b/keyboards/kingly_keys/ropro/readme.md new file mode 100644 index 0000000000..21b05679eb --- /dev/null +++ b/keyboards/kingly_keys/ropro/readme.md @@ -0,0 +1,16 @@ +The RoPro +=== + +![The_RoPro](https://i.imgur.com/hfOzBPI.jpg) + +A Compact 75-Key + Rotary Encoder Ortholinear keyboard by [Garret G.](https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal) + +Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) +Hardware Supported: The_RoPro rev1.0, rev1.5, rev2.0 PCB; Elite-C & Proton-C Compatible. +Hardware Availability: [Kingly-Keys.xyz](https://kingly-keys.xyz/) - (Through GB or when in stock) + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/ropro: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) diff --git a/keyboards/ropro/ropro.c b/keyboards/kingly_keys/ropro/ropro.c similarity index 100% rename from keyboards/ropro/ropro.c rename to keyboards/kingly_keys/ropro/ropro.c diff --git a/keyboards/ropro/ropro.h b/keyboards/kingly_keys/ropro/ropro.h similarity index 100% rename from keyboards/ropro/ropro.h rename to keyboards/kingly_keys/ropro/ropro.h diff --git a/keyboards/kingly_keys/ropro/rules.mk b/keyboards/kingly_keys/ropro/rules.mk new file mode 100644 index 0000000000..69774ec351 --- /dev/null +++ b/keyboards/kingly_keys/ropro/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +ENCODER_ENABLE = yes +RGBLIGHT_ENABLE = yes +LAYOUTS_HAS_RGB = yes diff --git a/keyboards/kingly_keys/smd_milk/2_milk.c b/keyboards/kingly_keys/smd_milk/2_milk.c new file mode 100644 index 0000000000..95fa50e029 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/2_milk.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#include "smd_milk.h" diff --git a/keyboards/kingly_keys/smd_milk/2_milk.h b/keyboards/kingly_keys/smd_milk/2_milk.h new file mode 100644 index 0000000000..8f294817f9 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/2_milk.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, \ + K01 \ +) { \ + { K00 }, \ + { K01 } \ +} diff --git a/keyboards/kingly_keys/smd_milk/config.h b/keyboards/kingly_keys/smd_milk/config.h new file mode 100644 index 0000000000..6e16d373d1 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/config.h @@ -0,0 +1,56 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kingly-Keys +#define PRODUCT SMD-2% Milk +#define DESCRIPTION The SMD Ed. of the Milk themed 2% Keyboard by rionlion100 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 1 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C5, D2 } +#define MATRIX_COL_PINS { D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 +#define FORCE_NKRO + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B3 +#define RGBLED_NUM 4 // Number of LEDs + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 10 \ No newline at end of file diff --git a/keyboards/kingly_keys/smd_milk/info.json b/keyboards/kingly_keys/smd_milk/info.json new file mode 100644 index 0000000000..8d9dbab990 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "smd_milk", + "keyboard_folder": "kinlgy_keys/smd_milk", + "url": "", + "maintainer": "TheRoyalSweatshirt", + "width": 1, + "height": 2, + "layouts": { + "LAYOUT": { + "key_count": 2, + "layout": [ {"x": 0, "y": 0 }, {"x": 0, "y": 1 }] + } + } +} + diff --git a/keyboards/kingly_keys/smd_milk/keymaps/default/keymap.c b/keyboards/kingly_keys/smd_milk/keymaps/default/keymap.c new file mode 100644 index 0000000000..22fb9cad68 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/keymaps/default/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_HOME, + KC_END + ) +}; diff --git a/keyboards/kingly_keys/smd_milk/readme.md b/keyboards/kingly_keys/smd_milk/readme.md new file mode 100644 index 0000000000..98823d54ab --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/readme.md @@ -0,0 +1,21 @@ +# 2% Milk + +![SMD_MILK](https://i.imgur.com/oAeKSGF.jpg) + +An SMD Version of the 2% Meme board themed around a milk carton and love + +Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal) +Hardware Availability: Through GB + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/smd_milk: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). + +### Credits ++ Original Concept by rionlion100 ++ Case design by Soft ++ Original 2% Milk PCB by PyroL ++ new SMD PCB by The_Royal ++ Name by jetpacktuxedo diff --git a/keyboards/kingly_keys/smd_milk/rules.mk b/keyboards/kingly_keys/smd_milk/rules.mk new file mode 100644 index 0000000000..815f4866cf --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. diff --git a/keyboards/kingly_keys/smd_milk/smd_milk.c b/keyboards/kingly_keys/smd_milk/smd_milk.c new file mode 100644 index 0000000000..95fa50e029 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/smd_milk.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#include "smd_milk.h" diff --git a/keyboards/kingly_keys/smd_milk/smd_milk.h b/keyboards/kingly_keys/smd_milk/smd_milk.h new file mode 100644 index 0000000000..8f294817f9 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/smd_milk.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, \ + K01 \ +) { \ + { K00 }, \ + { K01 } \ +} diff --git a/keyboards/kingly_keys/soap/README.md b/keyboards/kingly_keys/soap/README.md new file mode 100644 index 0000000000..0e32244d2f --- /dev/null +++ b/keyboards/kingly_keys/soap/README.md @@ -0,0 +1,16 @@ +SOAP +=== + +![SOAP](https://i.imgur.com/6h6O4QP.png) + +A Sanitary, "SOAP" Themed, Macro Pad by [Garret G.](https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal) + +Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal/) of Reddit. +Hardware Supported: SOAP rev1.0, rev2.0 PCB +Hardware Availability: [Kingly-Keys.xyz](https://kingly-keys.xyz/) - (Through GB) + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/soap: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) diff --git a/keyboards/kingly_keys/soap/config.h b/keyboards/kingly_keys/soap/config.h new file mode 100644 index 0000000000..2ffbaacc70 --- /dev/null +++ b/keyboards/kingly_keys/soap/config.h @@ -0,0 +1,54 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 .#pragma once + */ + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0004 +#define MANUFACTURER Kingly-Keys +#define PRODUCT SOAP +#define DESCRIPTION A Sanitary "Soap" Themed Macropad with Rotary Encoder + + /* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +#define ENCODERS_PAD_A { D6 } +#define ENCODERS_PAD_B { D7 } + + /* key matrix pins */ +#define MATRIX_ROW_PINS { C7, C6 } +#define MATRIX_COL_PINS { F4, F1, F0, D5 } +#define UNUSED_PINS + + /* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + /* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + + /* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED --- DIN Pin Routed to VIA on main PCB marked "RGB" */ +#define RGB_DI_PIN B6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 3 diff --git a/keyboards/kingly_keys/soap/info.json b/keyboards/kingly_keys/soap/info.json new file mode 100644 index 0000000000..257391eea2 --- /dev/null +++ b/keyboards/kingly_keys/soap/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "soap", + "url": "https://github.com/TheRoyalSweatshirt/SOAP", + "maintainer": "[TheRoyalSweatshirt](https://github.com/TheRoyalSweatshirt)", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT": { + "key_count": 8, + "layout": [{"label":"K00", "x":0, "y":0}, {"label":"K01", "x":1, "y":0}, {"label":"K02", "x":2, "y":0}, {"label":"K03", "x":4, "y":0}, {"label":"K10", "x":0, "y":1}, {"label":"K11", "x":1, "y":1}, {"label":"K12", "x":2, "y":1}, {"label":"K13", "x":4, "y":1}] + } + } +} diff --git a/keyboards/kingly_keys/soap/keymaps/default/keymap.c b/keyboards/kingly_keys/soap/keymaps/default/keymap.c new file mode 100644 index 0000000000..03966e42be --- /dev/null +++ b/keyboards/kingly_keys/soap/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +#define BASE 0 +#define FN 1 +#define RGB RGB_MOD +#define XXX KC_NO +#define KC_TR KC_TRANSPARENT +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE + * ,----------------------------------------. + * | DEL | UP | ENTER | | RGB | + * |-------+-------+-------+-------+--------| + * | LEFT | DOWN | RIGHT | | FN | + * `----------------------------------------' + */ + [BASE] = LAYOUT( + KC_DEL, KC_UP, KC_ENT, RGB, + KC_LEFT, KC_DOWN, KC_RIGHT, MO(1) + ), + + /* FN + * ,----------------------------------------. + * | HU+ | Br+ | Sat+ | | | + * |-------+-------+-------+-------+--------| + * | HU- | Br- | Sat- | | | + * `----------------------------------------' + */ + [FN] = LAYOUT( + RGB_HUI, RGB_VAI, RGB_SAI, KC_TR, + RGB_HUD, RGB_VAD, RGB_SAD, KC_TR + ) +}; + + /* Rotary Encoder Settings: */ + /* - Current Value = Horizontal Scrolling */ + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_WH_L); + } else { + tap_code(KC_WH_R); + } + } +} diff --git a/keyboards/kingly_keys/soap/rules.mk b/keyboards/kingly_keys/soap/rules.mk new file mode 100644 index 0000000000..27e3158479 --- /dev/null +++ b/keyboards/kingly_keys/soap/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +ENCODER_ENABLE = yes +RGBLIGHT_ENABLE = yes +LAYOUTS_HAS_RGB = yes diff --git a/keyboards/kingly_keys/soap/soap.c b/keyboards/kingly_keys/soap/soap.c new file mode 100644 index 0000000000..a467c54b74 --- /dev/null +++ b/keyboards/kingly_keys/soap/soap.c @@ -0,0 +1 @@ +#include "soap.h" diff --git a/keyboards/kingly_keys/soap/soap.h b/keyboards/kingly_keys/soap/soap.h new file mode 100644 index 0000000000..8d5eba3ad2 --- /dev/null +++ b/keyboards/kingly_keys/soap/soap.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 . + * + * Note: Matrix is a little wacky with the rotary encoder click mapping being + * on the opposite side of the board. Remember to pay attention to + * the 13th column where the lone key mapped for rotary encoder click (K132). +*/ + +#pragma once + +#include "quantum.h" + + +#define LAYOUT( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 } \ +} diff --git a/keyboards/kira75/keymaps/default/keymap.c b/keyboards/kira75/keymaps/default/keymap.c index 7a08c4e50a..74fa1ed844 100644 --- a/keyboards/kira75/keymaps/default/keymap.c +++ b/keyboards/kira75/keymaps/default/keymap.c @@ -26,22 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/kira75/rules.mk b/keyboards/kira75/rules.mk index 610410ae4c..0f29718cc8 100644 --- a/keyboards/kira75/rules.mk +++ b/keyboards/kira75/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk index dbcf540bda..8f53f26cd7 100644 --- a/keyboards/kmac/rules.mk +++ b/keyboards/kmac/rules.mk @@ -1,60 +1,19 @@ -# Project specific files -SRC += matrix.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# Supported layouts -LAYOUTS = tkl_ansi - # Build Options # change yes to no to disable # @@ -74,3 +33,9 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# Project specific files +SRC += matrix.c + +# Supported layouts +LAYOUTS = tkl_ansi diff --git a/keyboards/kmini/rules.mk b/keyboards/kmini/rules.mk index a4183870ca..0406c32326 100755 --- a/keyboards/kmini/rules.mk +++ b/keyboards/kmini/rules.mk @@ -1,54 +1,18 @@ -# Project specific files -SRC = matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -69,3 +33,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# Project specific files +SRC = matrix.c diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c index e35b8ec080..68c96fc192 100644 --- a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c @@ -1,5 +1,10 @@ #include QMK_KEYBOARD_H +enum custom_keycodes { + M_TGLHF = SAFE_RANGE, + M_TGG +}; + /* * Copy of knopps mini default May 16,2018 * Added comments in code to more easilly understand it. @@ -41,16 +46,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Layer 1 * _____ _____ _____ * | | | | | | -* ESC Macro3 Macro4 +* ESC Ctl+Z CSf+Z * |_____| |_____| |_____| * _____ _____ _____ * | | | | | | -* Macro5 Macro6 Macro7 +* Ctl+X Ctl+C Ctl+V * |_____| |_____| |_____| * */ LAYOUT( - LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)), + LT(3, KC_ESC), C(KC_Z), C(S(KC_Z)), C(KC_X), C(KC_C), C(KC_V)), /* * Layer 2 @@ -65,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ LAYOUT( - LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)), + LT(3, KC_1), KC_2, KC_3, KC_4, M_TGLHF, M_TGG), /* * Layer 3 Key Layout @@ -126,91 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// Older way of Macros found here: https://docs.qmk.fm/features/macros - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - //keyevent_t event = record->event; - - switch (id) { - case 0: - if (record->event.pressed) { - /* - * This is Macro 0 - * Content: tglhf - */ - return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END ); - } - break; - case 1: - if (record->event.pressed) { - /* - * This is Macro 1 - * Content: tgg - */ - return MACRO( T(T), T(G), T(G), T(ENT), END ); - } - break; - case 2: - if (record->event.pressed) { - /* - * This is Macro 2 - * Content: Press and hold "no" , type "l", release "no" - * I haven't found what this "NO" key maps to - */ - return MACRO( D(NO), T(L), U(NO), END ); - } - break; - case 3: - if (record->event.pressed) { - /* - * This is Macro 3 - * Content: press/hold LCTRL, type "2", release LCTRL - */ - return MACRO( D(LCTL), T(Z), U(LCTL), END ); - } - break; - case 4: - if (record->event.pressed) { - /* - * This is Macro 4 - * Content: press/hold LCTRL, type "2", release LCTRL - */ - return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END ); - } - break; - case 5: - if (record->event.pressed) { - /* - * This is Macro 5 - * Content: press/hold LCTRL, type "x", release LCTRL - */ - return MACRO( D(LCTL), T(X), U(LCTL), END ); - } - break; - case 6: - if (record->event.pressed) { - /* - * This is Macro 6 - * Content: press/hold LCTRL, type "c", release LCTRL - */ - return MACRO( D(LCTL), T(C), U(LCTL), END ); - } - break; - case 7: - if (record->event.pressed) { - /* - * This is Macro 7 - * Content: press/hold LCTRL, type "v", release LCTRL - */ - return MACRO( D(LCTL), T(V), U(LCTL), END ); - } - break; - } - return MACRO_NONE; -} - - - void set_switch_led(int ledId, bool state) { if(state) { switch(ledId) { @@ -480,6 +400,17 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) { led_set_layer(2); } break; + case M_TGLHF: + if (record->event.pressed) { + SEND_STRING("tglhf"); + tap_code(KC_ENT); + } + case M_TGG: + if (record->event.pressed) { + SEND_STRING("tgg"); + tap_code(KC_ENT); + } + return false; } return true; } diff --git a/keyboards/knops/mini/keymaps/default/keymap.c b/keyboards/knops/mini/keymaps/default/keymap.c index a5a701c88d..859f07aa07 100644 --- a/keyboards/knops/mini/keymaps/default/keymap.c +++ b/keyboards/knops/mini/keymaps/default/keymap.c @@ -1,15 +1,20 @@ #include QMK_KEYBOARD_H +enum custom_keycodes { + M_TGLHF = SAFE_RANGE, + M_TGG +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT), LAYOUT( - LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)), + LT(3, KC_ESC), C(KC_Z), C(S(KC_Z)), C(KC_X), C(KC_C), C(KC_V)), LAYOUT( - LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)), + LT(3, KC_1), KC_2, KC_3, KC_4, M_TGLHF, M_TGG), LAYOUT( KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)), @@ -52,54 +57,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - //keyevent_t event = record->event; - - switch (id) { - case 0: - if (record->event.pressed) { - return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END ); - } - break; - case 1: - if (record->event.pressed) { - return MACRO( T(T), T(G), T(G), T(ENT), END ); - } - break; - case 2: - if (record->event.pressed) { - return MACRO( D(NO), T(L), U(NO), END ); - } - break; - case 3: - if (record->event.pressed) { - return MACRO( D(LCTL), T(Z), U(LCTL), END ); - } - break; - case 4: - if (record->event.pressed) { - return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END ); - } - break; - case 5: - if (record->event.pressed) { - return MACRO( D(LCTL), T(X), U(LCTL), END ); - } - break; - case 6: - if (record->event.pressed) { - return MACRO( D(LCTL), T(C), U(LCTL), END ); - } - break; - case 7: - if (record->event.pressed) { - return MACRO( D(LCTL), T(V), U(LCTL), END ); - } - break; - } - return MACRO_NONE; -} - void set_switch_led(int ledId, bool state) { if(state) { switch(ledId) { @@ -369,6 +326,18 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) { led_set_layer(2); } break; + case M_TGLHF: + if (record->event.pressed) { + SEND_STRING("tglhf"); + tap_code(KC_ENT); + } + return false; + case M_TGG: + if (record->event.pressed) { + SEND_STRING("tgg"); + tap_code(KC_ENT); + } + return false; } return true; -} \ No newline at end of file +} diff --git a/keyboards/knops/mini/rules.mk b/keyboards/knops/mini/rules.mk index ca2a2a5f80..ef5ef06851 100644 --- a/keyboards/knops/mini/rules.mk +++ b/keyboards/knops/mini/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kona_classic/keymaps/ansi/keymap.c b/keyboards/kona_classic/keymaps/ansi/keymap.c index 5b53f21c60..e6ae4ce476 100644 --- a/keyboards/kona_classic/keymaps/ansi/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c index e9c0f326f3..021cce832d 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c index 2ca5b79208..fde23ba94c 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/ansi_split/keymap.c b/keyboards/kona_classic/keymaps/ansi_split/keymap.c index 79be4e911f..01e049c7bc 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c index 1e39f4aae6..eba565bb44 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/default/keymap.c b/keyboards/kona_classic/keymaps/default/keymap.c index ebfe0f2482..a42e936803 100644 --- a/keyboards/kona_classic/keymaps/default/keymap.c +++ b/keyboards/kona_classic/keymaps/default/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/iso/keymap.c b/keyboards/kona_classic/keymaps/iso/keymap.c index 0d37536039..1486a8b755 100644 --- a/keyboards/kona_classic/keymaps/iso/keymap.c +++ b/keyboards/kona_classic/keymaps/iso/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c index a7ab26a35d..96adc34827 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/iso_split/keymap.c b/keyboards/kona_classic/keymaps/iso_split/keymap.c index 14935e992e..278b4cd32d 100644 --- a/keyboards/kona_classic/keymaps/iso_split/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c index 4eb184bae9..1e8bc04186 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c @@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - - void matrix_init_user(void) { } diff --git a/keyboards/kona_classic/rules.mk b/keyboards/kona_classic/rules.mk index 8b4179e395..0a7df029c4 100644 --- a/keyboards/kona_classic/rules.mk +++ b/keyboards/kona_classic/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/business_card/info.json b/keyboards/kudox/columner/columner.c similarity index 100% rename from keyboards/business_card/info.json rename to keyboards/kudox/columner/columner.c diff --git a/keyboards/kudox/columner/columner.h b/keyboards/kudox/columner/columner.h new file mode 100644 index 0000000000..dcc745ddb7 --- /dev/null +++ b/keyboards/kudox/columner/columner.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/kudox/columner/config.h b/keyboards/kudox/columner/config.h new file mode 100644 index 0000000000..a76bce09da --- /dev/null +++ b/keyboards/kudox/columner/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9691 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Kumao Kobo +#define PRODUCT The Kudox Keyboard +#define DESCRIPTION Split column staggered 5x7 custom keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/kudox/columner/info.json b/keyboards/kudox/columner/info.json new file mode 100644 index 0000000000..8d98c81788 --- /dev/null +++ b/keyboards/kudox/columner/info.json @@ -0,0 +1,77 @@ +{ + "url": "http://kumaokobo.com/", + "maintainer": "Kumao Kobo", + "keyboard_name": "Kudox Keyboard Columner", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0.5, "w":1.25}, + {"label":"1", "x":1.25, "y":0.5}, + {"label":"2", "x":2.25, "y":0.25}, + {"label":"3", "x":3.25, "y":0}, + {"label":"4", "x":4.25, "y":0.25}, + {"label":"5", "x":5.25, "y":0.5}, + {"label":"6", "x":11, "y":0.5}, + {"label":"7", "x":12, "y":0.25}, + {"label":"8", "x":13, "y":0}, + {"label":"9", "x":14, "y":0.25}, + {"label":"0", "x":15, "y":0.5}, + {"label":"\u2190", "x":16, "y":0.5, "w":1.25}, + {"label":"Tab", "x":0, "y":1.5, "w":1.25}, + {"label":"Q", "x":1.25, "y":1.5}, + {"label":"W", "x":2.25, "y":1.25}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1.25}, + {"label":"T", "x":5.25, "y":1.5}, + {"label":"{", "x":6.25, "y":1.25, "h":1.25}, + {"label":"}", "x":10, "y":1.25, "h":1.25}, + {"label":"Y", "x":11, "y":1.5}, + {"label":"U", "x":12, "y":1.25}, + {"label":"I", "x":13, "y":1}, + {"label":"O", "x":14, "y":1.25}, + {"label":"P", "x":15, "y":1.5}, + {"label":"\\", "x":16, "y":1.5, "w":1.25}, + {"label":"Ctrl", "x":0, "y":2.5, "w":1.25}, + {"label":"A", "x":1.25, "y":2.5}, + {"label":"S", "x":2.25, "y":2.25}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2.25}, + {"label":"G", "x":5.25, "y":2.5}, + {"label":"H", "x":11, "y":2.5}, + {"label":"J", "x":12, "y":2.25}, + {"label":"K", "x":13, "y":2}, + {"label":"L", "x":14, "y":2.25}, + {"label":";", "x":15, "y":2.5}, + {"label":"Enter", "x":16, "y":2.5, "w":1.25}, + {"label":"Shift", "x":0, "y":3.5, "w":1.25}, + {"label":"Z", "x":1.25, "y":3.5}, + {"label":"X", "x":2.25, "y":3.25}, + {"label":"V", "x":4.25, "y":3.25}, + {"label":"C", "x":3.25, "y":3}, + {"label":"B", "x":5.25, "y":3.5}, + {"label":"-", "x":6.25, "y":2.5, "h":1.25}, + {"label":"=", "x":10, "y":2.5, "h":1.25}, + {"label":"N", "x":11, "y":3.5}, + {"label":"M", "x":12, "y":3.25}, + {"label":",", "x":13, "y":3}, + {"label":".", "x":14, "y":3.25}, + {"label":"/", "x":15, "y":3.5}, + {"label":"Shift", "x":16, "y":3.5, "w":1.25}, + {"label":"Alt", "x":0, "y":4.5, "w":1.25}, + {"label":"'", "x":1.25, "y":4.5}, + {"label":"~", "x":2.25, "y":4.25}, + {"label":"Del", "x":3.25, "y":4}, + {"label":"LANG2", "x":4.25, "y":4.5}, + {"label":"GUI", "x":5.25, "y":4.75}, + {"label":"Space", "x":6.25, "y":5}, + {"label":"Space", "x":10, "y":5}, + {"label":"GUI", "x":11, "y":4.75}, + {"label":"LANG2", "x":12, "y":4.5}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4.25}, + {"label":"\u2191", "x":15, "y":4.5}, + {"label":"\u2192", "x":16, "y":4.5, "w":1.25} + ] + } + } +} diff --git a/keyboards/kudox/columner/keymaps/default/config.h b/keyboards/kudox/columner/keymaps/default/config.h new file mode 100644 index 0000000000..f5bf85cca0 --- /dev/null +++ b/keyboards/kudox/columner/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kudox/columner/keymaps/default/keymap.c b/keyboards/kudox/columner/keymaps/default/keymap.c new file mode 100644 index 0000000000..84ebcc906b --- /dev/null +++ b/keyboards/kudox/columner/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _NUMB 2 + +// Shortcut to make keymap more readable +#define KC_ALES LALT_T(KC_ESC) + +#define KC_LGENT MT(KC_LGUI, KC_ENT) +#define KC_RGENT MT(KC_RGUI, KC_ENT) + +#define KC_L1NUM LT(_NUMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_LBRC , KC_RBRC ,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_MINS , KC_EQL ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,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_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_QUOT ,KC_GRV ,KC_DEL ,KC_L2SYM,KC_LGENT,KC_SPC , KC_SPC ,KC_RGENT,KC_L1NUM,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F11 , KC_F12 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_DQUO ,KC_QUOT ,KC_TILD ,KC_ASTR ,KC_PLUS ,_______ , _______ ,_______ ,_______ ,_______ ,KC_TILD ,KC_GRV ,KC_JYEN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_COLN ,KC_GRV ,_______ ,KC_MINS , _______ ,_______ ,_______ ,KC_DQUO ,KC_QUOT ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_DOT ,KC_SLSH , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_CIRC ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_NUMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_7 ,KC_8 ,KC_9 ,KC_ASTR ,KC_PLUS ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_4 ,KC_5 ,KC_6 ,KC_0 ,KC_MINS , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_1 ,KC_2 ,KC_3 ,KC_DOT ,KC_SLSH , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,KC_JYEN ,KC_0 ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/kudox/columner/keymaps/default/readme.md b/keyboards/kudox/columner/keymaps/default/readme.md new file mode 100644 index 0000000000..13d9e8bee1 --- /dev/null +++ b/keyboards/kudox/columner/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Kudox Keyboard Columner diff --git a/keyboards/kudox/columner/readme.md b/keyboards/kudox/columner/readme.md new file mode 100644 index 0000000000..0c62174bcf --- /dev/null +++ b/keyboards/kudox/columner/readme.md @@ -0,0 +1,32 @@ +# The Kudox Keyboard Columner + +

+Kudox logo +

+ +

+Kudox Columner +

+ +- Keyboard Maintainer: [Kumao Kobo](https://github.com/kumaokobo) +- Hardware Supported: Kudox Columner PCB rev1.0 w/ Pro Micro + +Make example for this keyboard (after setting up your build environment): + +```sh +make kudox/columner:default +``` + + +Example of flashing this keyboard: + +```sh +make kudox/columner: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). + + +## Layout + +![layout](https://raw.githubusercontent.com/kumaokobo/kudox-keyboard/master/img/kudox-columner-layout-rev1.png) diff --git a/keyboards/divergetm2/keymaps/default/rules.mk b/keyboards/kudox/columner/rules.mk similarity index 100% rename from keyboards/divergetm2/keymaps/default/rules.mk rename to keyboards/kudox/columner/rules.mk diff --git a/keyboards/kudox/config.h b/keyboards/kudox/config.h new file mode 100644 index 0000000000..36c8f68b90 --- /dev/null +++ b/keyboards/kudox/config.h @@ -0,0 +1,27 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define USE_SERIAL + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + diff --git a/keyboards/kudox/kudox.c b/keyboards/kudox/kudox.c new file mode 100644 index 0000000000..d7643747ad --- /dev/null +++ b/keyboards/kudox/kudox.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ +#include "kudox.h" diff --git a/keyboards/kudox/kudox.h b/keyboards/kudox/kudox.h new file mode 100644 index 0000000000..09549fbc55 --- /dev/null +++ b/keyboards/kudox/kudox.h @@ -0,0 +1,29 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#ifdef KEYBOARD_kudox_rev1 + #include "rev1.h" +#endif +#ifdef KEYBOARD_kudox_rev2 + #include "rev2.h" +#endif +#ifdef KEYBOARD_kudox_columner + #include "columner.h" +#endif + +#include "quantum.h" diff --git a/keyboards/kudox/readme.md b/keyboards/kudox/readme.md new file mode 100644 index 0000000000..cc97bf83b0 --- /dev/null +++ b/keyboards/kudox/readme.md @@ -0,0 +1,29 @@ +# The Kudox keyboard + +

+Kudox logo +

+ +

+Kudox PCB rev2.0 +

+ +- Keyboard Maintainer: [Kumao Kobo](https://github.com/kumaokobo) +- Hardware Supported: Kudox PCB rev1.0 rev2.0 w/ Pro Micro + +Make example for this keyboard (after setting up your build environment): + +```sh +make kudox/rev2:default +``` + + +Example of flashing this keyboard: + +```sh +make kudox/rev2:default:flash +``` + +*keymaps/default is for rev2.0. If you want to use rev1.0, you should remove Left-06 key and Right-06 key.* + +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). diff --git a/keyboards/kudox/rev1/config.h b/keyboards/kudox/rev1/config.h new file mode 100644 index 0000000000..b57b6b7acb --- /dev/null +++ b/keyboards/kudox/rev1/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9690 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Kumao Kobo +#define PRODUCT The Kudox Keyboard +#define DESCRIPTION Split row staggered 5x7 custom keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/kudox/rev1/info.json b/keyboards/kudox/rev1/info.json new file mode 100644 index 0000000000..f92d525838 --- /dev/null +++ b/keyboards/kudox/rev1/info.json @@ -0,0 +1,75 @@ +{ + "url": "http://kumaokobo.com/", + "maintainer": "Kumao Kobo", + "keyboard_name": "Kudox Keyboard Rev1", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":11, "y":0}, + {"label":"7", "x":12, "y":0}, + {"label":"8", "x":13, "y":0}, + {"label":"9", "x":14, "y":0}, + {"label":"0", "x":15, "y":0}, + {"label":"\u2190", "x":16, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.25}, + {"label":"Q", "x":1.25, "y":1}, + {"label":"W", "x":2.25, "y":1}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1}, + {"label":"T", "x":5.25, "y":1}, + {"label":"LANG2", "x":6.25, "y":1}, + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"/", "x":14.75, "y":1}, + {"label":"\\", "x":15.75, "y":1, "w":1.25}, + {"label":"Ctrl", "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":10.25, "y":2}, + {"label":"J", "x":11.25, "y":2}, + {"label":"K", "x":12.25, "y":2}, + {"label":"L", "x":13.25, "y":2}, + {"label":";", "x":14.25, "y":2}, + {"label":"Enter", "x":15.25, "y":2, "w":1.75}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"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":"LANG1", "x":9.75, "y":3}, + {"label":"N", "x":10.75, "y":3}, + {"label":"M", "x":11.75, "y":3}, + {"label":",", "x":12.75, "y":3}, + {"label":".", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":2.25}, + {"label":"Alt", "x":0, "y":4, "w":1.25}, + {"label":"'", "x":1.25, "y":4}, + {"label":"-", "x":2.25, "y":4}, + {"label":"=", "x":3.25, "y":4}, + {"label":"layer", "x":4.25, "y":4.33, "w":1.25}, + {"label":"GUI", "x":5.5, "y":4.67}, + {"label":"Space", "x":6.5, "y":5}, + {"label":"Enter", "x":9.5, "y":5}, + {"label":"Del", "x":10.5, "y":4.67}, + {"label":"layer", "x":11.5, "y":4.33, "w":1.25}, + {"label":"\u2190", "x":12.75, "y":4}, + {"label":"\u2193", "x":13.75, "y":4}, + {"label":"\u2191", "x":14.75, "y":4}, + {"label":"\u2192", "x":15.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/kudox/rev1/keymaps/default/config.h b/keyboards/kudox/rev1/keymaps/default/config.h new file mode 100644 index 0000000000..f5bf85cca0 --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kudox/rev1/keymaps/default/keymap.c b/keyboards/kudox/rev1/keymaps/default/keymap.c new file mode 100644 index 0000000000..4c24576824 --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALES LALT_T(KC_ESC) + +#define KC_RGENT MT(KC_RGUI, KC_ENT) + +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,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_L2SYM, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_SLSH ,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_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_L1SYM,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_QUOT ,KC_MINS ,KC_EQL ,KC_ENT ,KC_LGUI ,KC_SPC , KC_RGENT,KC_DEL ,SYM_L ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_DQUO ,KC_QUOT ,KC_GRV ,KC_ASTR ,KC_PLUS ,KC_EQL , KC_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_CIRC ,KC_JYEN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_COLN ,KC_GRV ,_______ ,KC_MINS , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_DOT ,KC_SLSH , _______ ,KC_LCBR ,KC_RCBR ,KC_DOT ,KC_SLSH ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_CIRC ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/kudox/rev1/keymaps/default/readme.md b/keyboards/kudox/rev1/keymaps/default/readme.md new file mode 100644 index 0000000000..98d8b2a054 --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Kudox Keyboard diff --git a/keyboards/kudox/rev1/keymaps/jis/config.h b/keyboards/kudox/rev1/keymaps/jis/config.h new file mode 100644 index 0000000000..f5bf85cca0 --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/jis/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kudox/rev1/keymaps/jis/keymap.c b/keyboards/kudox/rev1/keymaps/jis/keymap.c new file mode 100644 index 0000000000..5de27ff8d4 --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/jis/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H +#include"keymap_jp.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALES LALT_T(KC_ESC) + +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + 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_L2SYM, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,JP_AT ,JP_COLN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_SLSH ,KC_N ,KC_M ,KC_MINS ,KC_UP ,SYM_L , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_LGUI ,KC_LALT ,KC_ENT ,KC_LANG2,KC_SPC ,KC_SPC , KC_COMM ,KC_DOT ,KC_L1SYM,KC_LEFT ,KC_DOWN ,KC_RGHT ,JP_BSLS + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , XXXXXXX ,JP_CIRC ,JP_YEN ,JP_TILD ,JP_PIPE ,KC_DEL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ , KC_LT ,KC_GT ,JP_LBRC ,JP_RBRC ,JP_LCBR ,JP_RCBR ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_F11 ,KC_F12 ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,JP_PLUS ,JP_ASTR ,KC_SCLN ,JP_COLN ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,XXXXXXX ,XXXXXXX ,_______ ,KC_VOLU ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_MUTE ,KC_VOLD ,_______,_______ + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/kudox/rev1/keymaps/jis/readme.md b/keyboards/kudox/rev1/keymaps/jis/readme.md new file mode 100644 index 0000000000..0f3fae39f7 --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/jis/readme.md @@ -0,0 +1 @@ +# The JIS keymap for Kudox Keyboard diff --git a/keyboards/ergotravel/keymaps/default/rules.mk b/keyboards/kudox/rev1/keymaps/jis/rules.mk similarity index 100% rename from keyboards/ergotravel/keymaps/default/rules.mk rename to keyboards/kudox/rev1/keymaps/jis/rules.mk diff --git a/keyboards/kudox/rev1/keymaps/x1/config.h b/keyboards/kudox/rev1/keymaps/x1/config.h new file mode 100644 index 0000000000..f5bf85cca0 --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/x1/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kudox/rev1/keymaps/x1/keymap.c b/keyboards/kudox/rev1/keymaps/x1/keymap.c new file mode 100644 index 0000000000..1c08349b01 --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/x1/keymap.c @@ -0,0 +1,73 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _NUMB 2 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) +#define NUM_L MO(_NUMB) + +#define KC_ALES LALT_T(KC_ESC) + +#define KC_RGENT MT(KC_RGUI, KC_ENT) +#define KC_LGUI2 RALT_T(KC_LANG2) + +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +#define KC_L1NUM LT(_NUMB, KC_LANG1) +#define KC_ENNUM LT(_NUMB, KC_ENT) + +#define KC_FSYM LT(_SYMB, KC_F) +#define KC_JNUM LT(_NUMB, KC_J) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,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_L2SYM, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_SLSH ,KC_BSLS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_FSYM ,KC_G , KC_H ,KC_JNUM ,KC_K ,KC_L ,KC_SCLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_L1NUM,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_QUOT ,KC_MINS ,KC_EQL ,KC_ENNUM,KC_LGUI ,KC_SPC , KC_RGENT,KC_DEL ,SYM_L ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_DQUO ,KC_QUOT ,KC_GRV ,KC_ASTR ,KC_PLUS ,KC_EQL , KC_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_CIRC ,KC_JYEN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_COLN ,KC_GRV ,_______ ,KC_MINS , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_DOT ,KC_SLSH , _______ ,KC_LCBR ,KC_RCBR ,KC_DOT ,KC_SLSH ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_CIRC ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_NUMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_7 ,KC_8 ,KC_9 ,KC_ASTR ,KC_PLUS ,KC_EQL , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_4 ,KC_5 ,KC_6 ,KC_0 ,KC_MINS , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_1 ,KC_2 ,KC_3 ,KC_DOT ,KC_SLSH , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,KC_JYEN ,KC_0 ,_______ ,_______ ,_______ ,_______ , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/kudox/rev1/keymaps/x1/readme.md b/keyboards/kudox/rev1/keymaps/x1/readme.md new file mode 100644 index 0000000000..1085735afc --- /dev/null +++ b/keyboards/kudox/rev1/keymaps/x1/readme.md @@ -0,0 +1 @@ +# [x1](https://github.com/x1-) 's keymap for Kudox Keyboard diff --git a/keyboards/gh60/keymaps/sethbc/rules.mk b/keyboards/kudox/rev1/keymaps/x1/rules.mk similarity index 100% rename from keyboards/gh60/keymaps/sethbc/rules.mk rename to keyboards/kudox/rev1/keymaps/x1/rules.mk diff --git a/keyboards/kudox/rev1/rev1.c b/keyboards/kudox/rev1/rev1.c new file mode 100644 index 0000000000..3b39ee764d --- /dev/null +++ b/keyboards/kudox/rev1/rev1.c @@ -0,0 +1,22 @@ +#include "kudox.h" + + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; diff --git a/keyboards/kudox/rev1/rev1.h b/keyboards/kudox/rev1/rev1.h new file mode 100644 index 0000000000..7a97cce699 --- /dev/null +++ b/keyboards/kudox/rev1/rev1.h @@ -0,0 +1,24 @@ +#pragma once + +#include "kudox.h" +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk b/keyboards/kudox/rev1/rules.mk similarity index 100% rename from keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk rename to keyboards/kudox/rev1/rules.mk diff --git a/keyboards/kudox/rev2/config.h b/keyboards/kudox/rev2/config.h new file mode 100644 index 0000000000..3a0d608c22 --- /dev/null +++ b/keyboards/kudox/rev2/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9690 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Kumao Kobo +#define PRODUCT The Kudox Keyboard +#define DESCRIPTION Split row staggered 5x7 custom keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/kudox/rev2/info.json b/keyboards/kudox/rev2/info.json new file mode 100644 index 0000000000..73cb5a525a --- /dev/null +++ b/keyboards/kudox/rev2/info.json @@ -0,0 +1,77 @@ +{ + "url": "http://kumaokobo.com/", + "maintainer": "Kumao Kobo", + "keyboard_name": "Kudox Keyboard Rev2", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"`", "x":6, "y":0}, + {"label":"6", "x":10, "y":0}, + {"label":"7", "x":11, "y":0}, + {"label":"8", "x":12, "y":0}, + {"label":"9", "x":13, "y":0}, + {"label":"0", "x":14, "y":0}, + {"label":"-", "x":15, "y":0}, + {"label":"\u2190", "x":16, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.25}, + {"label":"Q", "x":1.25, "y":1}, + {"label":"W", "x":2.25, "y":1}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1}, + {"label":"T", "x":5.25, "y":1}, + {"label":"LANG2", "x":6.25, "y":1}, + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"/", "x":14.75, "y":1}, + {"label":"\\", "x":15.75, "y":1, "w":1.25}, + {"label":"Ctrl", "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":10.25, "y":2}, + {"label":"J", "x":11.25, "y":2}, + {"label":"K", "x":12.25, "y":2}, + {"label":"L", "x":13.25, "y":2}, + {"label":";", "x":14.25, "y":2}, + {"label":"Enter", "x":15.25, "y":2, "w":1.75}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"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":"LANG1", "x":9.75, "y":3}, + {"label":"N", "x":10.75, "y":3}, + {"label":"M", "x":11.75, "y":3}, + {"label":",", "x":12.75, "y":3}, + {"label":".", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":2.25}, + {"label":"Alt", "x":0, "y":4, "w":1.25}, + {"label":"'", "x":1.25, "y":4}, + {"label":"-", "x":2.25, "y":4}, + {"label":"=", "x":3.25, "y":4}, + {"label":"layer", "x":4.25, "y":4.33, "w":1.25}, + {"label":"GUI", "x":5.5, "y":4.67}, + {"label":"Space", "x":6.5, "y":5}, + {"label":"Enter", "x":9.5, "y":5}, + {"label":"Del", "x":10.5, "y":4.67}, + {"label":"layer", "x":11.5, "y":4.33, "w":1.25}, + {"label":"\u2190", "x":12.75, "y":4}, + {"label":"\u2193", "x":13.75, "y":4}, + {"label":"\u2191", "x":14.75, "y":4}, + {"label":"\u2192", "x":15.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/kudox/rev2/keymaps/default/config.h b/keyboards/kudox/rev2/keymaps/default/config.h new file mode 100644 index 0000000000..f5bf85cca0 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kudox/rev2/keymaps/default/keymap.c b/keyboards/kudox/rev2/keymaps/default/keymap.c new file mode 100644 index 0000000000..138a725a8c --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALES LALT_T(KC_ESC) + +#define KC_RGENT MT(KC_RGUI, KC_ENT) + +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_GRV , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_L2SYM, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_SLSH ,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_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_L1SYM,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_QUOT ,KC_MINS ,KC_EQL ,KC_ENT ,KC_LGUI ,KC_SPC , KC_RGENT,KC_DEL ,SYM_L ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,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_DQUO ,KC_QUOT ,KC_GRV ,KC_ASTR ,KC_PLUS ,KC_EQL , KC_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_CIRC ,KC_JYEN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_COLN ,KC_GRV ,_______ ,KC_MINS , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_DOT ,KC_SLSH , _______ ,KC_LCBR ,KC_RCBR ,KC_DOT ,KC_SLSH ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_CIRC ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/kudox/rev2/keymaps/default/readme.md b/keyboards/kudox/rev2/keymaps/default/readme.md new file mode 100644 index 0000000000..9bc4ca5051 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Kudox Keyboard Rev2.0 + +Left-06 key and Right-06 key are different between Rev1.0 and Rev2.0. diff --git a/keyboards/kudox/rev2/keymaps/jis/config.h b/keyboards/kudox/rev2/keymaps/jis/config.h new file mode 100644 index 0000000000..f5bf85cca0 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/jis/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kudox/rev2/keymaps/jis/keymap.c b/keyboards/kudox/rev2/keymaps/jis/keymap.c new file mode 100644 index 0000000000..c78cea2331 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/jis/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H +#include"keymap_jp.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALES LALT_T(KC_ESC) + +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LANG2, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,JP_AT ,JP_COLN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_UP ,KC_N ,KC_M ,KC_SLSH ,JP_UNDS ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_LGUI ,KC_LALT ,KC_DEL ,KC_L2SYM,KC_SPC ,KC_ENT , KC_LEFT ,KC_DOWN ,KC_RGHT ,KC_COMM ,KC_DOT ,KC_L1SYM,JP_BSLS + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,_______ , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,JP_LPRN ,JP_RPRN ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , JP_HASH ,JP_DLR ,JP_PERC ,JP_PLUS ,KC_MINS ,JP_CIRC ,JP_YEN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,JP_LBRC ,JP_RBRC ,XXXXXXX ,XXXXXXX ,XXXXXXX , JP_AMPR ,KC_SLSH ,JP_ASTR ,KC_SCLN ,JP_COLN ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,JP_LCBR ,JP_RCBR ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_VOLU ,XXXXXXX ,XXXXXXX ,KC_LT ,KC_GT ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,KC_LT ,KC_GT ,KC_LANG2,_______ ,_______ , KC_MUTE ,KC_VOLD ,KC_LANG1,_______ ,_______ ,_______ ,KC_DEL + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/kudox/rev2/keymaps/jis/readme.md b/keyboards/kudox/rev2/keymaps/jis/readme.md new file mode 100644 index 0000000000..ddf27339d1 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/jis/readme.md @@ -0,0 +1,3 @@ +# The JIS keymap for Kudox Keyboard Rev2.0 + +Left-06 key and Right-06 key are different between Rev1.0 and Rev2.0. diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk b/keyboards/kudox/rev2/keymaps/jis/rules.mk similarity index 100% rename from keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk rename to keyboards/kudox/rev2/keymaps/jis/rules.mk diff --git a/keyboards/helix/rev1/keymaps/default/rules.mk b/keyboards/kudox/rev2/rev2.c similarity index 100% rename from keyboards/helix/rev1/keymaps/default/rules.mk rename to keyboards/kudox/rev2/rev2.c diff --git a/keyboards/kudox/rev2/rev2.h b/keyboards/kudox/rev2/rev2.h new file mode 100644 index 0000000000..dcc745ddb7 --- /dev/null +++ b/keyboards/kudox/rev2/rev2.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/jc65/v32u4/keymaps/default/rules.mk b/keyboards/kudox/rev2/rules.mk similarity index 100% rename from keyboards/jc65/v32u4/keymaps/default/rules.mk rename to keyboards/kudox/rev2/rules.mk diff --git a/keyboards/kudox/rules.mk b/keyboards/kudox/rules.mk new file mode 100644 index 0000000000..5d8c2b2bb3 --- /dev/null +++ b/keyboards/kudox/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = kudox/rev2 diff --git a/keyboards/kudox_game/config.h b/keyboards/kudox_game/config.h new file mode 100644 index 0000000000..0b789c1768 --- /dev/null +++ b/keyboards/kudox_game/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2019 Kumao Kobo + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define USE_SERIAL + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/kudox_game/info.json b/keyboards/kudox_game/info.json new file mode 100644 index 0000000000..42932601a9 --- /dev/null +++ b/keyboards/kudox_game/info.json @@ -0,0 +1,39 @@ +{ + "keyboard_name": "Kudox Game Keyboard", + "url": "", + "maintainer": "Kumao Kobo", + "width": 7.5, + "height": 6.75, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1.5, "y":0}, + {"label":"2", "x":2.5, "y":0}, + {"label":"3", "x":3.5, "y":0}, + {"label":"4", "x":4.5, "y":0}, + {"label":"5", "x":5.5, "y":0}, + {"label":"Q", "x":1.75, "y":1}, + {"label":"W", "x":2.75, "y":1}, + {"label":"E", "x":3.75, "y":1}, + {"label":"R", "x":4.75, "y":1}, + {"label":"T", "x":5.75, "y":1}, + {"label":"GUI", "x":0, "y":2}, + {"label":"Alt", "x":1, "y":2}, + {"label":"A", "x":2, "y":2}, + {"label":"S", "x":3, "y":2}, + {"label":"D", "x":4, "y":2}, + {"label":"F", "x":5.25, "y":2}, + {"label":"G", "x":6.25, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.5}, + {"label":"Z", "x":1.5, "y":3}, + {"label":"X", "x":3.75, "y":3}, + {"label":"C", "x":4.75, "y":3}, + {"label":"V", "x":5.75, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"Layer", "x":5.5, "y":4.25, "h":1.5}, + {"x":6.5, "y":4.75, "h":2} + ] + } + } +} diff --git a/keyboards/kudox_game/keymaps/default/config.h b/keyboards/kudox_game/keymaps/default/config.h new file mode 100644 index 0000000000..5cbe7609a3 --- /dev/null +++ b/keyboards/kudox_game/keymaps/default/config.h @@ -0,0 +1,18 @@ +/* +Copyright 2019 Kumao Kobo + +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 . +*/ + +#pragma once diff --git a/keyboards/kudox_game/keymaps/default/keymap.c b/keyboards/kudox_game/keymaps/default/keymap.c new file mode 100644 index 0000000000..cf6b1dfc50 --- /dev/null +++ b/keyboards/kudox_game/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) +#define KC_ALEN LALT_T(KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , + //└────────┼────────┼────────┼────────┼────────┼────────┤ + KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , + //┌────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + KC_LGUI ,KC_ALEN ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V , + //├────────┼────────┘ └────────┴────────┼────────┼────────┐ + KC_LCTL ,SYM_L ,KC_SPC + //└────────┘ └────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 , + //└────────┼────────┼────────┼────────┼────────┼────────┤ + KC_GRV ,KC_UP ,KC_PIPE ,KC_LCBR ,KC_RCBR , + //┌────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + _______ ,_______ ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_LBRC ,KC_RBRC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + _______ ,KC_BSPC ,KC_CIRC ,KC_LPRN ,KC_RPRN , + //├────────┼────────┘ └────────┴────────┼────────┼────────┐ + _______ ,_______ ,_______ + //└────────┘ └────────┴────────┘ + ) + +}; diff --git a/keyboards/kudox_game/keymaps/default/readme.md b/keyboards/kudox_game/keymaps/default/readme.md new file mode 100644 index 0000000000..0fbdb86a94 --- /dev/null +++ b/keyboards/kudox_game/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Kudox Game Keyboard diff --git a/keyboards/kudox_game/kudox_game.c b/keyboards/kudox_game/kudox_game.c new file mode 100644 index 0000000000..cf053afd06 --- /dev/null +++ b/keyboards/kudox_game/kudox_game.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ +#include "kudox_game.h" diff --git a/keyboards/kudox_game/kudox_game.h b/keyboards/kudox_game/kudox_game.h new file mode 100644 index 0000000000..1da820fc27 --- /dev/null +++ b/keyboards/kudox_game/kudox_game.h @@ -0,0 +1,23 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#ifdef KEYBOARD_kudox_game_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" diff --git a/keyboards/kudox_game/readme.md b/keyboards/kudox_game/readme.md new file mode 100644 index 0000000000..5ad867790b --- /dev/null +++ b/keyboards/kudox_game/readme.md @@ -0,0 +1,26 @@ +# The Kudox Game keyboard + +

+Kudox logo +

+ +

+Kudox Game PCB rev1.0 +

+ +- Keyboard Maintainer: [Kumao Kobo](https://github.com/kumaokobo) +- Hardware Supported: Kudox Game PCB rev1.0 w/ Pro Micro + +Make example for this keyboard (after setting up your build environment): + +```sh +make kudox_game/rev1:default +``` + +Example of flashing this keyboard: + +```sh +make kudox_game/rev1:default:avrdude +``` + +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). diff --git a/keyboards/kudox_game/rev1/config.h b/keyboards/kudox_game/rev1/config.h new file mode 100644 index 0000000000..e7f7ad1b62 --- /dev/null +++ b/keyboards/kudox_game/rev1/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2019 Kumao Kobo + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9696 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Kumao Kobo +#define PRODUCT The Kudox Game Keyboard +#define DESCRIPTION Custom keyboard for game + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 7 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/kudox_game/rev1/rev1.c b/keyboards/kudox_game/rev1/rev1.c new file mode 100644 index 0000000000..8f1b8b2b68 --- /dev/null +++ b/keyboards/kudox_game/rev1/rev1.c @@ -0,0 +1,22 @@ +#include "kudox_game.h" + + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; diff --git a/keyboards/kudox_game/rev1/rev1.h b/keyboards/kudox_game/rev1/rev1.h new file mode 100644 index 0000000000..e630a51658 --- /dev/null +++ b/keyboards/kudox_game/rev1/rev1.h @@ -0,0 +1,20 @@ +#pragma once + +#include "../kudox_game.h" + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, \ + k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, k26, \ + k30, k31, k34, k35, k36, \ + k40, k45, k46 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, KC_NO }, \ + { KC_NO, k11, k12, k13, k14, k15, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, KC_NO, KC_NO, k34, k35, k36 }, \ + { k40, KC_NO, KC_NO, KC_NO, KC_NO, k45, k46 } \ +} diff --git a/keyboards/keebio/fourier/keymaps/default/rules.mk b/keyboards/kudox_game/rev1/rules.mk similarity index 100% rename from keyboards/keebio/fourier/keymaps/default/rules.mk rename to keyboards/kudox_game/rev1/rules.mk diff --git a/keyboards/kudox_game/rules.mk b/keyboards/kudox_game/rules.mk new file mode 100644 index 0000000000..71d7cf2702 --- /dev/null +++ b/keyboards/kudox_game/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +DEFAULT_FOLDER = kudox_game/rev1 diff --git a/keyboards/kyria/config.h b/keyboards/kyria/config.h new file mode 100644 index 0000000000..2e1e190bd7 --- /dev/null +++ b/keyboards/kyria/config.h @@ -0,0 +1,18 @@ +/* +Copyright 2019 Thomas Baart +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 . +*/ + +#pragma once + +#include "config_common.h" + diff --git a/keyboards/kyria/info.json b/keyboards/kyria/info.json new file mode 100644 index 0000000000..916367f47a --- /dev/null +++ b/keyboards/kyria/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "Kyria", + "url": "https://splitkb.com", + "maintainer": "splitkb.com", + "width": 16.5, + "height": 5.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":3, "y":0.25}, {"x":12.5, "y":0.25}, {"x":2, "y":0.5}, {"x":4, "y":0.5}, {"x":11.5, "y":0.5}, + {"x":13.5, "y":0.5}, {"x":5, "y":0.75}, {"x":10.5, "y":0.75}, {"x":0, "y":1}, {"x":1, "y":1}, + {"x":14.5, "y":1}, {"x":15.5, "y":1}, {"x":3, "y":1.25}, {"x":12.5, "y":1.25}, {"x":2, "y":1.5}, + {"x":4, "y":1.5}, {"x":11.5, "y":1.5}, {"x":13.5, "y":1.5}, {"x":5, "y":1.75}, {"x":10.5, "y":1.75}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2}, {"x":3, "y":2.25}, + {"x":12.5, "y":2.25}, {"x":2, "y":2.5}, {"x":4, "y":2.5}, {"x":11.5, "y":2.5}, {"x":13.5, "y":2.5}, + {"x":5, "y":2.75}, {"x":10.5, "y":2.75}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":14.5, "y":3}, + {"x":15.5, "y":3}, {"x":6, "y":3.25}, {"x":9.5, "y":3.25}, {"x":2.5, "y":3.5}, {"x":3.5, "y":3.5}, + {"x":7, "y":3.5}, {"x":8.5, "y":3.5}, {"x":12, "y":3.5}, {"x":13, "y":3.5}, {"x":4.5, "y":3.75}, + {"x":11, "y":3.75}, {"x":5.5, "y":4.25}, {"x":10, "y":4.25}, {"x":6.5, "y":4.5}, {"x":9, "y":4.5} + ] + } + } + } \ No newline at end of file diff --git a/keyboards/kyria/keymaps/default/config.h b/keyboards/kyria/keymaps/default/config.h new file mode 100644 index 0000000000..f00bfa8e70 --- /dev/null +++ b/keyboards/kyria/keymaps/default/config.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/kyria/keymaps/default/keymap.c b/keyboards/kyria/keymaps/default/keymap.c new file mode 100644 index 0000000000..acadb0422b --- /dev/null +++ b/keyboards/kyria/keymaps/default/keymap.c @@ -0,0 +1,219 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Ctrl/BS | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B |LShift|LShift| |LShift|LShift| N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | Del | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr| + * | | | Alt | Lower| Raise| | Lower| Raise| | | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + LT(_RAISE, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + MT(MOD_LCTL, KC_BSPC), 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_LSFT, KC_LSFT, KC_LSFT, KC_LSFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_LGUI, KC_DEL, MT(MOD_LALT, KC_ENT), LT(_LOWER, KC_SPC), LT(_RAISE, KC_ESC), LT(_LOWER, KC_ENT), LT(_RAISE, KC_SPC), KC_TAB, KC_BSPC, KC_RALT + ), +/* + * Lower Layer: Symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | | | | | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | ; | = | | = | ; | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_BSLS, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______ + ), +/* + * Raise Layer: Number keys, media, navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/default/rules.mk b/keyboards/kyria/keymaps/default/rules.mk new file mode 100644 index 0000000000..213c50a80f --- /dev/null +++ b/keyboards/kyria/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h new file mode 100644 index 0000000000..83d6283f56 --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/config.h @@ -0,0 +1,38 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ + +#pragma once + +#define EE_HANDS + +#ifdef OLED_DRIVER_ENABLE +# define OLED_DISPLAY_128X64 +# define OLED_FONT_H "font_gmk_bad.h" +# define OLED_DISABLE_TIMEOUT +# define OLED_SCROLL_TIMEOUT_RIGHT 60000 +#endif + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_SLEEP +# define RGBLIGHT_LIMIT_VAL 200 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +#define SPLIT_USB_DETECT +#define SPLIT_USB_TIMEOUT 1000 diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c new file mode 100644 index 0000000000..bdb00e5967 --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/keymap.c @@ -0,0 +1,372 @@ +#include "drashna.h" + +uint8_t is_master; + +#ifdef OLED_DRIVER_ENABLE +# define KEYLOGGER_LENGTH 10 +static uint32_t oled_timer = 0; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; +static uint16_t log_timer = 0; +// clang-format off +static const char PROGMEM code_to_name[0xFF] = { +// 0 1 2 3 4 5 6 7 8 9 A B c D E F + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x + '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x + ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x + ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx + 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx +}; + +void add_keylog(uint16_t keycode); +#endif + +#ifndef UNICODE_ENABLE +# define UC(x) KC_NO +#endif + +/* + * The `LAYOUT_kyria_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + +// clang-format off +#define LAYOUT_kyria_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ + ) +/* Re-pass though to allow templates to be used */ +#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kyria_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_kyria_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_kyria_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_kyria_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_kyria_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_kyria_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_kyria_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_kyria_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + [_MODS] = LAYOUT_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT, + _______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______ + ), + [_LOWER] = LAYOUT_wrapper( + KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, + _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _______, _______, _______, _______, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_RAISE] = LAYOUT_wrapper( + KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + _______, _________________ADJUST_L3_________________, HPT_TOG, HPT_FBK, MG_NKRO, UC_MOD, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, _______ + ), +// [_LAYERINDEX] = LAYOUT_wrapper( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; +// clang-format on + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + add_keylog(keycode); +#endif +#ifndef SPLIT_KEYBOARD + if (keycode == RESET && !is_master) { + return false; + } +#endif + } + return true; +} +void matrix_init_keymap(void) { is_master = (uint8_t)is_keyboard_master(); } + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +void add_keylog(uint16_t keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { + keycode = keycode & 0xFF; + } else if (keycode > 0xFF) { + keycode = 0; + } + + for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { + keylog_str[i] = keylog_str[i - 1]; + } + + if (keycode < (sizeof(code_to_name) / sizeof(char))) { + keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); + } + + log_timer = timer_read(); +} + +void update_log(void) { + if (timer_elapsed(log_timer) > 750) { + // add_keylog(0); + } +} + +void render_keylogger_status(void) { + oled_write_P(PSTR("Keylogger: "), false); + oled_write(keylog_str, false); +} + +void render_default_layer_state(void) { + oled_write_P(PSTR("Layout: "), false); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Qwerty "), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Colemak"), false); + break; + case _DVORAK: + oled_write_ln_P(PSTR("Dvorak"), false); + break; + case _WORKMAN: + oled_write_ln_P(PSTR("Workman"), false); + break; + case _NORMAN: + oled_write_ln_P(PSTR("Norman"), false); + break; + case _MALTRON: + oled_write_ln_P(PSTR("Maltron"), false); + break; + case _EUCALYN: + oled_write_ln_P(PSTR("Eucalyn"), false); + break; + case _CARPLAX: + oled_write_ln_P(PSTR("Carplax"), false); + break; + } +} + +void render_layer_state(void) { + oled_write_ln_P(PSTR("Layer:"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Lower"), layer_state_is(_LOWER)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Raise"), layer_state_is(_RAISE)); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("Mods"), layer_state_is(_MODS)); +} + +void render_keylock_status(uint8_t led_usb_state) { + oled_write_P(PSTR("Lock: "), false); + oled_write_P(PSTR("NUM"), led_usb_state & (1 << USB_LED_NUM_LOCK)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("SCL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); +} + +void render_mod_status(uint8_t modifiers) { + oled_write_P(PSTR("Mods: "), false); + oled_write_P(PSTR("Sft"), (modifiers & MOD_MASK_SHIFT)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Ctl"), (modifiers & MOD_MASK_CTRL)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Alt"), (modifiers & MOD_MASK_ALT)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); +} + +void render_bootmagic_status(void) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + oled_write_P(PSTR("Boot "), false); + oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); + oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("NKRO"), keymap_config.nkro); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("GUI"), !keymap_config.no_gui); + oled_write_P(PSTR("Magic "), false); + oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); + oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("GRV"), keymap_config.swap_grave_esc); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("CAPS"), keymap_config.swap_control_capslock); +} + +void render_user_status(void) { + oled_write_P(PSTR("USER: "), false); + oled_write_P(PSTR("Anim"), userspace_config.rgb_matrix_idle_anim); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Layr"), userspace_config.rgb_layer_change); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("Nuke"), userspace_config.nuke_switch); +} + +// clang-format off +void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +# ifndef SPLIT_TRANSPORT_MIRROR +void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} +# endif +// clang-format on + +void render_status_main(void) { + /* Show Keyboard Layout */ + render_default_layer_state(); + render_keylock_status(host_keyboard_leds()); + render_bootmagic_status(); + render_user_status(); + + render_keylogger_status(); +} + +void render_status_secondary(void) { + /* Show Keyboard Layout */ + render_logo(); + render_default_layer_state(); + render_layer_state(); + render_mod_status(get_mods() | get_oneshot_mods()); + + render_keylogger_status(); +} + +void oled_task_user(void) { + if (timer_elapsed32(oled_timer) > 30000) { + oled_off(); + return; + } +# ifndef SPLIT_KEYBOARD + else { + oled_on(); + } +# endif + + update_log(); + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { +# ifdef SPLIT_TRANSPORT_MIRROR + render_status_secondary(); +# else + render_kyria_logo(); +# endif + } +} + +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk new file mode 100644 index 0000000000..c1a37f5c59 --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/rules.mk @@ -0,0 +1,22 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_STARTUP_ANIMATION = yes + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +BOOTLOADER = atmel-dfu + +SPLIT_TRANSPORT = mirror diff --git a/keyboards/kyria/keymaps/thomasbaart/config.h b/keyboards/kyria/keymaps/thomasbaart/config.h new file mode 100644 index 0000000000..e878663bfb --- /dev/null +++ b/keyboards/kyria/keymaps/thomasbaart/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif + +// EC11K encoders have a different resolution than other EC11 encoders. +// When using the default resolution of 4, if you notice your encoder skipping +// every other tick, lower the resolution to 2. +#define ENCODER_RESOLUTION 2 + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/kyria/keymaps/thomasbaart/keymap.c b/keyboards/kyria/keymaps/thomasbaart/keymap.c new file mode 100644 index 0000000000..ea6ce0a749 --- /dev/null +++ b/keyboards/kyria/keymaps/thomasbaart/keymap.c @@ -0,0 +1,333 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#include QMK_KEYBOARD_H + +uint16_t copy_paste_timer; + +enum layers { + QWERTY = 0, + LOWER, + RAISE, + NAV, + ADJUST +}; + +enum custom_keycodes { + KC_CCCV = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LSFT | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LCTL | Z | X | C | V | B | CCCV | | | Del |Leader| N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+ | |------+------+------+------+------+----------------------' + * | GUI | Alt | | Space| Enter| | Bspc | Space| | Tab | AltGr| + * | | | Lower| Shift| Alt | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CCCV, XXXXXXX, KC_DEL, KC_LEAD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_LGUI, KC_LALT, MO(LOWER), MT(MOD_LSFT, KC_SPC), MT(MOD_LALT, KC_ENT), KC_BSPC, LT(NAV, KC_SPC), MO(RAISE), KC_TAB, KC_RALT + ), +/* + * Lower Layer: Numpad, Media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | VolUp| | | | / ? | 7 & | 8 * | 9 ( | - _ | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | | | * | 4 $ | 5 % | 6 ^ | , < | + | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | VolDn| Mute | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = + | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [LOWER] = LAYOUT( + _______, _______, _______, KC_VOLU, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_MINS, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_ASTR, KC_4, KC_5, KC_6, KC_COMM, KC_PLUS, + _______, _______, _______, KC_VOLD, KC_MUTE, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_EQL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Raise Layer: Symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | _ | € | | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [RAISE] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,_______,KC_BSLS, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Navigation Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | PgUp | Home | Up | End | | ScrlLk | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | PgDn | Left | Down | Right| | CapsLk | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [NAV] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_SLCK, + _______, _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CAPS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | SAI | HUI | VAI | | | | F4 | F5 | F6 | F11 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | | | | | | | | F1 | F2 | F3 | F12 | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LOWER, RAISE, ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + tap_code16(LCTL(KC_C)); + } else { // Tap, paste + tap_code16(LCTL(KC_V)); + } + } + break; + } + return true; +} + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_C) { // Inline Code + SEND_STRING("`` " SS_TAP(X_LEFT) SS_TAP(X_LEFT)); + } + SEQ_ONE_KEY(KC_P) { // Invoke Password Manager + SEND_STRING(SS_LCTRL(SS_LALT("\\"))); + } + SEQ_ONE_KEY(KC_S) { // Windows screenshot + SEND_STRING(SS_LGUI("\nS")); + } + SEQ_TWO_KEYS(KC_F, KC_P) { // Fusion Projection prefix + SEND_STRING("[Projection] "); + } + SEQ_TWO_KEYS(KC_E, KC_S) { // Email splitkb + SEND_STRING("thomas@splitkb.com"); + } + SEQ_TWO_KEYS(KC_E, KC_P) { // Email personal + SEND_STRING("mail@thomasbaart.nl"); + } + SEQ_TWO_KEYS(KC_S, KC_D) { // Splitkb documentation + SEND_STRING("https://docs.splitkb.com/"); + } + SEQ_TWO_KEYS(KC_S, KC_V) { // Splitkb VAT number + SEND_STRING("NL210593349B01"); + } + SEQ_THREE_KEYS(KC_S, KC_D, KC_K) { // Splitkb Kyria build log + SEND_STRING("https://docs.splitkb.com/docs/kyria-build-log/"); + } + SEQ_TWO_KEYS(KC_B, KC_C) { // Discord bongocat + SEND_STRING(":bongocat:\n"); + } + SEQ_TWO_KEYS(KC_C, KC_B) { // Discord code block + SEND_STRING("```c" SS_LSFT("\n\n") "``` " SS_TAP(X_UP)); + } + } +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case NAV: + oled_write_P(PSTR("Navigation\n"), false); + break; + case ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (biton32(layer_state)) { + case QWERTY: + // Move whole words. Hold shift to select while moving. + if (clockwise) { + tap_code16(C(KC_RGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + default: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + } + } else if (index == 1) { + switch (biton32(layer_state)) { + case QWERTY: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + break; + default: + // Volume control. + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/thomasbaart/rules.mk b/keyboards/kyria/keymaps/thomasbaart/rules.mk new file mode 100644 index 0000000000..9b8e294198 --- /dev/null +++ b/keyboards/kyria/keymaps/thomasbaart/rules.mk @@ -0,0 +1,5 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enable the Leader Key feature +MOUSEKEY_ENABLE = no diff --git a/keyboards/kyria/kyria.c b/keyboards/kyria/kyria.c new file mode 100644 index 0000000000..21ed5e84c8 --- /dev/null +++ b/keyboards/kyria/kyria.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#include "kyria.h" diff --git a/keyboards/kyria/kyria.h b/keyboards/kyria/kyria.h new file mode 100644 index 0000000000..a2a675e0db --- /dev/null +++ b/keyboards/kyria/kyria.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R06, R07, R08, R09, R10, R11, \ + L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \ + L24, L25, L26, L27, L28, L29, L30, L31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \ +) \ +{ \ + { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ + { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ + { L31, L30, L29, L28, L27, L26, L25, L24 }, \ + { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ + { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ + { R32, R33, R34, R35, R36, R37, R38, R39 }, \ + { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/kyria/readme.md b/keyboards/kyria/readme.md new file mode 100644 index 0000000000..f63a8f6551 --- /dev/null +++ b/keyboards/kyria/readme.md @@ -0,0 +1,21 @@ +# Kyria + +![Kyria](https://cdn.shopify.com/s/files/1/0227/9171/6941/products/PlateCase_f1870016-98b8-43a9-8aed-3eaf073b367b_900x.jpg?v=1568934600) + +An ergonomical 40% split keyboard + +Keyboard Maintainer: [splitkb.com](https://github.com/splitkb) +Hardware Supported: Pro Micro 5V/16MHz and compatible. +Hardware Availability: [splitkb.com](https://splitkb.com) and partners. + +Make example for this keyboard (after setting up your build environment): + + make kyria:default + +Example of flashing this keyboard: + + make kyria/rev1: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). + +A build guide for the Kyria can be found at [docs.splitkb.com](https://docs.splitkb.com/docs/kyria-build-log/). diff --git a/keyboards/kyria/rev1/config.h b/keyboards/kyria/rev1/config.h new file mode 100644 index 0000000000..29209f3fc6 --- /dev/null +++ b/keyboards/kyria/rev1/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2019 Thomas Baart + +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 . +*/ + +#pragma once + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER splitkb +#define PRODUCT Kyria Keyboard +#define DESCRIPTION Split 40 percent ergonomic keyboard + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +// wiring +#define MATRIX_ROW_PINS { B4, E6, D7, D4 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { C6 } +#define ENCODERS_PAD_B { B5 } +#define ENCODERS_PAD_A_RIGHT { B5 } +#define ENCODERS_PAD_B_RIGHT { C6 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 + +#define RGB_DI_PIN D3 +#define RGBLED_SPLIT { 10, 10 } +#define RGBLED_NUM 20 + +/* 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 diff --git a/keyboards/kyria/rev1/rev1.c b/keyboards/kyria/rev1/rev1.c new file mode 100644 index 0000000000..9aedcc130a --- /dev/null +++ b/keyboards/kyria/rev1/rev1.c @@ -0,0 +1 @@ +#include "rev1.h" \ No newline at end of file diff --git a/keyboards/kyria/rev1/rev1.h b/keyboards/kyria/rev1/rev1.h new file mode 100644 index 0000000000..2ef05bb0e9 --- /dev/null +++ b/keyboards/kyria/rev1/rev1.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#pragma once + +#include "kyria.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R06, R07, R08, R09, R10, R11, \ + L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \ + L24, L25, L26, L27, L28, L29, L30, L31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \ +) \ +{ \ + { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ + { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ + { L31, L30, L29, L28, L27, L26, L25, L24 }, \ + { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ + { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ + { R32, R33, R34, R35, R36, R37, R38, R39 }, \ + { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/kyria/rev1/rules.mk b/keyboards/kyria/rev1/rules.mk new file mode 100644 index 0000000000..8b1c9616cb --- /dev/null +++ b/keyboards/kyria/rev1/rules.mk @@ -0,0 +1,3 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/kyria/rules.mk b/keyboards/kyria/rules.mk new file mode 100644 index 0000000000..57fbf76cfb --- /dev/null +++ b/keyboards/kyria/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +SPLIT_KEYBOARD = yes # Split common +LINK_TIME_OPTIMIZATION_ENABLE =yes + +DEFAULT_FOLDER = kyria/rev1 diff --git a/keyboards/laptreus/rules.mk b/keyboards/laptreus/rules.mk index d170345073..237a6ac8ba 100644 --- a/keyboards/laptreus/rules.mk +++ b/keyboards/laptreus/rules.mk @@ -1,48 +1,18 @@ - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = catarina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/launchpad/keymaps/default/keymap.c b/keyboards/launchpad/keymaps/default/keymap.c index c793349a5d..8ebc98159d 100644 --- a/keyboards/launchpad/keymaps/default/keymap.c +++ b/keyboards/launchpad/keymaps/default/keymap.c @@ -1,7 +1,6 @@ // Below layout is based upon /u/That-Canadian's planck layout #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/launchpad/keymaps/default/rules.mk b/keyboards/launchpad/keymaps/default/rules.mk deleted file mode 100644 index d1fa27f41e..0000000000 --- a/keyboards/launchpad/keymaps/default/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ - - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/launchpad/keymaps/default_rgb/rules.mk b/keyboards/launchpad/keymaps/default_rgb/rules.mk index 164232f339..1e3cebb145 100644 --- a/keyboards/launchpad/keymaps/default_rgb/rules.mk +++ b/keyboards/launchpad/keymaps/default_rgb/rules.mk @@ -1 +1 @@ -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/launchpad/rev1/rev1.c b/keyboards/launchpad/rev1/rev1.c index a7aec80e10..cff4edf9f8 100644 --- a/keyboards/launchpad/rev1/rev1.c +++ b/keyboards/launchpad/rev1/rev1.c @@ -1,14 +1,9 @@ #include "launchpad.h" void matrix_init_kb(void) { - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<. /* #define RGBLIGHT_SAT_STEP 8 */ /* #define RGBLIGHT_VAL_STEP 8 */ #endif - -/* CapsLock LED */ -#define BACKLIGHT_PIN E6 -#ifdef BACKLIGHT_PIN - #define BACKLIGHT_LEVELS 6 -#endif diff --git a/keyboards/lazydesigners/dimple/dimple.c b/keyboards/lazydesigners/dimple/dimple.c index 69fb2253fc..6bbb9a0477 100644 --- a/keyboards/lazydesigners/dimple/dimple.c +++ b/keyboards/lazydesigners/dimple/dimple.c @@ -16,11 +16,11 @@ #include "dimple.h" void dimple_led_on() { - writePinHigh(E6); + writePinLow(E6); } void dimple_led_off() { - writePinLow(E6); + writePinHigh(E6); } void keyboard_pre_init_kb(void) { diff --git a/keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c b/keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c new file mode 100644 index 0000000000..cdaade987f --- /dev/null +++ b/keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c @@ -0,0 +1,109 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base COLEMAK layer + * ,---------------------------------------------------------------. + * |GEsc| Q | W | F | P | G | J | L | U | Y | : | Bspc | + * |---------------------------------------------------------------| + * |Tab-Ctl| A | R | S | T | D | H | N | E | I | O |Quote| + * |---------------------------------------------------------------| + * |Shft/Cap| Z | X | C | V | B | K | M | , | Up | . | + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Spc/Lwr | Spc/Rse |Left|Down|Rght| + * `-----------------------------------------------------' + */ + + [_BASE] = LAYOUT_wrapper( + __________________DIMPLE1__________________, + __________________DIMPLE2__________________, + __________________DIMPLE3L_________________,__________________DIMPLE3R_________________, + __________________DIMPLE4__________________ + ), + +/* Lower Symbol Layer + * ,---------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |---------------------------------------------------------------| + * | Del | | | | | | | _ | + | { | } | | | + * |---------------------------------------------------------------| + * | | | | | | | | | ; |PgUp| ? | + * |---------------------------------------------------------------| + * | | | | | |Home|PgDn|End | + * `-----------------------------------------------------' + */ + + [_LOWER] = LAYOUT_wrapper( + _________________LOWER_1___________________, + _________________LOWER_2___________________, + _________________LOWER_3___________________, + _________________LOWER_4___________________ + ), + +/* Raise Number Layer + * ,---------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc | + * |---------------------------------------------------------------| + * | Ins | | | | | | | - | = | [ | ] | \ | + * |---------------------------------------------------------------| + * | | | | | | | | | | . | / | + * |---------------------------------------------------------------| + * |VolD|Mute|VolU| | | | | | + * `-----------------------------------------------------' + */ + + [_RAISE] = LAYOUT_wrapper( + ___________________RAISE1__________________, + ___________________RAISE2__________________, + ___________________RAISE3__________________, + ___________________RAISE4__________________ + + ), + +/* Adjust Layer + * ,---------------------------------------------------------------. + * |RST |EEP | | | | | | | | | | | + * |---------------------------------------------------------------| + * | MP | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | MODE | HUI| HUD|M_SN| | | | | | | | + * |---------------------------------------------------------------| + * |RGB-|RGB |RGB+| | | | | | + * `-----------------------------------------------------' + */ + + [_ADJUST] = LAYOUT_wrapper( + ___________________ADJST1__________________, + ___________________ADJST2__________________, + ___________________ADJST3__________________, + ___________________ADJST4__________________ + + ), +/* Fkey Layer +* ,---------------------------------------------------------------. +* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| | +* |---------------------------------------------------------------| +* | | | | | | | | | | F11| F12| | +* |---------------------------------------------------------------| +* | | | | | | | | | | | | +* |---------------------------------------------------------------| +* | | | | | |FKEY| | | +* `-----------------------------------------------------' +*/ + + [_FKEY] = LAYOUT_wrapper( + ___________________FKEY1___________________, + ___________________FKEY2___________________, + ___________________FKEY3___________________, + ___________________FKEY4___________________ + ), +}; + +void led_set_user(uint8_t usb_led) { +if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } +} diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk index a818e871c6..99e4911afa 100644 --- a/keyboards/lazydesigners/dimple/rules.mk +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -1,50 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/lazydesigners/the30/config.h b/keyboards/lazydesigners/the30/config.h new file mode 100644 index 0000000000..fdd76fe730 --- /dev/null +++ b/keyboards/lazydesigners/the30/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2019 Erovia + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0030 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LazyDesigners +#define PRODUCT THE30 +#define DESCRIPTION A 30% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2 } +#define MATRIX_COL_PINS { B1, B2, B3, D4, D6, D7, B4, B5, B6, C6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/lazydesigners/the30/info.json b/keyboards/lazydesigners/the30/info.json new file mode 100644 index 0000000000..97974112eb --- /dev/null +++ b/keyboards/lazydesigners/the30/info.json @@ -0,0 +1,44 @@ +{ + "keyboard_name": "THE30", + "url": "http://lazydesigners.cn", + "maintainer": "Erovia", + "width": 10, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x10": { + "key_count": 30, + "layout": [ + {"label":"Q", "x":0, "y":0}, + {"label":"W", "x":1, "y":0}, + {"label":"E", "x":2, "y":0}, + {"label":"R", "x":3, "y":0}, + {"label":"T", "x":4, "y":0}, + {"label":"Y", "x":5, "y":0}, + {"label":"U", "x":6, "y":0}, + {"label":"I", "x":7, "y":0}, + {"label":"O", "x":8, "y":0}, + {"label":"P", "x":9, "y":0}, + {"label":"A", "x":0, "y":1}, + {"label":"S", "x":1, "y":1}, + {"label":"D", "x":2, "y":1}, + {"label":"F", "x":3, "y":1}, + {"label":"G", "x":4, "y":1}, + {"label":"H", "x":5, "y":1}, + {"label":"J", "x":6, "y":1}, + {"label":"K", "x":7, "y":1}, + {"label":"L", "x":8, "y":1}, + {"label":"ENTER", "x":9, "y":1}, + {"label":"Z", "x":0, "y":2}, + {"label":"X", "x":1, "y":2}, + {"label":"C", "x":2, "y":2}, + {"label":"V", "x":3, "y":2}, + {"label":"B", "x":4, "y":2}, + {"label":"N", "x":5, "y":2}, + {"label":"M", "x":6, "y":2}, + {"label":",", "x":7, "y":2}, + {"label":".", "x":8, "y":2}, + {"label":"/", "x":9, "y":2} + ] + } + } +} diff --git a/keyboards/lazydesigners/the30/keymaps/default/keymap.c b/keyboards/lazydesigners/the30/keymaps/default/keymap.c new file mode 100644 index 0000000000..e15fad7eb3 --- /dev/null +++ b/keyboards/lazydesigners/the30/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _FN +}; + +/* Press for Enter, hold for FN layer */ +#define FN_ENT LT(_FN, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-------------------------------------------------. + * | Q | W | E | R | T | Y | U | I | O | P | + * |-------------------------------------------------| + * | A | S | D | F | G | H | J | K | L |ENT | + * |-------------------------------------------------| + * | Z | X | C | V | B | N | M | , | . | / | + * `-------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_3x10( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, FN_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + ), +/* + * ,-------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + * |-------------------------------------------------| + * | | | | | | | | | | | + * |-------------------------------------------------| + * |RST |ERST| | |SPC | | | | | | + * `-------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_3x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, EEP_RST, _______, _______, KC_SPC, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/lazydesigners/the30/keymaps/default/readme.md b/keyboards/lazydesigners/the30/keymaps/default/readme.md new file mode 100644 index 0000000000..7df2b3b0a9 --- /dev/null +++ b/keyboards/lazydesigners/the30/keymaps/default/readme.md @@ -0,0 +1,25 @@ +# The default keymap for THE30 + +_Very simple keymap for testing and for easy access to RESET_ + +## QWERTY (Normal) Layer +``` +,-------------------------------------------------. +| Q | W | E | R | T | Y | U | I | O | P | +|-------------------------------------------------| +| A | S | D | F | G | H | J | K | L |ENT | +|-------------------------------------------------| +| Z | X | C | V | B | N | M | , | . | / | +`-------------------------------------------------' +``` + +## FN Layer +``` +,-------------------------------------------------. +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | +|-------------------------------------------------| +| | | | | | | | | | | +|-------------------------------------------------| +|RST |ERST| | |SPC | | | | | | +`-------------------------------------------------' +``` diff --git a/keyboards/lazydesigners/the30/readme.md b/keyboards/lazydesigners/the30/readme.md new file mode 100644 index 0000000000..a00e4d1fa1 --- /dev/null +++ b/keyboards/lazydesigners/the30/readme.md @@ -0,0 +1,21 @@ +# THE30 + +![the30](https://i.loli.net/2019/11/06/KTn3dNjreigovRz.jpg) + +A 30% custom keyboard designed and produced by [LazyDesigners](http://lazydesigners.cn). + +* Keyboard Maintainer: [Erovia](https://github.com/Erovia) +* Hardware Supported: THE30 +* Hardware Availability: Check for GBs on [Geekhack](https://geekhack.org) and on [LazyDesigner's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/the30:default + +Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)): + + make lazydesigners/the30:default:flash + +To enter the bootloader, either press the RESET button on the PCB or the RESET button if the current keymap has one. + +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). diff --git a/keyboards/lazydesigners/the30/rules.mk b/keyboards/lazydesigners/the30/rules.mk new file mode 100644 index 0000000000..6c1e24fda0 --- /dev/null +++ b/keyboards/lazydesigners/the30/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +# Support community keymaps +LAYOUTS = ortho_3x10 diff --git a/keyboards/lazydesigners/the30/the30.c b/keyboards/lazydesigners/the30/the30.c new file mode 100644 index 0000000000..c41e16dc08 --- /dev/null +++ b/keyboards/lazydesigners/the30/the30.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#include "the30.h" diff --git a/keyboards/lazydesigners/the30/the30.h b/keyboards/lazydesigners/the30/the30.h new file mode 100644 index 0000000000..82a6bf8ba5 --- /dev/null +++ b/keyboards/lazydesigners/the30/the30.h @@ -0,0 +1,38 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* + * ,-------------------------------------------------. + * | | | | | | | | | | | + * |-------------------------------------------------| + * | | | | | | | | | | | + * |-------------------------------------------------| + * | | | | | | | | | | | + * `-------------------------------------------------' + */ + +#define LAYOUT_ortho_3x10( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ +} diff --git a/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c b/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c index a792d34fbd..18261dbba6 100644 --- a/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c +++ b/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H enum custom_layers { _QWERTY, diff --git a/keyboards/lazydesigners/the50/rules.mk b/keyboards/lazydesigners/the50/rules.mk index ae211ec66e..561e38a997 100644 --- a/keyboards/lazydesigners/the50/rules.mk +++ b/keyboards/lazydesigners/the50/rules.mk @@ -1,41 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/lazydesigners/the60/rules.mk b/keyboards/lazydesigners/the60/rules.mk index 76fb44b2c8..97ea15d34a 100644 --- a/keyboards/lazydesigners/the60/rules.mk +++ b/keyboards/lazydesigners/the60/rules.mk @@ -1,41 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/leeku/finger65/config.h b/keyboards/leeku/finger65/config.h new file mode 100644 index 0000000000..3e6eebb324 --- /dev/null +++ b/keyboards/leeku/finger65/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2018 Rasmus Schults + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6050 +#define DEVICE_VER 0x0100 +#define MANUFACTURER LeeKu +#define PRODUCT L3 +#define DESCRIPTION QMK keyboard firmware for L3 + +#define RGBLED_NUM 12 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_ROW_PINS { C3, C4, C5, C6, C7 } +#define UNUSED_PINS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 1 + diff --git a/keyboards/leeku/finger65/finger65.h b/keyboards/leeku/finger65/finger65.h new file mode 100644 index 0000000000..3d2ef2db45 --- /dev/null +++ b/keyboards/leeku/finger65/finger65.h @@ -0,0 +1,61 @@ +/* Copyright 2018 Rasmus Schults + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2P, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1O, K1P, \ + K0A, K0B, K0C, K0D, K0G, K0I, K0J, K0M, K0N, K0O, K0P \ +) { \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P }, \ + { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, KC_NO, K3P }, \ + { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, KC_NO, K2P }, \ + { K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, KC_NO, K1O, K1P }, \ + { K0A, K0B, K0C, K0D, KC_NO, KC_NO, K0G, KC_NO, K0I, K0J, KC_NO, KC_NO, K0M, K0N, K0O, K0P } \ +} + +#define LAYOUT_65_ansi( \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, K4P, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, K2P, \ + K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1O, K1P, \ + K0A, K0B, K0C, K0G, K0J, K0M, K0N, K0O, K0P \ +) { \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, KC_NO, K4O, K4P }, \ + { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, KC_NO, K3P }, \ + { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, KC_NO, K2N, KC_NO, K2P }, \ + { K1A, KC_NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, KC_NO, K1O, K1P }, \ + { K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, KC_NO, KC_NO, K0M, K0N, K0O, K0P } \ +} + +#define LAYOUT_65_ansi_split_bs( \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, K2P, \ + K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1O, K1P, \ + K0A, K0B, K0C, K0G, K0J, K0M, K0N, K0O, K0P \ +) { \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P }, \ + { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, KC_NO, K3P }, \ + { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, KC_NO, K2N, KC_NO, K2P }, \ + { K1A, KC_NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, KC_NO, K1O, K1P }, \ + { K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, KC_NO, KC_NO, K0M, K0N, K0O, K0P } \ +} diff --git a/keyboards/leeku/finger65/info.json b/keyboards/leeku/finger65/info.json new file mode 100644 index 0000000000..f78d7098b0 --- /dev/null +++ b/keyboards/leeku/finger65/info.json @@ -0,0 +1,1095 @@ +{ + "keyboard_name": "Leeku Finger65", + "url": "", + "maintainer": "sidcarter", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + { + "label": "K4A", + "x": 0, + "y": 0 + }, + { + "label": "K4B", + "x": 1, + "y": 0 + }, + { + "label": "K4C", + "x": 2, + "y": 0 + }, + { + "label": "K4D", + "x": 3, + "y": 0 + }, + { + "label": "K4E", + "x": 4, + "y": 0 + }, + { + "label": "K4F", + "x": 5, + "y": 0 + }, + { + "label": "K4G", + "x": 6, + "y": 0 + }, + { + "label": "K4H", + "x": 7, + "y": 0 + }, + { + "label": "K4I", + "x": 8, + "y": 0 + }, + { + "label": "K4J", + "x": 9, + "y": 0 + }, + { + "label": "K4K", + "x": 10, + "y": 0 + }, + { + "label": "K4L", + "x": 11, + "y": 0 + }, + { + "label": "K4M", + "x": 12, + "y": 0 + }, + { + "label": "K4N", + "x": 13, + "y": 0 + }, + { + "label": "K4O", + "x": 14, + "y": 0 + }, + { + "label": "K4P", + "x": 15, + "y": 0 + }, + { + "label": "K3A", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "K3B", + "x": 1.5, + "y": 1 + }, + { + "label": "K3C", + "x": 2.5, + "y": 1 + }, + { + "label": "K3D", + "x": 3.5, + "y": 1 + }, + { + "label": "K3E", + "x": 4.5, + "y": 1 + }, + { + "label": "K3F", + "x": 5.5, + "y": 1 + }, + { + "label": "K3G", + "x": 6.5, + "y": 1 + }, + { + "label": "K3H", + "x": 7.5, + "y": 1 + }, + { + "label": "K3I", + "x": 8.5, + "y": 1 + }, + { + "label": "K3J", + "x": 9.5, + "y": 1 + }, + { + "label": "K3K", + "x": 10.5, + "y": 1 + }, + { + "label": "K3L", + "x": 11.5, + "y": 1 + }, + { + "label": "K3M", + "x": 12.5, + "y": 1 + }, + { + "label": "K3N", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "K3P", + "x": 15, + "y": 1 + }, + { + "label": "K2A", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "K2B", + "x": 1.75, + "y": 2 + }, + { + "label": "K2C", + "x": 2.75, + "y": 2 + }, + { + "label": "K2D", + "x": 3.75, + "y": 2 + }, + { + "label": "K2E", + "x": 4.75, + "y": 2 + }, + { + "label": "K2F", + "x": 5.75, + "y": 2 + }, + { + "label": "K2G", + "x": 6.75, + "y": 2 + }, + { + "label": "K2H", + "x": 7.75, + "y": 2 + }, + { + "label": "K2I", + "x": 8.75, + "y": 2 + }, + { + "label": "K2J", + "x": 9.75, + "y": 2 + }, + { + "label": "K2K", + "x": 10.75, + "y": 2 + }, + { + "label": "K2L", + "x": 11.75, + "y": 2 + }, + { + "label": "K2M", + "x": 12.75, + "y": 2 + }, + { + "label": "K2N", + "x": 13.75, + "y": 2, + "w": 1.25 + }, + { + "label": "K2P", + "x": 15, + "y": 2 + }, + { + "label": "K1A", + "x": 0, + "y": 3, + "w": 1.25 + }, + { + "label": "K1B", + "x": 1.25, + "y": 3 + }, + { + "label": "K1C", + "x": 2.25, + "y": 3 + }, + { + "label": "K1D", + "x": 3.25, + "y": 3 + }, + { + "label": "K1E", + "x": 4.25, + "y": 3 + }, + { + "label": "K1F", + "x": 5.25, + "y": 3 + }, + { + "label": "K1G", + "x": 6.25, + "y": 3 + }, + { + "label": "K1H", + "x": 7.25, + "y": 3 + }, + { + "label": "K1I", + "x": 8.25, + "y": 3 + }, + { + "label": "K1J", + "x": 9.25, + "y": 3 + }, + { + "label": "K1K", + "x": 10.25, + "y": 3 + }, + { + "label": "K1L", + "x": 11.25, + "y": 3 + }, + { + "label": "K1M", + "x": 12.25, + "y": 3, + "w": 1.75 + }, + { + "label": "K1O", + "x": 14, + "y": 3 + }, + { + "label": "K1P", + "x": 15, + "y": 3 + }, + { + "label": "K0A", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "K0B", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "K0C", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "label": "K0D", + "x": 3.75, + "y": 4, + "w": 2.25 + }, + { + "label": "K0G", + "x": 6, + "y": 4, + "w": 1.25 + }, + { + "label": "K0I", + "x": 7.25, + "y": 4, + "w": 2.75 + }, + { + "label": "K0J", + "x": 10, + "y": 4, + "w": 1.5 + }, + { + "label": "K0M", + "x": 11.5, + "y": 4, + "w": 1.5 + }, + { + "label": "K0N", + "x": 13, + "y": 4 + }, + { + "label": "K0O", + "x": 14, + "y": 4 + }, + { + "label": "K0P", + "x": 15, + "y": 4 + } + ] + }, + "LAYOUT_65_ansi": { + "layout": [ + { + "label": "K4A", + "x": 0, + "y": 0 + }, + { + "label": "K4B", + "x": 1, + "y": 0 + }, + { + "label": "K4C", + "x": 2, + "y": 0 + }, + { + "label": "K4D", + "x": 3, + "y": 0 + }, + { + "label": "K4E", + "x": 4, + "y": 0 + }, + { + "label": "K4F", + "x": 5, + "y": 0 + }, + { + "label": "K4G", + "x": 6, + "y": 0 + }, + { + "label": "K4H", + "x": 7, + "y": 0 + }, + { + "label": "K4I", + "x": 8, + "y": 0 + }, + { + "label": "K4J", + "x": 9, + "y": 0 + }, + { + "label": "K4K", + "x": 10, + "y": 0 + }, + { + "label": "K4L", + "x": 11, + "y": 0 + }, + { + "label": "K4M", + "x": 12, + "y": 0 + }, + { + "label": "K4O", + "x": 13, + "y": 0, + "w": 2 + }, + { + "label": "K4P", + "x": 15, + "y": 0 + }, + { + "label": "K3A", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "K3B", + "x": 1.5, + "y": 1 + }, + { + "label": "K3C", + "x": 2.5, + "y": 1 + }, + { + "label": "K3D", + "x": 3.5, + "y": 1 + }, + { + "label": "K3E", + "x": 4.5, + "y": 1 + }, + { + "label": "K3F", + "x": 5.5, + "y": 1 + }, + { + "label": "K3G", + "x": 6.5, + "y": 1 + }, + { + "label": "K3H", + "x": 7.5, + "y": 1 + }, + { + "label": "K3I", + "x": 8.5, + "y": 1 + }, + { + "label": "K3J", + "x": 9.5, + "y": 1 + }, + { + "label": "K3K", + "x": 10.5, + "y": 1 + }, + { + "label": "K3L", + "x": 11.5, + "y": 1 + }, + { + "label": "K3M", + "x": 12.5, + "y": 1 + }, + { + "label": "K4N", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "K3P", + "x": 15, + "y": 1 + }, + { + "label": "K2A", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "K2B", + "x": 1.75, + "y": 2 + }, + { + "label": "K2C", + "x": 2.75, + "y": 2 + }, + { + "label": "K2D", + "x": 3.75, + "y": 2 + }, + { + "label": "K2E", + "x": 4.75, + "y": 2 + }, + { + "label": "K2F", + "x": 5.75, + "y": 2 + }, + { + "label": "K2G", + "x": 6.75, + "y": 2 + }, + { + "label": "K2H", + "x": 7.75, + "y": 2 + }, + { + "label": "K2I", + "x": 8.75, + "y": 2 + }, + { + "label": "K2J", + "x": 9.75, + "y": 2 + }, + { + "label": "K2K", + "x": 10.75, + "y": 2 + }, + { + "label": "K2L", + "x": 11.75, + "y": 2 + }, + { + "label": "K2N", + "x": 12.75, + "y": 2, + "w": 2.25 + }, + { + "label": "K2P", + "x": 15, + "y": 2 + }, + { + "label": "K1A", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "K1B", + "x": 2.25, + "y": 3 + }, + { + "label": "K1C", + "x": 3.25, + "y": 3 + }, + { + "label": "K1D", + "x": 4.25, + "y": 3 + }, + { + "label": "K1E", + "x": 5.25, + "y": 3 + }, + { + "label": "K1F", + "x": 6.25, + "y": 3 + }, + { + "label": "K1G", + "x": 7.25, + "y": 3 + }, + { + "label": "K1H", + "x": 8.25, + "y": 3 + }, + { + "label": "K1J", + "x": 9.25, + "y": 3 + }, + { + "label": "K1K", + "x": 10.25, + "y": 3 + }, + { + "label": "K1L", + "x": 11.25, + "y": 3 + }, + { + "label": "K1M", + "x": 12.25, + "y": 3, + "w": 1.75 + }, + { + "label": "K1O", + "x": 14, + "y": 3 + }, + { + "label": "K1P", + "x": 15, + "y": 3 + }, + { + "label": "K0A", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "K0B", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "K0C", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "label": "K0G", + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "K0J", + "x": 10, + "y": 4, + "w": 1.5 + }, + { + "label": "K0M", + "x": 11.5, + "y": 4, + "w": 1.5 + }, + { + "label": "K0N", + "x": 13, + "y": 4 + }, + { + "label": "K0O", + "x": 14, + "y": 4 + }, + { + "label": "K0P", + "x": 15, + "y": 4 + } + ] + }, + "LAYOUT_65_ansi_split_bs": { + "layout": [ + { + "label": "K4A", + "x": 0, + "y": 0 + }, + { + "label": "K4B", + "x": 1, + "y": 0 + }, + { + "label": "K4C", + "x": 2, + "y": 0 + }, + { + "label": "K4D", + "x": 3, + "y": 0 + }, + { + "label": "K4E", + "x": 4, + "y": 0 + }, + { + "label": "K4F", + "x": 5, + "y": 0 + }, + { + "label": "K4G", + "x": 6, + "y": 0 + }, + { + "label": "K4H", + "x": 7, + "y": 0 + }, + { + "label": "K4I", + "x": 8, + "y": 0 + }, + { + "label": "K4J", + "x": 9, + "y": 0 + }, + { + "label": "K4K", + "x": 10, + "y": 0 + }, + { + "label": "K4L", + "x": 11, + "y": 0 + }, + { + "label": "K4M", + "x": 12, + "y": 0 + }, + { + "label": "K4N", + "x": 13, + "y": 0 + }, + { + "label": "K4O", + "x": 14, + "y": 0 + }, + { + "label": "K4P", + "x": 15, + "y": 0 + }, + { + "label": "K3A", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "K3B", + "x": 1.5, + "y": 1 + }, + { + "label": "K3C", + "x": 2.5, + "y": 1 + }, + { + "label": "K3D", + "x": 3.5, + "y": 1 + }, + { + "label": "K3E", + "x": 4.5, + "y": 1 + }, + { + "label": "K3F", + "x": 5.5, + "y": 1 + }, + { + "label": "K3G", + "x": 6.5, + "y": 1 + }, + { + "label": "K3H", + "x": 7.5, + "y": 1 + }, + { + "label": "K3I", + "x": 8.5, + "y": 1 + }, + { + "label": "K3J", + "x": 9.5, + "y": 1 + }, + { + "label": "K3K", + "x": 10.5, + "y": 1 + }, + { + "label": "K3L", + "x": 11.5, + "y": 1 + }, + { + "label": "K3M", + "x": 12.5, + "y": 1 + }, + { + "label": "K4N", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "K3P", + "x": 15, + "y": 1 + }, + { + "label": "K2A", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "K2B", + "x": 1.75, + "y": 2 + }, + { + "label": "K2C", + "x": 2.75, + "y": 2 + }, + { + "label": "K2D", + "x": 3.75, + "y": 2 + }, + { + "label": "K2E", + "x": 4.75, + "y": 2 + }, + { + "label": "K2F", + "x": 5.75, + "y": 2 + }, + { + "label": "K2G", + "x": 6.75, + "y": 2 + }, + { + "label": "K2H", + "x": 7.75, + "y": 2 + }, + { + "label": "K2I", + "x": 8.75, + "y": 2 + }, + { + "label": "K2J", + "x": 9.75, + "y": 2 + }, + { + "label": "K2K", + "x": 10.75, + "y": 2 + }, + { + "label": "K2L", + "x": 11.75, + "y": 2 + }, + { + "label": "K2N", + "x": 12.75, + "y": 2, + "w": 2.25 + }, + { + "label": "K2P", + "x": 15, + "y": 2 + }, + { + "label": "K1A", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "K1B", + "x": 2.25, + "y": 3 + }, + { + "label": "K1C", + "x": 3.25, + "y": 3 + }, + { + "label": "K1D", + "x": 4.25, + "y": 3 + }, + { + "label": "K1E", + "x": 5.25, + "y": 3 + }, + { + "label": "K1F", + "x": 6.25, + "y": 3 + }, + { + "label": "K1G", + "x": 7.25, + "y": 3 + }, + { + "label": "K1H", + "x": 8.25, + "y": 3 + }, + { + "label": "K1J", + "x": 9.25, + "y": 3 + }, + { + "label": "K1K", + "x": 10.25, + "y": 3 + }, + { + "label": "K1L", + "x": 11.25, + "y": 3 + }, + { + "label": "K1M", + "x": 12.25, + "y": 3, + "w": 1.75 + }, + { + "label": "K1O", + "x": 14, + "y": 3 + }, + { + "label": "K1P", + "x": 15, + "y": 3 + }, + { + "label": "K0A", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "K0B", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "K0C", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "label": "K0G", + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "K0J", + "x": 10, + "y": 4, + "w": 1.5 + }, + { + "label": "K0M", + "x": 11.5, + "y": 4, + "w": 1.5 + }, + { + "label": "K0N", + "x": 13, + "y": 4 + }, + { + "label": "K0O", + "x": 14, + "y": 4 + }, + { + "label": "K0P", + "x": 15, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/leeku/finger65/keymaps/default/keymap.c b/keyboards/leeku/finger65/keymaps/default/keymap.c new file mode 100644 index 0000000000..14a0f0c5c9 --- /dev/null +++ b/keyboards/leeku/finger65/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _FN, +}; + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ESC│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ( │ ) │ ` │BS │HOM│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │PGU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┼───┤ + * │ FUNC │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ENT │PGD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ SHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │SHIFT │UP │END│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤ + * │CTRL│GUI │ALT │ SPACE (6.25u) │ ALT │CTRL │LFT│DWN│RGT│ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_HOME, + 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_PGUP, + TG(_FN), 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_PGDN, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, _______, KC_SPC, _______, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN] = 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_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), +}; diff --git a/keyboards/leeku/finger65/keymaps/madhatter/keymap.c b/keyboards/leeku/finger65/keymaps/madhatter/keymap.c new file mode 100644 index 0000000000..f8d5a0f7bb --- /dev/null +++ b/keyboards/leeku/finger65/keymaps/madhatter/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _FNMS, +}; + +#define FNMS MO(_FNMS) + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ESC│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ( │ ) │ \ │ \ │HOM│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┼───┼───┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BKSPC│PGU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ ` │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │PGD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ SHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │SHIFT │UP │END│ + * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤ + * │CTRL │GUI│ ALT │ SPACE (6.25u) │ ALT │CTRL │LFT│DWN│RGT│ + * └─────┴───┴─────┴───────────────────────┴─────┴─────┴───┴───┴───┘ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_65_ansi_split_bs( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSLS, KC_HOME, + 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_BSPC, KC_PGUP, + KC_GRV, 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, FNMS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FNMS] = LAYOUT_65_ansi_split_bs( + 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_DEL, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_VOLU, + AG_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U,KC_MNXT, + _______, _______, _______, _______, _______, _______, KC_MS_L,KC_MS_D, KC_MS_R + ), +}; + +// uint32_t layer_state_set_user(uint32_t state) { +// switch(biton32(state)) { +// case _FNMS: +// led_off(); +// rgb_on(); +// break; +// default: +// led_off(); +// rgb_off(); +// break; +// } +// return state; +// } diff --git a/keyboards/leeku/finger65/keymaps/madhatter/rules.mk b/keyboards/leeku/finger65/keymaps/madhatter/rules.mk new file mode 100644 index 0000000000..6c605daecf --- /dev/null +++ b/keyboards/leeku/finger65/keymaps/madhatter/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/leeku/finger65/readme.md b/keyboards/leeku/finger65/readme.md new file mode 100644 index 0000000000..c800f3af3a --- /dev/null +++ b/keyboards/leeku/finger65/readme.md @@ -0,0 +1,16 @@ +# Leeku Finger65 PCB + +* Keyboard Maintainer: [sidcarter](https://github.com/sidcarter) +* Hardware Supported: LeeKu Finger65 PCB, atmega32a + +* Make example for this keyboard (after setting up your build environment): + + make leeku/finger65:default + +* This PCB is not QMK ready by default. If you want to use your Leeku Finger65 PCB with QMK, you must: + + * ISP Flash the Leeku PCB using the bootloader for the atmega32a that resides in the `util/` folder + * Build and install [bootloadHID](https://www.obdev.at/products/vusb/bootloadhid.html) on your system + * You can then do a `make leeku/finger65:default:flash` to flash your PCB with QMK + +* 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). diff --git a/keyboards/leeku/finger65/rules.mk b/keyboards/leeku/finger65/rules.mk new file mode 100644 index 0000000000..16ce59ecb1 --- /dev/null +++ b/keyboards/leeku/finger65/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover +MIDI_ENABLE = no # MIDI support diff --git a/keyboards/leeku/finger65/usbconfig.h b/keyboards/leeku/finger65/usbconfig.h new file mode 100644 index 0000000000..48be890468 --- /dev/null +++ b/keyboards/leeku/finger65/usbconfig.h @@ -0,0 +1,364 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'L', 'e', 'e', 'k', 'u' +#define USB_CFG_VENDOR_NAME_LEN 5 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'F', 'i', 'n', 'g', 'e', 'r', '6', '5' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c index 67a20971ce..0cf3503e43 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -37,15 +37,9 @@ enum custom_keycodes { RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, + M_SAMPLE }; -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - -//Macros -#define M_SAMPLE M(KC_SAMPLEMACRO) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -278,6 +272,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case M_SAMPLE: + if (record->event.pressed){ + SEND_STRING("hello world"); + } + return false; } return true; } @@ -328,27 +327,6 @@ void music_scale_user(void) #endif -/* - * Macro definition - */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - - switch (id) { - case KC_SAMPLEMACRO: - if (record->event.pressed){ - return MACRO (I(10), T(H), T(E), T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } - - } - - return MACRO_NONE; -} - - void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { if (memcmp(dest->display, source->display, sizeof(dest->display))) { diff --git a/keyboards/lets_split/keymaps/halvves/config.h b/keyboards/lets_split/keymaps/halvves/config.h new file mode 100644 index 0000000000..70f6d13c7b --- /dev/null +++ b/keyboards/lets_split/keymaps/halvves/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +// smooth mousekeys (copied from the ergo ez config) +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/lets_split/keymaps/halvves/keymap.c b/keyboards/lets_split/keymaps/halvves/keymap.c new file mode 100644 index 0000000000..6fbd646519 --- /dev/null +++ b/keyboards/lets_split/keymaps/halvves/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _UTIL, + _MOUSE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define UTIL MO(_UTIL) +#define MOUSE MO(_MOUSE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Util | Ctrl | Alt | GUI |Lower | Space |Raise | Mouse| Mouse| | Util | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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 , + UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, UTIL +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Util | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Mouse| Mouse| | | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, XXXXXXX +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Util | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Mouse| Mouse| | | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, XXXXXXX +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 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 / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Util + * ,-----------------------------------------------------------------------------------. + * | | | | | | Reset|Reset | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | LEFT | DOWN | UP | RGHT | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_UTIL] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Mouse + * ,-----------------------------------------------------------------------------------. + * | | | M Up | | | | | | |L Clk |R Clk | W Up | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |M Left|M Down|M Rght| | | | | | | |W Down| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, KC_WH_U, + XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/halvves/rules.mk b/keyboards/lets_split/keymaps/halvves/rules.mk new file mode 100644 index 0000000000..6c605daecf --- /dev/null +++ b/keyboards/lets_split/keymaps/halvves/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/lets_split/keymaps/khord/keymap.c b/keyboards/lets_split/keymaps/khord/keymap.c index 4209efabed..60b2973947 100644 --- a/keyboards/lets_split/keymaps/khord/keymap.c +++ b/keyboards/lets_split/keymaps/khord/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H - extern keymap_config_t keymap_config; #define _QWERTY 0 @@ -25,7 +24,6 @@ enum { // Dylan's additions #define C_A_DEL LALT(LCTL(KC_DEL)) #define C_A_INS LALT(LCTL(KC_INS)) -//#define MAC_LOK S(LCTL(KC_PWR)) #define MAC_LOK LCTL(LGUI(KC_Q)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -81,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_PGDN, KC_PGUP, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4 \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Adjust (Lower + Raise) diff --git a/keyboards/lets_split/keymaps/mekberg/README.md b/keyboards/lets_split/keymaps/mekberg/README.md new file mode 100644 index 0000000000..5202ec8366 --- /dev/null +++ b/keyboards/lets_split/keymaps/mekberg/README.md @@ -0,0 +1,65 @@ +# Let's Mekberg! + +This is my take on a Swedish 40% layout in a split format. The priority is to have the most highly used keys opposite the modifier to make chording simpler. In other words, if the layer modifier is on the left half, the most used keys should be bound on the right half. + +## Layers + +### Default + +The default layer has normal alpha layout with the addition of Swedish letters, causing Enter to move down one key and backspace to take the place of the right space. The enter key also doubles as Shift when held. + +2nd row left modifier has been bound to both Ctrl and Tab with modtap (hold for Ctrl, tap for Tab). + +Delete is available on all non-default layers, positioned on the upper right corner key. + +### Raise + +The raised layer has all the symbols and special characters predefined. As much as possible, there should be no need to use additional modifiers. + +Arrow keys have been disabled on this layer to avoid accidental misclicks when pressing the Raise key. + +#### macOS / Windows variants + +Because macOS and Windows expect quite different keycodes to produce the same special characters (for example '{' or '|'), there are two different layers, one for each OS. To toggle either macOS (default) and Windows layouts within the RAISE layer, press SPECIAL + W for Windows or SPECIAL + M for macOS. + +### Lower + +The lower layer focuses on numbers, with a numpad-like layout on the right and F-keys in a homerow-centric layout on the left. + +### Special + +The special layer has Reset and EEP Reset keys on the left half, along with media and volume controls. On the right half it has movement keys starting in the IJKL cluster. Additionally, custom macOS Sleep and Lock Screen keys can be found on the right half on this layer. + +## Configuration + +### PERMISSIVE_HOLD + +This option is used because otherwise modtap functions would fail to trigger. This increases reliability for me. + +### USE_SERIAL + +N/A + +### EE_HANDS + +Prepared for EEPROM settings and different keymaps depending on USB port connected, but default master side remains left regardless. + +## Building + +Clean the build environment: + +```shell +make clean +``` + +Build and flash left side: + +```shell +make lets_split/rev2:mekberg:avrdude-split-left +``` + +Then do the same for the right side: + +```shell +make lets_split/rev2:mekberg:avrdude-split-right +``` diff --git a/keyboards/lets_split/keymaps/mekberg/config.h b/keyboards/lets_split/keymaps/mekberg/config.h new file mode 100644 index 0000000000..5523ecb5a3 --- /dev/null +++ b/keyboards/lets_split/keymaps/mekberg/config.h @@ -0,0 +1,34 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +// Define some configuration for modtap behavior +// #define TAPPING_TERM 150 +#define PERMISSIVE_HOLD + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +//#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS diff --git a/keyboards/lets_split/keymaps/mekberg/keymap.c b/keyboards/lets_split/keymaps/mekberg/keymap.c new file mode 100644 index 0000000000..e530623f1d --- /dev/null +++ b/keyboards/lets_split/keymaps/mekberg/keymap.c @@ -0,0 +1,228 @@ +#include QMK_KEYBOARD_H + +/* +Let's Split physical layout +1u == 8chars +* == Homing keys + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | * | | | | * | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ + +// Layers +enum layer_names { + _DEFAULT, + _DEFAULT_MAC, + _DEFAULT_WIN, + _RAISE_MAC, + _RAISE_WIN, + _LOWER, + _SPECIAL, +}; + +#define TO_MAC TO(_DEFAULT) +#define TO_WIN TO(_DEFAULT_WIN) + +#define RAISE_M MO(_RAISE_MAC) +#define RAISE_W MO(_RAISE_WIN) +#define LOWER MO(_LOWER) +#define SPECIAL MO(_SPECIAL) + +// Modifiers +#define SFTENT KC_SFTENT // Enter => Shift when held +#define CTLTAB LCTL_T(KC_TAB) // Tab => Ctrl when held + +// ISO keycodes with Swedish layout names +#define SE_PLUS KC_MINS // + +#define SE_QSTM S(SE_PLUS) // Question mark +#define SE_TCK KC_EQL // Fronttick (´) +#define SE_BTCK S(SE_TCK) // Backtick (`) +#define SE_UML KC_RBRC // Umlaut (¨) +#define SE_TAK S(SE_UML) // Caret (^) +#define SE_TILD RALT(SE_UML) // Tilde (~) +#define SE_QUT KC_NUHS // Singlequote (') +#define SE_DQUT S(KC_2) // Doublequote (") +#define SE_AST S(SE_QUT) // Asterisk +#define SE_AUML KC_QUOT // Ä +#define SE_ARNG KC_LBRC // Å +#define SE_OUML KC_SCLN // Ö +#define SE_LT KC_NUBS // < +#define SE_GT S(SE_LT) // > +#define SE_DASH KC_SLSH // - +#define SE_USCR S(SE_DASH) // _ +#define SE_AT RALT(KC_2) // @ +#define SE_EXCL S(KC_1) // ! +#define SE_HASH S(KC_3) // # +#define SE_USD RALT(KC_4) // $ +#define SE_PCNT S(KC_5) // % +#define SE_AMP S(KC_6) // & +#define SE_EQLS S(KC_0) // = + +// Apple-specific layout keys +#define AP_SLS S(KC_7) // / +#define AP_PIPE LALT(KC_7) // | +#define AP_BSLS A(AP_SLS) // Backslash +#define AP_LCBR A(AP_LPAR) // { +#define AP_RCBR A(AP_RPAR) // } +#define AP_LBR A(KC_8) // [ +#define AP_RBR A(KC_9) // ] +#define AP_LPAR S(KC_8) // ( +#define AP_RPAR S(KC_9) // ) + +// Windows-specific layout keys +#define MS_SLS S(KC_7) // / +#define MS_PIPE RALT(SE_LT) // | +#define MS_BSLS RALT(SE_PLUS) // Backslash +#define MS_LCBR RALT(KC_7) // { +#define MS_RCBR RALT(KC_0) // } +#define MS_LBR RALT(KC_8) // [ +#define MS_RBR RALT(KC_9) // ] +#define MS_LPAR S(KC_8) // ( +#define MS_RPAR S(KC_9) // ) + +// My common shortcuts +#define MY_PREV KC_MRWD // Media: Previous +#define MY_NEXT KC_MFFD // Media: Next +#define MY_PLAY KC_MPLY // Media: Play/Pause +#define MY_LOCK C(A(KC_L)) // Mac: Lock + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +DEFAULT + Main layout for alphas and modifiers + Tab => Ctrl when held + Esc => MOVEMENT layer when held + Enter => Shift when held + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Esc | Q | W | E | R | T | | Y | U | I | O | P | Å | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + |Ctrl/Tab| A | S | D | F *| G | | H |* J | K | L | Ö | Ä | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | Shift | Z | X | C | V | B | | N | M | , | . | - | Enter | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | SPECIAL| Ctrl | Alt | Cmd | LOWER | Space | | Backspc| RAISE | Left | Down | Up | Right | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_DEFAULT] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, + CTLTAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OUML, SE_AUML, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_DASH, SFTENT, + SPECIAL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE_M, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* +DEFAULT - Windows + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | * | | | | * | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | RAISE | | | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_DEFAULT_WIN] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RAISE_W, _______, _______, _______, _______ +), + +/* +RAISE - Mac + This layer focuses on symbols and special characters. + + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | ! | ? | { | } | & | | ^ | | | ` | ´ | | Del | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | # | $ | ( | ) *| " | | ~ |* / | \ | ¨ | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | @ | % | [ | ] | ' | | | < | > | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | |XXXXXXXX| | | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_RAISE_MAC] = LAYOUT_ortho_4x12( + _______, SE_EXCL, SE_QSTM, AP_LCBR, AP_RCBR, SE_AMP, SE_TAK, AP_PIPE, SE_BTCK, SE_TCK, _______, KC_DEL, + _______, SE_HASH, SE_USD, AP_LPAR, AP_RPAR, SE_DQUT, SE_TILD, AP_SLS, AP_BSLS, SE_UML, _______, _______, + _______, SE_AT, SE_PCNT, AP_LBR, AP_RBR, SE_QUT, _______, SE_LT, SE_GT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* +RAISE - Windows + This layer focuses on symbols and special characters. + + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | ! | ? | { | } | & | | ^ | | | ` | ´ | | Del | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | # | $ | ( | ) *| " | | ~ |* / | \ | ¨ | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | @ | % | [ | ] | ' | | | < | > | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | |XXXXXXXX| | | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_RAISE_WIN] = LAYOUT_ortho_4x12( + _______, SE_EXCL, SE_QSTM, MS_LCBR, MS_RCBR, SE_AMP, SE_TAK, MS_PIPE, SE_BTCK, SE_TCK, _______, KC_DEL, + _______, SE_HASH, SE_USD, MS_LPAR, MS_RPAR, SE_DQUT, SE_TILD, MS_SLS, MS_BSLS, SE_UML, _______, _______, + _______, SE_AT, SE_PCNT, MS_LBR, MS_RBR, SE_QUT, _______, SE_LT, SE_GT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* +LOWER + This layer focuses on numbers and math. + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | F1 | F2 | F3 | F4 | | | * | 7 | 8 | 9 | - | Del | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | F5 | F6 | F7 | F8 *| | | / |* 4 | 5 | 6 | + | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | F9 | F10 | F11 | F12 | | | / | 1 | 2 | 3 | = | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | |XXXXXXXX| | | | | 0 | . | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_LOWER] = LAYOUT_ortho_4x12( + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, SE_AST, KC_7, KC_8, KC_9, SE_DASH, KC_DEL, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, AP_SLS, KC_4, KC_5, KC_6, SE_PLUS, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, MS_SLS, KC_1, KC_2, KC_3, SE_EQLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, _______, _______ +), + +/* +SPECIAL + This layer focuses on special functions, media controls and movement keys. + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Reset | | WIN | VolUp | | | | Ins | Home | Up | End | PgUp | Del | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + |EEPReset| | Prev | VolDn | Next *| | | |* Left | Down | Right | PgDn | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | Mute | | | | Lock | MAC | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + |XXXXXXXX| | | | | Play | | | | | | | Sleep | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_SPECIAL] = LAYOUT_ortho_4x12( + RESET, _______, TO_WIN, KC_VOLU, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_DEL, + EEP_RST, _______, MY_PREV, KC_VOLD, MY_NEXT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, + _______, _______, _______, KC_MUTE, _______, _______, MY_LOCK, TO_MAC, _______, _______, _______, _______, + _______, _______, _______, _______, _______, MY_PLAY, _______, _______, _______, _______, _______, KC_SLEP +) + +}; diff --git a/keyboards/lets_split/keymaps/zer09/config.h b/keyboards/lets_split/keymaps/zer09/config.h index 14be4ccc59..3990c3dc5b 100644 --- a/keyboards/lets_split/keymaps/zer09/config.h +++ b/keyboards/lets_split/keymaps/zer09/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define CATERINA_BOOTLOADER #define USB_MAX_POWER_CONSUMPTION 50 /* Use I2C or Serial, not both */ diff --git a/keyboards/lets_split/rev1/rev1.h b/keyboards/lets_split/rev1/rev1.h index a43d4a25ba..6a65954f22 100644 --- a/keyboards/lets_split/rev1/rev1.h +++ b/keyboards/lets_split/rev1/rev1.h @@ -2,11 +2,8 @@ #include "lets_split.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ diff --git a/keyboards/lets_split/rev1/rules.mk b/keyboards/lets_split/rev1/rules.mk index f845616741..e69de29bb2 100644 --- a/keyboards/lets_split/rev1/rules.mk +++ b/keyboards/lets_split/rev1/rules.mk @@ -1 +0,0 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 34e64e89f1..a1a3f00a0e 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -2,10 +2,8 @@ #include "lets_split.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/lets_split/rev2/rules.mk b/keyboards/lets_split/rev2/rules.mk index 7b30c0beff..e69de29bb2 100644 --- a/keyboards/lets_split/rev2/rules.mk +++ b/keyboards/lets_split/rev2/rules.mk @@ -1 +0,0 @@ -BACKLIGHT_ENABLE = no diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index f9d1a0dadb..98736310c6 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h index 2d3e68610e..e8459494be 100644 --- a/keyboards/lets_split/sockets/config.h +++ b/keyboards/lets_split/sockets/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xBEE5 -#define PRODUCT_ID 0xFEED +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0BEE #define DEVICE_VER 0x0001 #define MANUFACTURER Duckle29 #define PRODUCT Lets Split Sockets @@ -88,4 +88,4 @@ along with this program. If not, see . #define NO_ACTION_FUNCTION #define DISABLE_LEADER -#endif // USE_Link_Time_Optimization \ No newline at end of file +#endif // USE_Link_Time_Optimization diff --git a/keyboards/lets_split/sockets/sockets.h b/keyboards/lets_split/sockets/sockets.h index a79770bac6..a1a3f00a0e 100644 --- a/keyboards/lets_split/sockets/sockets.h +++ b/keyboards/lets_split/sockets/sockets.h @@ -1,12 +1,9 @@ #pragma once -#define DISABLE_JTAG // The keyboard uses PF4 and PF7, which are used by JTAG. #include "lets_split.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -15,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) diff --git a/keyboards/lets_split_eh/config.h b/keyboards/lets_split_eh/config.h index 655d35e1ab..f07706a834 100644 --- a/keyboards/lets_split_eh/config.h +++ b/keyboards/lets_split_eh/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -35,8 +34,3 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 - -/* serial.c configuration for split keyboard */ -//#define SOFT_SERIAL_PIN D0 - -#endif diff --git a/keyboards/lets_split_eh/eh/config.h b/keyboards/lets_split_eh/eh/config.h index 59afb39c0f..43e0266502 100644 --- a/keyboards/lets_split_eh/eh/config.h +++ b/keyboards/lets_split_eh/eh/config.h @@ -16,13 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef EH_CONFIG_H -#define EH_CONFIG_H - -// To let configuration know this is of type EH, which will force I2C irregardless of user config -#define EH -// The 'EH' only uses I2C -#define USE_I2C +#pragma once #include "config_common.h" @@ -40,10 +34,14 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN B2 -#define RGBLED_NUM 6 // Number of LEDs (each hand) +#define RGBLED_NUM 12 // Number of LEDs (each hand) +#define RGBLED_SPLIT { 6, 6 } +#define RGBLIGHT_ANIMATIONS /* Split Defines */ #define SPLIT_HAND_PIN D3 +#define SOFT_SERIAL_PIN D0 -#endif - +// The 'EH' has previously forced use of I2C so this default has been kept +// however users can undef to use serial +#define USE_I2C diff --git a/keyboards/lets_split_eh/eh/eh.c b/keyboards/lets_split_eh/eh/eh.c index e748d3ae05..d5a312085d 100644 --- a/keyboards/lets_split_eh/eh/eh.c +++ b/keyboards/lets_split_eh/eh/eh.c @@ -1,14 +1 @@ #include "lets_split_eh.h" - -void matrix_init_kb(void) { - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1< +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + // place overrides here diff --git a/keyboards/lets_split_eh/keymaps/mikethetiger/keymap.c b/keyboards/lets_split_eh/keymaps/mikethetiger/keymap.c new file mode 100644 index 0000000000..c5a2ed9535 --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/mikethetiger/keymap.c @@ -0,0 +1,120 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION, + _ADJUST, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FUNCTION MO(_FUNCTION) +#define ADJUST MO(_ADJUST) + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, 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 , + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_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, _______, _______, KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( \ + 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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | RESET| | | | | | |RGBMOD|RGBVAI|RGBSAI|RGBHUI|caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | |RGBRMO|RGBVAD|RGBSAD|RGBHUD|RGBTOG| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | |BLSTEP| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + RESET, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, \ + _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCTION] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/keebio/laplace/keymaps/default/rules.mk b/keyboards/lets_split_eh/keymaps/mikethetiger/rules.mk similarity index 100% rename from keyboards/keebio/laplace/keymaps/default/rules.mk rename to keyboards/lets_split_eh/keymaps/mikethetiger/rules.mk diff --git a/keyboards/lets_split_eh/lets_split_eh.h b/keyboards/lets_split_eh/lets_split_eh.h index f3d2cd0d06..51828b09ba 100644 --- a/keyboards/lets_split_eh/lets_split_eh.h +++ b/keyboards/lets_split_eh/lets_split_eh.h @@ -1,5 +1,4 @@ -#ifndef LETS_SPLIT_EH_H -#define LETS_SPLIT_EH_H +#pragma once #include "quantum.h" @@ -23,5 +22,3 @@ ) #define LAYOUT_kc_ortho_4x12 LAYOUT_kc - -#endif diff --git a/keyboards/lets_split_eh/rules.mk b/keyboards/lets_split_eh/rules.mk index 99b1ba2344..2bcd087d82 100644 --- a/keyboards/lets_split_eh/rules.mk +++ b/keyboards/lets_split_eh/rules.mk @@ -1,49 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/lfkeyboards/lfk65_hs/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk65_hs/keymaps/default/keymap.c index 0985debdff..87c9358624 100644 --- a/keyboards/lfkeyboards/lfk65_hs/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk65_hs/keymaps/default/keymap.c @@ -53,15 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_SAD, RGB_HUD, RGB_SAI), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/lfkeyboards/lfk65_hs/rules.mk b/keyboards/lfkeyboards/lfk65_hs/rules.mk index 5118c35977..bfae80e0c7 100644 --- a/keyboards/lfkeyboards/lfk65_hs/rules.mk +++ b/keyboards/lfkeyboards/lfk65_hs/rules.mk @@ -6,15 +6,3 @@ BOOT_LOADER = BootloaderHID # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c - -# Processor frequency. -F_CPU = 16000000 - -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT diff --git a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c index 68cb459159..81ab4338d1 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c @@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { // This keymap only has a single base layer, so reset the default if needed if(eeconfig_read_default_layer() > 1){ diff --git a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c index d0745382a0..806f402e83 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c @@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { // This keymap only has a single base layer, so reset the default if needed if(eeconfig_read_default_layer() > 1){ diff --git a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c index d4fcb88548..35d17805c3 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c @@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { // This keymap only has a single base layer, so reset the default if needed if(eeconfig_read_default_layer() > 1){ diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk index cc314c97a2..3c90998d98 100644 --- a/keyboards/lfkeyboards/lfk78/rules.mk +++ b/keyboards/lfkeyboards/lfk78/rules.mk @@ -7,32 +7,18 @@ LFK_REV = J ifeq ($(LFK_REV), B) MCU = atmega32u4 - OPT_DEFS += -DBOOTLOADER_SIZE=4096 else ifeq ($(LFK_REV), J) MCU = at90usb646 - OPT_DEFS += -DBOOTLOADER_SIZE=4096 else MCU = at90usb1286 - OPT_DEFS += -DBOOTLOADER_SIZE=8192 endif +BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_REV_$(LFK_REV) OPT_DEFS += -DLFK_REV_STRING=\"Rev$(LFK_REV)\" # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c -# Processor frequency. -F_CPU = 16000000 - -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c index fee3f7586e..f35826880b 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c @@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { // This keymap only has a single base layer, so reset the default if needed if(eeconfig_read_default_layer() > 1){ diff --git a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c index a1236de2ad..b86c99a41e 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c @@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = { [7] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN7 - Toggle audio click }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { // This keymap only has a single base layer, so reset the default if needed if(eeconfig_read_default_layer() > 1){ diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk index c10f473065..8e19706150 100644 --- a/keyboards/lfkeyboards/lfk87/rules.mk +++ b/keyboards/lfkeyboards/lfk87/rules.mk @@ -7,29 +7,16 @@ LFK_REV = C ifeq ($(LFK_REV), A) - MCU = at90usb1286 - OPT_DEFS += -DBOOTLOADER_SIZE=8192 + MCU = at90usb1286 else - MCU = at90usb646 - OPT_DEFS += -DBOOTLOADER_SIZE=4096 + MCU = at90usb646 endif +BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c -# Processor frequency. -F_CPU = 16000000 - -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - LAYOUTS = tkl_ansi tkl_iso # Build Options diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c index afd24ba6ef..3e131b2414 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c @@ -20,16 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { // This keymap only has a single base layer, so reset the default if needed if(eeconfig_read_default_layer() > 1){ diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 83553f64cb..7ed840ae9f 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk @@ -1,14 +1,15 @@ -SRC = TWIlib.c issi.c lighting.c - +# MCU name MCU = atmega32u4 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -F_CPU = 16000000 -F_USB = $(F_CPU) -ARCH = AVR8 - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu LAYOUTS = numpad_6x4 @@ -31,6 +32,7 @@ TAP_DANCE_ENABLE = no ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms +SRC = TWIlib.c issi.c lighting.c ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE diff --git a/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c b/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c index dc064ebf2d..303fa9bb4c 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c @@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { // This keymap only has a single base layer, so reset the default if needed if(eeconfig_read_default_layer() > 1){ diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index a1e52aae94..d3e6a24023 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -8,50 +8,13 @@ LFK_REV = C ifeq ($(LFK_REV), A) - MCU = at90usb1286 - OPT_DEFS += -DBOOTLOADER_SIZE=8192 + MCU = at90usb1286 else - MCU = at90usb646 - OPT_DEFS += -DBOOTLOADER_SIZE=4096 + MCU = at90usb646 endif +BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c b/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c index 1861dcc1ad..9c8ebdb63e 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c @@ -59,15 +59,6 @@ const uint16_t PROGMEM fn_actions[] = { [5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c b/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c index 6e5e57112e..ebf085122c 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c @@ -59,16 +59,6 @@ const uint16_t PROGMEM fn_actions[] = { [5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/lfkeyboards/smk65/rules.mk b/keyboards/lfkeyboards/smk65/rules.mk index b7f94154a4..d3f009e4d2 100644 --- a/keyboards/lfkeyboards/smk65/rules.mk +++ b/keyboards/lfkeyboards/smk65/rules.mk @@ -1,17 +1,15 @@ +# MCU name MCU = at90usb646 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c - -# Processor frequency. -F_CPU = 16000000 - -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index fb1cdf3962..50bf2beb32 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -24,5 +24,9 @@ along with this program. If not, see . #define USE_I2C #define USE_SERIAL -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION +#if !defined(NO_ACTION_MACRO) + #define NO_ACTION_MACRO +#endif +#if !defined(NO_ACTION_FUNCTION) + #define NO_ACTION_FUNCTION +#endif diff --git a/keyboards/lily58/keymaps/bcat/config.h b/keyboards/lily58/keymaps/bcat/config.h new file mode 100644 index 0000000000..1809262044 --- /dev/null +++ b/keyboards/lily58/keymaps/bcat/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define EE_HANDS diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c new file mode 100644 index 0000000000..9a85a55e1b --- /dev/null +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_LOWER, + LAYER_RAISE, + LAYER_ADJUST, +}; + +#define LY_LWR MO(LAYER_LOWER) +#define LY_RSE MO(LAYER_RAISE) + +#define KY_CESC LCTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ + [LAYER_DEFAULT] = LAYOUT( + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KY_CESC, 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_WBAK, KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI, KC_APP + ), + + /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ + [LAYER_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, KC_PIPE, KC_TILD, KC_DEL, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, KC_BSLS, KC_GRV, KC_INS, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823 */ + [LAYER_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_F11, KC_F12, _______, _______, KC_END, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7 */ + [LAYER_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); +} diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md new file mode 100644 index 0000000000..f90c5110bc --- /dev/null +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -0,0 +1,68 @@ +# bcat's Lily58 layout + +This split ergo layout is standard QWERTY on the default layer, with symbols on +the lower layer, numbers/navigation on the raise layer, and media keys centered +around the ESDF cluster in the adjust (raise + lower) layer. A few general +principles went into this layout: + +* The number row is optional, as are the outermost bottom row keys and the +"extra" keys on the innnermost columns below the controllers. This will enable +easy translation to a Crkbd or similar 40% ortho if I go that route. + +* Space and Enter are on the big thumb keys so they're easy to press +(particularly with G20 or other low-profile keycaps there). + +* There are two shift keys because really, Right Shift is important. + +* Arrow keys are on VIM-style HJKL keys. + +* Home/End and Page Up/Page Down are easy to reach and in a square kind of like +on the HHKB. + +* Navigation should be usable with just the right hand, to enable left-handed +mousing at the same time. Additionally, Web page scrolling (Space, Shift+Space) +should be possible with just the left hand, for writing at the same time as +scrolling. + +* Escape is easy to reach because Vim. + +* Since most of the modifiers are on the left half, keys frequently pressed +together with mods (e.g., numbers, function keys, etc.) are on the Raise layer +activated by the right thumb. + +* Every key on a TKL has a binding. + +* Backspace is bound in the same place on every layer to avoid having to let go +of layer-shift keys to fix a mistake. + +* Likewise, the comma and period keys are not rebound on the raise layer to +allow typing numbers with thousand separators and decimal points without +releasing the layer key. + +* Brackets and braces are on or near the home row for quick access when coding. + +* Other than Right Shift (sorry), modifiers aren't rebound on layers. + +## Default layer + +![Default layer layout](https://i.imgur.com/wx1brJV.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) + +## Lower layer + +![Lower layer layout](https://i.imgur.com/ytNFySG.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) + +## Raise layer + +![Raise layer layout](https://i.imgur.com/S7S29G6.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823)) + +## Adjust layer + +![Adjust layer layout](https://i.imgur.com/fCIySG2.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7)) diff --git a/keyboards/lily58/keymaps/bcat/rules.mk b/keyboards/lily58/keymaps/bcat/rules.mk new file mode 100644 index 0000000000..c87b447c1e --- /dev/null +++ b/keyboards/lily58/keymaps/bcat/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = atmel-dfu # Elite-C diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index b8dda17d53..f36248e12d 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -9,7 +9,6 @@ #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/lily58/keymaps/ninjonas/README.md b/keyboards/lily58/keymaps/ninjonas/README.md new file mode 100644 index 0000000000..8622528400 --- /dev/null +++ b/keyboards/lily58/keymaps/ninjonas/README.md @@ -0,0 +1,134 @@ +# ninjonas Keymap for [Lily58 Pro](https://github.com/kata0510/Lily58) + +## Keymap +This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](../../../../users/ninjonas). + +More information about the Lily58 pro keyboard can be found [here](https://yuchi-kbd.hatenablog.com/entry/2018/12/23/214342) + +### QWERTY +```c +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | = | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +``` + +### DVORAK +```c +/* DVORAK + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | A | O | E | U | I |-------. ,-------| D | H | T | N | S | / | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| ; | Q | J | K | X |-------| |-------| B | M | W | V | Z | = | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +``` + +### COLEMAK +```c +/* COLEMAK + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / | = | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +``` + +### LOWER +```c +/* LOWER + * ,------------------------------------------. ,------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+-------+------+------| |------+------+------+------+-------+------| + * | | |KC_BRIU| Play | Mute | | | PgUp | Home | Up | End | |K_MDSH| + * |------+------+------+-------+------+------| |------+------+------+------+-------+------| + * | | |KC_BRID| Next |VolUp | |-------. ,-------| PgDn | Left | Down |Right |K_LOCK | | + * |------+------+------+-------+------+------| | | |------+------+------+------+-------+------| + * |M_SHFT| | | Prev |VolDn | |-------| |-------| | | | | |M_PYNV| + * `------------------------------------------/ / \ \------------------------------------------' + * | | | | / / \ \ | |M_CODE| | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +``` + +### RAISE +```c +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | |K_CSCN| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | MS_L | MS_D | MS_R | WH_D |-------. ,-------| | | | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +``` + +### ADJUST +```c +/* ADJUST + * ,------------------------------------------. ,-----------------------------------------. + * |EEP_RST| | | | | | | | | |COLMAK|DVORAK|QWERTY| + * |-------+------+------+------+------+------| |------+------+------+------+------+------| + * |M_MAKE | | | | | | | | | | | | | + * |-------+------+------+------+------+------| |------+------+------+------+------+------| + * |M_VRSN | | | | | |-------. ,-------| | | | | | | + * |-------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |M_FLSH | | | | | |-------| |-------| | | | | | | + * `------------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +``` + + \ No newline at end of file diff --git a/keyboards/lily58/keymaps/ninjonas/config.h b/keyboards/lily58/keymaps/ninjonas/config.h new file mode 100644 index 0000000000..19fb5cd92b --- /dev/null +++ b/keyboards/lily58/keymaps/ninjonas/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 +#define TAPPING_FORCE_HOLD + +#define OLED_FONT_H "keyboards/lily58/lib/glcdfont.c" +#define OLED_DISABLE_TIMEOUT \ No newline at end of file diff --git a/keyboards/lily58/keymaps/ninjonas/keymap.c b/keyboards/lily58/keymaps/ninjonas/keymap.c new file mode 100644 index 0000000000..0ed197c141 --- /dev/null +++ b/keyboards/lily58/keymaps/ninjonas/keymap.c @@ -0,0 +1,152 @@ +/* Copyright 2019 @ninjonas + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "ninjonas.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | = | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_QWERTY] = LAYOUT_wrapper( + _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \ + _____________________QWERTY_L1______________________, _____________________QWERTY_R1______________________, \ + _____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________, \ + _____________________QWERTY_L3______________________, T_LBRC, T_RBRC, _____________________QWERTY_R3______________________, \ + ________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \ + ), + +/* DVORAK + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | A | O | E | U | I |-------. ,-------| D | H | T | N | S | / | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| ; | Q | J | K | X |-------| |-------| B | M | W | V | Z | = | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_DVORAK] = LAYOUT_wrapper( + _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \ + _____________________DVORAK_L1______________________, _____________________DVORAK_R1______________________, \ + _____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________, \ + _____________________DVORAK_L3______________________, T_LBRC, T_RBRC, _____________________DVORAK_R3______________________, \ + ________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \ + ), + +/* COLEMAK + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / | = | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_COLEMAK] = LAYOUT_wrapper( + _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \ + _____________________COLEMAK_L1_____________________, _____________________COLEMAK_R1_____________________, \ + _____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________, \ + _____________________COLEMAK_L3_____________________, T_LBRC, T_RBRC, _____________________COLEMAK_R3_____________________, \ + ________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \ + ), + +/* LOWER + * ,------------------------------------------. ,------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+-------+------+------| |------+------+------+------+-------+------| + * | | |KC_BRIU| Play | Mute | | | PgUp | Home | Up | End | |K_MDSH| + * |------+------+------+-------+------+------| |------+------+------+------+-------+------| + * | | |KC_BRID| Next |VolUp | |-------. ,-------| PgDn | Left | Down |Right |K_LOCK | | + * |------+------+------+-------+------+------| | | |------+------+------+------+-------+------| + * | |M_SHFT| | Prev |VolDn | |-------| |-------| | M | | | |M_PYNV| + * `------------------------------------------/ / \ \------------------------------------------' + * | | | | / / \ \ | |M_CODE| | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_LOWER] = LAYOUT_wrapper( \ + _____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________, \ + _____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________, \ + _____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, \ + _____________________LOWER_L3_______________________, _______, _______, _____________________LOWER_R3_______________________, \ + __________________________________, _______, _______, M_CODE, _______ \ + ), + +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | |K_CSCN| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | MS_L | MS_D | MS_R | WH_D |-------. ,-------| | | | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_RAISE] = LAYOUT_wrapper( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, _____________MOUSE_2______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + __________________________________, __________________________________ \ + ), + +/* ADJUST + * ,------------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |-------+------+------+------+------+------| |------+------+------+------+------+------| + * |M_MAKE |EEPRST| | | | | | | | |COLMAK|DVORAK|QWERTY| + * |-------+------+------+------+------+------| |------+------+------+------+------+------| + * |M_VRSN |M_MALL| | | | |-------. ,-------| | | | | | | + * |-------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |M_FLSH | | | | | |-------| |-------| | | | | | | + * `------------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_ADJUST] = LAYOUT_wrapper( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________, \ + _____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, \ + _____________________ADJUST_L3______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R3______________________,\ + __________________________________, __________________________________ \ + ), +}; \ No newline at end of file diff --git a/keyboards/lily58/keymaps/ninjonas/rules.mk b/keyboards/lily58/keymaps/ninjonas/rules.mk new file mode 100644 index 0000000000..c582662134 --- /dev/null +++ b/keyboards/lily58/keymaps/ninjonas/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index 8fd42070e0..4e8e3a7c9c 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -36,8 +36,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -#define CATERINA_BOOTLOADER - /* define tapping term */ #define TAPPING_TERM 100 @@ -72,4 +70,4 @@ along with this program. If not, see . //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION \ No newline at end of file +//#define NO_ACTION_FUNCTION diff --git a/keyboards/lily58/rev1/rev1.h b/keyboards/lily58/rev1/rev1.h index 4949bf5372..aa9f5727c2 100644 --- a/keyboards/lily58/rev1/rev1.h +++ b/keyboards/lily58/rev1/rev1.h @@ -2,7 +2,6 @@ #include "lily58.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef RGBLIGHT_ENABLE @@ -18,8 +17,6 @@ #endif #endif - -//void promicro_bootloader_jmp(bool program); #ifndef FLIP_HALF #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ @@ -62,4 +59,4 @@ { R30, R31, R32, R33, R34, R35 }, \ { KC_NO, R41, R42, R43, R44, R45 } \ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/lily58/rev1/rules.mk b/keyboards/lily58/rev1/rules.mk index 7fc101bf2b..6028b5a5b9 100644 --- a/keyboards/lily58/rev1/rules.mk +++ b/keyboards/lily58/rev1/rules.mk @@ -1,3 +1,3 @@ SRC += rev1/matrix.c SRC += rev1/split_util.c -SRC += rev1/split_scomm.c \ No newline at end of file +SRC += rev1/split_scomm.c diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index f2947c81cc..af25531ecd 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -1,55 +1,16 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -71,4 +32,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto + DEFAULT_FOLDER = lily58/rev1 diff --git a/keyboards/lily58/serial.c b/keyboards/lily58/serial.c index 325c29a3f7..f6293c3dc2 100755 --- a/keyboards/lily58/serial.c +++ b/keyboards/lily58/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/m0lly/rules.mk b/keyboards/m0lly/rules.mk index ae6cdcb535..21e3697dc6 100644 --- a/keyboards/m0lly/rules.mk +++ b/keyboards/m0lly/rules.mk @@ -1,54 +1,16 @@ - # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/m10a/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c index 2322396099..570cf91833 100644 --- a/keyboards/m10a/keymaps/default/keymap.c +++ b/keyboards/m10a/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/m10a/rules.mk b/keyboards/m10a/rules.mk index 0a00c7ccb3..739e396df3 100644 --- a/keyboards/m10a/rules.mk +++ b/keyboards/m10a/rules.mk @@ -1,50 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/atom47/keymaps/LEdiodes/keymap.c b/keyboards/maartenwut/atom47/keymaps/LEdiodes/keymap.c similarity index 100% rename from keyboards/atom47/keymaps/LEdiodes/keymap.c rename to keyboards/maartenwut/atom47/keymaps/LEdiodes/keymap.c diff --git a/keyboards/maartenwut/atom47/keymaps/LEdiodes/rules.mk b/keyboards/maartenwut/atom47/keymaps/LEdiodes/rules.mk new file mode 100644 index 0000000000..9334aaf28f --- /dev/null +++ b/keyboards/maartenwut/atom47/keymaps/LEdiodes/rules.mk @@ -0,0 +1,64 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/atom47/keymaps/default/keymap.c b/keyboards/maartenwut/atom47/keymaps/default/keymap.c similarity index 100% rename from keyboards/atom47/keymaps/default/keymap.c rename to keyboards/maartenwut/atom47/keymaps/default/keymap.c diff --git a/keyboards/atom47/keymaps/default/readme.md b/keyboards/maartenwut/atom47/keymaps/default/readme.md similarity index 100% rename from keyboards/atom47/keymaps/default/readme.md rename to keyboards/maartenwut/atom47/keymaps/default/readme.md diff --git a/keyboards/atom47/keymaps/maartenwut/keymap.c b/keyboards/maartenwut/atom47/keymaps/maartenwut/keymap.c similarity index 100% rename from keyboards/atom47/keymaps/maartenwut/keymap.c rename to keyboards/maartenwut/atom47/keymaps/maartenwut/keymap.c diff --git a/keyboards/atom47/keymaps/maartenwut/readme.md b/keyboards/maartenwut/atom47/keymaps/maartenwut/readme.md similarity index 100% rename from keyboards/atom47/keymaps/maartenwut/readme.md rename to keyboards/maartenwut/atom47/keymaps/maartenwut/readme.md diff --git a/keyboards/atom47/readme.md b/keyboards/maartenwut/atom47/readme.md similarity index 100% rename from keyboards/atom47/readme.md rename to keyboards/maartenwut/atom47/readme.md diff --git a/keyboards/atom47/rev2/config.h b/keyboards/maartenwut/atom47/rev2/config.h similarity index 100% rename from keyboards/atom47/rev2/config.h rename to keyboards/maartenwut/atom47/rev2/config.h diff --git a/keyboards/atom47/rev2/info.json b/keyboards/maartenwut/atom47/rev2/info.json similarity index 100% rename from keyboards/atom47/rev2/info.json rename to keyboards/maartenwut/atom47/rev2/info.json diff --git a/keyboards/atom47/rev2/readme.md b/keyboards/maartenwut/atom47/rev2/readme.md similarity index 100% rename from keyboards/atom47/rev2/readme.md rename to keyboards/maartenwut/atom47/rev2/readme.md diff --git a/keyboards/atom47/rev2/rev2.c b/keyboards/maartenwut/atom47/rev2/rev2.c similarity index 100% rename from keyboards/atom47/rev2/rev2.c rename to keyboards/maartenwut/atom47/rev2/rev2.c diff --git a/keyboards/atom47/rev2/rev2.h b/keyboards/maartenwut/atom47/rev2/rev2.h similarity index 100% rename from keyboards/atom47/rev2/rev2.h rename to keyboards/maartenwut/atom47/rev2/rev2.h diff --git a/keyboards/maartenwut/atom47/rev2/rules.mk b/keyboards/maartenwut/atom47/rev2/rules.mk new file mode 100644 index 0000000000..24d1c4199b --- /dev/null +++ b/keyboards/maartenwut/atom47/rev2/rules.mk @@ -0,0 +1,2 @@ +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/atom47/rev3/config.h b/keyboards/maartenwut/atom47/rev3/config.h similarity index 100% rename from keyboards/atom47/rev3/config.h rename to keyboards/maartenwut/atom47/rev3/config.h diff --git a/keyboards/atom47/rev3/info.json b/keyboards/maartenwut/atom47/rev3/info.json similarity index 100% rename from keyboards/atom47/rev3/info.json rename to keyboards/maartenwut/atom47/rev3/info.json diff --git a/keyboards/atom47/rev3/rev3.c b/keyboards/maartenwut/atom47/rev3/rev3.c similarity index 100% rename from keyboards/atom47/rev3/rev3.c rename to keyboards/maartenwut/atom47/rev3/rev3.c diff --git a/keyboards/atom47/rev3/rev3.h b/keyboards/maartenwut/atom47/rev3/rev3.h similarity index 100% rename from keyboards/atom47/rev3/rev3.h rename to keyboards/maartenwut/atom47/rev3/rev3.h diff --git a/keyboards/atom47/rev3/rules.mk b/keyboards/maartenwut/atom47/rev3/rules.mk similarity index 100% rename from keyboards/atom47/rev3/rules.mk rename to keyboards/maartenwut/atom47/rev3/rules.mk diff --git a/keyboards/maartenwut/atom47/rules.mk b/keyboards/maartenwut/atom47/rules.mk new file mode 100644 index 0000000000..0728c1a28c --- /dev/null +++ b/keyboards/maartenwut/atom47/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +DEFAULT_FOLDER = maartenwut/atom47/rev3 diff --git a/keyboards/maartenwut/plain60/config.h b/keyboards/maartenwut/plain60/config.h new file mode 100644 index 0000000000..d17481617f --- /dev/null +++ b/keyboards/maartenwut/plain60/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x0160 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Plain60 +#define DESCRIPTION A plain 60% PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B4,D7,D6,D4,E6} +#define MATRIX_COL_PINS {D2,D1,D0,D3,D5,B5,F0,B6,C6,C7,F1,F4,F5,F6,F7} + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define QMK_ESC_OUTPUT D2 // usually COL +#define QMK_ESC_INPUT B4 // usually ROW + +//VIA +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/plain60/info.json b/keyboards/maartenwut/plain60/info.json similarity index 100% rename from keyboards/plain60/info.json rename to keyboards/maartenwut/plain60/info.json diff --git a/keyboards/plain60/keymaps/RGB/config.h b/keyboards/maartenwut/plain60/keymaps/RGB/config.h similarity index 100% rename from keyboards/plain60/keymaps/RGB/config.h rename to keyboards/maartenwut/plain60/keymaps/RGB/config.h diff --git a/keyboards/plain60/keymaps/RGB/keymap.c b/keyboards/maartenwut/plain60/keymaps/RGB/keymap.c similarity index 100% rename from keyboards/plain60/keymaps/RGB/keymap.c rename to keyboards/maartenwut/plain60/keymaps/RGB/keymap.c diff --git a/keyboards/plain60/keymaps/RGB/rules.mk b/keyboards/maartenwut/plain60/keymaps/RGB/rules.mk similarity index 100% rename from keyboards/plain60/keymaps/RGB/rules.mk rename to keyboards/maartenwut/plain60/keymaps/RGB/rules.mk diff --git a/keyboards/plain60/keymaps/default/keymap.c b/keyboards/maartenwut/plain60/keymaps/default/keymap.c similarity index 100% rename from keyboards/plain60/keymaps/default/keymap.c rename to keyboards/maartenwut/plain60/keymaps/default/keymap.c diff --git a/keyboards/maartenwut/plain60/keymaps/via/keymap.c b/keyboards/maartenwut/plain60/keymaps/via/keymap.c new file mode 100644 index 0000000000..7e8cfff354 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/via/keymap.c @@ -0,0 +1,17 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _MA 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT( + 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_BSLS, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL) +}; diff --git a/keyboards/maartenwut/plain60/keymaps/via/rules.mk b/keyboards/maartenwut/plain60/keymaps/via/rules.mk new file mode 100644 index 0000000000..2b23b188b4 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA +SRC += keyboards/wilba_tech/wt_main.c + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/plain60/plain60.c b/keyboards/maartenwut/plain60/plain60.c similarity index 100% rename from keyboards/plain60/plain60.c rename to keyboards/maartenwut/plain60/plain60.c diff --git a/keyboards/plain60/plain60.h b/keyboards/maartenwut/plain60/plain60.h similarity index 85% rename from keyboards/plain60/plain60.h rename to keyboards/maartenwut/plain60/plain60.h index 4893e7ad79..2e3fc2cc31 100644 --- a/keyboards/plain60/plain60.h +++ b/keyboards/maartenwut/plain60/plain60.h @@ -61,10 +61,25 @@ {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, k1c, k1d, XXX}, \ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ - {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ {XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, XXX, XXX} \ } +#define LAYOUT_60_tsangan_hhkb( \ + 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, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k46, k4b, k4c, k4d \ +) \ +{ \ + {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, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, XXX} \ +} + #define LAYOUT_60_iso( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ diff --git a/keyboards/plain60/readme.md b/keyboards/maartenwut/plain60/readme.md similarity index 100% rename from keyboards/plain60/readme.md rename to keyboards/maartenwut/plain60/readme.md diff --git a/keyboards/maartenwut/plain60/rules.mk b/keyboards/maartenwut/plain60/rules.mk new file mode 100644 index 0000000000..77b5a3eb95 --- /dev/null +++ b/keyboards/maartenwut/plain60/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_tsangan_hhkb diff --git a/keyboards/ta65/config.h b/keyboards/maartenwut/ta65/config.h similarity index 100% rename from keyboards/ta65/config.h rename to keyboards/maartenwut/ta65/config.h diff --git a/keyboards/ta65/info.json b/keyboards/maartenwut/ta65/info.json similarity index 100% rename from keyboards/ta65/info.json rename to keyboards/maartenwut/ta65/info.json diff --git a/keyboards/ta65/keymaps/default/keymap.c b/keyboards/maartenwut/ta65/keymaps/default/keymap.c similarity index 100% rename from keyboards/ta65/keymaps/default/keymap.c rename to keyboards/maartenwut/ta65/keymaps/default/keymap.c diff --git a/keyboards/ta65/keymaps/default_ansi/keymap.c b/keyboards/maartenwut/ta65/keymaps/default_ansi/keymap.c similarity index 100% rename from keyboards/ta65/keymaps/default_ansi/keymap.c rename to keyboards/maartenwut/ta65/keymaps/default_ansi/keymap.c diff --git a/keyboards/ta65/keymaps/default_ansi_tsangan/keymap.c b/keyboards/maartenwut/ta65/keymaps/default_ansi_tsangan/keymap.c similarity index 100% rename from keyboards/ta65/keymaps/default_ansi_tsangan/keymap.c rename to keyboards/maartenwut/ta65/keymaps/default_ansi_tsangan/keymap.c diff --git a/keyboards/ta65/keymaps/default_iso/keymap.c b/keyboards/maartenwut/ta65/keymaps/default_iso/keymap.c similarity index 100% rename from keyboards/ta65/keymaps/default_iso/keymap.c rename to keyboards/maartenwut/ta65/keymaps/default_iso/keymap.c diff --git a/keyboards/ta65/keymaps/default_iso_tsangan/keymap.c b/keyboards/maartenwut/ta65/keymaps/default_iso_tsangan/keymap.c similarity index 100% rename from keyboards/ta65/keymaps/default_iso_tsangan/keymap.c rename to keyboards/maartenwut/ta65/keymaps/default_iso_tsangan/keymap.c diff --git a/keyboards/ta65/keymaps/maartenwut/config.h b/keyboards/maartenwut/ta65/keymaps/maartenwut/config.h similarity index 100% rename from keyboards/ta65/keymaps/maartenwut/config.h rename to keyboards/maartenwut/ta65/keymaps/maartenwut/config.h diff --git a/keyboards/ta65/keymaps/maartenwut/keymap.c b/keyboards/maartenwut/ta65/keymaps/maartenwut/keymap.c similarity index 100% rename from keyboards/ta65/keymaps/maartenwut/keymap.c rename to keyboards/maartenwut/ta65/keymaps/maartenwut/keymap.c diff --git a/keyboards/ta65/readme.md b/keyboards/maartenwut/ta65/readme.md similarity index 100% rename from keyboards/ta65/readme.md rename to keyboards/maartenwut/ta65/readme.md diff --git a/keyboards/maartenwut/ta65/rules.mk b/keyboards/maartenwut/ta65/rules.mk new file mode 100644 index 0000000000..ecc6296986 --- /dev/null +++ b/keyboards/maartenwut/ta65/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/ta65/ta65.c b/keyboards/maartenwut/ta65/ta65.c similarity index 100% rename from keyboards/ta65/ta65.c rename to keyboards/maartenwut/ta65/ta65.c diff --git a/keyboards/ta65/ta65.h b/keyboards/maartenwut/ta65/ta65.h similarity index 100% rename from keyboards/ta65/ta65.h rename to keyboards/maartenwut/ta65/ta65.h diff --git a/keyboards/wasdat/config.h b/keyboards/maartenwut/wasdat/config.h similarity index 100% rename from keyboards/wasdat/config.h rename to keyboards/maartenwut/wasdat/config.h diff --git a/keyboards/wasdat/info.json b/keyboards/maartenwut/wasdat/info.json similarity index 100% rename from keyboards/wasdat/info.json rename to keyboards/maartenwut/wasdat/info.json diff --git a/keyboards/maartenwut/wasdat/keymaps/default/keymap.c b/keyboards/maartenwut/wasdat/keymaps/default/keymap.c new file mode 100644 index 0000000000..715bbd3133 --- /dev/null +++ b/keyboards/maartenwut/wasdat/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │ │Del│End│PgD│ │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │               │ 4 │ 5 │ 6 │   │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐     ├───┼───┼───┼───┤ + * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_fullsize_ansi( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/wasdat/keymaps/default/readme.md b/keyboards/maartenwut/wasdat/keymaps/default/readme.md similarity index 100% rename from keyboards/wasdat/keymaps/default/readme.md rename to keyboards/maartenwut/wasdat/keymaps/default/readme.md diff --git a/keyboards/maartenwut/wasdat/keymaps/default_iso/keymap.c b/keyboards/maartenwut/wasdat/keymaps/default_iso/keymap.c new file mode 100644 index 0000000000..8bdad48312 --- /dev/null +++ b/keyboards/maartenwut/wasdat/keymaps/default_iso/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │ │Del│End│PgD│ │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │               │ 4 │ 5 │ 6 │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐     ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │AlGr│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_fullsize_iso( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + 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, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/wasdat/keymaps/default_iso/readme.md b/keyboards/maartenwut/wasdat/keymaps/default_iso/readme.md similarity index 100% rename from keyboards/wasdat/keymaps/default_iso/readme.md rename to keyboards/maartenwut/wasdat/keymaps/default_iso/readme.md diff --git a/keyboards/maartenwut/wasdat/keymaps/konstantin/config.h b/keyboards/maartenwut/wasdat/keymaps/konstantin/config.h new file mode 100644 index 0000000000..3c2583e2d4 --- /dev/null +++ b/keyboards/maartenwut/wasdat/keymaps/konstantin/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define LAYER_FN +#define LAYER_NUMPAD diff --git a/keyboards/maartenwut/wasdat/keymaps/konstantin/keymap.c b/keyboards/maartenwut/wasdat/keymaps/konstantin/keymap.c new file mode 100644 index 0000000000..481c5fd1fa --- /dev/null +++ b/keyboards/maartenwut/wasdat/keymaps/konstantin/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12││PSc│SLk│Pau│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace ││Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ ││Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent │└───┴───┴───┘ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ \ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ + * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RShift │ │ ↑ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ + * │LCtl│LGui│LAlt│ Space │RAlt│RGui│FnFL│RCtl││ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [L_BASE] = LAYOUT_tkl_iso( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, FN_FNLK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Fn layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │Num│Mut│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Clear ││Ply│Stp│Vo+│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │ │ │ │ │ ││Prv│Nxt│Vo-│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │└───┴───┴───┘ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ + * │ │ │MA0│MA2│MW←│MW→│ │ │App│ │ │ │ │ │PgU│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ + * │ │DtPR│DtNA│ MW↓ │ │ │ │ ││Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [L_FN] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NUMPAD, 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, CLEAR, KC_MPLY, KC_MSTP, KC_VOLU, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, _______, _______, _______, _______, KC_PGUP, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + /* Numpad layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │Num│ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │ ││ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ ││ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐PEnt│└───┴───┴───┘ + * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ + * │ │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ + * │ │ │ │ │ │ │ │ ││ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [L_NUMPAD] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk b/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk new file mode 100644 index 0000000000..041d321145 --- /dev/null +++ b/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk @@ -0,0 +1,10 @@ +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +SPACE_CADET_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes diff --git a/keyboards/wasdat/matrix.c b/keyboards/maartenwut/wasdat/matrix.c similarity index 100% rename from keyboards/wasdat/matrix.c rename to keyboards/maartenwut/wasdat/matrix.c diff --git a/keyboards/wasdat/readme.md b/keyboards/maartenwut/wasdat/readme.md similarity index 100% rename from keyboards/wasdat/readme.md rename to keyboards/maartenwut/wasdat/readme.md diff --git a/keyboards/maartenwut/wasdat/rules.mk b/keyboards/maartenwut/wasdat/rules.mk new file mode 100644 index 0000000000..059e84a1a5 --- /dev/null +++ b/keyboards/maartenwut/wasdat/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +CUSTOM_MATRIX = yes +SRC += matrix.c +LAYOUTS = fullsize_ansi fullsize_iso tkl_ansi tkl_iso diff --git a/keyboards/maartenwut/wasdat/wasdat.c b/keyboards/maartenwut/wasdat/wasdat.c new file mode 100644 index 0000000000..a2ec320f78 --- /dev/null +++ b/keyboards/maartenwut/wasdat/wasdat.c @@ -0,0 +1,47 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include "wasdat.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B0); + writePinHigh(B0); + setPinOutput(B1); + writePinHigh(B1); + setPinOutput(B2); + writePinHigh(B2); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, !led_state.caps_lock); + writePin(B1, !led_state.scroll_lock); + writePin(B2, !led_state.num_lock); + } + + return true; +} diff --git a/keyboards/wasdat/wasdat.h b/keyboards/maartenwut/wasdat/wasdat.h similarity index 100% rename from keyboards/wasdat/wasdat.h rename to keyboards/maartenwut/wasdat/wasdat.h diff --git a/keyboards/maartenwut/wonderland/config.h b/keyboards/maartenwut/wonderland/config.h new file mode 100755 index 0000000000..4da601257a --- /dev/null +++ b/keyboards/maartenwut/wonderland/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xA71C +#define DEVICE_VER 0x0003 +#define MANUFACTURER Maartenwut +#define PRODUCT Wonderland +#define DESCRIPTION "QMK Firmware for the Wonderland" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B0,D1,D2,D3,D5} +#define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,E6,C7,C6,B6,B5,B4,D7,D6,D4} +#define UNUSED_PINS + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Backlight configuration + */ +#define RGB_DI_PIN B7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 + +#define QMK_ESC_OUTPUT F0 // usually COL +#define QMK_ESC_INPUT B0 // usually ROW +#define QMK_LED B1 diff --git a/keyboards/maartenwut/wonderland/info.json b/keyboards/maartenwut/wonderland/info.json new file mode 100644 index 0000000000..d4f7196d86 --- /dev/null +++ b/keyboards/maartenwut/wonderland/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "Maartenwut Wonderland", + "url": "", + "maintainer": "Maartenwut", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 66, + "layout": [ + {"label":"k10", "x":0, "y":0}, + {"label":"k00", "x":1.25, "y":0}, + {"label":"k01", "x":2.25, "y":0}, + {"label":"k02", "x":3.25, "y":0}, + {"label":"k03", "x":4.25, "y":0}, + {"label":"k04", "x":5.25, "y":0}, + {"label":"k05", "x":6.25, "y":0}, + {"label":"k06", "x":7.25, "y":0}, + {"label":"k07", "x":10.25, "y":0}, + {"label":"k08", "x":11.25, "y":0}, + {"label":"k09", "x":12.25, "y":0}, + {"label":"k0a", "x":13.25, "y":0}, + {"label":"k0b", "x":14.25, "y":0}, + {"label":"k0c", "x":15.25, "y":0}, + {"label":"k0d", "x":16.25, "y":0}, + {"label":"k0e", "x":17.25, "y":0}, + {"label":"k20", "x":0, "y":1}, + {"label":"k11", "x":1.25, "y":1, "w":1.5}, + {"label":"k12", "x":2.75, "y":1}, + {"label":"k13", "x":3.75, "y":1}, + {"label":"k14", "x":4.75, "y":1}, + {"label":"k15", "x":5.75, "y":1}, + {"label":"k16", "x":6.75, "y":1}, + {"label":"k17", "x":9.75, "y":1}, + {"label":"k18", "x":10.75, "y":1}, + {"label":"k19", "x":11.75, "y":1}, + {"label":"k1a", "x":12.75, "y":1}, + {"label":"k1b", "x":13.75, "y":1}, + {"label":"k1c", "x":14.75, "y":1}, + {"label":"k1d", "x":15.75, "y":1}, + {"label":"k1e", "x":16.75, "y":1, "w":1.5}, + {"label":"k30", "x":0, "y":2}, + {"label":"k21", "x":1.25, "y":2, "w":1.75}, + {"label":"k22", "x":3, "y":2}, + {"label":"k23", "x":4, "y":2}, + {"label":"k24", "x":5, "y":2}, + {"label":"k25", "x":6, "y":2}, + {"label":"k26", "x":7, "y":2}, + {"label":"k27", "x":10, "y":2}, + {"label":"k28", "x":11, "y":2}, + {"label":"k29", "x":12, "y":2}, + {"label":"k2a", "x":13, "y":2}, + {"label":"k2b", "x":14, "y":2}, + {"label":"k2c", "x":15, "y":2}, + {"label":"k2e", "x":16, "y":2, "w":2.25}, + {"label":"k31", "x":1.25, "y":3, "w":2.25}, + {"label":"k32", "x":3.5, "y":3}, + {"label":"k33", "x":4.5, "y":3}, + {"label":"k34", "x":5.5, "y":3}, + {"label":"k35", "x":6.5, "y":3}, + {"label":"k36", "x":7.5, "y":3}, + {"label":"k37", "x":9.5, "y":3}, + {"label":"k38", "x":10.5, "y":3}, + {"label":"k39", "x":11.5, "y":3}, + {"label":"k3a", "x":12.5, "y":3}, + {"label":"k3b", "x":13.5, "y":3}, + {"label":"k3c", "x":14.5, "y":3}, + {"label":"k3d", "x":15.5, "y":3, "w":1.75}, + {"label":"k3e", "x":17.25, "y":3}, + {"label":"k41", "x":1.25, "y":4, "w":1.5}, + {"label":"k43", "x":4.25, "y":4, "w":1.5}, + {"label":"k45", "x":5.75, "y":4, "w":2}, + {"label":"k46", "x":7.75, "y":4, "w":1.25}, + {"label":"k48", "x":9.5, "y":4, "w":2.75}, + {"label":"k4a", "x":12.25, "y":4, "w":1.5}, + {"label":"k4e", "x":16.75, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/maartenwut/wonderland/keymaps/default/keymap.c b/keyboards/maartenwut/wonderland/keymaps/default/keymap.c new file mode 100755 index 0000000000..ccb022f684 --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _FUNC +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, \ + KC_PGUP, 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_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LCTL, KC_LAPO, KC_BSPC, KC_LGUI, KC_SPC, KC_RAPC, KC_RCTRL \ + ), +[_FUNC] = LAYOUT( + RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ +RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ + KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, \ + _______, KC_LALT, _______, _______, _______, KC_RALT, _______ \ + ) +}; diff --git a/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c b/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c new file mode 100755 index 0000000000..ceb9856061 --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, \ + KC_F10, 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_F11, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LCTL, KC_LAPO, KC_LGUI, RGUI(KC_SPC), KC_SPC, KC_RAPC, KC_RCTRL \ + ), +[_FUNC] = LAYOUT( + RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ +RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ + KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, \ + _______, KC_LALT, _______, _______, _______, KC_RALT, _______ \ + ) +}; diff --git a/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c b/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c new file mode 100755 index 0000000000..7669df535e --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, + KC_PGUP, 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_DEL, + KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_NUBS, KC_LALT, KC_SPC, KC_NUHS, KC_RCTRL + ), +[_FUNC] = LAYOUT( + RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, + _______, KC_LALT, _______, _______, _______, KC_RALT, _______ + ) +}; diff --git a/keyboards/maartenwut/wonderland/readme.md b/keyboards/maartenwut/wonderland/readme.md new file mode 100644 index 0000000000..36b3022caa --- /dev/null +++ b/keyboards/maartenwut/wonderland/readme.md @@ -0,0 +1,14 @@ +Wonderland USB-c and USB-mini +====== + +Only the USB-mini part is compatible with the original Alice case. The USB-c version was created for the Lubrigante, a case designed by Zambumon and a GB run by homerowco. + +Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut)
+Hardware Supported: Wonderland-C and Wonderland-Mini
+Hardware Availability: https://maartenwut.com/product/wonderland-mini-usb-only/
+ +Make example for this keyboard (after setting up your build environment): + + make maartenwut/wonderland: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). diff --git a/keyboards/maartenwut/wonderland/rules.mk b/keyboards/maartenwut/wonderland/rules.mk new file mode 100755 index 0000000000..19c0ea5919 --- /dev/null +++ b/keyboards/maartenwut/wonderland/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUTO_SHIFT_ENABLE = no +VELOCIKEY_ENABLE = yes diff --git a/keyboards/maartenwut/wonderland/wonderland.c b/keyboards/maartenwut/wonderland/wonderland.c new file mode 100755 index 0000000000..9f3233e0f1 --- /dev/null +++ b/keyboards/maartenwut/wonderland/wonderland.c @@ -0,0 +1,42 @@ +#include "wonderland.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + setPinOutput(B1); + setPinOutput(B2); + setPinOutput(B3); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(B1); + } else { + writePinHigh(B1); + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + led_set_user(usb_led); +} diff --git a/keyboards/maartenwut/wonderland/wonderland.h b/keyboards/maartenwut/wonderland/wonderland.h new file mode 100755 index 0000000000..075e3f64b4 --- /dev/null +++ b/keyboards/maartenwut/wonderland/wonderland.h @@ -0,0 +1,22 @@ +#pragma once +#include "quantum.h" + +// readability +#define XXX KC_NO +#define LAYOUT( \ + k10, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k20, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k30, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k41, k43, k45, k46, k48, k4a, 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, k1c, k1d, k1e}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, XXX, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {XXX, k41, XXX, k43, XXX, k45, k46, XXX, k48, XXX, k4a, XXX, XXX, XXX, k4e} \ +} + +void matrix_init_user(void); +void matrix_scan_user(void); diff --git a/keyboards/massdrop/alt/alt.h b/keyboards/massdrop/alt/alt.h index 8dfed8d2d6..f1adcd67c7 100644 --- a/keyboards/massdrop/alt/alt.h +++ b/keyboards/massdrop/alt/alt.h @@ -9,7 +9,7 @@ #include "usb/udi_cdc.h" #include "usb/usb2422.h" -#define LAYOUT( \ +#define LAYOUT_65_ansi_blocker( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, \ K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, \ @@ -32,3 +32,5 @@ dprintf(name " enabled\r\n"); \ } \ } + +#define LAYOUT LAYOUT_65_ansi_blocker // Ensure that user made existing keymaps do not break. diff --git a/keyboards/massdrop/alt/info.json b/keyboards/massdrop/alt/info.json index 8f85bece21..965b232fcd 100644 --- a/keyboards/massdrop/alt/info.json +++ b/keyboards/massdrop/alt/info.json @@ -5,7 +5,7 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_65_ansi_blocker": { "layout": [ {"label":"ESCAPE", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, diff --git a/keyboards/massdrop/alt/keymaps/bonta/keymap.c b/keyboards/massdrop/alt/keymaps/bonta/keymap.c new file mode 100644 index 0000000000..c1acf2c151 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/bonta/keymap.c @@ -0,0 +1,114 @@ +#include QMK_KEYBOARD_H + +enum alt_keycodes { + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode +#define RGB_BRU RGB_VAI +#define RGB_BRD RGB_VAD + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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_HOME, \ + 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_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( + 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_F13, KC_MUTE, \ + _______, RGB_SPD, RGB_BRU, RGB_SPI, _______, _______, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + _______, RGB_RMOD,RGB_BRD, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_VOLU, KC_VOLD, \ + _______, _______, _______, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ + ) +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + } + break; + } + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index f6f79ad91e..f1e9400331 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -15,14 +15,14 @@ enum alt_keycodes { keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( + [0] = LAYOUT_65_ansi_blocker( 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_HOME, \ 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_PGUP, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ ), - [1] = LAYOUT( + [1] = LAYOUT_65_ansi_blocker( 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_MUTE, \ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ diff --git a/keyboards/massdrop/alt/keymaps/favorable-mutation/README.md b/keyboards/massdrop/alt/keymaps/favorable-mutation/README.md new file mode 100644 index 0000000000..9b0ad513b4 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/favorable-mutation/README.md @@ -0,0 +1,14 @@ +### Massdrop Alt Layout + +This layout is for the [Massdrop Alt +Keyboard](https://drop.com/buy/massdrop-alt-mechanical-keyboard) +and targets MacOS machines. + +Some features: + +* Tap space for space, hold for cmd +* Tap caps lock for esc, hold for ctrl +* Dedicated key for entering default mode of [yabai window +manager](https://github.com/koekeishiya/yabai) +* Who needs arrow keys, anyways??? +* Method for clearing all stuck-down mods diff --git a/keyboards/massdrop/alt/keymaps/favorable-mutation/config.h b/keyboards/massdrop/alt/keymaps/favorable-mutation/config.h new file mode 100644 index 0000000000..1893f2ba6e --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/favorable-mutation/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2019 Griffin Rademacher + +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 . +*/ + +#pragma once + +// toggle one-shot layer keys after this many presses +#define ONESHOT_TAP_TOGGLE 3 + +// set time held before Mod-Tap key sends mod code +#define TAPPING_TERM 1000 + +// permissive hold: if holding down a Mod-Tap key while pressing another, it +// acts as a mod, even within the tapping term +#define PERMISSIVE_HOLD diff --git a/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c b/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c new file mode 100644 index 0000000000..873d18449b --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c @@ -0,0 +1,147 @@ +#include QMK_KEYBOARD_H + +enum alt_keycodes { + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout + HK_COSL, //Clear held-down keys +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode +#define CTL_ESC LCTL_T(KC_ESC) +#define TP_LSFT OSM(MOD_LSFT) +#define TP_RSFT OSM(MOD_RSFT) +#define TP_LALT OSM(MOD_LALT) +#define TP_RALT OSM(MOD_RALT) +#define KC_YBAI LCTL(KC_SPC) +#define GUI_SPC LGUI_T(KC_SPC) +#define KC_SPOT LGUI(KC_SPC) + +//TODO default layer vim-like binds that work with WM, i to type??? this leads +//to layers of vim modes - what's the best way to deal with that? +//also need to deal with shift not working for other mods, add to shift layer +//most likely +// +//TODO tap/toggle for layers + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_SPOT, + 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_HOME, + CTL_ESC, 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_MUTE, + TP_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_VOLU, KC_MPLY, + TP_LALT, TG(2), KC_YBAI, GUI_SPC, TP_RALT, TG(1), KC_MRWD, KC_VOLD, KC_MFFD + ), + [1] = LAYOUT( + KC_ESC, 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_DEL, + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_HOME, + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, KC_MRWD, KC_MFFD, _______, _______, _______, _______, KC_PGUP, + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_UP, KC_PGDN, + _______, _______, _______, HK_COSL, _______, TG(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) +#define MODS_CTRL (get_mods() & MOD_MASK_CTRL) +#define MODS_ALT (get_mods() & MOD_MASK_ALT) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case HK_COSL: + clear_keyboard(); + reset_oneshot_layer(); + return true; + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} diff --git a/keyboards/massdrop/alt/keymaps/xulkal/config.h b/keyboards/massdrop/alt/keymaps/xulkal/config.h new file mode 100644 index 0000000000..a078fece0f --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/xulkal/config.h @@ -0,0 +1,23 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#define RGB_MATRIX_TOG_LAYERS diff --git a/keyboards/massdrop/alt/keymaps/xulkal/keymap.c b/keyboards/massdrop/alt/keymaps/xulkal/keymap.c new file mode 100644 index 0000000000..9fe1c8643a --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/xulkal/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H +#include "xulkal.h" + +enum ctrl_keycodes { + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, TD_BSPC, KC_HOME, \ + 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_END, \ + 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_PGUP, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN, \ + KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LOWER, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + +#ifndef GAMELAYER_DISABLE + [_GAME] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, \ + 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_END, \ + 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_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LOWER, KC_LEFT, KC_DOWN, KC_RGHT \ + ), +#endif + + [_LOWER] = LAYOUT( + _______, RGB_RMOD,RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RESET, QWERTY, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, _______, \ + RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGBRST, GAME, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + return false; + case DBG_TOG: + if (record->event.pressed) + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + return false; + case DBG_MTRX: + if (record->event.pressed) + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + return false; + case DBG_KBD: + if (record->event.pressed) + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + return false; + case DBG_MOU: + if (record->event.pressed) + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + return false; + } + + return true; +} diff --git a/keyboards/massdrop/alt/keymaps/xulkal/rules.mk b/keyboards/massdrop/alt/keymaps/xulkal/rules.mk new file mode 100644 index 0000000000..f78fb3237b --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/xulkal/rules.mk @@ -0,0 +1 @@ +DISABLE_LTO = yes diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk index aa45c68056..3da2610f68 100644 --- a/keyboards/massdrop/alt/rules.mk +++ b/keyboards/massdrop/alt/rules.mk @@ -34,3 +34,5 @@ AUTO_SHIFT_ENABLE = no # Auto Shift # Custom RGB matrix handling RGB_MATRIX_ENABLE = custom + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index 53c96d95d0..39122ee49c 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c @@ -102,11 +102,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (rgb_matrix_get_flags()) { case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); rgb_matrix_set_color_all(0, 0, 0); } break; - case LED_FLAG_KEYLIGHT: { + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); rgb_matrix_set_color_all(0, 0, 0); } diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c index 79fe7388af..e5b194a343 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c @@ -102,11 +102,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (rgb_matrix_get_flags()) { case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); rgb_matrix_set_color_all(0, 0, 0); } break; - case LED_FLAG_KEYLIGHT: { + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); rgb_matrix_set_color_all(0, 0, 0); } diff --git a/keyboards/massdrop/ctrl/keymaps/xulkal/config.h b/keyboards/massdrop/ctrl/keymaps/xulkal/config.h new file mode 100644 index 0000000000..a078fece0f --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/xulkal/config.h @@ -0,0 +1,23 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#define RGB_MATRIX_TOG_LAYERS diff --git a/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c index 8b45b53ecb..debfa3b478 100644 --- a/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c @@ -8,7 +8,6 @@ enum ctrl_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints DBG_KBD, //DEBUG Toggle Keyboard Prints DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -21,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, TD_BSPC, KC_INS, KC_HOME, KC_PGUP, \ 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, TD_DEL, KC_END, KC_PGDN, \ 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, TD_DOT, KC_SLSH, KC_RSPC, KC_UP, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \ KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LOWER, KC_APP, KC_RCPC, KC_LEFT, KC_DOWN, KC_RGHT \ ), @@ -39,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, RGB_RMOD,RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, MD_BOOT, QWERTY, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RESET, QWERTY, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGBRST, GAME, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ @@ -62,8 +61,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - static uint16_t reset_timer; - switch (keycode) { case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) @@ -89,12 +86,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); return false; - case MD_BOOT: - if (record->event.pressed) - reset_timer = timer_read() + 500; - else if (timer_expired(reset_timer)) - reset_keyboard(); - return false; } return true; diff --git a/keyboards/maxipad/promicro/rules.mk b/keyboards/maxipad/promicro/rules.mk index dc6f196237..e6fef51727 100644 --- a/keyboards/maxipad/promicro/rules.mk +++ b/keyboards/maxipad/promicro/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/maxipad/teensy2/rules.mk b/keyboards/maxipad/teensy2/rules.mk index 3fb7c7e5a7..ae398e2588 100644 --- a/keyboards/maxipad/teensy2/rules.mk +++ b/keyboards/maxipad/teensy2/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/maxr1998/phoebe/config.h b/keyboards/maxr1998/phoebe/config.h new file mode 100644 index 0000000000..2e912b0965 --- /dev/null +++ b/keyboards/maxr1998/phoebe/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maxr1998 +#define PRODUCT Phoebe +#define DESCRIPTION A 5x12 ortolinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { B7, B3, B2, B1, D6 } +#define MATRIX_COL_PINS { D7, B4, B5, B6, C6, C7, B0, F1, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* RGB LED Setup */ +#define RGB_DI_PIN F0 // pin the DI on the WS2812B is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 8 // number of LEDs + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/maxr1998/phoebe/info.json b/keyboards/maxr1998/phoebe/info.json new file mode 100644 index 0000000000..f5d81cc6f5 --- /dev/null +++ b/keyboards/maxr1998/phoebe/info.json @@ -0,0 +1,73 @@ +{ + "keyboard_name": "Phoebe", + "keyboard_folder": "maxr1998/phoebe", + "url": "https://github.com/Maxr1998/Phoebe_Keyboard", + "maintainer": "Maxr1998", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 59, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 }, + { "w": 1, "x": 0, "y": 4 }, + { "w": 1, "x": 1, "y": 4 }, + { "w": 1, "x": 2, "y": 4 }, + { "w": 1, "x": 3, "y": 4 }, + { "w": 1, "x": 4, "y": 4 }, + { "w": 2, "x": 5, "y": 4 }, + { "w": 1, "x": 7, "y": 4 }, + { "w": 1, "x": 8, "y": 4 }, + { "w": 1, "x": 9, "y": 4 }, + { "w": 1, "x": 10, "y": 4 }, + { "w": 1, "x": 11, "y": 4 } ] + } + } +} diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c new file mode 100644 index 0000000000..1bf6f291dc --- /dev/null +++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c @@ -0,0 +1,102 @@ +#include QMK_KEYBOARD_H + +#include "keymap_german.h" + +enum layers { + _QWERTZ, + _SC, + _FN, + _GAMING +}; + +#define KC_SC MO(_SC) +#define KC_FN MO(_FN) +#define G_1 TO(_GAMING) +#define G_0 TG(_GAMING) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwertz + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Grv | Q | W | E | R | T | Z | U | I | O | P | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | +* ~ | ? | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Sup | Alt | Alt | SpCh | Space | AltGr| Fun | Left | Down | Right| + * `-----------------------------------------------------------------------------------' + */ +[_QWERTZ] = LAYOUT( + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, KC_BSPC, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, DE_QST, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, KC_SC, KC_SPC, KC_ALGR, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Special characters + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | #' | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | <> | | | | | | | | | | -_ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ---- | ---- | | | ---- | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SC] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______, + _______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______, + _______, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______ +), + +/* Function layer + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Ü | | Ö | F11 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Lock | Ä | ß | | | GAME | | RGBS | RGBB | RGBS | F12 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ---- | ---- | | ---- | ---- | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, KC_F11, _______, + KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______, + XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END +), + +/* Gaming + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Space| | | | | | | Leave| | | | + * `-----------------------------------------------------------------------------------' + */ +[_GAMING] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_SPC, XXXXXXX, _______, _______, _______, _______, _______, G_0, _______, _______, _______ +) +}; diff --git a/keyboards/maxr1998/phoebe/phoebe.c b/keyboards/maxr1998/phoebe/phoebe.c new file mode 100644 index 0000000000..d8629f7f55 --- /dev/null +++ b/keyboards/maxr1998/phoebe/phoebe.c @@ -0,0 +1 @@ +#include "phoebe.h" diff --git a/keyboards/maxr1998/phoebe/phoebe.h b/keyboards/maxr1998/phoebe/phoebe.h new file mode 100644 index 0000000000..2bf5a2d799 --- /dev/null +++ b/keyboards/maxr1998/phoebe/phoebe.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b } \ +} diff --git a/keyboards/maxr1998/phoebe/readme.md b/keyboards/maxr1998/phoebe/readme.md new file mode 100644 index 0000000000..72238e5db8 --- /dev/null +++ b/keyboards/maxr1998/phoebe/readme.md @@ -0,0 +1,13 @@ +# Phoebe +A 5x12 ortolinear keyboard, developed by Maxr1998, [fully open-source](https://github.com/Maxr1998/Phoebe_Keyboard). + +![Image](https://i.imgur.com/zEZxqZC.jpg) + +Keyboard Maintainer: [Maxr1998](https://github.com/Maxr1998) +Hardware Availability: DIY from the [open-source design files](https://github.com/Maxr1998/Phoebe), potential official distribution in the future + +Make example for this keyboard (after setting up your build environment): + + make maxr1998/phoebe: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). diff --git a/keyboards/maxr1998/phoebe/rules.mk b/keyboards/maxr1998/phoebe/rules.mk new file mode 100644 index 0000000000..b73145d7ff --- /dev/null +++ b/keyboards/maxr1998/phoebe/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +COMBO_ENABLE = no # Key combo feature +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +KEY_LOCK_ENABLE = yes +API_SYSEX_ENABLE = no +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/maxr1998/pulse4k/config.h b/keyboards/maxr1998/pulse4k/config.h index cb4eab6995..d1bfaf3006 100644 --- a/keyboards/maxr1998/pulse4k/config.h +++ b/keyboards/maxr1998/pulse4k/config.h @@ -43,7 +43,6 @@ along with this program. If not, see . #define DEBOUNCE 5 /* Rotary encoders */ -#define NUMBER_OF_ENCODERS 2 #define ENCODERS_PAD_A { D2, F6 } #define ENCODERS_PAD_B { D3, F5 } #define ENCODER_RESOLUTION 4 diff --git a/keyboards/maxr1998/pulse4k/readme.md b/keyboards/maxr1998/pulse4k/readme.md index 3a552188df..197e024cf1 100644 --- a/keyboards/maxr1998/pulse4k/readme.md +++ b/keyboards/maxr1998/pulse4k/readme.md @@ -1,6 +1,8 @@ # Pulse 4k A four-key macropad with two rotary encoders, developed by Maxr1998, [fully open-source](https://github.com/Maxr1998/Pulse_4k). +

+ Keyboard Maintainer: [Maxr1998](https://github.com/Maxr1998) Hardware Availability: DIY from the [open-source design files](https://github.com/Maxr1998/Pulse_4k), potential official distribution in the future diff --git a/keyboards/maxr1998/pulse4k/rules.mk b/keyboards/maxr1998/pulse4k/rules.mk index 6446662215..cee105352f 100644 --- a/keyboards/maxr1998/pulse4k/rules.mk +++ b/keyboards/maxr1998/pulse4k/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -30,4 +31,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/mechkeys/mk60/rules.mk b/keyboards/mechkeys/mk60/rules.mk index e5a48d853f..4f8bd49eff 100644 --- a/keyboards/mechkeys/mk60/rules.mk +++ b/keyboards/mechkeys/mk60/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -78,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/mechllama/g35/rules.mk b/keyboards/mechllama/g35/rules.mk index 1e1487513a..20fbf160af 100644 --- a/keyboards/mechllama/g35/rules.mk +++ b/keyboards/mechllama/g35/rules.mk @@ -1,10 +1,14 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu NKRO_ENABLE = yes diff --git a/keyboards/mechlovin/hannah910/config.h b/keyboards/mechlovin/hannah910/config.h new file mode 100644 index 0000000000..1ff7dfd0b2 --- /dev/null +++ b/keyboards/mechlovin/hannah910/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Mechlovin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mechlovin +#define PRODUCT Hannah910 +#define DESCRIPTION A replace PCB for TGR910 keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B5, B6, D3, C6, C7 } +#define MATRIX_COL_PINS { E6, B1, B3, F0, F1, F4, F5, F6, F7, D5, D4, B4, D6, D7, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +#define RGBLED_NUM 9 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +#define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c new file mode 100644 index 0000000000..2c696ab564 --- /dev/null +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ +#include "hannah910.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +}; +void led_init_ports(void) { + setPinOutput(B2); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D2); + +} +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B2); + } else { + writePinLow(B2); + } + led_set_user(usb_led); +} + +uint32_t layer_state_set_user(uint32_t state) +{ + // if on layer 1, turn on D2 LED, otherwise off. + if (biton32(state) == 1) { + writePinHigh(D2); + } else { + writePinLow(D2); + } + // if on layer 2, turn on D1 LED, otherwise off. + if (biton32(state) == 2) { + writePinHigh(D1); + } else { + writePinLow(D1); + } + + // if on layer 3, turn on D0 LED, otherwise off. + if (biton32(state) == 3) { + writePinHigh(D0); + } else { + writePinLow(D0); + } + + return state; +} diff --git a/keyboards/mechlovin/hannah910/hannah910.h b/keyboards/mechlovin/hannah910/hannah910.h new file mode 100644 index 0000000000..554116721c --- /dev/null +++ b/keyboards/mechlovin/hannah910/hannah910.h @@ -0,0 +1,70 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ + k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ + { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, k64, KC_NO, k65, KC_NO, k66, KC_NO, k67, k68, k69, k70, k71 }, \ +} +#define LAYOUT_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ + k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k65, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, KC_NO, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ + { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, KC_NO, k67, k68, k69, k70, k71 }, \ +} + +#define LAYOUT_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k43, k45, \ + k46, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k65, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, KC_NO }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, KC_NO, k43, k45 }, \ + { k46, KC_NO, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, KC_NO, k67, k68, k69, k70, k71 }, \ +} diff --git a/keyboards/mechlovin/hannah910/info.json b/keyboards/mechlovin/hannah910/info.json new file mode 100644 index 0000000000..7bc6c74414 --- /dev/null +++ b/keyboards/mechlovin/hannah910/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Hannah910", + "url": "", + "maintainer": "Mechlovin'", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "key_count": 71, + "layout": [{"label":"~", "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":"Back", "x":13, "y":0}, {"label":"Delete", "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"INS", "x":15, "y":1}, {"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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"HOME", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"Shift", "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":"Up", "x":14, "y":3}, {"label":"END", "x":15, "y":3}, {"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":2.75}, {"label":"Space", "x":6.5, "y":4, "w":1.25}, {"label":"Space", "x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_iso": { + "key_count": 68, + "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"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":"INS", "x":15, "y":1}, {"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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"HOME", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"Shift", "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":"Up", "x":14, "y":3}, {"label":"END", "x":15, "y":3}, {"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":"6.25U", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_ansi": { + "key_count": 66, + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"INS", "x":15, "y":1}, {"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":"HOME", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"Up", "x":14, "y":3}, {"label":"END", "x":15, "y":3}, {"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":"6.25U", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/config.h b/keyboards/mechlovin/hannah910/keymaps/ansi/config.h new file mode 100644 index 0000000000..3d1156ac06 --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/ansi/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c b/keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c new file mode 100644 index 0000000000..97dd7a5f02 --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( /* Base */ + 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_INS, + LT(1,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_HOME, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ansi( /* Base */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md b/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md new file mode 100644 index 0000000000..b0dfa055c6 --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md @@ -0,0 +1 @@ +# The ansi keymap for hannah910 diff --git a/keyboards/mechlovin/hannah910/keymaps/default/config.h b/keyboards/mechlovin/hannah910/keymaps/default/config.h new file mode 100644 index 0000000000..3d1156ac06 --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/mechlovin/hannah910/keymaps/default/keymap.c b/keyboards/mechlovin/hannah910/keymaps/default/keymap.c new file mode 100644 index 0000000000..48499a111a --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + 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_INS, + LT(1,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_NUBS, KC_ENT, KC_HOME, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( /* Base */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/keymaps/default/readme.md b/keyboards/mechlovin/hannah910/keymaps/default/readme.md new file mode 100644 index 0000000000..6abbe27c4b --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hannah910 diff --git a/keyboards/mechlovin/hannah910/readme.md b/keyboards/mechlovin/hannah910/readme.md new file mode 100644 index 0000000000..6cc6b226f1 --- /dev/null +++ b/keyboards/mechlovin/hannah910/readme.md @@ -0,0 +1,15 @@ +# hannah910 + +![hannah910](https://i.imgur.com/n8WN5Z7.jpg) + +Replacement PCB and plate for TGR 910 keyboard + +Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) +Hardware Supported: TGR910 CE, TGR910 SE +Hardware Availability: [Reddit Group Buy](https://www.reddit.com/r/mechmarket/comments/dhwvbn/gb_1015_update_hannah_910_group_buy_tgr_910/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah910: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). diff --git a/keyboards/mechlovin/hannah910/rules.mk b/keyboards/mechlovin/hannah910/rules.mk new file mode 100644 index 0000000000..5e17282eb0 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file diff --git a/keyboards/mechmini/v1/i2c.c b/keyboards/mechmini/v1/i2c.c deleted file mode 100644 index c27f3e3d17..0000000000 --- a/keyboards/mechmini/v1/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< -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 . -*/ - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/mechmini/v1/rules.mk b/keyboards/mechmini/v1/rules.mk index 11bd8955f3..ee023b43ba 100644 --- a/keyboards/mechmini/v1/rules.mk +++ b/keyboards/mechmini/v1/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # build options @@ -38,13 +19,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c diff --git a/keyboards/mechmini/v1/usbconfig.h b/keyboards/mechmini/v1/usbconfig.h index d2d848fcdc..85a915bb46 100644 --- a/keyboards/mechmini/v1/usbconfig.h +++ b/keyboards/mechmini/v1/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/mechmini/v1/v1.c b/keyboards/mechmini/v1/v1.c index 508d60c784..2c910d9658 100644 --- a/keyboards/mechmini/v1/v1.c +++ b/keyboards/mechmini/v1/v1.c @@ -16,61 +16,13 @@ along with this program. If not, see . */ #include "v1.h" -#include -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" -#include "rgblight.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_init_kb(void) { matrix_init_user(); } -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; +__attribute__ ((weak)) +void matrix_init_user(void) {} -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/mehkee96/mehkee96.c b/keyboards/mehkee96/mehkee96.c index 604fad8032..46427ec93b 100644 --- a/keyboards/mehkee96/mehkee96.c +++ b/keyboards/mehkee96/mehkee96.c @@ -16,66 +16,13 @@ along with this program. If not, see . */ #include "mehkee96.h" -#include "rgblight.h" -#include +void matrix_init_kb(void) { matrix_init_user(); } -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" +__attribute__ ((weak)) +void matrix_init_user(void) {} -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_scan_kb(void) { matrix_scan_user(); } -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h index fb24c60795..5aa5c29503 100644 --- a/keyboards/meira/featherble/config.h +++ b/keyboards/meira/featherble/config.h @@ -40,9 +40,6 @@ along with this program. If not, see . #define B5_AUDIO #define AUDIO_VOICES -#define CATERINA_BOOTLOADER - - // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING //#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/meira/featherble/rules.mk b/keyboards/meira/featherble/rules.mk index e27608983f..b0295ced77 100644 --- a/keyboards/meira/featherble/rules.mk +++ b/keyboards/meira/featherble/rules.mk @@ -1,3 +1,5 @@ -BLUETOOTH_ENABLE = yes +# Processor frequency F_CPU = 8000000 + +BLUETOOTH_ENABLE = yes BLUETOOTH = AdafruitBLE diff --git a/keyboards/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c index 5703999a04..9bcd771c42 100644 --- a/keyboards/meira/keymaps/default/keymap.c +++ b/keyboards/meira/keymaps/default/keymap.c @@ -174,22 +174,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/meira/matrix.c b/keyboards/meira/matrix.c index 030c91332d..7de188a68c 100644 --- a/keyboards/meira/matrix.c +++ b/keyboards/meira/matrix.c @@ -116,8 +116,6 @@ void matrix_init(void) init_rows(); // init_lcols(); -// TX_RX_LED_INIT; - // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; diff --git a/keyboards/meira/promicro/config.h b/keyboards/meira/promicro/config.h index 67e5ca06d1..22975f68c0 100644 --- a/keyboards/meira/promicro/config.h +++ b/keyboards/meira/promicro/config.h @@ -36,8 +36,6 @@ along with this program. If not, see . #define LED_EN_PIN D2 #define UNUSED_PINS -#define CATERINA_BOOTLOADER - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/meira/promicro/promicro.h b/keyboards/meira/promicro/promicro.h index 8e7525eab6..9e6800b497 100644 --- a/keyboards/meira/promicro/promicro.h +++ b/keyboards/meira/promicro/promicro.h @@ -5,6 +5,4 @@ #include "quantum.h" -#include "pro_micro.h" - #endif diff --git a/keyboards/meira/promicro/rules.mk b/keyboards/meira/promicro/rules.mk index 22e49971f1..3c81f1b344 100644 --- a/keyboards/meira/promicro/rules.mk +++ b/keyboards/meira/promicro/rules.mk @@ -1,14 +1 @@ -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - BLUETOOTH_ENABLE = no diff --git a/keyboards/meira/rules.mk b/keyboards/meira/rules.mk index 6c2472f433..8357e780bf 100644 --- a/keyboards/meira/rules.mk +++ b/keyboards/meira/rules.mk @@ -1,48 +1,16 @@ -SRC += matrix.c TWIlib.c issi.c lighting.c - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -74,6 +42,7 @@ CUSTOM_MATRIX = yes #ifeq ($(strip $(WATCHDOG_ENABLE)), yes) # TMK_COMMON_DEFS += -DWATCHDOG_ENABLE #endif +SRC += matrix.c TWIlib.c issi.c lighting.c DEFAULT_FOLDER = meira/promicro LAYOUTS = ortho_4x12 diff --git a/keyboards/meishi/rules.mk b/keyboards/meishi/rules.mk index 45eb6ee376..571a1c48ce 100644 --- a/keyboards/meishi/rules.mk +++ b/keyboards/meishi/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/meishi2/info.json b/keyboards/meishi2/info.json index e69de29bb2..11e18e9f47 100644 --- a/keyboards/meishi2/info.json +++ b/keyboards/meishi2/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "meishi2", + "url": "", + "maintainer": "biacco42", + "width": 4, + "height": 1, + "layouts": { + "LAYOUT": { + "key_count": 4, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 } + ] + } + } +} diff --git a/keyboards/meishi2/rules.mk b/keyboards/meishi2/rules.mk index bc370be039..7218e1e1bf 100644 --- a/keyboards/meishi2/rules.mk +++ b/keyboards/meishi2/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h index 201b1ad07f..8ab88653f3 100644 --- a/keyboards/melody96/config.h +++ b/keyboards/melody96/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/melody96/info.json b/keyboards/melody96/info.json index e2a31c9f34..f69ae26790 100644 --- a/keyboards/melody96/info.json +++ b/keyboards/melody96/info.json @@ -7,6 +7,12 @@ "layouts": { "LAYOUT": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Scroll Lock", "x":14, "y":0}, {"label":"Pause", "x":15, "y":0}, {"label":"Insert", "x":16, "y":0}, {"label":"Home", "x":17, "y":0}, {"label":"PgUp", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"x":18, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}, {"x":18, "y":5}] + }, + "LAYOUT_hotswap": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Home", "x":13, "y":0}, {"label":"End", "x":14, "y":0}, {"label":"PgUp", "x":15, "y":0}, {"label":"PgDn", "x":16, "y":0}, {"label":"Media Play", "x":17, "y":0}, {"label":"Pause", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"Up", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"label":"Space", "x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"Left", "x":13, "y":5}, {"label":"Down", "x":14, "y":5}, {"label":"Right", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}, {"label":"Enter", "x":18, "y":4, "h":2}] + }, + "LAYOUT_std60_split_num0": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15, "y":0}, {"label":"PgUp", "x":16, "y":0}, {"label":"PgDn", "x":17, "y":0}, {"label":"Delete", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":2.75}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"label":"Space", "x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.25}, {"label":"Fn", "x":11.25, "y":5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5, "w":1.25}, {"label":"0", "x":15, "y":5}, {"label":"00", "x":16, "y":5}, {"label":".", "x":17, "y":5}, {"label":"Enter", "x":18, "y":4, "h":2}] } } -} \ No newline at end of file +} diff --git a/keyboards/melody96/keymaps/default/keymap.c b/keyboards/melody96/keymaps/default/keymap.c index 16f4561b58..ba73cbce83 100644 --- a/keyboards/melody96/keymaps/default/keymap.c +++ b/keyboards/melody96/keymaps/default/keymap.c @@ -69,10 +69,6 @@ BL_TOGG, BL_DEC, BL_INC changes the in-switch LEDs _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } diff --git a/keyboards/melody96/keymaps/default_std60_split_num0/keymap.c b/keyboards/melody96/keymaps/default_std60_split_num0/keymap.c new file mode 100644 index 0000000000..25881d3f80 --- /dev/null +++ b/keyboards/melody96/keymaps/default_std60_split_num0/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + KC_P00 = SAFE_RANGE +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_std60_split_num0( + KC_ESC, 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_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, + 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_P0, KC_P00, KC_PDOT, KC_PENT + ), + + [0] = LAYOUT_std60_split_num0( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_P00: + if (record->event.pressed) { + SEND_STRING("00"); + } + break; + } + return true; +} diff --git a/keyboards/melody96/keymaps/default_std60_split_num0/readme.md b/keyboards/melody96/keymaps/default_std60_split_num0/readme.md new file mode 100644 index 0000000000..d20a179aa9 --- /dev/null +++ b/keyboards/melody96/keymaps/default_std60_split_num0/readme.md @@ -0,0 +1,39 @@ +# default_std60_split_num0 + +A modified default keymap for use with the LAYOUT_std60_split_num0 macro. + +## Base Layer + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Prt│Hm │End│PUp│PDn│Del│ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤ +│` ~│1 !│2 @│3 #│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│ Bksp │NLk│ / │ * │ - │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┼───┼───┼───┤ +│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│ \ | │7 │8 │9 │ + │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ +│CapsLk│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' "│ Enter │4 │5 │6 │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┼───┼───┼───┼───┤ +│ Shift │ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│ Shift │1 │2 │3 │Ent│ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┼───┼───┼───┤ │ +│Ctrl│GUI │Alt │Space │Alt │Fn │Menu│Ctrl│0 │00 │ . │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┴───┴───┴───┴───┘ +``` + +## Function Layer + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│RST│ │ │ │ │ │ │ │ │ │ │ │ │Mut│VDn│VUp│ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┼───┼───┼───┤ +│ │RTg│ │RMd│RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ +│BLTogg│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┼───┼───┼───┼───┤ +│ │ │ │BL-│BTg│BL+│ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┼───┼───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┴───┴───┴───┴───┘ +``` diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index c2b0431047..1ee7ca1e77 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H #include "konstantin.h" -static const HSV *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW }; +static const HSV *colors[] = { &godspeed_blue, &godspeed_yellow }; static const size_t cnum = sizeof colors / sizeof *colors; static size_t cidx = 0; @@ -20,11 +20,10 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { cidx = (cidx + 1) % cnum; rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v); } - return false; - - default: - return true; + break; } + + return true; } const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -40,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSfRCt│ ↑ │P1 │P2 │P3 │ │ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤PEn│ - * │LCtl│LGui│LAlt│ Space │RAlGu│FnLk │ ← │ ↓ │ → │P0 │P. │ │ + * │LCtl│LGui│LAlt│ Space │RAlGu│FnFLk│ ← │ ↓ │ → │P0 │P. │ │ * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ */ [L_BASE] = LAYOUT( @@ -52,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, XXXXXXX, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT ), - /* Function layer + /* Fn layer * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │ │ │ │ │ │ │ │ │ │ │ │ │ │Sys│SLk│Pau│Brk│Top│Btm│ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ @@ -68,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ */ [L_FN] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSR, KC_SLCK, KC_PAUS, KC_BRK, TOP, BOTTOM, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SYSRQ, KC_SLCK, KC_PAUS, BREAK, TOP, BOTTOM, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET, diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk index 47a859d089..995402cb05 100644 --- a/keyboards/melody96/keymaps/konstantin/rules.mk +++ b/keyboards/melody96/keymaps/konstantin/rules.mk @@ -1,10 +1,11 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = no -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODEMAP_ENABLE = yes - -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +SPACE_CADET_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes diff --git a/keyboards/melody96/keymaps/zunger/keymap.c b/keyboards/melody96/keymaps/zunger/keymap.c index 9031447cd2..bedb77a4b7 100644 --- a/keyboards/melody96/keymaps/zunger/keymap.c +++ b/keyboards/melody96/keymaps/zunger/keymap.c @@ -54,7 +54,6 @@ enum layers_keymap { // autogenerate the keymaps for the other layers. // TODO: It would also be nice to be able to put the actual code points in here, rather than // numbers. -// TODO: Also add checkmark and dengir. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -70,9 +69,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ∅ | | | | | | | | | | | | | | | | | | | SHIFTCADET * |---------------------------------------------------------------------------| * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | - * | ` | | | | | | | | | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | - * | ` | | | | | | | | | | | | ≁ | BKSPC |LCK| | ⊗ | | - * | | | | | | | | | | | | | ± | BKSPC |LCK| | | | + * | ` | ¡ | | £ | | | | | ° | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | + * | ` | ¿ | | € | | | | | | | | | ≁ | BKSPC |LCK| | ⊗ | | + * | | ̀ | ́ | ̂ | ̃ | ̈ | ̄ | | | | | | ± | BKSPC |LCK| | × | | [3] * | | | | | | | | | | | | | ∓ | BKSPC |LCK| | | | * |---------------------------------------------------------------------------| * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | @@ -104,6 +103,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * clicks the mouse, and SHIFT+CADET+FIVE right-clicks. * [2] The Greek letters in this row are the three modifier keys (GREEK, CADET, FN), * not the Unicode Greek letters. + * [3] The accent marks in this row are combining accent marks, which may be put after + * a character to combine it. In order, they are grave, acute, circumflex, tilde, + * diaresis (umlaut), and macron. */ // NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the // switch on the KC_GRV key; change back to KC_ESC once this is fixed. @@ -116,14 +118,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_GREEK,KC_CADET,MO_FN, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), [_GREEK] = LAYOUT_hotswap( KC_GRV, H(00b9), H(00b2), H(00b3), H(2074), H(2075), H(2076), H(2077), H(2078), H(2079), H(2070), H(207b), H(207a), H(207d), H(207e), XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), + KC_GRV, H(00a1), _______, H(00a3), _______, _______, _______, _______, H(00b0), _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), _______, H(03b8), H(03c9), H(03b5), H(03c1), H(03c4), H(03c8), H(03c5), H(03b9), H(03bf), H(03c0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, _______, H(03b1), H(03c3), H(03b4), H(03c6), H(03b3), H(03b7), H(03d1), H(03ba), H(03bb), H(22ef), H(22c5), _______, KC_P4, KC_P5, KC_P6, H(2295), _______, H(03b6), H(03be), H(03c7), H(03c2), H(03b2), H(03bd), H(03bc), H(226a), H(226b), H(222b), _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), [_SHIFTGREEK] = LAYOUT_hotswap( KC_GRV, H(2081), H(2082), H(2083), H(2084), H(2085), H(2086), H(2087), H(2088), H(2089), H(2080), H(208b), H(208a), H(208d), H(208e), XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, H(2241), _______, _______, XXXXXXX, H(2297), XXXXXXX, + KC_GRV, H(00bf), _______, H(20ac), _______, _______, _______, _______, _______, _______, _______, XXXXXXX, H(2241), _______, _______, XXXXXXX, H(2297), XXXXXXX, _______, H(0398), H(03a9), H(0395), H(03a1), H(03a4), H(03a8), H(03a5), H(0399), H(039f), H(03a0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, _______, H(0391), H(03a3), H(0394), H(03a6), H(0393), H(0397), XXXXXXX, H(039a), H(039b), H(2026), H(2234), _______, KC_P4, KC_P5, KC_P6, H(2295), _______, H(0396), H(039e), H(03a7), H(2714), H(0392), H(039d), H(039c), H(2272), H(2273), XXXXXXX, _______, _______, KC_P1, KC_P2, KC_P3, @@ -131,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // TODO: Add mouse keys to keypad. [_CADET] = LAYOUT_hotswap( H(00AC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, + KC_GRV, H(0300), H(0301), H(0302), H(0303), H(0308), H(0304), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), XXXXXXX, _______, H(2227), H(2228), H(2229), H(222a), H(2282), H(2283), H(2200), H(221e), H(2203), H(2202), H(2208), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, _______, H(22a5), H(22a4), H(22a2), H(22a3), H(2191), H(2193), H(2190), H(2192), H(2194), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, _______, XXXXXXX, XXXXXXX, H(2260), H(2248), H(2261), H(2264), H(2265), XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, @@ -145,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), // Function layer is mostly for keyboard meta-control operations. Lots of this is just from the - // default layout; TODO make it nicer, add Unicode mode switchers. + // default layout; TODO make it nicer. [_FUNCTION] = LAYOUT_hotswap( RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/melody96/melody96.c b/keyboards/melody96/melody96.c index 2d313bc1e1..2fe274ee47 100644 --- a/keyboards/melody96/melody96.c +++ b/keyboards/melody96/melody96.c @@ -1,7 +1,6 @@ #include "melody96.h" -void led_set_user(uint8_t usb_led) { - +void led_set_kb(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { DDRC |= (1 << 6); PORTC &= ~(1 << 6); } else { @@ -19,4 +18,6 @@ void led_set_user(uint8_t usb_led) { } else { DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); } -} \ No newline at end of file + + led_set_user(usb_led); +} diff --git a/keyboards/melody96/melody96.h b/keyboards/melody96/melody96.h index d846fa28da..37a6a85b09 100644 --- a/keyboards/melody96/melody96.h +++ b/keyboards/melody96/melody96.h @@ -1,5 +1,4 @@ -#ifndef MELODY96_H -#define MELODY96_H +#pragma once #include "quantum.h" @@ -64,4 +63,39 @@ { K110, K111, K112, K113, K114, K115, K116, K117, K118 } \ } -#endif +/* LAYOUT_std60_split_num0 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Prt│Pau│Hm │End│PUp│PDn│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤ + * │` ~│1 !│2 @│3 #│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│ Bksp │NLk│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│ \ | │7 │8 │9 │ + │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ + * │CapsLk│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' "│ Enter │4 │5 │6 │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┼───┼───┼───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│ Shift │1 │2 │3 │Ent│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┼───┼───┼───┤ │ + * │Ctrl│GUI │Alt │Space │Alt │GUI │Menu│Ctrl│0 │00 │ . │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┴───┴───┴───┴───┘ + */ +#define LAYOUT_std60_split_num0( \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, KB1, KB0, K63, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, KA1, KA0, K64, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K84, K96, K92, K91, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K86, K82, K81, K80, \ + K10, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K76, K72, K71, \ + K00, K01, K02, K06, K08, K07, K04, K03, K66, K62, K61, K60 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO, K06, K07, K08 }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, KC_NO, K66, KC_NO, KC_NO }, \ + { KC_NO, K71, K72, KC_NO, K74, K75, K76, K77, K78 }, \ + { K80, K81, K82, KC_NO, K84, K85, K86, K87, K88 }, \ + { KC_NO, K91, K92, K93, K94, K95, K96, K97, K98 }, \ + { KA0, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KB0, KB1, KB2, KB3, KB4, KB5, KB6, KB7, KB8 } \ +} diff --git a/keyboards/melody96/readme.md b/keyboards/melody96/readme.md index 73cc13262b..2d472b3276 100644 --- a/keyboards/melody96/readme.md +++ b/keyboards/melody96/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make melody96:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +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). diff --git a/keyboards/melody96/rules.mk b/keyboards/melody96/rules.mk index be0f84b170..1e6d4bb7cd 100644 --- a/keyboards/melody96/rules.mk +++ b/keyboards/melody96/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/meme/rules.mk b/keyboards/meme/rules.mk index 339bb5f6a2..621c2dded1 100644 --- a/keyboards/meme/rules.mk +++ b/keyboards/meme/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/meson/config.h b/keyboards/meson/config.h new file mode 100644 index 0000000000..3e37c89fd7 --- /dev/null +++ b/keyboards/meson/config.h @@ -0,0 +1,172 @@ +/* +Copyright 2019 Luciano M + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Luciano M +#define PRODUCT Meson +#define DESCRIPTION 3x14 split keyboard with two thumb keys per side + +/* key matrix size */ +#define MATRIX_ROWS 8 // 4 rows each half +#define MATRIX_COLS 7 + +#define MATRIX_ROW_PINS { F7, C6, F6, F5 } +#define MATRIX_COL_PINS { D4, D7, E6, B3, B2, B6, F4 } +// #define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define USE_I2C +#define SOFT_SERIAL_PIN D0 + +#define RGB_DI_PIN B5 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #define RGBLIGHT_SPLIT + #define RGBLED_SPLIT { 5, 5 } + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS + /*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/meson/info.json b/keyboards/meson/info.json new file mode 100644 index 0000000000..3d7eab847f --- /dev/null +++ b/keyboards/meson/info.json @@ -0,0 +1,108 @@ +{ + "keyboard_name": "Meson", + "keyboard_folder": "meson", + "maintainer": "qmk", + "width": 15.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "", "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": 8.5, "y": 0}, + {"label": "", "x": 9.5, "y": 0}, + {"label": "", "x": 10.5, "y": 0}, + {"label": "", "x": 11.5, "y": 0}, + {"label": "", "x": 12.5, "y": 0}, + {"label": "", "x": 13.5, "y": 0}, + {"label": "", "x": 14.5, "y": 0}, + {"label": "", "x": 0, "y": 1}, + {"label": "", "x": 1, "y": 1}, + {"label": "", "x": 2, "y": 1}, + {"label": "", "x": 3, "y": 1}, + {"label": "", "x": 4, "y": 1}, + {"label": "", "x": 5, "y": 1}, + {"label": "", "x": 6, "y": 1}, + {"label": "", "x": 8.5, "y": 1}, + {"label": "", "x": 9.5, "y": 1}, + {"label": "", "x": 10.5, "y": 1}, + {"label": "", "x": 11.5, "y": 1}, + {"label": "", "x": 12.5, "y": 1}, + {"label": "", "x": 13.5, "y": 1}, + {"label": "", "x": 14.5, "y": 1}, + {"label": "", "x": 0, "y": 2}, + {"label": "", "x": 1, "y": 2}, + {"label": "", "x": 2, "y": 2}, + {"label": "", "x": 3, "y": 2}, + {"label": "", "x": 4, "y": 2}, + {"label": "", "x": 5, "y": 2}, + {"label": "", "x": 6, "y": 2}, + {"label": "", "x": 8.5, "y": 2}, + {"label": "", "x": 9.5, "y": 2}, + {"label": "", "x": 10.5, "y": 2}, + {"label": "", "x": 11.5, "y": 2}, + {"label": "", "x": 12.5, "y": 2}, + {"label": "", "x": 13.5, "y": 2}, + {"label": "", "x": 14.5, "y": 2}, + {"label": "", "x": 4, "y": 3}, + {"label": "", "x": 5, "y": 3}, + {"label": "", "x": 9.5, "y": 3}, + {"label": "", "x": 10.5, "y": 3} + ] + }, + "LAYOUT_2u": { + "layout": [ + {"label": "", "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": 8.5, "y": 0}, + {"label": "", "x": 9.5, "y": 0}, + {"label": "", "x": 10.5, "y": 0}, + {"label": "", "x": 11.5, "y": 0}, + {"label": "", "x": 12.5, "y": 0}, + {"label": "", "x": 13.5, "y": 0}, + {"label": "", "x": 14.5, "y": 0}, + {"label": "", "x": 0, "y": 1}, + {"label": "", "x": 1, "y": 1}, + {"label": "", "x": 2, "y": 1}, + {"label": "", "x": 3, "y": 1}, + {"label": "", "x": 4, "y": 1}, + {"label": "", "x": 5, "y": 1}, + {"label": "", "x": 6, "y": 1}, + {"label": "", "x": 8.5, "y": 1}, + {"label": "", "x": 9.5, "y": 1}, + {"label": "", "x": 10.5, "y": 1}, + {"label": "", "x": 11.5, "y": 1}, + {"label": "", "x": 12.5, "y": 1}, + {"label": "", "x": 13.5, "y": 1}, + {"label": "", "x": 14.5, "y": 1}, + {"label": "", "x": 0, "y": 2}, + {"label": "", "x": 1, "y": 2}, + {"label": "", "x": 2, "y": 2}, + {"label": "", "x": 3, "y": 2}, + {"label": "", "x": 4, "y": 2}, + {"label": "", "x": 5, "y": 2}, + {"label": "", "x": 6, "y": 2}, + {"label": "", "x": 8.5, "y": 2}, + {"label": "", "x": 9.5, "y": 2}, + {"label": "", "x": 10.5, "y": 2}, + {"label": "", "x": 11.5, "y": 2}, + {"label": "", "x": 12.5, "y": 2}, + {"label": "", "x": 13.5, "y": 2}, + {"label": "", "x": 14.5, "y": 2}, + {"label": "", "x": 4, "y": 3, "w": 2}, + {"label": "", "x": 9.5, "y": 3, "w": 2} + ] + } + } + } + diff --git a/keyboards/meson/keymaps/default/config.h b/keyboards/meson/keymaps/default/config.h new file mode 100644 index 0000000000..cb72945366 --- /dev/null +++ b/keyboards/meson/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Luciano M + * + * 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 . + */ + +#pragma once + +// place overrides here \ No newline at end of file diff --git a/keyboards/meson/keymaps/default/keymap.c b/keyboards/meson/keymaps/default/keymap.c new file mode 100644 index 0000000000..002fc79775 --- /dev/null +++ b/keyboards/meson/keymaps/default/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2019 Luciano M + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + MESON = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( /* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LALT, KC_GRV, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + MO(1), KC_SPC, KC_SPC, MO(2) + ), + + [1] = LAYOUT( /* Symbols */ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TAB, KC_BSLS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RGB_VAI, + KC_LCTL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, + KC_LSFT, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, MESON, RGB_MOD, + MO(1), KC_SPC, KC_SPC, MO(3) + ), + + [2] = LAYOUT( /* Numbers */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_VOLU, + KC_LCTL, 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_VOLD, + KC_LSFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_LGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MPRV, KC_MNXT, KC_MPLY, + MO(3), KC_SPC, KC_SPC, MO(2) + ), + + [3] = LAYOUT( /* Reset, other functions if you want */ + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MESON: + if (record->event.pressed) { + // when keycode MESON is pressed + SEND_STRING("Meson macro working"); + } else { + // when keycode MESON is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/meson/keymaps/default/readme.md b/keyboards/meson/keymaps/default/readme.md new file mode 100644 index 0000000000..04d94252be --- /dev/null +++ b/keyboards/meson/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for meson diff --git a/keyboards/meson/meson.c b/keyboards/meson/meson.c new file mode 100644 index 0000000000..9dc6f6a2e6 --- /dev/null +++ b/keyboards/meson/meson.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Luciano M + * + * 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 . + */ +#include "meson.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/meson/meson.h b/keyboards/meson/meson.h new file mode 100644 index 0000000000..5344d5410c --- /dev/null +++ b/keyboards/meson/meson.h @@ -0,0 +1,56 @@ +/* Copyright 2019 Luciano M + * + * 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 . + */ + +#pragma once +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, R20, \ + L30, L31, R31, R30 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06}, \ + { L10, L11, L12, L13, L14, L15, L16}, \ + { L20, L21, L22, L23, L24, L25, L26}, \ + { ___, ___, ___, ___, L30, L31, ___}, \ + { R00, R01, R02, R03, R04, R05, R06}, \ + { R10, R11, R12, R13, R14, R15, R16}, \ + { R20, R21, R22, R23, R24, R25, R26}, \ + { ___, ___, ___, ___, R30, R31, ___}, \ +} + +// 2u SPACEBAR LAYOUT, DON'T FORGET TO CHANGE NAME OF LAYOUTS IN KEYMAP.C + +#define LAYOUT_2u( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, R20, \ + L30, R30 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06}, \ + { L10, L11, L12, L13, L14, L15, L16}, \ + { L20, L21, L22, L23, L24, L25, L26}, \ + { ___, ___, ___, ___, L30, ___, ___},\ + { R00, R01, R02, R03, R04, R05, R06}, \ + { R10, R11, R12, R13, R14, R15, R16}, \ + { R20, R21, R22, R23, R24, R25, R26}, \ + { ___, ___, ___, ___, R30, ___, ___},\ +} diff --git a/keyboards/meson/readme.md b/keyboards/meson/readme.md new file mode 100644 index 0000000000..3824690c12 --- /dev/null +++ b/keyboards/meson/readme.md @@ -0,0 +1,13 @@ +# meson + +A 3x14 split keyboard with two thumb keys on each half. Supports MX, Alps, and Choc reversible. + +Keyboard Maintainer: [PyroL](https://github.com/PyrooL) +Hardware Supported: Meson PCBs, Pro Micro +Hardware Availability: [open source at PyroL's Github](https://github.com/PyrooL/Meson) + +Make example for this keyboard (after setting up your build environment): + + make meson: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). diff --git a/keyboards/meson/rules.mk b/keyboards/meson/rules.mk new file mode 100644 index 0000000000..323ec666a9 --- /dev/null +++ b/keyboards/meson/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +SPLIT_KEYBOARD = yes +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index db85097177..b0b9d4c475 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -237,5 +237,3 @@ along with this program. If not, see . //#define EE_HANDS #define I2C_MASTER_LEFT //#define I2C_MASTER_RIGHT - -#define DISABLE_JTAG diff --git a/keyboards/miniaxe/keymaps/underglow/rules.mk b/keyboards/miniaxe/keymaps/underglow/rules.mk index 64fa91deda..1e3cebb145 100644 --- a/keyboards/miniaxe/keymaps/underglow/rules.mk +++ b/keyboards/miniaxe/keymaps/underglow/rules.mk @@ -1,2 +1 @@ -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow - +RGBLIGHT_ENABLE = yes diff --git a/keyboards/miniaxe/rules.mk b/keyboards/miniaxe/rules.mk index 2f56a907ba..204aeed76e 100644 --- a/keyboards/miniaxe/rules.mk +++ b/keyboards/miniaxe/rules.mk @@ -1,65 +1,16 @@ - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -84,4 +35,3 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) DEBUG_ENABLE = no CUSTOM_MATRIX = no # Use custom matrix code SPLIT_KEYBOARD = yes # Use shared split_common code - diff --git a/keyboards/minidox/keymaps/default/keymap.c b/keyboards/minidox/keymaps/default/keymap.c index 6cc78cce1d..03731082c9 100644 --- a/keyboards/minidox/keymaps/default/keymap.c +++ b/keyboards/minidox/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/minidox/keymaps/xyverz/keymap.c b/keyboards/minidox/keymaps/xyverz/keymap.c index 4863f4f922..994ee4e1b4 100644 --- a/keyboards/minidox/keymaps/xyverz/keymap.c +++ b/keyboards/minidox/keymaps/xyverz/keymap.c @@ -1,44 +1,28 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum planck_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - LOWER, - RAISE, - BACKLIT -}; +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; // Adding macros to make the keymaps below much easier to read. -#define SFTSCLN SFT_T(KC_SCLN) -#define SFTSLSH SFT_T(KC_SLSH) -#define SFTZED SFT_T(KC_Z) -//#define ALTENT ALT_T(KC_ENT) -//#define ESCTRL CTL_T(KC_ESC) -//#define TABGUI GUI_T(KC_TAB) -#define CTRLQ CTL_T(KC_Q) -#define CTRLV CTL_T(KC_V) -#define ALTJ ALT_T(KC_J) -#define ALTW ALT_T(KC_W) -#define CTRLX CTL_T(KC_X) -#define CTRLDOT CTL_T(KC_DOT) -#define ALTC ALT_T(KC_C) -#define ALTCOMM ALT_T(KC_COMM) -//#define GUIBSPC GUI_T(KC_BSPC) +/* + Visit https://github.com/qmk/qmk_firmware/blob/master/docs/feature_advanced_keycodes.md#mod-tap + to read why these macros below are side-aware (LALT, RCTL, etc). +*/ +#define CTLSCLN RCTL_T(KC_SCLN) +#define CTLSLSH LCTL_T(KC_SLSH) +#define RCTLZED RCTL_T(KC_Z) +#define LCTLZED LCTL_T(KC_Z) +#define ALTDOT RALT_T(KC_DOT) +#define ALTX LALT_T(KC_X) +#define ALTQ LALT_T(KC_Q) +#define ALTV RALT_T(KC_V) +#define GUICOMM RGUI_T(KC_COMM) +#define GUIJ LGUI_T(KC_J) +#define GUIC LGUI_T(KC_C) +#define GUIW RGUI_T(KC_W) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak @@ -48,19 +32,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------| |------+------+------+------+------| * | A | O | E | U | I | | D | H | T | N | S | * |------+------+------+------+------| |------+------+------+------+------| - * |SFT/ ;|CTL/ Q|ALT/ J| K | X | | B | M |ALT/ W|CTL/ V|SFT/ Z| + * |CTL/ ;|ALT/ Q|GUI/ J| K | X | | B | M |GUI/ W|ALT/ V|CTL/ Z| * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. - * | LOWER| Gui | | | | Ent |RAISE | - * `-------------| BSpc | | Spc |------+------. + * | LOWER| BSPC | | | | Spc |RAISE | + * `-------------| SHFT | | Ent |------+------. * | | | | * `------' `------' */ [_DVORAK] = LAYOUT ( \ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, \ KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, \ - SFTSCLN, CTRLQ, ALTJ, KC_K, KC_X, KC_B, KC_M, ALTW, CTRLV, SFTZED, \ - LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ + CTLSCLN, ALTQ, GUIJ, KC_K, KC_X, KC_B, KC_M, GUIW, ALTV, RCTLZED, \ + LOWER, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, RAISE \ ), /* Qwerty @@ -70,19 +54,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------| |------+------+------+------+------| * | A | S | D | F | G | | H | J | K | L | ; | * |------+------+------+------+------| |------+------+------+------+------| - * |SFT/ Z|CTL/ X|ALT/ C| V | B | | N | M |ALT/ ,|CTL/ .|SFT/ /| + * |CTL/ Z|ALT/ X|GUI/ C| V | B | | N | M |GUI/ ,|ALT/ .|CTL/ /| * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. - * | LOWER| Gui | | | | Ent |RAISE | - * `-------------| BSpc | | Spc |------+------. + * | LOWER| BSPC | | | | Spc |RAISE | + * `-------------| SHFT | | Ent |------+------. * | | | | * `------' `------' */ [_QWERTY] = LAYOUT ( \ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - SFTZED, CTRLX, ALTC, KC_V, KC_B, KC_N, KC_M, ALTCOMM, CTRLDOT, SFTSLSH, \ - LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ + LCTLZED, ALTX, GUIC, KC_V, KC_B, KC_N, KC_M, GUICOMM, ALTDOT, CTLSLSH, \ + LOWER, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, RAISE \ ), /* Colemak @@ -92,19 +76,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------| |------+------+------+------+------| * | A | R | S | T | D | | H | N | E | I | S | * |------+------+------+------+------| |------+------+------+------+------| - * |SFT/ Z|CTL/ X|ALT/ C| V | B | | K | M |ALT/ ,|CTL/ .|SFT/ /| + * |CTL/ Z|ALT/ X|GUI/ C| V | B | | K | M |GUI/ ,|ALT/ .|CTL/ /| * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. - * | LOWER| Gui | | | | Ent |RAISE | - * `-------------| BSpc | | Spc |------+------. + * | LOWER| BSPC | | | | Spc |RAISE | + * `-------------| SHFT | | Ent |------+------. * | | | | * `------' `------' */ [_COLEMAK] = LAYOUT ( \ KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, \ - SFTZED, CTRLX, ALTC, KC_V, KC_B, KC_K, KC_M, ALTCOMM, CTRLDOT, SFTSLSH, \ - LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ + LCTLZED, ALTX, GUIC, KC_V, KC_B, KC_K, KC_M, GUICOMM, ALTDOT, CTLSLSH, \ + LOWER, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, RAISE \ ), /* Lower @@ -168,65 +152,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT ( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, \ - KC_F11, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12, \ + KC_F11, RESET, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12, \ _______, QWERTY, COLEMAK, DVORAK, _______, RESET, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______ \ -) + ) }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -}; +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif void matrix_init_user(void) { - // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); +#ifdef BOOTLOADER_CATERINA + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); +#endif }; +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } return true; -}; +} \ No newline at end of file diff --git a/keyboards/minidox/pro_micro.h b/keyboards/minidox/pro_micro.h deleted file mode 100644 index f9e7ed75d9..0000000000 --- a/keyboards/minidox/pro_micro.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ - -#ifndef Pins_Arduino_h -#define Pins_Arduino_h - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* Pins_Arduino_h */ diff --git a/keyboards/minidox/rev1/rev1.h b/keyboards/minidox/rev1/rev1.h index 99c579d6eb..5d32b05d41 100644 --- a/keyboards/minidox/rev1/rev1.h +++ b/keyboards/minidox/rev1/rev1.h @@ -3,11 +3,8 @@ #include "../minidox.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); - // readability #define ___ KC_NO diff --git a/keyboards/minidox/rev1/rules.mk b/keyboards/minidox/rev1/rules.mk index f845616741..7b30c0beff 100644 --- a/keyboards/minidox/rev1/rules.mk +++ b/keyboards/minidox/rev1/rules.mk @@ -1 +1 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file +BACKLIGHT_ENABLE = no diff --git a/keyboards/minidox/rules.mk b/keyboards/minidox/rules.mk index 861976e15b..dd2affb3f9 100644 --- a/keyboards/minidox/rules.mk +++ b/keyboards/minidox/rules.mk @@ -1,53 +1,16 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -69,5 +32,9 @@ USE_I2C ?= no SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c -DEFAULT_FOLDER = minidox/rev1 \ No newline at end of file +DEFAULT_FOLDER = minidox/rev1 diff --git a/keyboards/mint60/keymaps/default/keymap.c b/keyboards/mint60/keymaps/default/keymap.c index 4a90bd57c7..0c65f73c7e 100644 --- a/keyboards/mint60/keymaps/default/keymap.c +++ b/keyboards/mint60/keymaps/default/keymap.c @@ -19,7 +19,6 @@ #include "split_util.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -52,22 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool TOG_STATUS = false; int RGB_current_mode; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case RGBRST: diff --git a/keyboards/mint60/matrix.c b/keyboards/mint60/matrix.c index 6d8878332a..30f3c56bcf 100644 --- a/keyboards/mint60/matrix.c +++ b/keyboards/mint60/matrix.c @@ -200,18 +200,12 @@ uint8_t matrix_scan(void) }else{ matrix_slave_scan(); -// if(serial_slave_DATA_CORRUPT()){ -// TXLED0; int offset = (isLeftHand) ? ROWS_PER_HAND : 0; for (int i = 0; i < ROWS_PER_HAND; ++i) { matrix[offset+i] = serial_master_buffer[i]; } -// }else{ -// TXLED1; -// } - matrix_scan_quantum(); } return 1; diff --git a/keyboards/mint60/rules.mk b/keyboards/mint60/rules.mk index b4472153bc..037e814312 100644 --- a/keyboards/mint60/rules.mk +++ b/keyboards/mint60/rules.mk @@ -1,57 +1,15 @@ -SRC += i2c.c \ - serial.c \ - matrix.c \ - split_util.c \ - # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable @@ -74,5 +32,9 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes +SRC += i2c.c \ + serial.c \ + matrix.c \ + split_util.c USE_I2C = yes RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/mitosis/keymaps/default/keymap.c b/keyboards/mitosis/keymaps/default/keymap.c index ec440ed759..6132ad6f78 100644 --- a/keyboards/mitosis/keymaps/default/keymap.c +++ b/keyboards/mitosis/keymaps/default/keymap.c @@ -18,16 +18,10 @@ enum mitosis_layers enum mitosis_keycodes { FNKEY = SAFE_RANGE, - SHIFT -}; - - -// Macro definitions for readability -enum mitosis_macros -{ - VOLU, - VOLD, - ESCM + SHIFT, + M_VOLU, + M_VOLD, + M_ESCM }; #define LONGPRESS_DELAY 150 @@ -39,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q, KC_P, KC_Y, KC_C, KC_B, KC_V, KC_M, KC_U, KC_Z, KC_L, KC_A, KC_N, KC_I, KC_S, KC_F, KC_D, KC_T, KC_H, KC_O, KC_R, KC_COMM, KC_DOT, KC_J, KC_G, KC_SLSH, KC_SCLN, KC_W, KC_K, KC_QUOT, KC_X, - M(VOLU), M(ESCM), KC_TAB, KC_LCTL, KC_LALT, KC_ENT, KC_DEL, KC_PGUP, - M(VOLD), KC_LGUI, KC_E, FNKEY, SHIFT, KC_SPC, KC_BSPC, KC_PGDN + M_VOLU, M_ESCM, KC_TAB, KC_LCTL, KC_LALT, KC_ENT, KC_DEL, KC_PGUP, + M_VOLD, KC_LGUI, KC_E, FNKEY, SHIFT, KC_SPC, KC_BSPC, KC_PGDN ), @@ -78,55 +72,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { static uint16_t key_timer; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - - //switch multiplexing for media, short tap for volume up, long press for play/pause - case VOLU: - if (record->event.pressed) { - key_timer = timer_read(); // if the key is being pressed, we start the timer. - } else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down"). - if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { // LONGPRESS_DELAY being 150ms, the threshhold we pick for counting something as a tap. - return MACRO(T(MPLY), END); - } else { - return MACRO(T(VOLU), END); - } - } - break; - - //switch multiplexing for media, short tap for volume down, long press for next track - case VOLD: - if (record->event.pressed) { - key_timer = timer_read(); - } else { - if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { - return MACRO(T(MNXT), END); - } else { - return MACRO(T(VOLD), END); - } - } - break; - - //switch multiplexing for escape, short tap for escape, long press for context menu - case ESCM: - if (record->event.pressed) { - key_timer = timer_read(); - } else { - if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { - return MACRO(T(APP), END); - } else { - return MACRO(T(ESC), END); - } - } - break; - - break; - } - return MACRO_NONE; -}; - static bool singular_key = false; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -165,6 +110,44 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_FUNCTION, _SHIFTED, _FUNCSHIFT); return false; break; + //switch multiplexing for media, short tap for volume up, long press for play/pause + case M_VOLU: + if (record->event.pressed) { + key_timer = timer_read(); // if the key is being pressed, we start the timer. + } else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down"). + if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { // LONGPRESS_DELAY being 150ms, the threshhold we pick for counting something as a tap. + tap_code(KC_MPLY); + } else { + tap_code(KC_VOLU); + } + } + return false; + + //switch multiplexing for media, short tap for volume down, long press for next track + case M_VOLD: + if (record->event.pressed) { + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { + tap_code(KC_MNXT); + } else { + tap_code(KC_VOLD); + } + } + return false; + + //switch multiplexing for escape, short tap for escape, long press for context menu + case M_ESCM: + if (record->event.pressed) { + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { + tap_code(KC_APP); + } else { + tap_code(KC_ESC); + } + } + return false; //If any other key was pressed during the layer mod hold period, //then the layer mod was used momentarily, and should block latching diff --git a/keyboards/mitosis/mitosis.h b/keyboards/mitosis/mitosis.h index 4b73f0407a..80476e71c8 100644 --- a/keyboards/mitosis/mitosis.h +++ b/keyboards/mitosis/mitosis.h @@ -2,9 +2,6 @@ #define MITOSIS_H #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include #define red_led_off PORTF |= (1<<5) #define red_led_on PORTF &= ~(1<<5) diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk index 0ca4ef1f06..420c49f9b9 100644 --- a/keyboards/mitosis/rules.mk +++ b/keyboards/mitosis/rules.mk @@ -1,57 +1,16 @@ - -OPT_DEFS += -DMITOSIS_PROMICRO -MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -73,3 +32,10 @@ USB = /dev/ttyACM0 # upload: build # $(MITOSIS_UPLOAD_COMMAND) + +OPT_DEFS += -DMITOSIS_PROMICRO +MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c diff --git a/keyboards/miuni32/keymaps/default/keymap.c b/keyboards/miuni32/keymaps/default/keymap.c index 754c20f7d3..ae58f80a24 100644 --- a/keyboards/miuni32/keymaps/default/keymap.c +++ b/keyboards/miuni32/keymaps/default/keymap.c @@ -59,21 +59,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - void matrix_init_user(void) { } diff --git a/keyboards/miuni32/keymaps/default/rules.mk b/keyboards/miuni32/keymaps/default/rules.mk deleted file mode 100644 index 3a741d20a7..0000000000 --- a/keyboards/miuni32/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/miuni32/rules.mk b/keyboards/miuni32/rules.mk index 1092e50d8c..68622e672a 100644 --- a/keyboards/miuni32/rules.mk +++ b/keyboards/miuni32/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -54,14 +17,15 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 +RGBLIGHT_ENABLE = yes diff --git a/keyboards/model01/keymaps/default/rules.mk b/keyboards/model01/keymaps/default/rules.mk deleted file mode 100644 index 4d1abd88ad..0000000000 --- a/keyboards/model01/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -# used by default keymap -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/model01/keymaps/dshields/config.h b/keyboards/model01/keymaps/dshields/config.h index 1c78217f2f..fdb23d46ba 100644 --- a/keyboards/model01/keymaps/dshields/config.h +++ b/keyboards/model01/keymaps/dshields/config.h @@ -1,30 +1,4 @@ #pragma once -#define RGB_MATRIX_KEYPRESSES #define RGB_DIGITAL_RAIN_DROPS 18 -#define USB_MAX_POWER_CONSUMPTION 100 -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_TIMEOUT 3000 - -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 40 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0 - -// dynamic macro keys -#define DM_PLAY DYN_MACRO_PLAY1 -#define DM_STRT DYN_REC_START1 -#define DM_STOP DYN_REC_STOP - -// one-shot layer keys -#define OSL_FUN OSL(FUN) - -// one-shot modifier keys -#define OSMLCTL OSM(MOD_LCTL) -#define OSMRCTL OSM(MOD_RCTL) -#define OSMLALT OSM(MOD_LALT) -#define OSMRALT OSM(MOD_RALT) -#define OSMLSFT OSM(MOD_LSFT) -#define OSMRSFT OSM(MOD_RSFT) diff --git a/keyboards/model01/keymaps/dshields/keymap.c b/keyboards/model01/keymaps/dshields/keymap.c index 3a89d062b5..7dbfaf0cfb 100644 --- a/keyboards/model01/keymaps/dshields/keymap.c +++ b/keyboards/model01/keymaps/dshields/keymap.c @@ -1,27 +1,23 @@ #include QMK_KEYBOARD_H - -enum { DEF, FUN }; -enum { DYNAMIC_MACRO_RANGE = SAFE_RANGE }; - -#include "dynamic_macro.h" +#include "dshields.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEF] = LAYOUT( RESET , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, - KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_TOG, DM_PLAY, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , + KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_TOG, _______, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , KC_PGUP, KC_A , KC_S , KC_D , KC_F , KC_G , KC_TAB , KC_ENT , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, - KC_PGDN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_ESC , _______, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, - OSMLCTL, KC_RCTL, + KC_PGDN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_ESC , DM_PLY1, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, + OSMLCTL, OSMRCTL, KC_BSPC, KC_SPC , KC_LGUI, OSMRALT, OSMLSFT, OSMRSFT, OSL_FUN, OSL_FUN ), [FUN] = LAYOUT( - _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_MOD, DM_STRT, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , - KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, _______, DM_STOP, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, - KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, KC_PIPE, + EEP_RST, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_MOD, DM_REC1, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , + KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, RGB_HUI, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, + KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, RGB_HUD, DM_RSTP, _______, _______, _______, _______, KC_BSLS, KC_PIPE, _______, _______, KC_DEL , KC_ENT , _______, _______, @@ -30,24 +26,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { - case DEF: - set_all_leds_to(0,0,0); - break; - case FUN: - // TODO light the fn keys - // set_led_to(?, 0, 128, 0); - // set_led_to(?, 0, 128, 0); - break; - } - return state; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - return true; -} - diff --git a/keyboards/model01/keymaps/dshields/rules.mk b/keyboards/model01/keymaps/dshields/rules.mk deleted file mode 100644 index d3754cc1fc..0000000000 --- a/keyboards/model01/keymaps/dshields/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = no -CONSOLE_ENABLE = no diff --git a/keyboards/model01/keymaps/tw1t611/config.h b/keyboards/model01/keymaps/tw1t611/config.h new file mode 100644 index 0000000000..8ab9d8b025 --- /dev/null +++ b/keyboards/model01/keymaps/tw1t611/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 James Laird-Wah + * + * 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 . + */ + +#pragma once + +/* place overrides here */ diff --git a/keyboards/model01/keymaps/tw1t611/keymap.c b/keyboards/model01/keymaps/tw1t611/keymap.c new file mode 100644 index 0000000000..b4bd53e3fe --- /dev/null +++ b/keyboards/model01/keymaps/tw1t611/keymap.c @@ -0,0 +1,50 @@ +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +/* layer constants */ +enum { + DEF = 0, + MOD, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DEF] = LAYOUT( + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , DE_SS , + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, KC_MUTE, KC_Y , KC_U , KC_I , KC_O , KC_P , DE_AE , + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , DE_PARA, _______, KC_H , KC_J , KC_K , KC_L , DE_SLSH, DE_OE , + DE_PIPE, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, _______, KC_N , KC_M , DE_COMM, DE_DOT , DE_MINS, DE_UE , + KC_LALT, KC_LGUI, + KC_SPC , KC_ENT , + KC_LSFT, MO(MOD), + KC_BSPC, KC_DEL , + KC_LCTL, KC_RCTL + ), +[MOD] = LAYOUT( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + DE_CIRC, DE_QUOT, DE_DQOT, DE_LCBR, DE_RCBR, DE_GRV , RGB_TOG, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , DE_EQL , DE_PERC, + DE_TILD, DE_EXLM, DE_DLR , DE_LPRN, DE_RPRN, DE_AMPR, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, DE_QST , DE_ASTR, + DE_BSLS, DE_HASH, DE_LESS, DE_LBRC, DE_RBRC, DE_MORE, _______, RESET , DE_AT , DE_EURO, DE_SCLN, DE_COLN, DE_UNDS, DE_PLUS, + _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______ + ) +}; + +/* template for new layouts: +LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______ + ) +*/ + +/* vim: set ts=2 sw=2 et: */ diff --git a/keyboards/model01/keymaps/tw1t611/readme.md b/keyboards/model01/keymaps/tw1t611/readme.md new file mode 100644 index 0000000000..b9d728831c --- /dev/null +++ b/keyboards/model01/keymaps/tw1t611/readme.md @@ -0,0 +1,5 @@ +# Keymap for Keyboardio's Model01 by tw1t611 + +Features: +- german keymap +- vim optimized diff --git a/keyboards/model01/rules.mk b/keyboards/model01/rules.mk index 4345027f41..5e3cbaa332 100644 --- a/keyboards/model01/rules.mk +++ b/keyboards/model01/rules.mk @@ -1,53 +1,21 @@ -QUANTUM_LIB_SRC += i2c_master.c -SRC += leds.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options # change yes to no to disable # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration @@ -59,6 +27,9 @@ MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode CUSTOM_MATRIX = yes +QUANTUM_LIB_SRC += i2c_master.c +SRC += leds.c \ + matrix.c # You can set RGB_MATRIX_ENABLE = no in your rules.mk to disable this and save the Flash RGB_MATRIX_ENABLE = custom # Enable RGB matrix effects (+10000). diff --git a/keyboards/moon/pca9555.c b/keyboards/moon/pca9555.c deleted file mode 100644 index b0e542d8de..0000000000 --- a/keyboards/moon/pca9555.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright 2019 - * - * 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 . - */ -#include "i2c_master.h" -#include "pca9555.h" - -#include "debug.h" - -#define SLAVE_TO_ADDR(n) (n << 1) -#define TIMEOUT 100 - -enum { - CMD_INPUT_0 = 0, - CMD_INPUT_1, - CMD_OUTPUT_0, - CMD_OUTPUT_1, - CMD_INVERSION_0, - CMD_INVERSION_1, - CMD_CONFIG_0, - CMD_CONFIG_1, -}; - -void pca9555_init(uint8_t slave_addr) { - static uint8_t s_init = 0; - if (!s_init) { - i2c_init(); - - s_init = 1; - } - - // TODO: could check device connected - // i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); - // i2c_stop(); -} - -void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; - - i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_set_config::FAILED\n"); - } -} - -void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; - - i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_set_output::FAILED\n"); - } -} - -uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; - - uint8_t data = 0; - i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_readPins::FAILED\n"); - } - return data; -} diff --git a/keyboards/moon/rules.mk b/keyboards/moon/rules.mk index 699fc33957..3c67b3c287 100644 --- a/keyboards/moon/rules.mk +++ b/keyboards/moon/rules.mk @@ -1,59 +1,16 @@ -# Project specific files -SRC += i2c_master.c pca9555.c matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# Supported layouts -LAYOUTS = tkl_ansi tkl_iso - # Build Options # change yes to no to disable # @@ -74,4 +31,13 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# custom matrix setup CUSTOM_MATRIX = yes + +VPATH += drivers/gpio +SRC += pca9555.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c + +# Supported layouts +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/mt40/i2c.c b/keyboards/mt40/i2c.c deleted file mode 100644 index c27f3e3d17..0000000000 --- a/keyboards/mt40/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/mt40/mt40.c b/keyboards/mt40/mt40.c index 555689f872..dd079e7d81 100644 --- a/keyboards/mt40/mt40.c +++ b/keyboards/mt40/mt40.c @@ -13,32 +13,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "mt40.h" -#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - rgblight_task(); - matrix_init_user(); -} diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index db6ec93f5e..0cbf90c674 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -1,18 +1,14 @@ # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -28,17 +24,14 @@ AUDIO_ENABLE ?= no # Audio output on port C6 UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c TAP_DANCE_ENABLE = no OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c LAYOUTS = planck_mit LAYOUTS_HAS_RGB = no diff --git a/keyboards/mt40/usbconfig.h b/keyboards/mt40/usbconfig.h index 498b01fd9e..e1f5f2ea42 100644 --- a/keyboards/mt40/usbconfig.h +++ b/keyboards/mt40/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x03 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'T', 'h', 'o', 'm', 'a', 's', 'D', 'e', 'h', 'a', 'e', 'z', 'e' diff --git a/keyboards/mt980/rules.mk b/keyboards/mt980/rules.mk index 9a7718aadb..b3655bf723 100644 --- a/keyboards/mt980/rules.mk +++ b/keyboards/mt980/rules.mk @@ -1,47 +1,19 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # - BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) diff --git a/keyboards/mxss/keymaps/default/keymap.c b/keyboards/mxss/keymaps/default/keymap.c index 7ac107f371..17cebe0c8f 100644 --- a/keyboards/mxss/keymaps/default/keymap.c +++ b/keyboards/mxss/keymaps/default/keymap.c @@ -51,22 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk index f46ae63743..7df8517583 100644 --- a/keyboards/mxss/rules.mk +++ b/keyboards/mxss/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/nafuda/config.h b/keyboards/nafuda/config.h new file mode 100644 index 0000000000..3db4401d49 --- /dev/null +++ b/keyboards/nafuda/config.h @@ -0,0 +1,69 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0012 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT nafuda +#define DESCRIPTION A custom cursorpad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +// wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D4 } +#define MATRIX_COL_PINS { F4, F5, F6 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 7 // Number of LEDs +#define RGBLIGHT_ANIMATIONS + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/nafuda/info.json b/keyboards/nafuda/info.json new file mode 100644 index 0000000000..d5bf2b055e --- /dev/null +++ b/keyboards/nafuda/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "nafuda", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Mouse", "x":1, "y":0}, + {"label":"Backspace", "x":0, "y":0.5}, + {"label":"\u2191", "x":1, "y":1}, + {"label":"Browser", "x":2, "y":0.5}, + {"label":"\u2190", "x":0, "y":1.5}, + {"label":"\u2193", "x":1, "y":2}, + {"label":"\u2192", "x":2, "y":1.5} + ] + } + } +} diff --git a/keyboards/nafuda/keymaps/default/config.h b/keyboards/nafuda/keymaps/default/config.h new file mode 100644 index 0000000000..e35fe2ccd7 --- /dev/null +++ b/keyboards/nafuda/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + diff --git a/keyboards/nafuda/keymaps/default/keymap.c b/keyboards/nafuda/keymaps/default/keymap.c new file mode 100644 index 0000000000..f0baff6c22 --- /dev/null +++ b/keyboards/nafuda/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE, + _MOUSE, + _BROWSER, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //|-------------------------------------------| + TG(_MOUSE), + //|---------------+---------------+-----------| +LT(_ADJUST, KC_BSPC), KC_UP,TG(_BROWSER), + //|---------------+---------------+-----------| + KC_LEFT, KC_DOWN, KC_RIGHT + //|-------------------------------------------| + ), + + [_MOUSE] = LAYOUT( + //|-------------------------------------------| + TG(_MOUSE), + //|---------------+---------------+-----------| + KC_BTN1, KC_MS_U, KC_BTN2, + //|---------------+---------------+-----------| + KC_MS_L, KC_MS_D, KC_MS_R + //|-------------------------------------------| + ), + + [_BROWSER] = LAYOUT( + //|-------------------------------------------| + LCTL(KC_W), + //|---------------+---------------+-----------| + LCTL(LSFT(KC_T)), KC_WH_U,TG(_BROWSER), + //|---------------+---------------+-----------| + LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB) + //|-------------------------------------------| + ), + + [_ADJUST] = LAYOUT( /* Base */ + //|-------------------------------------------| + RGB_VAD, + //|---------------+---------------+-----------| + MO(_ADJUST), RGB_SAD, RGB_VAI, + //|---------------+---------------+-----------| + RGB_MOD, RGB_TOG, RGB_SAI + //|-------------------------------------------| + ) +}; diff --git a/keyboards/nafuda/keymaps/default/readme.md b/keyboards/nafuda/keymaps/default/readme.md new file mode 100644 index 0000000000..b84276bf8a --- /dev/null +++ b/keyboards/nafuda/keymaps/default/readme.md @@ -0,0 +1,34 @@ +# The default keymap for nafuda + +## Base +| 1 | 2 | 3 | +|:--------------:|:--------:|:-----:| +| | MOUSE | | +| ADJUST or BSPC | UP |BROWSER| +| LEFT | DOWN | RIGHT| + + +## MOUSE +| 1 | 2 | 3 | +|:--------:|:--------:|:---------:| +| | BASE | | +| Btn 1 | MOUSE_UP | Btn2 | +|MOUSE_LEFT|MOUSE_DOWN|MOUSE_RIGHT| + + +## BROWSER +| 1 | 2 | 3 | +|:-----------:|:--------:|:-------:| +| | LCTL(W) | | +| LCTL+LSFT(T)| WHEEL_UP | BROWSER | +|LCTL+SFT(TAB)|WHEEL_DOWN|LCTL(TAB)| + + +## Adjust +| 1 | 2 | 3 | +|:-------:|:-------:|:------:| +| | RGB_VAD | | +| Adjust | RGB_SAD | RGB_VAI| +| RGB_MOD | RGB_TOG | RGB_SAI| + + diff --git a/keyboards/nafuda/nafuda.c b/keyboards/nafuda/nafuda.c new file mode 100644 index 0000000000..d2061181e7 --- /dev/null +++ b/keyboards/nafuda/nafuda.c @@ -0,0 +1,5 @@ +#include "nafuda.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/nafuda/nafuda.h b/keyboards/nafuda/nafuda.h new file mode 100644 index 0000000000..008a9c16f4 --- /dev/null +++ b/keyboards/nafuda/nafuda.h @@ -0,0 +1,24 @@ +#pragma once + +#include "quantum.h" + +/* + * ,-----------------. + * | | L01 | | + * |-----------------+ + * | L10 | L11 | L12 | + * |-----------------+ + * | L20 | L21 | L22 | + * |-----------------' + */ + +#define LAYOUT( \ + L01, \ + L10, L11, L12, \ + L20, L21, L22 \ + ) \ + { \ + {KC_NO, L01,KC_NO }, \ + { L10, L11, L12 }, \ + { L20, L21, L22 } \ + } diff --git a/keyboards/nafuda/readme.md b/keyboards/nafuda/readme.md new file mode 100644 index 0000000000..73007ed01e --- /dev/null +++ b/keyboards/nafuda/readme.md @@ -0,0 +1,17 @@ +# nafuda + +![nafuda](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190608/20190608024901.jpg) + +This is 7 keys cursor macropad. + +* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +* Hardware Supported: Nafuda PCB, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1271706) + +Make example for this keyboard (after setting up your build environment): + + make nafuda: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). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/nafuda-build-guide) diff --git a/keyboards/nafuda/rules.mk b/keyboards/nafuda/rules.mk new file mode 100644 index 0000000000..bdc8634648 --- /dev/null +++ b/keyboards/nafuda/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +TAP_DANCE_ENABLE = no +OLED_DRIVER_ENABLE = no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/naked48/config.h b/keyboards/naked48/config.h new file mode 100644 index 0000000000..cfb6bf4ffc --- /dev/null +++ b/keyboards/naked48/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/naked48/info.json b/keyboards/naked48/info.json new file mode 100644 index 0000000000..362fc9f5e0 --- /dev/null +++ b/keyboards/naked48/info.json @@ -0,0 +1,251 @@ +{ + "keyboard_name": "Naked48", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label":"Tab", + "x":0, + "y":0 + }, + { + "label":"Q", + "x":1, + "y":0 + }, + { + "label":"W", + "x":2, + "y":0 + }, + { + "label":"E", + "x":3, + "y":0 + }, + { + "label":"R", + "x":4, + "y":0 + }, + { + "label":"T", + "x":5, + "y":0 + }, + { + "label":"Y", + "x":8, + "y":0 + }, + { + "label":"U", + "x":9, + "y":0 + }, + { + "label":"I", + "x":10, + "y":0 + }, + { + "label":"O", + "x":11, + "y":0 + }, + { + "label":"P", + "x":12, + "y":0 + }, + { + "label":"Back Space", + "x":13, + "y":0 + }, + { + "label":"Esc", + "x":0, + "y":1 + }, + { + "label":"A", + "x":1, + "y":1 + }, + { + "label":"S", + "x":2, + "y":1 + }, + { + "label":"D", + "x":3, + "y":1 + }, + { + "label":"F", + "x":4, + "y":1 + }, + { + "label":"G", + "x":5, + "y":1 + }, + { + "label":"H", + "x":8, + "y":1 + }, + { + "label":"J", + "x":9, + "y":1 + }, + { + "label":"K", + "x":10, + "y":1 + }, + { + "label":"L", + "x":11, + "y":1 + }, + { + "label":";", + "x":12, + "y":1 + }, + { + "label":"'", + "x":13, + "y":1 + }, + { + "label":"Shift", + "x":0, + "y":2 + }, + { + "label":"Z", + "x":1, + "y":2 + }, + { + "label":"X", + "x":2, + "y":2 + }, + { + "label":"C", + "x":3, + "y":2 + }, + { + "label":"V", + "x":4, + "y":2 + }, + { + "label":"B", + "x":5, + "y":2 + }, + { + "label":"N", + "x":8, + "y":2 + }, + { + "label":"M", + "x":9, + "y":2 + }, + { + "label":",", + "x":10, + "y":2 + }, + { + "label":".", + "x":11, + "y":2 + }, + { + "label":"/", + "x":12, + "y":2 + }, + { + "label":"Enter", + "x":13, + "y":2 + }, + { + "label":"Adjust", + "x":1, + "y":3 + }, + { + "label":"Ctrl", + "x":2, + "y":3 + }, + { + "label":"Alt", + "x":3, + "y":3 + }, + { + "label":"GUI", + "x":4, + "y":3 + }, + { + "label":"⇓", + "x":5, + "y":3 + }, + { + "x":6, + "y":3 + }, + { + "x":7, + "y":3 + }, + { + "label":"⇑", + "x":8, + "y":3 + }, + { + "label":"←", + "x":9, + "y":3 + }, + { + "label":"↓", + "x":10, + "y":3 + }, + { + "label":"↑", + "x":11, + "y":3 + }, + { + "label":"→", + "x":12, + "y":3 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/naked48/keymaps/default/config.h b/keyboards/naked48/keymaps/default/config.h new file mode 100644 index 0000000000..0e452bdb4a --- /dev/null +++ b/keyboards/naked48/keymaps/default/config.h @@ -0,0 +1,28 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +//#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +//#define USE_SERIAL + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked48/keymaps/default/keymap.c b/keyboards/naked48/keymaps/default/keymap.c new file mode 100644 index 0000000000..616967f57b --- /dev/null +++ b/keyboards/naked48/keymaps/default/keymap.c @@ -0,0 +1,110 @@ +#include QMK_KEYBOARD_H + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + 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(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + 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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked48/keymaps/default/readme.md b/keyboards/naked48/keymaps/default/readme.md new file mode 100644 index 0000000000..a28ad8c52c --- /dev/null +++ b/keyboards/naked48/keymaps/default/readme.md @@ -0,0 +1,37 @@ +# The default keymap for naked48 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| BSPC| +| ESC | A| S| D| F| G| | | H| J| K| L| ;| '| +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| LEFT| DOWN| UP| RIGHT| | + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ~| !| @| #| $| %| | | ^| &| *| (| )| DEL| +| ESC| F1| F2| F3| F4| F5| | | F6| _| +| {| }| PIPE| +| LSFT| F7| F8| F9| F10| F11| | | F12| SNUHS| SNUBS| ,| .| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ~| 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| DEL| +| DEL| F1| F2| F3| F4| F5| | | F6| -| =| [| ]| BSLS| +| LSFT| F7| F8| F9| F10| F11| | | F12| NUHS| NUBS| ,| .| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:------:|:------:|:------:|:------:|:-------:|:------:| +| ~| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_RST| XXXXX| XXXXX| XXXXX| XXXXX| DEL| +| ESC| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_TOG| RGB_MOD| XXXXX| C+A+D| Alt+PSCR| PSCR| +| LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_VAD| RGB_VAI| RGB_HUD| RGB_HUI| RGB_SAD| RGB_SAI| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| RESET| RESET| RAISE| MNXT| VOLD| VOLU| MPLY| | + diff --git a/keyboards/naked48/keymaps/default_with_nafuda/config.h b/keyboards/naked48/keymaps/default_with_nafuda/config.h new file mode 100644 index 0000000000..314fe55c30 --- /dev/null +++ b/keyboards/naked48/keymaps/default_with_nafuda/config.h @@ -0,0 +1,36 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + +#define RGBLED_NUM 55 // Number of LEDs +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 48, 7 } + diff --git a/keyboards/naked48/keymaps/default_with_nafuda/keymap.c b/keyboards/naked48/keymaps/default_with_nafuda/keymap.c new file mode 100644 index 0000000000..f5d0772aa4 --- /dev/null +++ b/keyboards/naked48/keymaps/default_with_nafuda/keymap.c @@ -0,0 +1,135 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _MOUSE, + _BROWSER, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + 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_BTN1, KC_MS_U, KC_BTN2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_MS_L, KC_MS_D, KC_MS_R, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, LCTL(KC_W), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,LCTL(LSFT(KC_T)),KC_WH_U,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,LT(_ADJUST, KC_BSPC),KC_UP,TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,LT(_ADJUST, KC_BSPC),KC_UP,TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_nafuda( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAD, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, _ADJUST, RGB_SAD, RGB_VAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_MOD, RGB_TOG, RGB_SAI, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} + diff --git a/keyboards/naked48/keymaps/default_with_nafuda/readme.md b/keyboards/naked48/keymaps/default_with_nafuda/readme.md new file mode 100644 index 0000000000..417b44133b --- /dev/null +++ b/keyboards/naked48/keymaps/default_with_nafuda/readme.md @@ -0,0 +1,31 @@ +# The default_with_nafuda keymap for naked48 + +Add Nafuda maps to the default layout. + +## Default +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| | MOUSE| | +| BS+Ad| UP|Browser| +| LEFT| DOWN| RIGHT| + +## Mouse +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |Default| | +| BTN1| MS_U| BTN2| +| MS_L| MS_D| MS_R| + +## Browser +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |CloseTAB| | +|ReOpenTAB|WH_U|Default| +| LTAB| WH_D| RTAB| + +## Adjust +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |LED_VAD| | +|Default|LED_HUD|LED_VAI| +|LED_MOD|LED_ON/Off|LED_HUI| diff --git a/keyboards/naked48/keymaps/default_with_nafuda/rules.mk b/keyboards/naked48/keymaps/default_with_nafuda/rules.mk new file mode 100644 index 0000000000..6c605daecf --- /dev/null +++ b/keyboards/naked48/keymaps/default_with_nafuda/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/naked48/keymaps/default_with_setta21/config.h b/keyboards/naked48/keymaps/default_with_setta21/config.h new file mode 100644 index 0000000000..2ad4d0adeb --- /dev/null +++ b/keyboards/naked48/keymaps/default_with_setta21/config.h @@ -0,0 +1,35 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + +#define RGBLED_NUM 69 // Number of LEDs +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 48, 21 } diff --git a/keyboards/naked48/keymaps/default_with_setta21/keymap.c b/keyboards/naked48/keymaps/default_with_setta21/keymap.c new file mode 100644 index 0000000000..f6e460588c --- /dev/null +++ b/keyboards/naked48/keymaps/default_with_setta21/keymap.c @@ -0,0 +1,138 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + 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_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, KC_EQL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER), KC_SPC, KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL + //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| + ), + + [_LOWER] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, MO(_LOWER),XXXXXXX,KC_LEFT, XXXXXXX,XXXXXXX, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+--------+-------+-------| + 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_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+--------+-------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, KC_EQL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+----------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL + //`------------------------------------------------------------------------------------------------------------' |------------------------------------------------| + ), + + + [_RAISE] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + 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_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, KC_EQL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RPRN, SEND_SUM,SEND_AVE, KC_DEL + //`------------------------------------------------------------------------------------------------------------' |------------------------------------------------| + ), + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG,_______,_______ + //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| + ) +}; + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool result = false; + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("=SUM("); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("=AVERAGE("); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("=COUNTIF("); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("=MAX("); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("=MIN("); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked48/keymaps/default_with_setta21/readme.md b/keyboards/naked48/keymaps/default_with_setta21/readme.md new file mode 100644 index 0000000000..6e2a3441d2 --- /dev/null +++ b/keyboards/naked48/keymaps/default_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The default_with_setta21 keymap for naked48 + +Add Setta21 maps to the default layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/naked48/keymaps/salicylic/config.h b/keyboards/naked48/keymaps/salicylic/config.h new file mode 100644 index 0000000000..b6372db3b9 --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic/config.h @@ -0,0 +1,44 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + +#define DRIVER_LED_TOTAL 48 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_LIMIT_VAL 50 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 +#endif + diff --git a/keyboards/naked48/keymaps/salicylic/keymap.c b/keyboards/naked48/keymaps/salicylic/keymap.c new file mode 100644 index 0000000000..8b5e15c139 --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic/keymap.c @@ -0,0 +1,117 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +//#ifdef RGB_MATRIX_ENABLE +//Following line allows macro to read current RGB settings +//extern rgblight_config_t rgblight_config; + +//#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE),JP_DOT, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_MHEN, _______, _______, _______, _______, KC_HENK, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} + diff --git a/keyboards/naked48/keymaps/salicylic/readme.md b/keyboards/naked48/keymaps/salicylic/readme.md new file mode 100644 index 0000000000..6563bb46ff --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic/readme.md @@ -0,0 +1,37 @@ +# The salicylic keymap for naked48 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| [| +|LCTRL | A| S| D| F| G| | | H| J| K| L| -| ]| +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \| +| | LEFT| RIGHT| LGUI| MHEN|LOWER, ENT|BSPC|DEL|RAISE,SPC|HENK| LALT| DOWN| UP| | + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| !| ?| [| ]| ~| | | 6| 7| 8| 9| *| /| +| '| #| "| (| )| @| | | XXXXX| 4| 5| 6| -| =| +| ^| %| &| ;| :| PIPE| | | 0| 1| 2| 3| +| ENT| +| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| 1| 2| 3| 4| 5| | | 6| XXXXX| UP| XXXXX| PGUP| DEL| +|F11,LCTRL| F1| F2| F3| F4| F5| | | XXXXX| LEFT| DOWN| RIGHT| LSFT| ENT| +|F12,LSFT| F6| F7| F8| F9| F10| | | XXXXX| XXXXX| XXXXX| XXXXX| PGDN| XXXXX| +| | LEFT| RIGHT| LGUI| MHEN| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:------:|:------:|:------:|:------:|:-------:|:------:| +| ESC| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_RST| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| +| LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_TOG| RGB_MOD| XXXXX| C+A+D| Alt+PSCR| PSCR| +| LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_VAD| RGB_VAI| RGB_HUD| RGB_HUI| RGB_SAD| RGB_SAI| +| | LEFT| RIGHT| LGUI| MHEN| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | + diff --git a/keyboards/naked48/keymaps/salicylic/rules.mk b/keyboards/naked48/keymaps/salicylic/rules.mk new file mode 100644 index 0000000000..be8d10c9a6 --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 + diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h b/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h new file mode 100644 index 0000000000..7ce6416010 --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h @@ -0,0 +1,37 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + +#define RGBLED_NUM 55 // Number of LEDs +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 48, 7 } + diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c new file mode 100644 index 0000000000..5a99b8c0ad --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c @@ -0,0 +1,139 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _MOUSE, + _BROWSER, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_BTN1, KC_MS_U, KC_BTN2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_MS_L, KC_MS_D, KC_MS_R, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, LCTL(KC_W), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC,LCTL(LSFT(KC_T)),KC_WH_U,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE),JP_DOT, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, KC_MHEN, _______, _______, _______, _______, KC_HENK, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_nafuda( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, _ADJUST, RGB_SAD, RGB_VAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_MOD, RGB_TOG, RGB_SAI, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/readme.md b/keyboards/naked48/keymaps/salicylic_with_nafuda/readme.md new file mode 100644 index 0000000000..15e34e188c --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/readme.md @@ -0,0 +1,32 @@ +# The salicylic_with_nafuda keymap for naked48 + +Add Nafuda maps to the salicylic layout. + +## Default +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| | MOUSE| | +| BS+Ad| UP|Browser| +| LEFT| DOWN| RIGHT| + +## Mouse +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |Default| | +| BTN1| MS_U| BTN2| +| MS_L| MS_D| MS_R| + +## Browser +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |CloseTAB| | +|ReOpenTAB|WH_U|Default| +| LTAB| WH_D| RTAB| + +## Adjust +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |LED_VAD| | +|Default|LED_HUD|LED_VAI| +|LED_MOD|LED_ON/Off|LED_HUI| + diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/rules.mk b/keyboards/naked48/keymaps/salicylic_with_nafuda/rules.mk new file mode 100644 index 0000000000..f76b955efd --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/config.h b/keyboards/naked48/keymaps/salicylic_with_setta21/config.h new file mode 100644 index 0000000000..2ad4d0adeb --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/config.h @@ -0,0 +1,35 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + +#define RGBLED_NUM 69 // Number of LEDs +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 48, 21 } diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c new file mode 100644 index 0000000000..cbe65fe660 --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c @@ -0,0 +1,143 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, JP_EQL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL + //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| + ), + + [_LOWER] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE),JP_DOT, _______, _______, _______, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL + //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| + ), + + [_RAISE] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, JP_EQL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, KC_MHEN, _______, _______, _______, _______, KC_HENK, _______, _______, _______, JP_RPRN, SEND_SUM,SEND_AVE, KC_DEL + //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| + ), + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG,_______,_______ + //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool result = false; + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("_SUM*"); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("_AVERAGE*"); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("_COUNTIF*"); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("_MAX*"); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("_MIN*"); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} + diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/readme.md b/keyboards/naked48/keymaps/salicylic_with_setta21/readme.md new file mode 100644 index 0000000000..2c76bc2907 --- /dev/null +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The salicylic_with_setta21 keymap for naked48 + +Add Setta21 maps to the salicylic layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/keebio/quefrency/keymaps/default/rules.mk b/keyboards/naked48/keymaps/salicylic_with_setta21/rules.mk similarity index 100% rename from keyboards/keebio/quefrency/keymaps/default/rules.mk rename to keyboards/naked48/keymaps/salicylic_with_setta21/rules.mk diff --git a/keyboards/naked48/naked48.c b/keyboards/naked48/naked48.c new file mode 100644 index 0000000000..dc516e98f4 --- /dev/null +++ b/keyboards/naked48/naked48.c @@ -0,0 +1,6 @@ +#include "naked48.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + diff --git a/keyboards/naked48/naked48.h b/keyboards/naked48/naked48.h new file mode 100644 index 0000000000..1c715eb24a --- /dev/null +++ b/keyboards/naked48/naked48.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_naked48_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/naked48/readme.md b/keyboards/naked48/readme.md new file mode 100644 index 0000000000..bb16571efd --- /dev/null +++ b/keyboards/naked48/readme.md @@ -0,0 +1,18 @@ +# naked48 + +![naked48](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190326/20190326015949.jpg) + +This is 48 keys modification Ortholinear keyboard. + +Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +Hardware Supported: Naked60BMP PCB, Pro Micro +Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1271568) + +Make example for this keyboard (after setting up your build environment): + + make naked48:default:avrdude + +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). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/naked48led-build-guide) +[Firmware](https://github.com/Salicylic-acid3/qmk_firmware/tree/master/keyboards/naked48) diff --git a/keyboards/naked48/rev1/config.h b/keyboards/naked48/rev1/config.h new file mode 100644 index 0000000000..0d0390366f --- /dev/null +++ b/keyboards/naked48/rev1/config.h @@ -0,0 +1,84 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT naked48 +#define DESCRIPTION Ortholinear 48 Keys Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 12 + +// wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D4, C6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D7, E6, B4, B5 } +// When using Nafuda, comment out MATRIX_ROW_PINS_RIGHT and MATRIX_COL_PINS_RIGHT. +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6 } +#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5, B2, B2 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifndef RGBLED_NUM + #define RGBLED_NUM 48 +#endif + +#define RGBLIGHT_ANIMATIONS + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/naked48/rev1/rev1.c b/keyboards/naked48/rev1/rev1.c new file mode 100644 index 0000000000..e127232d80 --- /dev/null +++ b/keyboards/naked48/rev1/rev1.c @@ -0,0 +1,36 @@ +#include "naked48.h" + +/*#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + //led_set_user(usb_led); +} +#endif*/ + +#ifdef RGB_MATRIX_ENABLE + led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0,47,42,41,36,35,30,29,24,23,18,17 }, + { 1,46,43,40,37,34,31,28,25,22,19,16 }, + { 2,45,44,39,38,33,32,27,26,21,20,15 }, + { 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14 } + }, { + // LED Index to Physical Position + { 0, 0 }, { 0, 21 }, { 0, 43 }, { 17, 64 }, { 34, 64 },{ 52, 64 }, { 69, 64 }, { 86, 64 }, { 103, 64 }, { 121, 64 }, + { 138, 64 }, { 155, 64 }, { 172, 64 }, { 190, 64 }, { 207, 64 },{ 224, 43 }, { 224, 21 }, { 224, 0 }, { 207, 0 }, { 207, 21 }, + { 207, 43 }, { 190, 43 }, { 190, 21 }, { 190, 0 }, { 172, 0 },{ 172, 21 }, { 172, 43 }, { 155, 43 }, { 155, 21 }, { 155, 0 }, + { 138, 0 }, { 138, 21 }, { 138, 43 }, { 86, 43 }, { 86, 21 },{ 86, 0 }, { 69, 0 }, { 69, 21 }, { 69, 43 }, { 52, 43 }, + { 52, 21 }, { 52, 0 }, { 34, 0 }, { 34, 21 }, { 34, 43 },{ 17, 43 }, { 17, 21 }, { 17, 0 } + }, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4 +} }; +#endif + +void matrix_init_kb(void) { + matrix_init_user(); +}; \ No newline at end of file diff --git a/keyboards/naked48/rev1/rev1.h b/keyboards/naked48/rev1/rev1.h new file mode 100644 index 0000000000..de58f8f924 --- /dev/null +++ b/keyboards/naked48/rev1/rev1.h @@ -0,0 +1,92 @@ +#pragma once + +#include "naked48.h" + +#include "quantum.h" +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +////////////////////////////////////////////////////////////////////////////// +// When only use Naked48. +////////////////////////////////////////////////////////////////////////////// +/* + * ,------------------------------------ ------------------------------------. + * | L00 | L01 | L02 | L03 | L04 | L05 | | L06 | L07 | L08 | L09 | L0A | L0B | + * |------------------------------------ ------------------------------------+ + * | L10 | L11 | L12 | L13 | L14 | L15 | | L16 | L17 | L18 | L19 | L1A | L1B | + * |------------------------------------ ------------------------------------+ + * | L20 | L21 | L22 | L23 | L24 | L25 | | L26 | L17 | L28 | L29 | L2A | L2B | + * |-----------------------------------------------------------------------------------+ + * | L30 | L32 | L33 | L34 | L35 | L36 | L37 | L38 | L39 | L3A | L3B | L3D | + * |-----------------------------------------------------------------------' + */ + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + +////////////////////////////////////////////////////////////////////////////// +// When connecting Setta21 to Naked48. +////////////////////////////////////////////////////////////////////////////// + +#define LAYOUT_with_setta21( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, R30, R32, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO, R11, R12, R13, R14, R15,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R30,KC_NO, R32,KC_NO, R34, R35,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + +////////////////////////////////////////////////////////////////////////////// +// When connecting Nafuda to Naked48. +////////////////////////////////////////////////////////////////////////////// + +#define LAYOUT_with_nafuda( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R01, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R10, R11, R12, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + {KC_NO, R01,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R10, R11, R12,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + diff --git a/keyboards/keebio/quefrency/keymaps/default65/rules.mk b/keyboards/naked48/rev1/rules.mk similarity index 100% rename from keyboards/keebio/quefrency/keymaps/default65/rules.mk rename to keyboards/naked48/rev1/rules.mk diff --git a/keyboards/naked48/rules.mk b/keyboards/naked48/rules.mk new file mode 100644 index 0000000000..75e073df6d --- /dev/null +++ b/keyboards/naked48/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_DRIVER_ENABLE = no +# USE_I2C = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = naked48/rev1 diff --git a/keyboards/naked60/config.h b/keyboards/naked60/config.h new file mode 100644 index 0000000000..cfb6bf4ffc --- /dev/null +++ b/keyboards/naked60/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/naked60/info.json b/keyboards/naked60/info.json new file mode 100644 index 0000000000..a16bfe24d9 --- /dev/null +++ b/keyboards/naked60/info.json @@ -0,0 +1,73 @@ +{ + "keyboard_name": "Naked60", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"ESC", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":8, "y":0}, + {"label":"7", "x":9, "y":0}, + {"label":"8", "x":10, "y":0}, + {"label":"9", "x":11, "y":0}, + {"label":"0", "x":12, "y":0}, + {"label":"Back Space", "x":13, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":8, "y":1}, + {"label":"U", "x":9, "y":1}, + {"label":"I", "x":10, "y":1}, + {"label":"O", "x":11, "y":1}, + {"label":"P", "x":12, "y":1}, + {"label":"\\", "x":13, "y":1}, + {"label":"Esc", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":"H", "x":8, "y":2}, + {"label":"J", "x":9, "y":2}, + {"label":"K", "x":10, "y":2}, + {"label":"L", "x":11, "y":2}, + {"label":";", "x":12, "y":2}, + {"label":"'", "x":13, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"B", "x":5, "y":3}, + {"label":"N", "x":8, "y":3}, + {"label":"M", "x":9, "y":3}, + {"label":",", "x":10, "y":3}, + {"label":".", "x":11, "y":3}, + {"label":"/", "x":12, "y":3}, + {"label":"Enter", "x":13, "y":3}, + {"label":"Adjust", "x":1, "y":4}, + {"label":"Ctrl", "x":2, "y":4}, + {"label":"Alt", "x":3, "y":4}, + {"label":"GUI", "x":4, "y":4}, + {"label":"⇓", "x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"label":"⇑", "x":8, "y":4}, + {"label":"←", "x":9, "y":4}, + {"label":"↓", "x":10, "y":4}, + {"label":"↑", "x":11, "y":4}, + {"label":"→", "x":12, "y":4} + ] + } + } +} diff --git a/keyboards/naked60/keymaps/default/config.h b/keyboards/naked60/keymaps/default/config.h new file mode 100644 index 0000000000..4b3496d856 --- /dev/null +++ b/keyboards/naked60/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked60/keymaps/default/keymap.c b/keyboards/naked60/keymaps/default/keymap.c new file mode 100644 index 0000000000..9b764482ec --- /dev/null +++ b/keyboards/naked60/keymaps/default/keymap.c @@ -0,0 +1,96 @@ +#include QMK_KEYBOARD_H + + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, 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_BSLS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC, KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_FLOCK] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + 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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TILD, 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, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked60/keymaps/default/readme.md b/keyboards/naked60/keymaps/default/readme.md new file mode 100644 index 0000000000..c6f3342b21 --- /dev/null +++ b/keyboards/naked60/keymaps/default/readme.md @@ -0,0 +1,53 @@ +# The default keymap for naked60 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC | 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| BSPC| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| \ | +| LSFT | A| S| D| F| G| | | H| J| K| L| ;| '| +|LCTRL | Z| X| C| V| B| | | N| M| ,| .| /| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| LEFT| DOWN| UP| RIGHT| | + + + +## FLock +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| FLock| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| BSPC| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| BSLS| +| LSFT | A| S| D| F| G| | | H| J| K| L| SCLN| QUOT| +|LCTRL | Z| X| C| V| B| | | N| M| COMM| DOT| SLSH| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| LEFT| DOWN| UP| RIGHT| | + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| ~| !| @| #| $| %| | | ^| &| *| (| )| DEL| +| _____| F1| F2| F3| F4| F5| | | F6| _| +| {| }| PIPE| +| _____| F7| F8| F9| F10| F11| | | F12| SNUHS| SNUBS| ,| .| _____| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| ~| 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| DEL| +| _____| F1| F2| F3| F4| F5| | | F6| -| =| [| ]| BSLS| +| _____| F7| F8| F9| F10| F11| | | F12| NUHS| NUBS| ,| .| _____| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| FLock| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| TILD| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| +| LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| MS_L| MS_D| MS_R| XXXXX| PSCR| +| LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| C+A+D| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| RESET| RESET| RAISE| MNXT| VOLD| VOLU| MPLY| | + diff --git a/keyboards/naked60/keymaps/default_with_nafuda/config.h b/keyboards/naked60/keymaps/default_with_nafuda/config.h new file mode 100644 index 0000000000..0761e5b6d3 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_nafuda/config.h @@ -0,0 +1,27 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked60/keymaps/default_with_nafuda/keymap.c b/keyboards/naked60/keymaps/default_with_nafuda/keymap.c new file mode 100644 index 0000000000..be8c9f3ec9 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_nafuda/keymap.c @@ -0,0 +1,156 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _MOUSE, + _BROWSER, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(KC_W), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_T)),KC_WH_U,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL,LT(_ADJUST, KC_BSPC), KC_UP,TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,LT(_ADJUST, KC_BSPC), KC_UP,TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + 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_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_nafuda( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), _ADJUST, RGB_SAD, RGB_VAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RGB_MOD, RGB_TOG, RGB_SAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked60/keymaps/default_with_nafuda/readme.md b/keyboards/naked60/keymaps/default_with_nafuda/readme.md new file mode 100644 index 0000000000..27201090df --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_nafuda/readme.md @@ -0,0 +1,39 @@ +# The default_with_nafuda keymap for naked60 + +Add Nafuda maps to the default layout. + +Default + //|--------------------| + Mouse, + //|------+------+------| + BS + Ad, UP,Browser, + //|------+------+------| + LEFT, DOWN, RIGHT + //|--------------------| + +Mouse + //|--------------------| + Default, + //|------+------+------| + BTN1, MS_U, BTN2, + //|------+------+------| + MS_L, MS_D, MS_R + //|--------------------| + +Browser + //|--------------------| + CloseTAB, + //|------+------+------| + ReOpenTAB, WH_U,Default, + //|------+------+------| + LTAB, WH_D, RTAB + //|--------------------| + +Adjust + //|------------------------| + LED VAD, + //|------+----------+------| + Default, LED HUD,LED VAI, + //|------+----------+------| + LED MOD,LED ON/Off,LED HUI + //|------------------------| diff --git a/keyboards/naked60/keymaps/default_with_setta21/config.h b/keyboards/naked60/keymaps/default_with_setta21/config.h new file mode 100644 index 0000000000..0761e5b6d3 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_setta21/config.h @@ -0,0 +1,27 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked60/keymaps/default_with_setta21/keymap.c b/keyboards/naked60/keymaps/default_with_setta21/keymap.c new file mode 100644 index 0000000000..95a273a388 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_setta21/keymap.c @@ -0,0 +1,156 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, KC_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER), KC_SPC, KC_SPC,MO(_RAISE),KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______,_______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + 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_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST,KC_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + 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_F3, KC_F6, KC_F9,SEND_CIF, KC_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_RPRN, SEND_SUM,SEND_AVE, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), RGB_MOD, RGB_TOG,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("=SUM("); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("=AVERAGE("); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("=COUNTIF("); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("=MAX("); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("=MIN("); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked60/keymaps/default_with_setta21/readme.md b/keyboards/naked60/keymaps/default_with_setta21/readme.md new file mode 100644 index 0000000000..750a8b3508 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The default_with_setta21 keymap for naked60 + +Add Setta21 maps to the default layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|Ad+Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|ADJUST| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/naked60/keymaps/salicylic/config.h b/keyboards/naked60/keymaps/salicylic/config.h new file mode 100644 index 0000000000..4b3496d856 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic/config.h @@ -0,0 +1,22 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked60/keymaps/salicylic/keymap.c b/keyboards/naked60/keymaps/salicylic/keymap.c new file mode 100644 index 0000000000..17172f77b9 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic/keymap.c @@ -0,0 +1,111 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + TD(TD_ESFL), 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, JP_LBRC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, LT(_LOWER,KC_ENT),KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC), KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_FLOCK] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE),JP_DOT, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked60/keymaps/salicylic/readme.md b/keyboards/naked60/keymaps/salicylic/readme.md new file mode 100644 index 0000000000..2901dbf7fa --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic/readme.md @@ -0,0 +1,51 @@ +# The salicylic keymap for naked60 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC(FLock) | 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| BSPC| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| [| +|LCTRL | A| S| D| F| G| | | H| J| K| L| -| ]| +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \| +| | LEFT| RIGHT| LGUI| MHEN|LOWER, ENT|BSPC|DEL|RAISE,SPC|HENK| LALT| DOWN| UP| | + + +## FLock +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC(FLock)| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| BSPC| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| [| +|LCTRL | A| S| D| F| G| | | H| J| K| L| -| ]| +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \| +| | LEFT| RIGHT| LGUI| MHEN|LOWER, ENT|BSPC|DEL|RAISE,SPC|HENK| LALT| DOWN| UP| | + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| :| !| ?| [| ]| ~| | | 6| 7| 8| 9| *| /| +| '| #| "| (| )| @| | | XXXXX| 4| 5| 6| -| =| +| ^| %| &| ;| :| PIPE| | | 0| 1| 2| 3| +| ENT| +| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| ESC| 1| 2| 3| 4| 5| | | 6| XXXXX| UP| XXXXX| PGUP| DEL| +|F11,LCTRL| F1| F2| F3| F4| F5| | | XXXXX| LEFT| DOWN| RIGHT| LSFT| ENT| +|F12,LSFT| F6| F7| F8| F9| F10| | | XXXXX| XXXXX| XXXXX| XXXXX| PGDN| XXXXX| +| | LEFT| RIGHT| LGUI| MHEN| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:-----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| ESC| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| +| LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| MS_L| MS_D| MS_R| XXXXX| PSCR| +| LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| C+A+D| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| RESET| RESET| RAISE| HENK| LALT| DOWN| UP| | + diff --git a/keyboards/naked60/keymaps/salicylic/rules.mk b/keyboards/naked60/keymaps/salicylic/rules.mk new file mode 100644 index 0000000000..e5ddcae8d9 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h b/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h new file mode 100644 index 0000000000..47da6d4418 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h @@ -0,0 +1,28 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c new file mode 100644 index 0000000000..3a2cd9eb85 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c @@ -0,0 +1,176 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _MOUSE, + _BROWSER, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC), KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(KC_W), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_T)),KC_WH_U,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE), JP_DOT,_______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_nafuda( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), _ADJUST, RGB_SAD, RGB_VAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RGB_MOD, RGB_TOG, RGB_SAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md b/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md new file mode 100644 index 0000000000..17b973b73a --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md @@ -0,0 +1,39 @@ +# The salicylic_with_nafuda keymap for naked60 + +Add Nafuda maps to the salicylic layout. + +Default + //|--------------------| + Mouse, + //|------+------+------| + BS + Ad, UP,Browser, + //|------+------+------| + LEFT, DOWN, RIGHT + //|--------------------| + +Mouse + //|--------------------| + Default, + //|------+------+------| + BTN1, MS_U, BTN2, + //|------+------+------| + MS_L, MS_D, MS_R + //|--------------------| + +Browser + //|--------------------| + CloseTAB, + //|------+------+------| + ReOpenTAB, WH_U,Default, + //|------+------+------| + LTAB, WH_D, RTAB + //|--------------------| + +Adjust + //|------------------------| + LED VAD, + //|------+----------+------| + Default, LED HUD,LED VAI, + //|------+----------+------| + LED MOD,LED ON/Off,LED HUI + //|------------------------| diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk b/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk new file mode 100644 index 0000000000..e5ddcae8d9 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/config.h b/keyboards/naked60/keymaps/salicylic_with_setta21/config.h new file mode 100644 index 0000000000..0761e5b6d3 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/config.h @@ -0,0 +1,27 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c new file mode 100644 index 0000000000..a1f5a6e21a --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c @@ -0,0 +1,170 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, LT(_LOWER,KC_ENT),KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC), KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE), JP_DOT,_______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, JP_RPRN, SEND_SUM,SEND_AVE, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), RGB_MOD, RGB_TOG,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool result = false; + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("_SUM*"); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("_AVERAGE*"); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("_COUNTIF*"); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("_MAX*"); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("_MIN*"); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md b/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md new file mode 100644 index 0000000000..1baa36703a --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The salicylic_with_setta21 keymap for naked60 + +Add Setta21 maps to the salicylic layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk b/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk new file mode 100644 index 0000000000..e5ddcae8d9 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked60/naked60.c b/keyboards/naked60/naked60.c new file mode 100644 index 0000000000..1ff159cdb4 --- /dev/null +++ b/keyboards/naked60/naked60.c @@ -0,0 +1 @@ +#include "naked60.h" diff --git a/keyboards/naked60/naked60.h b/keyboards/naked60/naked60.h new file mode 100644 index 0000000000..1b736feec0 --- /dev/null +++ b/keyboards/naked60/naked60.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_naked60_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/naked60/readme.md b/keyboards/naked60/readme.md new file mode 100644 index 0000000000..60bb164377 --- /dev/null +++ b/keyboards/naked60/readme.md @@ -0,0 +1,18 @@ +# naked60 + +![naked60](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190530/20190530040355.jpg) + +This is 60 keys modification Ortholinear keyboard. + +Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +Hardware Supported: Naked60BMP PCB, Pro Micro +Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1360780) + +Make example for this keyboard (after setting up your build environment): + + make naked60:default:avrdude + +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). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/naked60bmp-build-guide) +[Firmware](https://github.com/Salicylic-acid3/qmk_firmware/tree/master/keyboards/naked60) diff --git a/keyboards/naked60/rev1/config.h b/keyboards/naked60/rev1/config.h new file mode 100644 index 0000000000..ac0c0ab2fc --- /dev/null +++ b/keyboards/naked60/rev1/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT naked60 +#define DESCRIPTION Ortholinear 60 Keys Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 12 + +// Rows are doubled-up +#define MATRIX_ROW_PINS { B6, D1, D0, D4, C6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D7, E6, B4, B5, D3 } +// When using Setta21 +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B2 } +#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5, B2, B2 } +// When using Nafuda +//#define MATRIX_ROW_PINS_RIGHT { D1, D0, D4, C6, B6 } +//#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, D7, E6, B4, B5, D3 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 + +/* 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 diff --git a/keyboards/naked60/rev1/rev1.c b/keyboards/naked60/rev1/rev1.c new file mode 100644 index 0000000000..bce48f89c3 --- /dev/null +++ b/keyboards/naked60/rev1/rev1.c @@ -0,0 +1,5 @@ +#include "naked60.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/naked60/rev1/rev1.h b/keyboards/naked60/rev1/rev1.h new file mode 100644 index 0000000000..d8ee83c470 --- /dev/null +++ b/keyboards/naked60/rev1/rev1.h @@ -0,0 +1,92 @@ +#pragma once + +#include "naked60.h" + +#include "quantum.h" + + +////////////////////////////////////////////////////////////////////////////// +// When only use naked60. +////////////////////////////////////////////////////////////////////////////// +/* + * ,------------------------------------ ------------------------------------. + * | L00 | L01 | L02 | L03 | L04 | L05 | | L06 | L07 | L08 | L09 | L0A | L0B | + * |------------------------------------ ------------------------------------+ + * | L10 | L11 | L12 | L13 | L14 | L15 | | L16 | L17 | L18 | L19 | L1A | L1B | + * |------------------------------------ ------------------------------------+ + * | L20 | L21 | L22 | L23 | L24 | L25 | | L26 | L17 | L28 | L29 | L2A | L2B | + * |------------------------------------ ------------------------------------+ + * | L30 | L31 | L32 | L33 | L34 | L35 | | L36 | L37 | L38 | L39 | L3A | L3B | + * |-----------------------------------------------------------------------' + * | L40 | L41 | L42 | L43 | L44 | L45 | L46 | L47 | L48 | L49 | L4A | L4B | + * |-----------------------------------------------------------------------' + */ + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + +////////////////////////////////////////////////////////////////////////////// +// When connecting Setta21 to naked60. +////////////////////////////////////////////////////////////////////////////// + +#define LAYOUT_with_setta21( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, R30, R32, R34, R35, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B }, \ + { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO, R11, R12, R13, R14, R15,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R30,KC_NO, R32,KC_NO, R34, R35,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + +////////////////////////////////////////////////////////////////////////////// +// When connecting Nafuda to naked60. +////////////////////////////////////////////////////////////////////////////// + +#define LAYOUT_with_nafuda( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R01, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R10, R11, R12, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B }, \ + {KC_NO, R01,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R10, R11, R12,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + diff --git a/keyboards/lets_split/keymaps/default/rules.mk b/keyboards/naked60/rev1/rules.mk similarity index 100% rename from keyboards/lets_split/keymaps/default/rules.mk rename to keyboards/naked60/rev1/rules.mk diff --git a/keyboards/naked60/rules.mk b/keyboards/naked60/rules.mk new file mode 100644 index 0000000000..f5bce8d50c --- /dev/null +++ b/keyboards/naked60/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +OLED_DRIVER_ENABLE = no +USE_I2C = no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = naked60/rev1 diff --git a/keyboards/naked64/config.h b/keyboards/naked64/config.h new file mode 100644 index 0000000000..cfb6bf4ffc --- /dev/null +++ b/keyboards/naked64/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/naked64/info.json b/keyboards/naked64/info.json new file mode 100644 index 0000000000..60ac6d7276 --- /dev/null +++ b/keyboards/naked64/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Naked64", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"pgup", "x":0.25, "y":0}, + {"label":"ESC", "x":1.75, "y":0}, + {"label":"1", "x":2.75, "y":0}, + {"label":"2", "x":4, "y":0}, + {"label":"3", "x":5, "y":0}, + {"label":"4", "x":6, "y":0}, + {"label":"5", "x":7, "y":0}, + {"label":"6", "x":9.25, "y":0}, + {"label":"7", "x":10.25, "y":0}, + {"label":"8", "x":11.25, "y":0}, + {"label":"9", "x":12.25, "y":0}, + {"label":"0", "x":13.5, "y":0}, + {"label":"-", "x":14.5, "y":0}, + {"label":"Back Space", "x":15.5, "y":0}, + {"label":"pgdn", "x":0, "y":1}, + {"label":"Tab", "x":1.25, "y":1, "w":1.5}, + {"label":"Q", "x":2.75, "y":1}, + {"label":"W", "x":4, "y":1}, + {"label":"E", "x":5, "y":1}, + {"label":"R", "x":6, "y":1}, + {"label":"T", "x":7, "y":1}, + {"label":"Y", "x":9.25, "y":1}, + {"label":"U", "x":10.25, "y":1}, + {"label":"I", "x":11.25, "y":1}, + {"label":"O", "x":12.25, "y":1}, + {"label":"P", "x":13.5, "y":1}, + {"label":"[", "x":14.5, "y":1}, + {"label":"]", "x":15.5, "y":1}, + {"label":"Control", "x":1, "y":2, "w":1.75}, + {"label":"A", "x":2.75, "y":2}, + {"label":"S", "x":4, "y":2}, + {"label":"D", "x":5, "y":2}, + {"label":"F", "x":6, "y":2}, + {"label":"G", "x":7, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":";", "x":13.5, "y":2}, + {"label":"'", "x":14.5, "y":2}, + {"label":"Return", "x":15.5, "y":2}, + {"label":"Shift", "x":0.5, "y":3, "w":2.25}, + {"label":"Z", "x":2.75, "y":3}, + {"label":"X", "x":4, "y":3}, + {"label":"C", "x":5, "y":3}, + {"label":"V", "x":6, "y":3}, + {"label":"B", "x":7, "y":3}, + {"label":"N", "x":9.25, "y":3}, + {"label":"M", "x":10.25, "y":3}, + {"label":",", "x":11.25, "y":3}, + {"label":".", "x":12.25, "y":3}, + {"label":"/", "x":13.5, "y":3}, + {"label":"↑", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3}, + {"label":"Adjust", "x":1.25, "y":4, "w":1.75}, + {"label":"Alt", "x":3.75, "y":4.25}, + {"x":4.75, "y":4.25, "w":2.25}, + {"label":"⇓", "x":7, "y":4.25}, + {"label":"⇑", "x":9.25, "y":4.25}, + {"x":10.25, "y":4.25, "w":2}, + {"label":"GUI", "x":12.25, "y":4.25}, + {"label":"←", "x":13.5, "y":4}, + {"label":"↓", "x":14.5, "y":4}, + {"label":"→", "x":15.5, "y":4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/naked64/keymaps/default/config.h b/keyboards/naked64/keymaps/default/config.h new file mode 100644 index 0000000000..8c4e1f5129 --- /dev/null +++ b/keyboards/naked64/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + + diff --git a/keyboards/naked64/keymaps/default/keymap.c b/keyboards/naked64/keymaps/default/keymap.c new file mode 100644 index 0000000000..4460407dba --- /dev/null +++ b/keyboards/naked64/keymaps/default/keymap.c @@ -0,0 +1,156 @@ +#include QMK_KEYBOARD_H + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + KC_PGUP, 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_BSPC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_PGDN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCBR, KC_RCBR, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + MO(_ADJUST), KC_LALT, KC_SPC,MO(_LOWER), MO(_RAISE), KC_SPC, KC_LGUI, KC_LEFT, KC_DOWN,KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + TG(_FLOCK), KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, KC_ESC, 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, 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_VOLU,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, KC_ESC, 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_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, 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, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + TG(_FLOCK), RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR,XXXXXXX, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ) +}; + + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _FLOCK: + rgblight_sethsv_range(HSV_YELLOW, 0, 2); + break; + case _LOWER: + rgblight_sethsv_range(HSV_BLUE, 0, 2); + break; + case _RAISE: + rgblight_sethsv_range(HSV_RED, 0, 2); + break; + case _ADJUST: + rgblight_sethsv_range(HSV_PURPLE, 0, 2); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 2); + break; + } + rgblight_set_effect_range( 2, 6); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked64/keymaps/default/readme.md b/keyboards/naked64/keymaps/default/readme.md new file mode 100644 index 0000000000..66bb965b29 --- /dev/null +++ b/keyboards/naked64/keymaps/default/readme.md @@ -0,0 +1,56 @@ +# The default keymap for naked64 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| BSPC| +| PgDn | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| +| | Control | A| S| D| F| G| H| J| K| L| ;| '| ENT| +| | Shift | Z| X| C| V| B| N| M| ,| .| /| Up| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| Left| Down| Right| + + + +## FLock +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| +| | Control | A| S| D| F| G| H| J| K| L| ;| '| ENT| +| | Shift | Z| X| C| V| B| N| M| ,| .| /| Up| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| Left| Down| Right| + + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | !| @| #| $| %| ^| &| *| (| )| DEL| ]| +| | Control | F1| F2| F3| F4| F5| F6| _| +| {| }| PIPE| ENT| +| | Shift | F7| F8| F9| F10| F11| F12| SNUHS| SNUBS| ,| .| VoUp| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | ,| MNxt| VoDn| Mply| + + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp | ESC | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| BSPC| +| | Control | F1| F2| F3| F4| F5| F6| -| =| (| )| \| ENT| +| | Shift | F7| F8| F9| F10| F11| F12| NUHS| NUBS| .| /| VoUp| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| MNxt| VoDn| Mply| + + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp | RST | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LRST| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| +| | Control | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LTOG| LMOD| XXXXX| C+A+D|Alt+PSCR|PSCR| XXXXX| +| | Shift | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LVAD| LVAI| LHUD| LHUI| LSAD| LSAI| XXXXX| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| MNxt| VoDn| Mply| + + diff --git a/keyboards/lets_split_eh/keymaps/default/rules.mk b/keyboards/naked64/keymaps/default/rules.mk similarity index 100% rename from keyboards/lets_split_eh/keymaps/default/rules.mk rename to keyboards/naked64/keymaps/default/rules.mk diff --git a/keyboards/naked64/keymaps/default_with_setta21/config.h b/keyboards/naked64/keymaps/default_with_setta21/config.h new file mode 100644 index 0000000000..c88277da20 --- /dev/null +++ b/keyboards/naked64/keymaps/default_with_setta21/config.h @@ -0,0 +1,31 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_LED_MAP { 0, 1, 3, 2, 2, 3, 2, 3, 4, 5, 6, 7 } + diff --git a/keyboards/naked64/keymaps/default_with_setta21/keymap.c b/keyboards/naked64/keymaps/default_with_setta21/keymap.c new file mode 100644 index 0000000000..5e3d8bf642 --- /dev/null +++ b/keyboards/naked64/keymaps/default_with_setta21/keymap.c @@ -0,0 +1,185 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + KC_PGUP, 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_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_PGDN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCBR, KC_RCBR, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + MO(_ADJUST), KC_LALT, KC_SPC,MO(_LOWER), MO(_RAISE), KC_SPC, KC_LGUI, KC_LEFT, KC_DOWN,KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + TG(_FLOCK), KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, 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_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST,KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,KC_VOLU,_______, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |------------------------------------------------| + _______, KC_ESC, 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_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + _______, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, _______, KC_RPRN, SEND_SUM,SEND_AVE, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + TG(_FLOCK), RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR,XXXXXXX, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, RGB_MOD, RGB_TOG,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _FLOCK: + rgblight_sethsv_range(HSV_YELLOW, 0, 2); + break; + case _LOWER: + rgblight_sethsv_range(HSV_BLUE, 0, 2); + break; + case _RAISE: + rgblight_sethsv_range(HSV_RED, 0, 2); + break; + case _ADJUST: + rgblight_sethsv_range(HSV_PURPLE, 0, 2); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 2); + break; + } + rgblight_set_effect_range( 2, 6); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("=SUM("); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("=AVERAGE("); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("=COUNTIF("); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("=MAX("); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("=MIN("); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked64/keymaps/default_with_setta21/readme.md b/keyboards/naked64/keymaps/default_with_setta21/readme.md new file mode 100644 index 0000000000..6196d68fe0 --- /dev/null +++ b/keyboards/naked64/keymaps/default_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The default_with_setta21 keymap for naked64 + +Add Setta21 maps to the default layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|Ad+Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|ADJUST| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/lfkeyboards/lfk65_hs/keymaps/default/rules.mk b/keyboards/naked64/keymaps/default_with_setta21/rules.mk similarity index 100% rename from keyboards/lfkeyboards/lfk65_hs/keymaps/default/rules.mk rename to keyboards/naked64/keymaps/default_with_setta21/rules.mk diff --git a/keyboards/naked64/keymaps/salicylic/config.h b/keyboards/naked64/keymaps/salicylic/config.h new file mode 100644 index 0000000000..4b3496d856 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic/config.h @@ -0,0 +1,22 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked64/keymaps/salicylic/keymap.c b/keyboards/naked64/keymaps/salicylic/keymap.c new file mode 100644 index 0000000000..ca4fbb7550 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic/keymap.c @@ -0,0 +1,203 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _MOUSE, + _BROWSER, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + TG(_MOUSE),TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, KC_BSPC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + TG(_BROWSER), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, JP_RBRC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_BSLS, KC_ENT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, KC_UP, KC_RSFT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ZKHK, KC_LGUI,LT(_LOWER,KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC),ALT_T(KC_HENK),KC_LEFT,KC_DOWN,KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + TG(_MOUSE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + TG(_BROWSER), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_T)),KC_UP,LCTL(KC_W), \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_TAB)),KC_DOWN,LCTL(KC_TAB) \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______,TD(TD_ESQW),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, XXXXXXX, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, KC_UP, KC_RSFT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ZKHK, _______, MO(_LOWER), _______, _______, MO(_RAISE), JP_DOT, KC_LEFT, KC_DOWN, KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, KC_ESC, 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_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + LCTL_T(KC_F11), XXXXXXX, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, XXXXXXX, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR,XXXXXXX, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ) +}; + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _MOUSE: + rgblight_sethsv_at(HSV_RED, 0); + break; + case _BROWSER: + rgblight_sethsv_at(HSV_RED, 1); + break; + case _FLOCK: + rgblight_sethsv_range(HSV_YELLOW, 0, 2); + break; + case _LOWER: + rgblight_sethsv_range(HSV_BLUE, 0, 2); + break; + case _RAISE: + rgblight_sethsv_range(HSV_RED, 0, 2); + break; + case _ADJUST: + rgblight_sethsv_range(HSV_PURPLE, 0, 2); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 2); + break; + } + rgblight_set_effect_range( 2, 6); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked64/keymaps/salicylic/readme.md b/keyboards/naked64/keymaps/salicylic/readme.md new file mode 100644 index 0000000000..8b2d812ea4 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic/readme.md @@ -0,0 +1,56 @@ +# The salicylic keymap for naked64 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| BSPC| +| PgDn | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| +| | Control | A| S| D| F| G| H| J| K| L| -| \| ENT| +| | Shift | Z| X| C| V| B| N| M| ,| .| /| Up| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| Left| Down| Right| + + + +## FLock +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| +| | Control | A| S| D| F| G| H| J| K| L| ;| '| ENT| +| | Shift | Z| X| C| V| B| N| M| ,| .| /| Up| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| Left| Down| Right| + + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | !| @| #| $| %| ^| &| *| (| )| DEL| ]| +| | Control | F1| F2| F3| F4| F5| F6| _| +| {| }| PIPE| ENT| +| | Shift | F7| F8| F9| F10| F11| F12| SNUHS| SNUBS| ,| .| VoUp| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | ,| MNxt| VoDn| Mply| + + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp | ESC | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| BSPC| +| | Control | F1| F2| F3| F4| F5| F6| -| =| (| )| \| ENT| +| | Shift | F7| F8| F9| F10| F11| F12| NUHS| NUBS| .| /| VoUp| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| MNxt| VoDn| Mply| + + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp | RST | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| +| | Control | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LTOG| LMOD| XXXXX| C+A+D|Alt+PSCR|PSCR| XXXXX| +| | Shift | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LVAD| LVAI| LHUD| LHUI| LSAD| LSAI| XXXXX| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| MNxt| VoDn| Mply| + + diff --git a/keyboards/naked64/keymaps/salicylic/rules.mk b/keyboards/naked64/keymaps/salicylic/rules.mk new file mode 100644 index 0000000000..e5ddcae8d9 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/config.h b/keyboards/naked64/keymaps/salicylic_with_setta21/config.h new file mode 100644 index 0000000000..0761e5b6d3 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/config.h @@ -0,0 +1,27 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c new file mode 100644 index 0000000000..0a1acbaa6d --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c @@ -0,0 +1,234 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _MOUSE, + _BROWSER, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + TG(_MOUSE),TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + TG(_BROWSER), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, JP_RBRC, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_BSLS, KC_ENT,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, KC_UP, KC_RSFT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + KC_ZKHK, KC_LGUI,LT(_LOWER,KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC),ALT_T(KC_HENK),KC_LEFT,KC_DOWN,KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + TG(_MOUSE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + TG(_BROWSER), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, _______,_______,_______,_______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_T)),KC_UP,LCTL(KC_W), _______, _______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_TAB)),KC_DOWN,LCTL(KC_TAB) \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + _______,TD(TD_ESQW),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, XXXXXXX, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST,KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, KC_UP, KC_RSFT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + KC_ZKHK, _______, MO(_LOWER), _______, _______, MO(_RAISE), JP_DOT, KC_LEFT, KC_DOWN, KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |------------------------------------------------| + _______, KC_ESC, 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_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + _______, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + LCTL_T(KC_F11), XXXXXXX, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, XXXXXXX, _______, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| + SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, _______, _______, KC_RPRN, SEND_SUM,SEND_AVE, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + _______, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR,XXXXXXX, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, RGB_MOD, RGB_TOG,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ) +}; + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _MOUSE: + rgblight_sethsv_at(HSV_RED, 0); + break; + case _BROWSER: + rgblight_sethsv_at(HSV_RED, 1); + break; + case _FLOCK: + rgblight_sethsv_range(HSV_YELLOW, 0, 2); + break; + case _LOWER: + rgblight_sethsv_range(HSV_BLUE, 0, 2); + break; + case _RAISE: + rgblight_sethsv_range(HSV_RED, 0, 2); + break; + case _ADJUST: + rgblight_sethsv_range(HSV_PURPLE, 0, 2); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 2); + break; + } + rgblight_set_effect_range( 2, 6); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("=SUM("); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("=AVERAGE("); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("=COUNTIF("); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("=MAX("); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("=MIN("); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/readme.md b/keyboards/naked64/keymaps/salicylic_with_setta21/readme.md new file mode 100644 index 0000000000..cf09c1a74c --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The salicylic_with_setta21 keymap for naked64 + +Add Setta21 maps to the salicylic layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|Ad+Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|ADJUST| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/rules.mk b/keyboards/naked64/keymaps/salicylic_with_setta21/rules.mk new file mode 100644 index 0000000000..e5ddcae8d9 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked64/naked64.c b/keyboards/naked64/naked64.c new file mode 100644 index 0000000000..a2863f0477 --- /dev/null +++ b/keyboards/naked64/naked64.c @@ -0,0 +1 @@ +#include "naked64.h" diff --git a/keyboards/naked64/naked64.h b/keyboards/naked64/naked64.h new file mode 100644 index 0000000000..a131440118 --- /dev/null +++ b/keyboards/naked64/naked64.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_naked64_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/naked64/readme.md b/keyboards/naked64/readme.md new file mode 100644 index 0000000000..403e5cf4ae --- /dev/null +++ b/keyboards/naked64/readme.md @@ -0,0 +1,18 @@ +# naked64 + +![naked64](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190627/20190627022840.jpg) + +This is 64 keys modification Ortholinear keyboard. + +Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +Hardware Supported: Naked64SF PCB, Pro Micro +Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1418693) + +Make example for this keyboard (after setting up your build environment): + + make naked64: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). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/naked64SF-build-guide) +[Firmware](https://github.com/Salicylic-acid3/qmk_firmware/tree/master/keyboards/naked64) diff --git a/keyboards/naked64/rev1/config.h b/keyboards/naked64/rev1/config.h new file mode 100644 index 0000000000..2e48edbc03 --- /dev/null +++ b/keyboards/naked64/rev1/config.h @@ -0,0 +1,82 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT naked64 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D3 } +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B4, B5, B2, B2 } +#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B6 + +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_LED_MAP { 0, 1, 3, 2, 2, 3, 2, 3, 4, 5, 6, 7 } + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +// Selection of RGBLIGHT MODE to use. +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_SNAKE + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/naked64/rev1/rev1.c b/keyboards/naked64/rev1/rev1.c new file mode 100644 index 0000000000..d851f97823 --- /dev/null +++ b/keyboards/naked64/rev1/rev1.c @@ -0,0 +1,5 @@ +#include "rev1.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/naked64/rev1/rev1.h b/keyboards/naked64/rev1/rev1.h new file mode 100644 index 0000000000..a0f83749d1 --- /dev/null +++ b/keyboards/naked64/rev1/rev1.h @@ -0,0 +1,78 @@ +#pragma once + +#include "naked64.h" + + +////////////////////////////////////////////////////////////////////////////// +// When only use Naked64. +////////////////////////////////////////////////////////////////////////////// +/* + * ,------------------------------------------ -----------------------------------------. + * | L00 | L20 | L70 | L31 | L02 | L52 | L13 | | L63 | L34 | L05 | L45 | L16 | L66 | L37 | + * |------------------------------------------ ------------------------------------------+ + * | L10 | L30 | L01 | L41 | L12 | L62 | L23 | | L73 | L44 | L15 | L55 | L26 | L76 | L47 | + * |------------------------------------------ ------------------------------------------+ + * | L40 | L11 | L51 | L22 | L72 | L33 | | L04 | L54 | L25 | L65 | L36 | L07 | L57 | + * |------------------------------------ ------------------------------------------+ + * | L50 | L21 | L61 | L32 | L03 | L43 | | L14 | L64 | L35 | L75 | L46 | L17 | L67 | + * |------------------------------------ ------------------------------------------+ + * | L60 | | L71 | L42 | | L53 | | L24 | L74 | | L06 | L56 | L27 | L77 | + * |------------------------------------ ------------------------------------------' + */ + +#define LAYOUT( \ + L00, L20, L70, L31, L02, L52, L13, L63, L34, L05, L45, L16, L66, L37, \ + L10, L30, L01, L41, L12, L62, L23, L73, L44, L15, L55, L26, L76, L47, \ + L40, L11, L51, L22, L72, L33, L04, L54, L25, L65, L36, L07, L57, \ + L50, L21, L61, L32, L03, L43, L14, L64, L35, L75, L46, L17, L67, \ + L60, L71, L42, L53, L24, L74, L06, L56, L27, L77 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37 }, \ + { L40, L41, L42, L43, L44, L45, L46, L47 }, \ + { L50, L51, L52, L53, L54, L55, L56, L57 }, \ + { L60, L61, L62, L63, L64, L65, L66, L67 }, \ + { L70, L71, L72, L73, L74, L75, L76, L77 }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + +////////////////////////////////////////////////////////////////////////////// +// When connecting Setta21 to Naked64. +////////////////////////////////////////////////////////////////////////////// + +#define LAYOUT_with_setta21( \ + L00, L20, L70, L31, L02, L52, L13, L63, L34, L05, L45, L16, L66, L37, R00, R01, R02, R03, R04, R05, \ + L10, L30, L01, L41, L12, L62, L23, L73, L44, L15, L55, L26, L76, L47, R11, R12, R13, R14, R15, \ + L40, L11, L51, L22, L72, L33, L04, L54, L25, L65, L36, L07, L57, R20, R21, R22, R23, R24, R25, \ + L50, L21, L61, L32, L03, L43, L14, L64, L35, L75, L46, L17, L67, R30, R32, R34, R35, \ + L60, L71, L42, L53, L24, L74, L06, L56, L27, L77 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37 }, \ + { L40, L41, L42, L43, L44, L45, L46, L47 }, \ + { L50, L51, L52, L53, L54, L55, L56, L57 }, \ + { L60, L61, L62, L63, L64, L65, L66, L67 }, \ + { L70, L71, L72, L73, L74, L75, L76, L77 }, \ + { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO }, \ + {KC_NO, R11, R12, R13, R14, R15,KC_NO,KC_NO }, \ + { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO }, \ + { R30,KC_NO, R32,KC_NO, R34, R35,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + diff --git a/keyboards/m10a/keymaps/default/rules.mk b/keyboards/naked64/rev1/rules.mk similarity index 100% rename from keyboards/m10a/keymaps/default/rules.mk rename to keyboards/naked64/rev1/rules.mk diff --git a/keyboards/naked64/rules.mk b/keyboards/naked64/rules.mk new file mode 100644 index 0000000000..864baccc8f --- /dev/null +++ b/keyboards/naked64/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +TAP_DANCE_ENABLE = no +OLED_DRIVER_ENABLE = no +USE_I2C = no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = naked64/rev1 diff --git a/keyboards/namecard2x4/rev1/rules.mk b/keyboards/namecard2x4/rev1/rules.mk index 51d2cbcb2e..e69de29bb2 100644 --- a/keyboards/namecard2x4/rev1/rules.mk +++ b/keyboards/namecard2x4/rev1/rules.mk @@ -1,81 +0,0 @@ -# MCU name -#MCU = at90usb1286 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - -#UNICODEMAP_ENABLE = yes # for emoji user -#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips diff --git a/keyboards/namecard2x4/rev2/rules.mk b/keyboards/namecard2x4/rev2/rules.mk index 51d2cbcb2e..e69de29bb2 100644 --- a/keyboards/namecard2x4/rev2/rules.mk +++ b/keyboards/namecard2x4/rev2/rules.mk @@ -1,81 +0,0 @@ -# MCU name -#MCU = at90usb1286 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - -#UNICODEMAP_ENABLE = yes # for emoji user -#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rules.mk new file mode 100644 index 0000000000..4c4f8c9ee0 --- /dev/null +++ b/keyboards/namecard2x4/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +#UNICODEMAP_ENABLE = yes # for emoji user +#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips + +DEFAULT_FOLDER = namecard2x4/rev2 diff --git a/keyboards/nek_type_a/config.h b/keyboards/nek_type_a/config.h index 5b105804dd..98a954dd12 100644 --- a/keyboards/nek_type_a/config.h +++ b/keyboards/nek_type_a/config.h @@ -46,8 +46,3 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk index 6f172a9cea..db5b1642c8 100644 --- a/keyboards/nek_type_a/rules.mk +++ b/keyboards/nek_type_a/rules.mk @@ -1,14 +1,17 @@ -SRC = matrix.c mcp23017.c - +# MCU name MCU = atmega32u4 + +# Processor frequency F_CPU = 8000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) @@ -30,4 +33,6 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes DEBUG_ENABLE = yes -BLUETOOTH = AdafruitBLE \ No newline at end of file +BLUETOOTH = AdafruitBLE + +SRC += matrix.c mcp23017.c diff --git a/keyboards/newgame40/keymaps/default/keymap.c b/keyboards/newgame40/keymaps/default/keymap.c index f3588751fa..41f16a7b76 100644 --- a/keyboards/newgame40/keymaps/default/keymap.c +++ b/keyboards/newgame40/keymaps/default/keymap.c @@ -16,8 +16,7 @@ #include QMK_KEYBOARD_H - extern keymap_config_t keymap_config; - + enum layers { _QWERTY, _COLEMAK, diff --git a/keyboards/newgame40/rules.mk b/keyboards/newgame40/rules.mk index cca40ce8e2..ab07dd2b6a 100644 --- a/keyboards/newgame40/rules.mk +++ b/keyboards/newgame40/rules.mk @@ -1,49 +1,14 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/nightmare/config.h b/keyboards/nightmare/config.h new file mode 100644 index 0000000000..fafba644dd --- /dev/null +++ b/keyboards/nightmare/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 cfbender + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xB00B +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER cfbender +#define PRODUCT nightmare +#define DESCRIPTION A 50% from The Society of the Crossed Keys + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { B4, B5, D3, D2, D1, D0, F4, F5, F6, F7, B1, B3, B2, B6} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 1 diff --git a/keyboards/nightmare/info.json b/keyboards/nightmare/info.json new file mode 100644 index 0000000000..14e8ac647c --- /dev/null +++ b/keyboards/nightmare/info.json @@ -0,0 +1,534 @@ +{ + "keyboard_name": "Nightmare", + "url": "https://keyhive.xyz/shop/nightmare-pcb-and-case", + "maintainer": "cfbender", + "width": 15.25, + "height": 4, + "layouts": { + "LAYOUT_default": { + "layout": [ + { + "label": "Home", + "x": 0, + "y": 0 + }, + { + "label": "`", + "x": 1.25, + "y": 0 + }, + { + "label": "Q", + "x": 2.25, + "y": 0 + }, + { + "label": "W", + "x": 3.25, + "y": 0 + }, + { + "label": "E", + "x": 4.25, + "y": 0 + }, + { + "label": "R", + "x": 5.25, + "y": 0 + }, + { + "label": "T", + "x": 6.25, + "y": 0 + }, + { + "label": "Y", + "x": 7.25, + "y": 0 + }, + { + "label": "U", + "x": 8.25, + "y": 0 + }, + { + "label": "I", + "x": 9.25, + "y": 0 + }, + { + "label": "O", + "x": 10.25, + "y": 0 + }, + { + "label": "P", + "x": 11.25, + "y": 0 + }, + { + "label": "{", + "x": 12.25, + "y": 0 + }, + { + "label": "}", + "x": 13.25, + "y": 0 + }, + { + "label": "Bspc", + "x": 14.25, + "y": 0 + }, + { + "label": "End", + "x": 0, + "y": 1 + }, + { + "label": "Tab", + "x": 1.25, + "y": 1, + "w": 1.25 + }, + { + "label": "A", + "x": 2.5, + "y": 1 + }, + { + "label": "S", + "x": 3.5, + "y": 1 + }, + { + "label": "D", + "x": 4.5, + "y": 1 + }, + { + "label": "F", + "x": 5.5, + "y": 1 + }, + { + "label": "G", + "x": 6.5, + "y": 1 + }, + { + "label": "H", + "x": 7.5, + "y": 1 + }, + { + "label": "J", + "x": 8.5, + "y": 1 + }, + { + "label": "K", + "x": 9.5, + "y": 1 + }, + { + "label": "L", + "x": 10.5, + "y": 1 + }, + { + "label": ":", + "x": 11.5, + "y": 1 + }, + { + "label": "\"", + "x": 12.5, + "y": 1 + }, + { + "label": "Enter", + "x": 13.5, + "y": 1, + "w": 1.75 + }, + { + "label": "PgUp", + "x": 0, + "y": 2 + }, + { + "label": "Shift", + "x": 1.25, + "y": 2, + "w": 1.75 + }, + { + "label": "Z", + "x": 3, + "y": 2 + }, + { + "label": "X", + "x": 4, + "y": 2 + }, + { + "label": "C", + "x": 5, + "y": 2 + }, + { + "label": "V", + "x": 6, + "y": 2 + }, + { + "label": "B", + "x": 7, + "y": 2 + }, + { + "label": "N", + "x": 8, + "y": 2 + }, + { + "label": "M", + "x": 9, + "y": 2 + }, + { + "label": "<", + "x": 10, + "y": 2 + }, + { + "label": "<", + "x": 11, + "y": 2 + }, + { + "label": "?", + "x": 12, + "y": 2 + }, + { + "label": "Shift", + "x": 13, + "y": 2, + "w": 1.25 + }, + { + "label": "MO(1)", + "x": 14.25, + "y": 2 + }, + { + "label": "PgDn", + "x": 0, + "y": 3 + }, + { + "label": "GUI", + "x": 2.5, + "y": 3 + }, + { + "label": "Ctrl", + "x": 3.5, + "y": 3, + "w": 1.25 + }, + { + "x": 4.75, + "y": 3, + "w": 7 + }, + { + "label": "Ctrl", + "x": 11.75, + "y": 3, + "w": 1.25 + }, + { + "label": "MO(2)", + "x": 13, + "y": 3 + } + ] + }, + "LAYOUT_split": { + "layout": [ + { + "label": "Home", + "x": 0, + "y": 0 + }, + { + "label": "`", + "x": 1.25, + "y": 0 + }, + { + "label": "Q", + "x": 2.25, + "y": 0 + }, + { + "label": "W", + "x": 3.25, + "y": 0 + }, + { + "label": "E", + "x": 4.25, + "y": 0 + }, + { + "label": "R", + "x": 5.25, + "y": 0 + }, + { + "label": "T", + "x": 6.25, + "y": 0 + }, + { + "label": "Y", + "x": 7.25, + "y": 0 + }, + { + "label": "U", + "x": 8.25, + "y": 0 + }, + { + "label": "I", + "x": 9.25, + "y": 0 + }, + { + "label": "O", + "x": 10.25, + "y": 0 + }, + { + "label": "P", + "x": 11.25, + "y": 0 + }, + { + "label": "{", + "x": 12.25, + "y": 0 + }, + { + "label": "}", + "x": 13.25, + "y": 0 + }, + { + "label": "Bspc", + "x": 14.25, + "y": 0 + }, + { + "label": "End", + "x": 0, + "y": 1 + }, + { + "label": "Tab", + "x": 1.25, + "y": 1, + "w": 1.25 + }, + { + "label": "A", + "x": 2.5, + "y": 1 + }, + { + "label": "S", + "x": 3.5, + "y": 1 + }, + { + "label": "D", + "x": 4.5, + "y": 1 + }, + { + "label": "F", + "x": 5.5, + "y": 1 + }, + { + "label": "G", + "x": 6.5, + "y": 1 + }, + { + "label": "H", + "x": 7.5, + "y": 1 + }, + { + "label": "J", + "x": 8.5, + "y": 1 + }, + { + "label": "K", + "x": 9.5, + "y": 1 + }, + { + "label": "L", + "x": 10.5, + "y": 1 + }, + { + "label": ":", + "x": 11.5, + "y": 1 + }, + { + "label": "\"", + "x": 12.5, + "y": 1 + }, + { + "label": "Enter", + "x": 13.5, + "y": 1, + "w": 1.75 + }, + { + "label": "PgUp", + "x": 0, + "y": 2 + }, + { + "label": "Shift", + "x": 1.25, + "y": 2, + "w": 1.75 + }, + { + "label": "Z", + "x": 3, + "y": 2 + }, + { + "label": "X", + "x": 4, + "y": 2 + }, + { + "label": "C", + "x": 5, + "y": 2 + }, + { + "label": "V", + "x": 6, + "y": 2 + }, + { + "label": "B", + "x": 7, + "y": 2 + }, + { + "label": "N", + "x": 8, + "y": 2 + }, + { + "label": "M", + "x": 9, + "y": 2 + }, + { + "label": "<", + "x": 10, + "y": 2 + }, + { + "label": "<", + "x": 11, + "y": 2 + }, + { + "label": "?", + "x": 12, + "y": 2 + }, + { + "label": "Shift", + "x": 13, + "y": 2, + "w": 1.25 + }, + { + "label": "MO(1)", + "x": 14.25, + "y": 2 + }, + { + "label": "PgDn", + "x": 0, + "y": 3 + }, + { + "label": "GUI", + "x": 2.5, + "y": 3 + }, + { + "label": "Ctrl", + "x": 3.5, + "y": 3, + "w": 1.25 + }, + { + "label": "Alt", + "x": 4.75, + "y": 3 + }, + { + "x": 5.75, + "y": 3, + "w": 2.25 + }, + { + "x": 8, + "y": 3, + "w": 2.75 + }, + { + "label": "RGUI", + "x": 10.75, + "y": 3 + }, + { + "label": "Ctrl", + "x": 11.75, + "y": 3, + "w": 1.25 + }, + { + "label": "MO(2)", + "x": 13, + "y": 3 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/nightmare/keymaps/default/config.h b/keyboards/nightmare/keymaps/default/config.h new file mode 100644 index 0000000000..c3addafcc2 --- /dev/null +++ b/keyboards/nightmare/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 cfbender + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/nightmare/keymaps/default/keymap.c b/keyboards/nightmare/keymaps/default/keymap.c new file mode 100644 index 0000000000..dd8896cefc --- /dev/null +++ b/keyboards/nightmare/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2019 cfbender + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define OPT_TAB LCTL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split(/* Base */ + KC_HOME, KC_GESC, 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_BSPC, + KC_END, OPT_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOTE, KC_ENTER, + KC_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_PGDN, KC_LGUI, KC_LALT, KC_LALT, KC_SPACE, KC_SPACE, KC_RGUI, KC_RCTL, MO(2)), + + [1] = LAYOUT_split( + KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_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), + + [2] = LAYOUT_split( + KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, 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_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; + diff --git a/keyboards/nightmare/keymaps/default/readme.md b/keyboards/nightmare/keymaps/default/readme.md new file mode 100644 index 0000000000..b044730cf5 --- /dev/null +++ b/keyboards/nightmare/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for nightmare + +![Default Layout](https://imgur.com/G0Hh7F3.png) \ No newline at end of file diff --git a/keyboards/nightmare/nightmare.c b/keyboards/nightmare/nightmare.c new file mode 100644 index 0000000000..ee0f5fc2e1 --- /dev/null +++ b/keyboards/nightmare/nightmare.c @@ -0,0 +1,51 @@ +/* Copyright 2019 cfbender + * + * 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 . + */ +#include "nightmare.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/nightmare/nightmare.h b/keyboards/nightmare/nightmare.h new file mode 100644 index 0000000000..017e3494e0 --- /dev/null +++ b/keyboards/nightmare/nightmare.h @@ -0,0 +1,51 @@ +/* Copyright 2019 cfbender + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_default( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k013, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k307, k311, k312 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k300, k301, k302, KC_NO, KC_NO, KC_NO, KC_NO, k307, KC_NO, KC_NO, KC_NO, k311, k312, k313 } \ +} + + +#define LAYOUT_split( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k013, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k304, k305, k307, k309, k311, k312 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k300, k301, k302, KC_NO, k304, k305, KC_NO, k307, KC_NO, k309, KC_NO, k311, k312, k313 } \ +} diff --git a/keyboards/nightmare/readme.md b/keyboards/nightmare/readme.md new file mode 100644 index 0000000000..9e53ac5a92 --- /dev/null +++ b/keyboards/nightmare/readme.md @@ -0,0 +1,15 @@ +# Crossed Keys Nightmare + +![Crossed Keys Nightmare](https://i.imgur.com/JiKtPzL.png) + +A 50% pseudo-TMO50 clone with an adjusted bottom row, designed on the cheap with a Pro Micro and 3D Printed case. + +Keyboard Maintainer: [cfbender](https://github.com/cfbender) +Hardware Supported: Nightmare case and PCB +Hardware Availability: [Github](https://github.com/cfbender/keyboards/tree/master/nightmare) + +Make example for this keyboard (after setting up your build environment): + + make nightmare: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). diff --git a/keyboards/nightmare/rules.mk b/keyboards/nightmare/rules.mk new file mode 100644 index 0000000000..66a778b6c2 --- /dev/null +++ b/keyboards/nightmare/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/niu_mini/config.h b/keyboards/niu_mini/config.h index 2c202a8e46..be94fd9e7b 100644 --- a/keyboards/niu_mini/config.h +++ b/keyboards/niu_mini/config.h @@ -15,16 +15,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" -#define DEVICE_VER 0x0001 /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 #define MANUFACTURER KBDFans #define PRODUCT NIU Mini #define DESCRIPTION A compact ortholinear keyboard @@ -47,7 +46,7 @@ along with this program. If not, see . /* number of backlight levels */ #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 4 + #define BACKLIGHT_LEVELS 4 #endif /* Set 0 if debouncing isn't needed */ @@ -61,11 +60,11 @@ along with this program. If not, see . #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 14 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 14 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 #endif /* @@ -85,5 +84,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/niu_mini/info.json b/keyboards/niu_mini/info.json index 8023742ed7..5677a01ad3 100644 --- a/keyboards/niu_mini/info.json +++ b/keyboards/niu_mini/info.json @@ -1,18 +1,115 @@ { - "keyboard_name": "NIU Mini", - "url": "", - "maintainer": "qmk", - "width": 12, - "height": 4, - "layouts": { - "LAYOUT_ortho_4x12": { - "key_count": 48, - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":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":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] - }, + "keyboard_name": "NIU Mini", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":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":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3} + ] + }, - "LAYOUT_planck_mit": { - "key_count": 47, - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":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":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + "LAYOUT_planck_mit": { + "key_count": 47, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":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":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3, "w":2}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3} + ] + } } - } } diff --git a/keyboards/niu_mini/keymaps/codecoffeecode/keymap.c b/keyboards/niu_mini/keymaps/codecoffeecode/keymap.c new file mode 100644 index 0000000000..7c794b2037 --- /dev/null +++ b/keyboards/niu_mini/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,103 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0 + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Caps | Alt |Layer1| Space |Layer2| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [0] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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, + KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Layer 1 + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Reset| | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [1] = LAYOUT_planck_mit( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Layer 2 (r_ Indicates RGB Controls) + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |BL_TOG|BL_STEP| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [2] = LAYOUT_planck_mit( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + + } else { + + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) { + + } else { + + } + + if (IS_LED_ON(usb_led, USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/niu_mini/keymaps/codecoffeecode/readme.md b/keyboards/niu_mini/keymaps/codecoffeecode/readme.md new file mode 100644 index 0000000000..661e24c9fa --- /dev/null +++ b/keyboards/niu_mini/keymaps/codecoffeecode/readme.md @@ -0,0 +1,5 @@ +## CodeCoffeeCode's 40% Keymap + +- Added Delete to Layer 1 +- Swapped Tab and Esc like on the Planck EZ +- Put all the Arrows on the bottom row, moving the Forward Slash to beside Enter \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c index 5c7dc7fc0d..1fdeb02fc7 100644 --- a/keyboards/niu_mini/keymaps/default/keymap.c +++ b/keyboards/niu_mini/keymaps/default/keymap.c @@ -2,59 +2,59 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0 - * ,-----------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Caps | Alt |Layer1| Space |Layer2| / | Left | Down |Right | - * `-----------------------------------------------------------------------------------' - */ - [0] = LAYOUT_planck_mit( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_TAB, 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_UP, KC_ENT, - KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT - ), + /* Layer 0 + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Caps | Alt |Layer1| Space |Layer2| / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + [0] = LAYOUT_planck_mit( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, 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_UP, KC_ENT, + KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + ), - /* Layer 1 - * ,-----------------------------------------------------------------------------------. - * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Reset| | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ - [1] = LAYOUT_planck_mit( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + /* Layer 1 + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Reset| | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [1] = LAYOUT_planck_mit( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), - /* Layer 2 (r_ Indicates RGB Controls) - * ,-----------------------------------------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |BL_TOG|BL_STEP| | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ - [2] = LAYOUT_planck_mit( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) + /* Layer 2 (r_ Indicates RGB Controls) + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |BL_TOG|BL_STEP| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [2] = LAYOUT_planck_mit( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; @@ -65,39 +65,39 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - } else { + } else { - } + } - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - } else { + } else { - } + } - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - } else { + } else { - } + } - if (usb_led & (1 << USB_LED_COMPOSE)) { + if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) { - } else { + } else { - } + } - if (usb_led & (1 << USB_LED_KANA)) { + if (IS_LED_ON(usb_led, USB_LED_KANA)) { - } else { + } else { - } + } } diff --git a/keyboards/niu_mini/keymaps/nosarthur/README.md b/keyboards/niu_mini/keymaps/nosarthur/README.md new file mode 100644 index 0000000000..9d57ceb5f7 --- /dev/null +++ b/keyboards/niu_mini/keymaps/nosarthur/README.md @@ -0,0 +1,35 @@ +# Kbdfans Niu Mini + +Here `keymap.c` is generated by [qmk configurator](https://config.qmk.fm) and +it corresponds to the colemak-dh layout. + +To customize, upload the json file to qmk configurator + +- `keymap_colemak_dh.json`: colemak-dh layout +- `keymap_qwerty.json`: qwerty layout + +Make the modification via the web interface, "compile" and download "keymap only". +Then place the generated `keymap.c` in this folder. + +To flush the firmware, connect your keyboard and run + +``` +make niu_mini:nosarthur:dtu +``` +in the `qmk_firmware` source folder. +There will be some prompts saying no device is found. Click the reset button in +the back of your keyboard and it should work. + +# notes from qmk configurator + +This layout was generated by the QMK API. You can find the JSON data used to +generate this keymap in the file layers.json. + +To make use of this file you will need follow the following steps: + +* Download or Clone QMK Firmware: +* Extract QMK Firmware to a location on your hard drive +* Copy this folder into %s +* You are now ready to compile or use your keymap with the source + +More information can be found in the QMK docs: diff --git a/keyboards/niu_mini/keymaps/nosarthur/keymap.c b/keyboards/niu_mini/keymaps/nosarthur/keymap.c new file mode 100644 index 0000000000..fe719fc821 --- /dev/null +++ b/keyboards/niu_mini/keymaps/nosarthur/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_planck_mit(KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, TT(3), KC_LALT, KC_LCTL, LT(2,KC_BSPC), KC_SPC, LT(1,KC_ENT), KC_COLN, KC_2, KC_1, KC_0), + [1] = LAYOUT_planck_mit(KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_COLN, KC_PIPE, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCBR, KC_RCBR, KC_DOT, KC_SLSH, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_PLUS), + [2] = LAYOUT_planck_mit(KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_VOLU, KC_MUTE, KC_NO, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_NO, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP), + [3] = LAYOUT_planck_mit(KC_F1, KC_F2, KC_MS_U, KC_F3, KC_F4, KC_7, KC_8, KC_9, KC_MINS, KC_F10, KC_F11, KC_F12, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, KC_F5, KC_4, KC_5, KC_6, KC_PLUS, RGB_HUI, RGB_HUD, RGB_TOG, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_1, KC_2, KC_3, KC_ENT, KC_ASTR, KC_SLSH, RGB_MOD, KC_TRNS, TO(0), KC_TRNS, KC_BTN1, KC_TRNS, KC_0, KC_DOT, KC_NO, KC_NO, KC_NO, KC_NO) +}; diff --git a/keyboards/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json b/keyboards/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json new file mode 100644 index 0000000000..8dc43350c8 --- /dev/null +++ b/keyboards/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json @@ -0,0 +1 @@ +{"keyboard":"niu_mini","keymap":"22","layout":"LAYOUT_planck_mit","layers":[["KC_TAB","KC_Q","KC_W","KC_F","KC_P","KC_B","KC_J","KC_L","KC_U","KC_Y","KC_SCLN","KC_MINS","KC_ESC","KC_A","KC_R","KC_S","KC_T","KC_G","KC_K","KC_N","KC_E","KC_I","KC_O","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_D","KC_V","KC_M","KC_H","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","KC_LGUI","TT(3)","KC_LALT","KC_LCTL","LT(2,KC_BSPC)","KC_SPC","LT(1,KC_ENT)","KC_COLN","KC_2","KC_1","KC_0"],["KC_GRV","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_EQL","KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_MINS","KC_COLN","KC_PIPE","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_LCBR","KC_RCBR","KC_DOT","KC_SLSH","KC_BSLS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_CAPS","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_PLUS"],["KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_PGUP","KC_HOME","KC_UP","KC_END","KC_VOLU","KC_MUTE","KC_NO","KC_LT","KC_GT","KC_LPRN","KC_RPRN","KC_NO","KC_PGDN","KC_LEFT","KC_DOWN","KC_RGHT","KC_VOLD","KC_NO","KC_TRNS","KC_NO","KC_NO","KC_LBRC","KC_RBRC","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_DEL","KC_TRNS","KC_MPRV","KC_MNXT","KC_MPLY","KC_MSTP"],["KC_F1","KC_F2","KC_MS_U","KC_F3","KC_F4","KC_7","KC_8","KC_9","KC_MINS","KC_F10","KC_F11","KC_F12","KC_BTN2","KC_MS_L","KC_MS_D","KC_MS_R","KC_F5","KC_4","KC_5","KC_6","KC_PLUS","RGB_HUI","RGB_HUD","RGB_TOG","KC_TRNS","KC_F6","KC_F7","KC_F8","KC_F9","KC_1","KC_2","KC_3","KC_ENT","KC_ASTR","KC_SLSH","RGB_MOD","KC_TRNS","TO(0)","KC_TRNS","KC_BTN1","KC_TRNS","KC_0","KC_DOT","KC_NO","KC_NO","KC_NO","KC_NO"]],"author":"Dong Zhou","notes":"My awesome keymap"} \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/nosarthur/keymap_qwerty.json b/keyboards/niu_mini/keymaps/nosarthur/keymap_qwerty.json new file mode 100644 index 0000000000..ec9b945f4f --- /dev/null +++ b/keyboards/niu_mini/keymaps/nosarthur/keymap_qwerty.json @@ -0,0 +1 @@ +{"keyboard":"niu_mini","keymap":"14","layout":"LAYOUT_planck_mit","layers":[["KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_MINS","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_RSFT","KC_LGUI","TT(3)","KC_LALT","KC_LCTL","LT(2,KC_BSPC)","KC_SPC","LT(1,KC_ENT)","KC_3","KC_2","KC_1","KC_0"],["KC_GRV","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_EQL","KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_NO","KC_COLN","KC_PIPE","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_LCBR","KC_RCBR","KC_DOT","KC_SLSH","KC_BSLS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_CAPS","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_PLUS"],["KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_NO","KC_NO","KC_UP","KC_VOLD","KC_VOLU","KC_MUTE","KC_NO","KC_LT","KC_GT","KC_LPRN","KC_RPRN","KC_NO","KC_NO","KC_LEFT","KC_DOWN","KC_RGHT","KC_PGDN","KC_PGUP","KC_NO","KC_NO","KC_NO","KC_LBRC","KC_RBRC","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_HOME","KC_TRNS","KC_MPRV","KC_MNXT","KC_MPLY","KC_MSTP"],["KC_F1","KC_F2","KC_MS_U","KC_F3","KC_F4","KC_7","KC_8","KC_9","KC_MINS","KC_F10","KC_F11","KC_F12","KC_BTN2","KC_MS_L","KC_MS_D","KC_MS_R","KC_NO","KC_4","KC_5","KC_6","KC_PLUS","RGB_HUI","RGB_HUD","RGB_TOG","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_1","KC_2","KC_3","KC_ENT","KC_ASTR","KC_SLSH","RGB_MOD","KC_TRNS","TO(0)","KC_TRNS","KC_BTN1","KC_TRNS","KC_0","KC_DOT","KC_NO","KC_NO","KC_NO","KC_NO"]],"author":"Dong Zhou","notes":"My awesome keymap"} \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/nosarthur/rules.mk b/keyboards/niu_mini/keymaps/nosarthur/rules.mk new file mode 100644 index 0000000000..37ba40cdfe --- /dev/null +++ b/keyboards/niu_mini/keymaps/nosarthur/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = yes +BACKLIGHT_ENABLE = no +AUDIO_ENABLE = no +CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/niu_mini/keymaps/readme.md b/keyboards/niu_mini/keymaps/readme.md index 8a263ed0b4..6cfda6fe04 100644 --- a/keyboards/niu_mini/keymaps/readme.md +++ b/keyboards/niu_mini/keymaps/readme.md @@ -22,3 +22,4 @@ When adding your keymap to this list, keep it organised alphabetically (select l - **mason** - **planck** Planck default layout - **xtonhasvim** A Planck-like layout with a few tweaks and a vim emulation layer. +- **nosarthur** Custom Colemak-dh layout and qwerty layout diff --git a/keyboards/niu_mini/keymaps/tobias/config.h b/keyboards/niu_mini/keymaps/tobias/config.h new file mode 100644 index 0000000000..f88b52d1fc --- /dev/null +++ b/keyboards/niu_mini/keymaps/tobias/config.h @@ -0,0 +1,40 @@ +#pragma once + +//#include "../../config.h" + +//#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#define RGBLIGHT_SLEEP +#define TAPPING_TOGGLE 2 +#define ALT_F4 LALT(KC_F4) +#define CTALDEL LSFT(LCTL(KC_ESC)) +#define NO_DEBUG +#define CTLZ LCTL(KC_Z) +#define CTLX LCTL(KC_X) +#define CTLC LCTL(KC_C) +#define CTLV LCTL(KC_V) + diff --git a/keyboards/niu_mini/keymaps/tobias/keymap.c b/keyboards/niu_mini/keymaps/tobias/keymap.c new file mode 100644 index 0000000000..935dd5c506 --- /dev/null +++ b/keyboards/niu_mini/keymaps/tobias/keymap.c @@ -0,0 +1,413 @@ + /* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +// extern keymap_config_t keymap_config; + +enum layers { + _QWERTY, + _FNL1, + _MOUSE, + _LOWER, + _RAISE, + _FNL2, + _ADJUST, + _GAMEMODE, + _FNL3, _LOWER2, + _RAISE2 +}; + +enum custom_keycodes { + TBMACRO = SAFE_RANGE, + DGRMCRO, + WRKMOD +}; + +bool bnumlock = false; +bool numlock_changed = false; +bool workmode = true; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FNL1 | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Bksp |Lower | Space |Raise | Bksp | AltGr| * | Esc | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + TT(_FNL1), 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, + KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, TT(_LOWER), KC_SPC, KC_SPC, TT(_RAISE), KC_BSPC, KC_RALT, KC_NUHS, KC_ESC +), + + +/* FNL1 + * ,-----------------------------------------------------------------------------------. + * |TbMacr| Prev | Play | Next | AltF4| CapsL| Esc | PgUp | Up | PgDn |PrScrn| Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol- | Vol+ | Mute | NumL | Home | Left | Down | Right| | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | End | | | | ? | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | ! | | + * `-----------------------------------------------------------------------------------' + */ +[_FNL1] = LAYOUT_ortho_4x12( + TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, KC_ESC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_BSPC, + TT(_FNL1), _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL, + KC_LSFT, CTLZ, CTLX, CTLC, CTLV, _______, KC_END, _______, _______, _______, LSFT(KC_MINS), _______, + _______, _______, CTALDEL, _______, _______, _______, _______, TO(_MOUSE), _______, _______, LSFT(KC_1), _______ +), + +[_MOUSE] = { + { KC_TAB, XXXXXXX, XXXXXXX, KC_MS_UP, XXXXXXX, KC_T, XXXXXXX, KC_MS_BTN3, KC_MS_WH_UP, KC_MS_BTN2, XXXXXXX, KC_MS_ACCEL0 }, + {TO(_QWERTY), XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, XXXXXXX, XXXXXXX, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, XXXXXXX, KC_MS_ACCEL1}, + {_______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_ACCEL2}, + {KC_LCTL, TO(_QWERTY), KC_LALT, _______, TO(_QWERTY), KC_MS_BTN1, XXXXXXX, TO(_QWERTY), _______, _______, TO(_QWERTY), TO(_QWERTY)} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | § | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ´ | ` | @ | £ | $ | € | ¨ | { | [ | ] | } | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | < | | | > | ° | | | µ | ¨ | ^ | ~ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | AltGr| | | | | | | | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_EQL, S(KC_EQL), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_E), KC_RBRC, RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), + KC_LSFT, KC_NUBS, RALT(KC_NUBS), S(KC_NUBS), DGRMCRO, XXXXXXX, XXXXXXX, RALT(KC_M), KC_RBRC, S(KC_RBRC), RALT(KC_RBRC), _______, + _______, _______, KC_RALT, _______,TO(_ADJUST), _______, _______, _______, _______, _______, _______, TO(_QWERTY) +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Tab | F1 | F2 | F3 | F4 | Esc | Bksp | / | 7 | 8 | 9 | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FNL2 | F5 | F6 | F7 | F8 |Insert| Home | PgUp | 4 | 5 | 6 | + | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | Del | End | PgDn | 1 | 2 | 3 | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Alt | | | | * | 0 | , | . | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_ESC, KC_BSPC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + TT(_FNL2), KC_F5, KC_F6, KC_F7, KC_F8, KC_INS, KC_HOME, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PENT, + _______, _______, KC_LALT, _______, TO(_QWERTY), _______, _______, KC_PAST, KC_P0, KC_PDOT, KC_DOT, TO(_QWERTY) +), + +/* FNL2 + * ,-----------------------------------------------------------------------------------. + * |TbMacr| Prev | Play | Next | AltF4| CapsL| |PrScrn|Insert| Home | PgUp |ScrLck| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol- | Vol+ | Mute | NumL | | | Del | End | PgDn | Pause| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | Up | | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Left | Down | Right| BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_FNL2] = LAYOUT_ortho_4x12( + TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, _______, KC_PSCR, KC_INS, KC_HOME, KC_PGUP, KC_SLCK, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_PAUS, + _______, CTLZ, CTLX, CTLC, CTLV, _______, _______, _______, _______, KC_UP, _______, KC_ENT, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, TO(_QWERTY) +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | GAME | Reset| | | | | | | | | |LIGHTS| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |BLtogg|BLstep| | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |RGBtog|RGBhui|RGBhud|RGBmod|RGBsai|RGBsad| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RGB4 | | | | | | | | | NKO | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + TO(_GAMEMODE), RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, WRKMOD, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_MODE_FORWARD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_M_R, TO(_QWERTY) +), + +/* Game mode + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FNL1 | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | 1 | Lower| Bksp | Alt | Space | Raise| Bksp | BAIL | * | Esc | + * `-----------------------------------------------------------------------------------' + */ +[_GAMEMODE] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + TT(_FNL3), 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, + KC_LCTL, KC_1, MO(_LOWER2), KC_DEL, KC_LALT, KC_SPC, KC_SPC, MO(_RAISE2), KC_BSPC, TO(_QWERTY), KC_NUHS, KC_ESC +), + +/* FNL3 + * ,-----------------------------------------------------------------------------------. + * |TbMacr| Prev | Play | Next | AltF4| CapsL| Esc | PgUp | Up | PgDn |PrScrn| Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol- | Vol+ | Mute | NumL | Home | Left | Down | Right| | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | End | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_FNL3] = LAYOUT_ortho_4x12( + TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, KC_ESC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_BSPC, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL, + KC_LSFT, _______, _______, _______, _______, _______, KC_END, _______, _______, _______, LSFT(KC_MINS), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LSFT(KC_1), _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Tab | F1 | F2 | F3 | F4 | Esc | Bksp | / | 7 | 8 | 9 | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FNL2 | F5 | F6 | F7 | F8 |Insert| Home | PgUp | 4 | 5 | 6 | + | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | Del | End | PgDn | 1 | 2 | 3 | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Alt | | | | * | 0 | , | . | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER2] = LAYOUT_ortho_4x12( + KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_ESC, KC_BSPC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + TT(_FNL2), KC_F5, KC_F6, KC_F7, KC_F8, KC_INS, KC_HOME, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PENT, + _______, _______, _______, _______, _______, _______, _______, KC_PAST, KC_P0, KC_PDOT, KC_DOT, TO(_GAMEMODE) +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | § | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ´ | ` | @ | £ | $ | € | ¨ | { | [ | ] | } | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | < | | | > | ° | | | µ | ¨ | ^ | ~ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | AltGr| | | | | | | | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE2] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_EQL, S(KC_EQL), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_E), KC_RBRC, RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), + KC_LSFT, KC_NUBS, RALT(KC_NUBS), S(KC_NUBS), DGRMCRO, XXXXXXX, XXXXXXX, RALT(KC_M), KC_RBRC, S(KC_RBRC), RALT(KC_RBRC), _______, + _______, _______, KC_RALT, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAMEMODE) +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case TBMACRO: + SEND_STRING(SS_TAP(X_TAB) SS_DOWN(X_LSHIFT) SS_TAP(X_HOME) SS_UP(X_LSHIFT) SS_TAP(X_DELETE)); + return false; + case DGRMCRO: + if(!bnumlock) { + //register_code(KC_NLCK); + //unregister_code(KC_NLCK); + tap_code(KC_NLCK); + bnumlock = true; + } + //SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P0) SS_TAP(X_P1) SS_TAP(X_P7) SS_TAP(X_P6) SS_UP(X_LALT)); + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_KP_0) SS_TAP(X_KP_1) SS_TAP(X_KP_7) SS_TAP(X_KP_6) SS_UP(X_LALT) ); + return false; + case WRKMOD: + if(!workmode) { + workmode = true; + return false; + } + else { + workmode = false; + return false; + } + } + + } + return true; +} + +void rgbflag(uint8_t r, uint8_t g, uint8_t b) { + for(int i = 0; i < RGBLED_NUM; i++){ + switch(i) { + case 0 ... 13: + // rgblight_setrgb_at(r,g,b,i); + led[i].r = r; + led[i].g = g; + led[i].b = b; + break; + /* case 9 ... 11: + // rgblight_setrgb_at(r,g,b,i); + led[i].r = r; + led[i].g = g; + led[i].b = b; + break; */ + default: + // rgblight_setrgb_at(0,0,0,i); + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + break; + } + } + rgblight_set(); +} + +layer_state_t layer_state_set_user(layer_state_t state) { +// if(rgblight_get_mode() == 1) { + switch (biton32(state)) { + case _QWERTY: + if(!workmode){ + rgblight_mode(9); + } + else if(workmode){ + rgblight_mode(1); + rgbflag(0x00, 0x00, 0x00); + } + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + case _LOWER: + rgblight_mode(1); + if(!bnumlock) { + tap_code(KC_NLCK); + } + rgbflag(0xFF, 0x00, 0x00); + + break; + case _ADJUST: + rgblight_mode(1); + rgbflag(0xFF, 0xFF, 0xFF); + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + case _RAISE: + rgblight_mode(1); + rgbflag(0x00, 0xFF, 0x00); + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + case _FNL1: + rgblight_mode(1); + rgbflag(0x00, 0x00, 0xFF); + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + case _GAMEMODE: + rgblight_mode(1); + rgbflag(0xFF, 0x00, 0xFF); + break; + case _MOUSE: + rgblight_mode(1); + rgbflag(0x00, 0xFF, 0xFF); + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + default: // for any other layers, or the default layer + rgblight_mode(1); + if(bnumlock) { + tap_code(KC_NLCK); + } + rgbflag(0xFF, 0xFF, 0xFF); + break; + } + // } + return state; +} + +/* void matrix_scan_user(void) { + + //Layer LED indicators + + uint32_t layer = layer_state; + + + if (layer & (1<<2)) { + if(!bnumlock) { + numlock_changed = true; + register_code(KC_NLCK); + unregister_code(KC_NLCK); + bnumlock = true; + } + } +} + */ + + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + bnumlock = true; + + } else { + bnumlock = false; + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/tobias/readme.md b/keyboards/niu_mini/keymaps/tobias/readme.md new file mode 100644 index 0000000000..0a8077884d --- /dev/null +++ b/keyboards/niu_mini/keymaps/tobias/readme.md @@ -0,0 +1,2 @@ +# Swedish 40% Layout + diff --git a/keyboards/niu_mini/keymaps/tobias/rules.mk b/keyboards/niu_mini/keymaps/tobias/rules.mk new file mode 100644 index 0000000000..d75595602f --- /dev/null +++ b/keyboards/niu_mini/keymaps/tobias/rules.mk @@ -0,0 +1,2 @@ +NKRO_ENABLE = YES +MOUSEKEY_ENABLE = yes \ No newline at end of file diff --git a/keyboards/niu_mini/niu_mini.c b/keyboards/niu_mini/niu_mini.c index 60df62b9e3..835625ee4f 100644 --- a/keyboards/niu_mini/niu_mini.c +++ b/keyboards/niu_mini/niu_mini.c @@ -3,17 +3,17 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, - {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, - {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, - {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, + {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, }; #endif void matrix_init_kb(void) { - // Turn status LED on - DDRE |= (1<<6); - PORTE |= (1<<6); + // Turn status LED on + setPinOutput(E6); + writePinHigh(E6); - matrix_init_user(); + matrix_init_user(); } diff --git a/keyboards/niu_mini/niu_mini.h b/keyboards/niu_mini/niu_mini.h index 00f025b803..5fef7b4326 100644 --- a/keyboards/niu_mini/niu_mini.h +++ b/keyboards/niu_mini/niu_mini.h @@ -1,49 +1,46 @@ -#ifndef NIU_MINI_H -#define NIU_MINI_H +#pragma once #include "quantum.h" #define LAYOUT_planck_mit( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ ) \ { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \ } #define LAYOUT_ortho_4x12( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ ) \ { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ - ) \ - LAYOUT_ortho_4x12( \ - KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ - KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ - KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ - KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ ) #define LAYOUT LAYOUT_ortho_4x12 #define LAYOUT_kc_ortho_4x12 LAYOUT_kc - -#endif diff --git a/keyboards/niu_mini/readme.md b/keyboards/niu_mini/readme.md index 36e8c8458b..f4863d8549 100644 --- a/keyboards/niu_mini/readme.md +++ b/keyboards/niu_mini/readme.md @@ -1,5 +1,4 @@ -NIU Mini -=== +# NIU Mini ![NIU Mini](https://cdn.shopify.com/s/files/1/1473/3902/files/40__01.jpg) @@ -11,6 +10,10 @@ Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/products/niu-mini Make example for this keyboard (after setting up your build environment): - make niu_mini:default:dfu + make niu_mini:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)): + + make niu_mini: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). diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk index 01d96eccf2..67548a448c 100644 --- a/keyboards/niu_mini/rules.mk +++ b/keyboards/niu_mini/rules.mk @@ -1,72 +1,36 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = ortho_4x12 planck_mit LAYOUTS_HAS_RGB = no - diff --git a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100755 index 4331155df4..0000000000 --- a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -#if HAL_USE_PAL || defined(__DOXYGEN__) -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -const PALConfig pal_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} -#endif -}; -#endif - -void enter_bootloader_mode_if_requested(void); - -/** - * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. - */ -void __early_init(void) { - enter_bootloader_mode_if_requested(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) { -} diff --git a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100755 index 54df72ea68..0000000000 --- a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null @@ -1,1187 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for NK65 Keyboard - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "NK65 PCB" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_USB_DM 11U -#define GPIOA_USB_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#define LINE_USB_DM PAL_LINE(GPIOA, 11U) -#define LINE_USB_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) - -#define LINE_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - PIN_MODE_ALTERNATE(GPIOA_PIN1) | \ - PIN_MODE_INPUT(GPIOA_PIN2) | \ - PIN_MODE_INPUT(GPIOA_PIN3) | \ - PIN_MODE_INPUT(GPIOA_PIN4) | \ - PIN_MODE_INPUT(GPIOA_PIN5) | \ - PIN_MODE_INPUT(GPIOA_PIN6) | \ - PIN_MODE_INPUT(GPIOA_PIN7) | \ - PIN_MODE_INPUT(GPIOA_PIN8) | \ - PIN_MODE_INPUT(GPIOA_PIN9) | \ - PIN_MODE_INPUT(GPIOA_PIN10) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ - PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ - PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ - PIN_OSPEED_HIGH(GPIOA_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ - PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ - PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ - PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_PIN4) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_USB_DM) | \ - PIN_ODR_HIGH(GPIOA_USB_DP) | \ - PIN_ODR_HIGH(GPIOA_SWDIO) | \ - PIN_ODR_HIGH(GPIOA_SWCLK) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \ - PIN_AFIO_AF(GPIOA_PIN1, 1) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - PIN_MODE_OUTPUT(GPIOB_PIN7) | \ - PIN_MODE_INPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_HIGH(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_PIN3) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_LOW(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - PIN_MODE_INPUT(GPIOC_PIN1) | \ - PIN_MODE_INPUT(GPIOC_PIN2) | \ - PIN_MODE_INPUT(GPIOC_PIN3) | \ - PIN_MODE_INPUT(GPIOC_PIN4) | \ - PIN_MODE_INPUT(GPIOC_PIN5) | \ - PIN_MODE_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - PIN4 (input pullup). - * PD5 - PIN5 (input pullup). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD11 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - PIN12 (input pullup). - * PD13 - PIN13 (input pullup). - * PD14 - PIN14 (input pullup). - * PD15 - PIN15 (input pullup). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ - PIN_MODE_INPUT(GPIOD_PIN1) | \ - PIN_MODE_INPUT(GPIOD_PIN2) | \ - PIN_MODE_INPUT(GPIOD_PIN3) | \ - PIN_MODE_INPUT(GPIOD_PIN4) | \ - PIN_MODE_INPUT(GPIOD_PIN5) | \ - PIN_MODE_INPUT(GPIOD_PIN6) | \ - PIN_MODE_INPUT(GPIOD_PIN7) | \ - PIN_MODE_INPUT(GPIOD_PIN8) | \ - PIN_MODE_INPUT(GPIOD_PIN9) | \ - PIN_MODE_INPUT(GPIOD_PIN10) | \ - PIN_MODE_INPUT(GPIOD_PIN11) | \ - PIN_MODE_INPUT(GPIOD_PIN12) | \ - PIN_MODE_INPUT(GPIOD_PIN13) | \ - PIN_MODE_INPUT(GPIOD_PIN14) | \ - PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_PIN4) | \ - PIN_ODR_HIGH(GPIOD_PIN5) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_HIGH(GPIOD_PIN12) | \ - PIN_ODR_HIGH(GPIOD_PIN13) | \ - PIN_ODR_HIGH(GPIOD_PIN14) | \ - PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) |\ - PIN_MODE_OUTPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) |\ - PIN_MODE_INPUT(GPIOE_PIN5) |\ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_OUTPUT(GPIOE_PIN8) | \ - PIN_MODE_OUTPUT(GPIOE_PIN9) | \ - PIN_MODE_OUTPUT(GPIOE_PIN10) | \ - PIN_MODE_OUTPUT(GPIOE_PIN11) | \ - PIN_MODE_OUTPUT(GPIOE_PIN12) | \ - PIN_MODE_OUTPUT(GPIOE_PIN13) | \ - PIN_MODE_OUTPUT(GPIOE_PIN14) | \ - PIN_MODE_OUTPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\ - PIN_OSPEED_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN4) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN5) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_LOW(GPIOE_PIN8) | \ - PIN_ODR_LOW(GPIOE_PIN9) | \ - PIN_ODR_LOW(GPIOE_PIN10) | \ - PIN_ODR_LOW(GPIOE_PIN11) | \ - PIN_ODR_LOW(GPIOE_PIN12) | \ - PIN_ODR_LOW(GPIOE_PIN13) | \ - PIN_ODR_LOW(GPIOE_PIN14) | \ - PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0) |\ - PIN_AFIO_AF(GPIOE_PIN3, 0) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0) |\ - PIN_AFIO_AF(GPIOE_PIN5, 0) |\ - PIN_AFIO_AF(GPIOE_PIN6, 0) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (input floating). - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \ - PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ - PIN_MODE_INPUT(GPIOF_PIN2) | \ - PIN_MODE_INPUT(GPIOF_PIN3) | \ - PIN_MODE_INPUT(GPIOF_PIN4) | \ - PIN_MODE_INPUT(GPIOF_PIN5) | \ - PIN_MODE_INPUT(GPIOF_PIN6) | \ - PIN_MODE_INPUT(GPIOF_PIN7) | \ - PIN_MODE_INPUT(GPIOF_PIN8) | \ - PIN_MODE_INPUT(GPIOF_PIN9) | \ - PIN_MODE_INPUT(GPIOF_PIN10) | \ - PIN_MODE_INPUT(GPIOF_PIN11) | \ - PIN_MODE_INPUT(GPIOF_PIN12) | \ - PIN_MODE_INPUT(GPIOF_PIN13) | \ - PIN_MODE_INPUT(GPIOF_PIN14) | \ - PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \ - PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \ - PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \ - PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \ - PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \ - PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ - PIN_MODE_INPUT(GPIOG_PIN1) | \ - PIN_MODE_INPUT(GPIOG_PIN2) | \ - PIN_MODE_INPUT(GPIOG_PIN3) | \ - PIN_MODE_INPUT(GPIOG_PIN4) | \ - PIN_MODE_INPUT(GPIOG_PIN5) | \ - PIN_MODE_INPUT(GPIOG_PIN6) | \ - PIN_MODE_INPUT(GPIOG_PIN7) | \ - PIN_MODE_INPUT(GPIOG_PIN8) | \ - PIN_MODE_INPUT(GPIOG_PIN9) | \ - PIN_MODE_INPUT(GPIOG_PIN10) | \ - PIN_MODE_INPUT(GPIOG_PIN11) | \ - PIN_MODE_INPUT(GPIOG_PIN12) | \ - PIN_MODE_INPUT(GPIOG_PIN13) | \ - PIN_MODE_INPUT(GPIOG_PIN14) | \ - PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ - PIN_MODE_INPUT(GPIOH_PIN1) | \ - PIN_MODE_INPUT(GPIOH_PIN2) | \ - PIN_MODE_INPUT(GPIOH_PIN3) | \ - PIN_MODE_INPUT(GPIOH_PIN4) | \ - PIN_MODE_INPUT(GPIOH_PIN5) | \ - PIN_MODE_INPUT(GPIOH_PIN6) | \ - PIN_MODE_INPUT(GPIOH_PIN7) | \ - PIN_MODE_INPUT(GPIOH_PIN8) | \ - PIN_MODE_INPUT(GPIOH_PIN9) | \ - PIN_MODE_INPUT(GPIOH_PIN10) | \ - PIN_MODE_INPUT(GPIOH_PIN11) | \ - PIN_MODE_INPUT(GPIOH_PIN12) | \ - PIN_MODE_INPUT(GPIOH_PIN13) | \ - PIN_MODE_INPUT(GPIOH_PIN14) | \ - PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ - PIN_ODR_HIGH(GPIOH_PIN1) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ - PIN_AFIO_AF(GPIOH_PIN1, 0) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0)) - - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) -/* - * USB bus de-activation macro, required by the USB driver. - */ -// #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) -// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100755 index 43377629a3..0000000000 --- a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/nk65/bootloader_defs.h b/keyboards/nk65/bootloader_defs.h deleted file mode 100755 index 3b0e9d20a6..0000000000 --- a/keyboards/nk65/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here: - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 791e444689..51e101cde5 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -106,7 +106,7 @@ along with this program. If not, see . #define RGB_BACKLIGHT_BRIGHTNESS 255 // the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 +#define RGB_BACKLIGHT_EFFECT 6 // the default effect speed (0-3) #define RGB_BACKLIGHT_EFFECT_SPEED 0 @@ -136,19 +136,19 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+32) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 67 +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+32) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 69 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (67+(4*5*15*2)) = (67+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 667 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 +// Dynamic macro starts after dynamic keymaps (69+(4*5*15*2)) = (69+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 669 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/nk65/keymaps/default_via/rules.mk b/keyboards/nk65/keymaps/default_via/rules.mk index deb4fc889b..b8311f5e7f 100755 --- a/keyboards/nk65/keymaps/default_via/rules.mk +++ b/keyboards/nk65/keymaps/default_via/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/issi/is31fl3733.c \ quantum/color.c \ drivers/arm/i2c_master.c diff --git a/keyboards/nk65/nk65.h b/keyboards/nk65/nk65.h index e45360541c..49725a7e64 100755 --- a/keyboards/nk65/nk65.h +++ b/keyboards/nk65/nk65.h @@ -18,8 +18,8 @@ #define XXX KC_NO #include "quantum.h" -#include "../zeal60/rgb_backlight_keycodes.h" -#include "../zeal60/zeal60_keycodes.h" +#include "../wilba_tech/wt_rgb_backlight_keycodes.h" +#include "../wilba_tech/via_keycodes.h" // This a shortcut to help you visually see your layout. diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk index 9467227805..0840daf376 100755 --- a/keyboards/nk65/rules.mk +++ b/keyboards/nk65/rules.mk @@ -1,52 +1,11 @@ -# project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ - drivers/issi/is31fl3733.c \ - quantum/color.c \ - drivers/arm/i2c_master.c - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = +# MCU name +MCU = STM32F303 # Do not put the microcontroller into power saving mode # when we get USB suspend event. We want it to keep updating # backlight effects. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - # Build Options # comment out to disable the options. # @@ -67,3 +26,10 @@ DYNAMIC_KEYMAP_ENABLE = no CIE1931_CURVE = yes LAYOUTS = 65_ansi + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c diff --git a/keyboards/nomu30/rules.mk b/keyboards/nomu30/rules.mk index d4785aabbe..e05730c69e 100644 --- a/keyboards/nomu30/rules.mk +++ b/keyboards/nomu30/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/novelpad/README.md b/keyboards/novelpad/README.md deleted file mode 100644 index 5c73644a28..0000000000 --- a/keyboards/novelpad/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# NovelPad/NumChoc - -![NovelPad](https://i.imgur.com/vi4EdSh.jpg?1) - -A 5x4 macropad/numpad, sold by NovelKeys.xyz. There are two versions of the PCB, the NovelPad for MX switches and the NumChoc for Kailh Choc low profile switches. Both utilize the same firmware with no changes required. - -Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) / [Woodkeys.click](https://woodkeys.click) -Hardware Supported: NovelPad -Hardware Availability: [Novelkeys.xyz](https://novelkeys.xyz) - -Make example for this keyboard (after setting up your build environment): - - make novelpad:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/novelpad/config.h b/keyboards/novelpad/config.h index c9b6b91a59..a2d24d7f82 100755 --- a/keyboards/novelpad/config.h +++ b/keyboards/novelpad/config.h @@ -14,8 +14,8 @@ 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 . */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -31,35 +31,219 @@ along with this program. If not, see . #define MATRIX_ROWS 5 #define MATRIX_COLS 4 -/* key matrix pins */ +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ #define MATRIX_ROW_PINS { C2, C4, C5, C6, C7 } #define MATRIX_COL_PINS { D7, D6, D5, D4 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* Set 0 if debouncing isn't needed */ +#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 10 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 4 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE - /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - false \ -) +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE -#define BACKLIGHT_LEVELS 10 -#define BACKLIGHT_PIN B7 +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO -#ifdef RGBLIGHT_ENABLE -#define RGB_DI_PIN D3 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 4 +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line #endif +*/ -#endif +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/novelpad/info.json b/keyboards/novelpad/info.json index 7523bf5dda..4bd648754b 100644 --- a/keyboards/novelpad/info.json +++ b/keyboards/novelpad/info.json @@ -6,7 +6,32 @@ "height": 5, "layouts": { "LAYOUT_ortho_5x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4} + ] } } } diff --git a/keyboards/novelpad/keymaps/default/keymap.c b/keyboards/novelpad/keymaps/default/keymap.c index 487a377832..cbac67eaaa 100755 --- a/keyboards/novelpad/keymaps/default/keymap.c +++ b/keyboards/novelpad/keymaps/default/keymap.c @@ -14,115 +14,60 @@ 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 . */ + #include QMK_KEYBOARD_H enum custom_keycodes { - BL = SAFE_RANGE, - WK_RED, - WK_GREEN, - WK_BLUE + WK_RED = SAFE_RANGE, + WK_GREEN, + WK_BLUE }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_ESC, + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_TAB, + MO(1), KC_P0, KC_PDOT, KC_ENT + ), - [0] = LAYOUT( - KC_NLCK, KC_PSLS, KC_PAST, KC_ESC, - KC_P7, KC_P8, KC_P9, KC_PMNS, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, KC_TAB, - MO(1), KC_P0, KC_PDOT, KC_ENT - ), - - [1] = LAYOUT( - _______, BL, RGB_MODE_SWIRL, RESET, - RGB_TOG, RGB_MOD, RGB_MODE_PLAIN, RGB_MODE_SNAKE, - RGB_HUI, RGB_SAI, RGB_VAI, RGB_MODE_KNIGHT, - RGB_HUD, RGB_SAD, RGB_VAD, RGB_MODE_XMAS, - _______, WK_RED, WK_GREEN, WK_BLUE - ), - + [1] = LAYOUT( + _______, BL_STEP, RGB_M_SW, RESET, + RGB_TOG, RGB_MOD, RGB_M_P, RGB_M_SN, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_M_K, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_X, + _______, WK_RED, WK_GREEN, WK_BLUE + ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - -void matrix_init_user(void) { - - rgblight_setrgb(0,255,0); -} - -void matrix_scan_user(void) { +void keyboard_post_init_user(void) { + rgblight_setrgb(0, 255, 0); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case BL: - if (record->event.pressed) { -#ifdef BACKLIGHT_ENABLE - backlight_step(); -#endif + switch (keycode) { + case WK_RED: + if (record->event.pressed) { + rgblight_show_solid_color(0xFF, 0x00, 0x00); + } else { + rgblight_show_solid_color(0xFF, 0xFF, 0xFF); + } + return false; + case WK_GREEN: + if (record->event.pressed) { + rgblight_show_solid_color(0x00, 0xFF, 0x00); + } else { + rgblight_show_solid_color(0xFF, 0xFF, 0xFF); + } + return false; + case WK_BLUE: + if (record->event.pressed) { + rgblight_show_solid_color(0x00, 0x00, 0xFF); + } else { + rgblight_show_solid_color(0xFF, 0xFF, 0xFF); + } + return false; } - return false; - break; - case WK_RED: - if (record->event.pressed) { - rgblight_show_solid_color(0xFF, 0, 0); - } else { - rgblight_show_solid_color(0xFF, 0xFF, 0xFF); - } - return false; - break; - case WK_GREEN: - if (record->event.pressed) { - rgblight_show_solid_color(0, 0xFF, 0); - } else { - rgblight_show_solid_color(0xFF, 0xFF, 0xFF); - } - return false; - break; - case WK_BLUE: - if (record->event.pressed) { - rgblight_show_solid_color(0, 0, 0xFF); - } else { - rgblight_show_solid_color(0xFF, 0xFF, 0xFF); - } - return false; - break; - } - return true; -} - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - + return true; } diff --git a/keyboards/novelpad/novelpad.c b/keyboards/novelpad/novelpad.c index 719cb89d6a..9f6ee7dae4 100755 --- a/keyboards/novelpad/novelpad.c +++ b/keyboards/novelpad/novelpad.c @@ -14,4 +14,5 @@ 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 . */ + #include "novelpad.h" diff --git a/keyboards/novelpad/novelpad.h b/keyboards/novelpad/novelpad.h index f5a0b95f59..6650a67223 100755 --- a/keyboards/novelpad/novelpad.h +++ b/keyboards/novelpad/novelpad.h @@ -14,25 +14,23 @@ 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 . */ -#ifndef KB_H -#define KB_H + +#pragma once #include "quantum.h" #define LAYOUT_ortho_5x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33, \ - K40, K41, K42, K43 \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 }, \ - { K30, K31, K32, K33 }, \ - { K40, K41, K42, K43 } \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ } #define LAYOUT LAYOUT_ortho_5x4 - -#endif diff --git a/keyboards/novelpad/readme.md b/keyboards/novelpad/readme.md new file mode 100644 index 0000000000..0cde8337ca --- /dev/null +++ b/keyboards/novelpad/readme.md @@ -0,0 +1,15 @@ +# NovelPad/NumChoc + +![NovelPad](https://i.imgur.com/vi4EdSh.jpg?1) + +A 5x4 macropad/numpad, sold by NovelKeys.xyz. There are two versions of the PCB, the NovelPad for MX switches and the NumChoc for Kailh Choc low profile switches. Both utilize the same firmware with no changes required. + +Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) / [Woodkeys.click](https://woodkeys.click) +Hardware Supported: NovelPad +Hardware Availability: [Novelkeys.xyz](https://novelkeys.xyz) + +Make example for this keyboard (after setting up your build environment): + + make novelpad: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). diff --git a/keyboards/novelpad/rules.mk b/keyboards/novelpad/rules.mk index 8d35c6c05c..54e4cea03b 100755 --- a/keyboards/novelpad/rules.mk +++ b/keyboards/novelpad/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/noxary/220/rules.mk b/keyboards/noxary/220/rules.mk index 0f8cae9269..785fb488d4 100644 --- a/keyboards/noxary/220/rules.mk +++ b/keyboards/noxary/220/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -80,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = ortho_6x4 \ No newline at end of file +LAYOUTS = ortho_6x4 diff --git a/keyboards/noxary/260/260.h b/keyboards/noxary/260/260.h index 2c62bd2a54..c43cdc370f 100644 --- a/keyboards/noxary/260/260.h +++ b/keyboards/noxary/260/260.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ +#define LAYOUT_all( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ @@ -38,3 +38,60 @@ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314 }, \ { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, KC_NO, K414 } \ } + +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K406, K410, K411, K412, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, KC_NO, K414 } \ +} + +#define LAYOUT_60_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K406, K410, K411, K412, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, KC_NO, K414 } \ +} + +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ + K401, K402, K406, K411, K412 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314 }, \ + { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, KC_NO, KC_NO } \ +} + +#define LAYOUT_60_tsangan_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ + K400, K401, K402, K406, K411, K412, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, KC_NO, K414 } \ +} + diff --git a/keyboards/noxary/260/info.json b/keyboards/noxary/260/info.json index e5b449ff36..c8df665c0f 100644 --- a/keyboards/noxary/260/info.json +++ b/keyboards/noxary/260/info.json @@ -5,8 +5,24 @@ "width": 15, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_iso": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}] + }, + + "LAYOUT_60_tsangan_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] } } } \ No newline at end of file diff --git a/keyboards/noxary/260/keymaps/default/keymap.c b/keyboards/noxary/260/keymaps/default/keymap.c index 061e3d2407..3e8c57bd4e 100644 --- a/keyboards/noxary/260/keymaps/default/keymap.c +++ b/keyboards/noxary/260/keymaps/default/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |Ctrl | * `-----------------------------------------------------------' */ - [_BL] = LAYOUT( + [_BL] = 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_BSLS, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | BL_Toggle | | | | |Vol-| | * `----------------------------------------------------------------' */ - [_FL1] = LAYOUT( + [_FL1] = 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_PSCR, _______, KC_VOLU, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | * `----------------------------------------------------------------' */ - [_FL2] = LAYOUT( + [_FL2] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/noxary/260/rules.mk b/keyboards/noxary/260/rules.mk index 0fffc2d387..4d9977cd3b 100644 --- a/keyboards/noxary/260/rules.mk +++ b/keyboards/noxary/260/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -79,3 +31,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +EXTRAFLAGS += -flto + +LAYOUTS = 60_ansi 60_iso 60_hhkb 60_tsangan_hhkb diff --git a/keyboards/noxary/268/rules.mk b/keyboards/noxary/268/rules.mk index d0b4ce2b59..59e6b524cf 100644 --- a/keyboards/noxary/268/rules.mk +++ b/keyboards/noxary/268/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/noxary/268_2/268_2.h b/keyboards/noxary/268_2/268_2.h index 71fd844172..e69ed88def 100644 --- a/keyboards/noxary/268_2/268_2.h +++ b/keyboards/noxary/268_2/268_2.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ +#define LAYOUT_65_ansi_blocker( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, \ diff --git a/keyboards/noxary/268_2/info.json b/keyboards/noxary/268_2/info.json index b47e2de980..cef0f302ce 100644 --- a/keyboards/noxary/268_2/info.json +++ b/keyboards/noxary/268_2/info.json @@ -5,7 +5,7 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_65_ansi_blocker": { "layout": [ {"x":0, "y":0}, {"x":1, "y":0}, diff --git a/keyboards/noxary/268_2/keymaps/default/keymap.c b/keyboards/noxary/268_2/keymaps/default/keymap.c index c22ec2b1d6..01d5613cac 100644 --- a/keyboards/noxary/268_2/keymaps/default/keymap.c +++ b/keyboards/noxary/268_2/keymaps/default/keymap.c @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │Ctrl│Win │Alt │ Space │Alt │ Fn │ │ ← │ ↓ │ → │ * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ */ - [_BL] = LAYOUT( + [_BL] = LAYOUT_65_ansi_blocker( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, 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_PGUP, @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ BL Toggle │ │ │ │ │Vl-│ │ * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ */ - [_FL] = LAYOUT( + [_FL] = LAYOUT_65_ansi_blocker( 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_PSCR, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, diff --git a/keyboards/noxary/268_2/rules.mk b/keyboards/noxary/268_2/rules.mk index a89c930a14..2f9d087656 100644 --- a/keyboards/noxary/268_2/rules.mk +++ b/keyboards/noxary/268_2/rules.mk @@ -1,53 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -68,3 +31,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/noxary/280/rules.mk b/keyboards/noxary/280/rules.mk index ad6117f16c..7ac7c8f654 100644 --- a/keyboards/noxary/280/rules.mk +++ b/keyboards/noxary/280/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/noxary/x268/rules.mk b/keyboards/noxary/x268/rules.mk index 3c4a26ad1a..8b2d28fcda 100644 --- a/keyboards/noxary/x268/rules.mk +++ b/keyboards/noxary/x268/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ok60/rules.mk b/keyboards/ok60/rules.mk index 03646c4857..6a0b6cfb35 100644 --- a/keyboards/ok60/rules.mk +++ b/keyboards/ok60/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/omnikey_blackheart/rules.mk b/keyboards/omnikey_blackheart/rules.mk index 3d4422e986..648f84eeed 100644 --- a/keyboards/omnikey_blackheart/rules.mk +++ b/keyboards/omnikey_blackheart/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/omnikeyish/rules.mk b/keyboards/omnikeyish/rules.mk index 38d50425fb..6318daef7a 100644 --- a/keyboards/omnikeyish/rules.mk +++ b/keyboards/omnikeyish/rules.mk @@ -1,55 +1,16 @@ -# keyboard specific files -SRC += dynamic_macro.c - # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - # Build Options # comment out to disable the options. # @@ -62,4 +23,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no + +# Project specific files +SRC += dynamic_macro.c diff --git a/keyboards/orange75/rules.mk b/keyboards/orange75/rules.mk index 0f9672a51c..d5b1f1e10a 100644 --- a/keyboards/orange75/rules.mk +++ b/keyboards/orange75/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -70,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no diff --git a/keyboards/org60/keymaps/boardy/keymap.c b/keyboards/org60/keymaps/boardy/keymap.c index 43994f189f..b85e475824 100644 --- a/keyboards/org60/keymaps/boardy/keymap.c +++ b/keyboards/org60/keymaps/boardy/keymap.c @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //--------------------------------------------------------------------------------------------------------------------------------------| // | | | | |░░░░░░| | | | // | | | | |░░░░░░| | | | - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FUNCTION),KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT), //--------------------------------------------------------------------------------------------------------------------------------------' @@ -103,19 +103,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //--------------------------------------------------------------------------------------------------------------------------------------| // | | | | |░░░░░░| | | | // | | | | |░░░░░░| | | | - KC_LCTL, KC_LGUI, KC_LALT, KC_0, F(0), KC_NO, KC_MUTE, KC_VOLD, KC_MPLY), + KC_LCTL, KC_LGUI, KC_LALT, KC_0, MO(_FUNCTION),KC_NO, KC_MUTE, KC_VOLD, KC_MPLY), //--------------------------------------------------------------------------------------------------------------------------------------' }; - -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(_FUNCTION), // to Function overlay -}; - - // Loop void matrix_scan_user(void) { // Empty -}; \ No newline at end of file +}; diff --git a/keyboards/org60/keymaps/default/keymap.c b/keyboards/org60/keymaps/default/keymap.c index bf5438657a..1c209a72d2 100644 --- a/keyboards/org60/keymaps/default/keymap.c +++ b/keyboards/org60/keymaps/default/keymap.c @@ -20,20 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// Macros -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { register_code(KC_RSFT); } - else { unregister_code(KC_RSFT); } - break; - } - - return MACRO_NONE; -}; - // Loop void matrix_scan_user(void) { // Empty diff --git a/keyboards/org60/rules.mk b/keyboards/org60/rules.mk index 53e9a28fe8..3e00a04937 100644 --- a/keyboards/org60/rules.mk +++ b/keyboards/org60/rules.mk @@ -1,52 +1,15 @@ # MCU name MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# LUFA specific -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 4719c22696..585c916404 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -34,41 +34,40 @@ along with this program. If not, see . /* key combination for magic key command */ #undef IS_COMMAND -#define IS_COMMAND() ( \ - get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ -) +#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT))) #ifdef RGBLIGHT_ENABLE -# define RGB_DI_PIN D3 -# define RGBLED_NUM 16 // Number of LEDs -# define RGBLED_SPLIT { 8, 8 } +# define RGB_DI_PIN D3 +# define RGBLED_NUM 16 // Number of LEDs +# define RGBLED_SPLIT \ + { 8, 8 } -# define RGBLIGHT_HUE_STEP 12 -# define RGBLIGHT_SAT_STEP 12 -# define RGBLIGHT_VAL_STEP 12 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#endif // RGBLIGHT_ENABLE +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#endif // RGBLIGHT_ENABLE #ifdef AUDIO_ENABLE -# define C6_AUDIO -# ifdef RGBLIGHT_ENABLE -# define NO_MUSIC_MODE -# endif -#endif //AUDIO_ENABLE +# define C6_AUDIO +# ifdef RGBLIGHT_ENABLE +# define NO_MUSIC_MODE +# endif +#endif // AUDIO_ENABLE #undef PRODUCT #ifdef KEYBOARD_orthodox_rev1 -# define PRODUCT Drashna Hacked Orthodox Rev.1 +# define PRODUCT Drashna Hacked Orthodox Rev .1 #elif KEYBOARD_orthodox_rev3 -# define PRODUCT Drashna Hacked Orthodox Rev.3 +# define PRODUCT Drashna Hacked Orthodox Rev .3 #endif -#define QMK_ESC_OUTPUT D7 // usually COL +#define QMK_ESC_OUTPUT D7 // usually COL #ifdef KEYBOARD_orthodox_rev1 -# define QMK_ESC_INPUT D4 // usually ROW +# define QMK_ESC_INPUT D4 // usually ROW #else -# define QMK_ESC_INPUT D2 // usually ROW +# define QMK_ESC_INPUT D2 // usually ROW #endif #define QMK_LED B0 #define QMK_SPEAKER C6 diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index bde959f5e7..2dbe186343 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -1,36 +1,13 @@ -/* -This is the keymap for the keyboard - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger - -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 . -*/ - -#include QMK_KEYBOARD_H #include "drashna.h" -#ifdef INDICATOR_LIGHTS -extern userspace_config_t userspace_config; - -uint8_t last_mod; -uint8_t last_led; -uint8_t last_osm; -#endif - - +/* + * The `LAYOUT_orthodox_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ +// clang-format off #define LAYOUT_orthodox_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -38,7 +15,7 @@ uint8_t last_osm; ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ - KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, KC_QUOT, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \ ) #define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) @@ -121,6 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; +// clang-format on void matrix_init_keymap(void) { #ifndef CONVERT_TO_PROTON_C diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk index a122b9e0f1..0d28c44a71 100644 --- a/keyboards/orthodox/keymaps/drashna/rules.mk +++ b/keyboards/orthodox/keymaps/drashna/rules.mk @@ -10,7 +10,6 @@ NKRO_ENABLE = yes SPACE_CADET_ENABLE = no INDICATOR_LIGHTS = yes -MACROS_ENABLED = no RGBLIGHT_TWINKLE = no RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/keyboards/orthodox/keymaps/xyverz/config.h b/keyboards/orthodox/keymaps/xyverz/config.h index fc6d5d23b5..a44d2b5aed 100644 --- a/keyboards/orthodox/keymaps/xyverz/config.h +++ b/keyboards/orthodox/keymaps/xyverz/config.h @@ -19,10 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once /* Use I2C or Serial, not both */ @@ -33,6 +30,4 @@ along with this program. If not, see . #define MASTER_LEFT // #define _MASTER_RIGHT -// #define EE_HANDS - -#endif +// #define EE_HANDS \ No newline at end of file diff --git a/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c index df66e0fc55..cc3c38943b 100644 --- a/keyboards/orthodox/keymaps/xyverz/keymap.c +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c @@ -1,50 +1,16 @@ -/* -This is the keymap for the keyboard - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger - -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 . -*/ - #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; -enum custom_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - LOWER, - RAISE, - ADJUST, -}; +// Aliases to keep the keymap tidy +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT ( \ @@ -85,69 +51,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void matrix_init_user(void) { +#ifdef BOOTLOADER_CATERINA + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); +#endif +}; + +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - } - return true; -} + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/orthodox/rev1/rev1.h b/keyboards/orthodox/rev1/rev1.h index 783dfb34b9..d9d0b78dfc 100644 --- a/keyboards/orthodox/rev1/rev1.h +++ b/keyboards/orthodox/rev1/rev1.h @@ -23,11 +23,8 @@ along with this program. If not, see . #include "orthodox.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ diff --git a/keyboards/orthodox/rev1/rules.mk b/keyboards/orthodox/rev1/rules.mk index 7e31822098..8daa5f5ecb 100644 --- a/keyboards/orthodox/rev1/rules.mk +++ b/keyboards/orthodox/rev1/rules.mk @@ -1,2 +1,11 @@ -BACKLIGHT_ENABLE = no +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina + +BACKLIGHT_ENABLE = no diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h index ad3437a626..07ecb663ba 100644 --- a/keyboards/orthodox/rev3/config.h +++ b/keyboards/orthodox/rev3/config.h @@ -48,8 +48,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D2, F5, F6, D6, D7, B4, B5, B6, F7 } /*/ -#define CATERINA_BOOTLOADER - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/orthodox/rev3/rev3.h b/keyboards/orthodox/rev3/rev3.h index 783dfb34b9..d9d0b78dfc 100644 --- a/keyboards/orthodox/rev3/rev3.h +++ b/keyboards/orthodox/rev3/rev3.h @@ -23,11 +23,8 @@ along with this program. If not, see . #include "orthodox.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ diff --git a/keyboards/orthodox/rev3/rules.mk b/keyboards/orthodox/rev3/rules.mk index 7e31822098..8daa5f5ecb 100644 --- a/keyboards/orthodox/rev3/rules.mk +++ b/keyboards/orthodox/rev3/rules.mk @@ -1,2 +1,11 @@ -BACKLIGHT_ENABLE = no +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina + +BACKLIGHT_ENABLE = no diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.h b/keyboards/orthodox/rev3_teensy/rev3_teensy.h index 783dfb34b9..d9d0b78dfc 100644 --- a/keyboards/orthodox/rev3_teensy/rev3_teensy.h +++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.h @@ -23,11 +23,8 @@ along with this program. If not, see . #include "orthodox.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ diff --git a/keyboards/orthodox/rev3_teensy/rules.mk b/keyboards/orthodox/rev3_teensy/rules.mk index 4090613457..cbd79cccde 100644 --- a/keyboards/orthodox/rev3_teensy/rules.mk +++ b/keyboards/orthodox/rev3_teensy/rules.mk @@ -1,2 +1,11 @@ -BACKLIGHT_ENABLE = no +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay + +BACKLIGHT_ENABLE = no diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index 61878ea83c..59f039a76d 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -1,46 +1,6 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/otaku_split/rev0/rules.mk b/keyboards/otaku_split/rev0/rules.mk index 04e0aacb16..8c41bc5a2e 100644 --- a/keyboards/otaku_split/rev0/rules.mk +++ b/keyboards/otaku_split/rev0/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/otaku_split/rev1/rules.mk b/keyboards/otaku_split/rev1/rules.mk index 04e0aacb16..8c41bc5a2e 100644 --- a/keyboards/otaku_split/rev1/rules.mk +++ b/keyboards/otaku_split/rev1/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/paladin64/keymaps/default/keymap.c b/keyboards/paladin64/keymaps/default/keymap.c index 3f4608438c..63c1f1f0b3 100755 --- a/keyboards/paladin64/keymaps/default/keymap.c +++ b/keyboards/paladin64/keymaps/default/keymap.c @@ -44,15 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // keyevent_t event = record->event; - - switch (id) { - - } - return MACRO_NONE; -} - void matrix_init_user(void) { } diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk index 3b79256abe..558d1855a1 100755 --- a/keyboards/paladin64/rules.mk +++ b/keyboards/paladin64/rules.mk @@ -1,45 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -59,4 +28,4 @@ RGBLIGHT_ENABLE ?= yes #PS2_USE_USART ?= yes #PS2_USE_INT ?= yes -LAYOUTS = 60_ansi \ No newline at end of file +LAYOUTS = 60_ansi diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h index b5889180e8..c565f39bcc 100644 --- a/keyboards/panc60/config.h +++ b/keyboards/panc60/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 #define MANUFACTURER Panc Interactive #define PRODUCT panc60 @@ -36,6 +37,5 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/panc60/panc60.c b/keyboards/panc60/panc60.c index 16674d30d2..6bd16a4bdc 100644 --- a/keyboards/panc60/panc60.c +++ b/keyboards/panc60/panc60.c @@ -13,52 +13,33 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "panc60.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c_master.h" -#include "quantum.h" - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } diff --git a/keyboards/panc60/rules.mk b/keyboards/panc60/rules.mk index 5531807f18..d3ed4998bc 100644 --- a/keyboards/panc60/rules.mk +++ b/keyboards/panc60/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -35,17 +16,11 @@ BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes +COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -SRC = i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - LAYOUTS = 60_ansi 60_hhkb diff --git a/keyboards/panc60/usbconfig.h b/keyboards/panc60/usbconfig.h index 54a7d20f14..e65d210ace 100644 --- a/keyboards/panc60/usbconfig.h +++ b/keyboards/panc60/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/pancake/config.h b/keyboards/pancake/config.h new file mode 100644 index 0000000000..a83ef5d0cc --- /dev/null +++ b/keyboards/pancake/config.h @@ -0,0 +1,31 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rionlion100 +#define PRODUCT Pancake +#define DESCRIPTION Choc Ortho Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/pancake/feather/config.h b/keyboards/pancake/feather/config.h new file mode 100644 index 0000000000..fbb175758b --- /dev/null +++ b/keyboards/pancake/feather/config.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* Pancake default pinout */ +#define MATRIX_ROW_PINS { B5, D7, C6, D0 } +#define MATRIX_COL_PINS { C7, D6, B7, B6, F0, D2, D3, F1, F4, F5, F6, F7 } +#define UNUSED_PINS + +#define AdafruitBleResetPin D4 +#define AdafruitBleCSPin B4 +#define AdafruitBleIRQPin E6 \ No newline at end of file diff --git a/keyboards/qwertyydox/keymaps/default/rules.mk b/keyboards/pancake/feather/readme.md similarity index 100% rename from keyboards/qwertyydox/keymaps/default/rules.mk rename to keyboards/pancake/feather/readme.md diff --git a/keyboards/pancake/feather/rules.mk b/keyboards/pancake/feather/rules.mk new file mode 100644 index 0000000000..ed10c5faa7 --- /dev/null +++ b/keyboards/pancake/feather/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BLUETOOTH = AdafruitBLE +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. + +LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/pancake/info.json b/keyboards/pancake/info.json new file mode 100644 index 0000000000..c18e48b8b1 --- /dev/null +++ b/keyboards/pancake/info.json @@ -0,0 +1,113 @@ +{ + "keyboard_name": "Pancake", + "keyboard_folder": "Pancake", + "url": "", + "maintainer": "rionlion100", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_mit": { + "key_count": 47, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 2, "x": 5, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + } + } +} diff --git a/keyboards/pancake/keymaps/default/keymap.c b/keyboards/pancake/keymaps/default/keymap.c new file mode 100644 index 0000000000..cebc6fccba --- /dev/null +++ b/keyboards/pancake/keymaps/default/keymap.c @@ -0,0 +1,90 @@ +#include QMK_KEYBOARD_H +enum layers { + _DEFAULT, + _LOWER, + _RAISE, + _FN +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FN MO(_FN) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Default + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | " | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | FN | Lower| Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DEFAULT] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_SCLN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , + KC_LCTL, KC_LALT, KC_LGUI, FN, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | _ | + | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | { | } | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | ? | | Vol- | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + 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_UNDS, KC_PLUS, _______, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_QUES, _______, KC_VOLD, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | - | = | | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | [ | ] | Vol- | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Vol+ | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + 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_MINS, KC_EQL, _______, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______ +), + + /* FN + * ,-----------------------------------------------------------------------------------. + * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | F11 | F12 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | TRNS | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_ortho_4x12( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + + +}; + diff --git a/keyboards/vitamins_included/keymaps/default/rules.mk b/keyboards/pancake/keymaps/default/readme.md similarity index 100% rename from keyboards/vitamins_included/keymaps/default/rules.mk rename to keyboards/pancake/keymaps/default/readme.md diff --git a/keyboards/pancake/pancake.c b/keyboards/pancake/pancake.c new file mode 100644 index 0000000000..e01636016c --- /dev/null +++ b/keyboards/pancake/pancake.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#include "pancake.h" diff --git a/keyboards/pancake/pancake.h b/keyboards/pancake/pancake.h new file mode 100644 index 0000000000..cb77569967 --- /dev/null +++ b/keyboards/pancake/pancake.h @@ -0,0 +1,44 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_planck_mit( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, \ + k300, k301, k302, k303, k304, k305, k307, k308, k309, k310, k311 \ +) \ +{ \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211 }, \ + { k300, k301, k302, k303, k304, k305, k305, k307, k308, k309, k310, k311 } \ +} + +#define LAYOUT_ortho_4x12( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311 \ +) \ +{ \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311 } \ +} diff --git a/keyboards/pancake/promicro/config.h b/keyboards/pancake/promicro/config.h new file mode 100644 index 0000000000..3b65ced818 --- /dev/null +++ b/keyboards/pancake/promicro/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* Pancake default pinout */ +#define MATRIX_ROW_PINS { B1, B3, B2, B6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, E6, B4, B5, D7, C6, D4, D0, D1 } +#define UNUSED_PINS \ No newline at end of file diff --git a/keyboards/pancake/promicro/readme.md b/keyboards/pancake/promicro/readme.md new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/keyboards/pancake/promicro/readme.md @@ -0,0 +1 @@ + diff --git a/keyboards/pancake/promicro/rules.mk b/keyboards/pancake/promicro/rules.mk new file mode 100644 index 0000000000..3ede4cd34b --- /dev/null +++ b/keyboards/pancake/promicro/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. + +LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/pancake/readme.md b/keyboards/pancake/readme.md new file mode 100644 index 0000000000..bbf341b972 --- /dev/null +++ b/keyboards/pancake/readme.md @@ -0,0 +1,12 @@ +# Pancake + +Ortho 40% Ortho Keyboard with an option for the adafruit feather + +Keyboard Maintainer: [Rionlion100](https://github.com/rionlion100) +Hardware Availability: [GB](https://geekhack.org/index.php?topic=101371.0) + +Make example for this keyboard (after setting up your build environment): + + make pancake: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). diff --git a/keyboards/pdxkbc/rules.mk b/keyboards/pdxkbc/rules.mk index bc370be039..7218e1e1bf 100644 --- a/keyboards/pdxkbc/rules.mk +++ b/keyboards/pdxkbc/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index 3dbe5ee030..0ae69e8e2b 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0348 +#define DEVICE_VER 0x0200 #define MANUFACTURER Pearl Boards #define PRODUCT Pearl #define DESCRIPTION 40% keyboard diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index c8cd8a8609..093b5fdd93 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c @@ -15,49 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "pearl.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -74,17 +32,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } -} \ No newline at end of file + } +} diff --git a/keyboards/pearl/rules.mk b/keyboards/pearl/rules.mk index 4db92d1219..79b783e421 100644 --- a/keyboards/pearl/rules.mk +++ b/keyboards/pearl/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,12 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -SRC = i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/pearl/usbconfig.h b/keyboards/pearl/usbconfig.h index 54a7d20f14..e65d210ace 100644 --- a/keyboards/pearl/usbconfig.h +++ b/keyboards/pearl/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/percent/booster/booster.c b/keyboards/percent/booster/booster.c new file mode 100644 index 0000000000..3a298f58ff --- /dev/null +++ b/keyboards/percent/booster/booster.c @@ -0,0 +1,51 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "booster.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/percent/booster/booster.h b/keyboards/percent/booster/booster.h new file mode 100644 index 0000000000..be2d2cb12b --- /dev/null +++ b/keyboards/percent/booster/booster.h @@ -0,0 +1,32 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K40, K42, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, KC_NO, K42, KC_NO }, \ +} diff --git a/keyboards/percent/booster/config.h b/keyboards/percent/booster/config.h new file mode 100644 index 0000000000..23ac7ad0c8 --- /dev/null +++ b/keyboards/percent/booster/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Percent Studio +#define PRODUCT Booster +#define DESCRIPTION Custom programmable numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { D1, D6, D7, B4, B5 } +#define MATRIX_COL_PINS { C7, D4, D2, D0 } + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 + #define RGBLIGHT_SLEEP + #define RGBLIGHT_ANIMATIONS +#endif + diff --git a/keyboards/percent/booster/info.json b/keyboards/percent/booster/info.json new file mode 100644 index 0000000000..08d573d76d --- /dev/null +++ b/keyboards/percent/booster/info.json @@ -0,0 +1,31 @@ +{ + "keyboard_name": "booster", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "key_count": 17, + "layout": [ + {"label":"K00 (D1,C7)", "x":0, "y":0}, + {"label":"K01 (D1,D4)", "x":1, "y":0}, + {"label":"K02 (D1,D2)", "x":2, "y":0}, + {"label":"K03 (D1,D0)", "x":3, "y":0}, + {"label":"K10 (D6,C7)", "x":0, "y":1}, + {"label":"K11 (D6,D4)", "x":1, "y":1}, + {"label":"K12 (D6,D2)", "x":2, "y":1}, + {"label":"K20 (D7,C7)", "x":0, "y":2}, + {"label":"K21 (D7,D4)", "x":1, "y":2}, + {"label":"K22 (D7,D2)", "x":2, "y":2}, + {"label":"K23 (D7,D0)", "x":3, "y":1, "h":2}, + {"label":"K30 (B4,C7)", "x":0, "y":3}, + {"label":"K31 (B4,D4)", "x":1, "y":3}, + {"label":"K32 (B4,D2)", "x":2, "y":3}, + {"label":"K40 (B5,C7)", "x":0, "y":4, "w":2}, + {"label":"K42 (B5,D2)", "x":2, "y":4}, + {"label":"K33 (B4,D0)", "x":3, "y":3, "h":2} + ] + } + } +} diff --git a/keyboards/percent/booster/keymaps/default/keymap.c b/keyboards/percent/booster/keymaps/default/keymap.c new file mode 100644 index 0000000000..919774bcad --- /dev/null +++ b/keyboards/percent/booster/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + +}; diff --git a/keyboards/percent/booster/keymaps/default/readme.md b/keyboards/percent/booster/keymaps/default/readme.md new file mode 100644 index 0000000000..0293153f02 --- /dev/null +++ b/keyboards/percent/booster/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Booster diff --git a/keyboards/percent/booster/readme.md b/keyboards/percent/booster/readme.md new file mode 100644 index 0000000000..78b4b5a35c --- /dev/null +++ b/keyboards/percent/booster/readme.md @@ -0,0 +1,13 @@ +# Booster + +Booster is a number pad designed for Canoe. Shared exactly the same angle and approximate design language, + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Booster PCB +Hardware Availability: [Percent Studio Store](https://percent.studio/products/booster-for-canoe-65) + +Make example for this keyboard (after setting up your build environment): + + make percent/booster: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). diff --git a/keyboards/percent/booster/rules.mk b/keyboards/percent/booster/rules.mk new file mode 100644 index 0000000000..fb2ca00e71 --- /dev/null +++ b/keyboards/percent/booster/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +EXTRAFLAGS += -flto + +LAYOUTS = numpad_5x4 diff --git a/keyboards/percent/canoe/canoe.c b/keyboards/percent/canoe/canoe.c new file mode 100644 index 0000000000..e59b0dd7bc --- /dev/null +++ b/keyboards/percent/canoe/canoe.c @@ -0,0 +1,58 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#include "canoe.h" + +void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +#ifdef BACKLIGHT_ENABLE +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // Turn on the lights + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} + +void backlight_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); +} +#endif diff --git a/keyboards/canoe/canoe.h b/keyboards/percent/canoe/canoe.h similarity index 95% rename from keyboards/canoe/canoe.h rename to keyboards/percent/canoe/canoe.h index 22f2a1f22d..2f608598f8 100644 --- a/keyboards/canoe/canoe.h +++ b/keyboards/percent/canoe/canoe.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CANOE_H -#define CANOE_H +#pragma once #include "quantum.h" @@ -39,7 +38,7 @@ along with this program. If not, see . { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ } \ } -#define LAYOUT( \ +#define LAYOUT_65_ansi_blocker( \ K0D, K0C, K0B, K0A, K09, K08, K07, K06, K05, K04, K03, K02, K01, K00, K0E, \ K1D, K1C, K1B, K1A, K19, K18, K17, K16, K15, K14, K13, K12, K11, K10, K1E, \ K2D, K2C, K2B, K2A, K29, K28, K27, K26, K25, K24, K23, K22, K21, K2E, \ @@ -56,4 +55,4 @@ along with this program. If not, see . { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ } \ } -#endif +#define LAYOUT LAYOUT_65_ansi_blocker // added to not break existing checked in keymaps diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h new file mode 100644 index 0000000000..bae6ed20fa --- /dev/null +++ b/keyboards/percent/canoe/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#ifndef CANOE_CONFIG_H +#define CANOE_CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 +#define MANUFACTURER NotActuallyPercent +#define PRODUCT CANOE + +#define RGBLED_NUM 2 + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +#endif diff --git a/keyboards/percent/canoe/info.json b/keyboards/percent/canoe/info.json new file mode 100644 index 0000000000..756cd1b37a --- /dev/null +++ b/keyboards/percent/canoe/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "Canoe", + "maintainer": "qmk", + "url": "", + "height": 6, + "width": 15, + "layouts": { + "LAYOUT_iso": { + "key_count": 68, + "layout": [{"label":"K0D", "x":0, "y":0}, {"label":"K0C", "x":1, "y":0}, {"label":"K0B", "x":2, "y":0}, {"label":"K0A", "x":3, "y":0}, {"label":"K09", "x":4, "y":0}, {"label":"K08", "x":5, "y":0}, {"label":"K07", "x":6, "y":0}, {"label":"K06", "x":7, "y":0}, {"label":"K05", "x":8, "y":0}, {"label":"K04", "x":9, "y":0}, {"label":"K03", "x":10, "y":0}, {"label":"K02", "x":11, "y":0}, {"label":"K01", "x":12, "y":0}, {"label":"K00", "x":13, "y":0, "w":2}, {"label":"K0E", "x":15, "y":0}, {"label":"K1D", "x":0, "y":1, "w":1.5}, {"label":"K1C", "x":1.5, "y":1}, {"label":"K1B", "x":2.5, "y":1}, {"label":"K1A", "x":3.5, "y":1}, {"label":"K19", "x":4.5, "y":1}, {"label":"K18", "x":5.5, "y":1}, {"label":"K17", "x":6.5, "y":1}, {"label":"K16", "x":7.5, "y":1}, {"label":"K15", "x":8.5, "y":1}, {"label":"K14", "x":9.5, "y":1}, {"label":"K13", "x":10.5, "y":1}, {"label":"K12", "x":11.5, "y":1}, {"label":"K11", "x":12.5, "y":1}, {"label":"K1E", "x":15, "y":1}, {"label":"K2D", "x":0, "y":2, "w":1.75}, {"label":"K2C", "x":1.75, "y":2}, {"label":"K2B", "x":2.75, "y":2}, {"label":"K2A", "x":3.75, "y":2}, {"label":"K29", "x":4.75, "y":2}, {"label":"K28", "x":5.75, "y":2}, {"label":"K27", "x":6.75, "y":2}, {"label":"K26", "x":7.75, "y":2}, {"label":"K25", "x":8.75, "y":2}, {"label":"K24", "x":9.75, "y":2}, {"label":"K23", "x":10.75, "y":2}, {"label":"K22", "x":11.75, "y":2}, {"label":"K10", "x":12.75, "y":2}, {"label":"K21", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"K2E", "x":15, "y":2}, {"label":"K3D", "x":0, "y":3, "w":1.25}, {"label":"K4A", "x":1.25, "y":3}, {"label":"K3C", "x":2.25, "y":3}, {"label":"K3B", "x":3.25, "y":3}, {"label":"K3A", "x":4.25, "y":3}, {"label":"K39", "x":5.25, "y":3}, {"label":"K38", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K36", "x":8.25, "y":3}, {"label":"K35", "x":9.25, "y":3}, {"label":"K34", "x":10.25, "y":3}, {"label":"K33", "x":11.25, "y":3}, {"label":"K32", "x":12.25, "y":3, "w":1.75}, {"label":"K30", "x":14, "y":3}, {"label":"K3E", "x":15, "y":3}, {"label":"K4D", "x":0, "y":4, "w":1.25}, {"label":"K4C", "x":1.25, "y":4, "w":1.25}, {"label":"K4B", "x":2.5, "y":4, "w":1.25}, {"label":"K48", "x":3.75, "y":4, "w":6.25}, {"label":"K44", "x":10, "y":4, "w":1.25}, {"label":"K43", "x":11.25, "y":4, "w":1.25}, {"label":"K42", "x":13, "y":4}, {"label":"K40", "x":14, "y":4}, {"label":"K4E", "x":15, "y":4}] + }, + "LAYOUT_65_ansi_blocker": { + "key_count": 67, + "layout": [{"label":"K0D", "x":0, "y":0}, {"label":"K0C", "x":1, "y":0}, {"label":"K0B", "x":2, "y":0}, {"label":"K0A", "x":3, "y":0}, {"label":"K09", "x":4, "y":0}, {"label":"K08", "x":5, "y":0}, {"label":"K07", "x":6, "y":0}, {"label":"K06", "x":7, "y":0}, {"label":"K05", "x":8, "y":0}, {"label":"K04", "x":9, "y":0}, {"label":"K03", "x":10, "y":0}, {"label":"K02", "x":11, "y":0}, {"label":"K01", "x":12, "y":0}, {"label":"K00", "x":13, "y":0, "w":2}, {"label":"K0E", "x":15, "y":0}, {"label":"K1D", "x":0, "y":1, "w":1.5}, {"label":"K1C", "x":1.5, "y":1}, {"label":"K1B", "x":2.5, "y":1}, {"label":"K1A", "x":3.5, "y":1}, {"label":"K19", "x":4.5, "y":1}, {"label":"K18", "x":5.5, "y":1}, {"label":"K17", "x":6.5, "y":1}, {"label":"K16", "x":7.5, "y":1}, {"label":"K15", "x":8.5, "y":1}, {"label":"K14", "x":9.5, "y":1}, {"label":"K13", "x":10.5, "y":1}, {"label":"K12", "x":11.5, "y":1}, {"label":"K11", "x":12.5, "y":1}, {"label":"K10", "x":13.5, "y":1, "w":1.5}, {"label":"K1E", "x":15, "y":1}, {"label":"K2D", "x":0, "y":2, "w":1.75}, {"label":"K2C", "x":1.75, "y":2}, {"label":"K2B", "x":2.75, "y":2}, {"label":"K2A", "x":3.75, "y":2}, {"label":"K29", "x":4.75, "y":2}, {"label":"K28", "x":5.75, "y":2}, {"label":"K27", "x":6.75, "y":2}, {"label":"K26", "x":7.75, "y":2}, {"label":"K25", "x":8.75, "y":2}, {"label":"K24", "x":9.75, "y":2}, {"label":"K23", "x":10.75, "y":2}, {"label":"K22", "x":11.75, "y":2}, {"label":"K21", "x":12.75, "y":2, "w":2.25}, {"label":"K2E", "x":15, "y":2}, {"label":"K3D", "x":0, "y":3, "w":2.25}, {"label":"K3C", "x":2.25, "y":3}, {"label":"K3B", "x":3.25, "y":3}, {"label":"K3A", "x":4.25, "y":3}, {"label":"K39", "x":5.25, "y":3}, {"label":"K38", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K36", "x":8.25, "y":3}, {"label":"K35", "x":9.25, "y":3}, {"label":"K34", "x":10.25, "y":3}, {"label":"K33", "x":11.25, "y":3}, {"label":"K32", "x":12.25, "y":3, "w":1.75}, {"label":"K30", "x":14, "y":3}, {"label":"K3E", "x":15, "y":3}, {"label":"K4D", "x":0, "y":4, "w":1.25}, {"label":"K4C", "x":1.25, "y":4, "w":1.25}, {"label":"K4B", "x":2.5, "y":4, "w":1.25}, {"label":"K48", "x":3.75, "y":4, "w":6.25}, {"label":"K44", "x":10, "y":4, "w":1.25}, {"label":"K43", "x":11.25, "y":4, "w":1.25}, {"label":"K42", "x":13, "y":4}, {"label":"K40", "x":14, "y":4}, {"label":"K4E", "x":15, "y":4}] + } + } +} diff --git a/keyboards/canoe/keymaps/boy_314/keymap.c b/keyboards/percent/canoe/keymaps/boy_314/keymap.c similarity index 100% rename from keyboards/canoe/keymaps/boy_314/keymap.c rename to keyboards/percent/canoe/keymaps/boy_314/keymap.c diff --git a/keyboards/canoe/keymaps/boy_314/readme.md b/keyboards/percent/canoe/keymaps/boy_314/readme.md similarity index 100% rename from keyboards/canoe/keymaps/boy_314/readme.md rename to keyboards/percent/canoe/keymaps/boy_314/readme.md diff --git a/keyboards/canoe/keymaps/default/keymap.c b/keyboards/percent/canoe/keymaps/default/keymap.c similarity index 100% rename from keyboards/canoe/keymaps/default/keymap.c rename to keyboards/percent/canoe/keymaps/default/keymap.c diff --git a/keyboards/canoe/keymaps/dhertz/keymap.c b/keyboards/percent/canoe/keymaps/dhertz/keymap.c similarity index 100% rename from keyboards/canoe/keymaps/dhertz/keymap.c rename to keyboards/percent/canoe/keymaps/dhertz/keymap.c diff --git a/keyboards/canoe/keymaps/iso/keymap.c b/keyboards/percent/canoe/keymaps/iso/keymap.c similarity index 100% rename from keyboards/canoe/keymaps/iso/keymap.c rename to keyboards/percent/canoe/keymaps/iso/keymap.c diff --git a/keyboards/canoe/matrix.c b/keyboards/percent/canoe/matrix.c similarity index 100% rename from keyboards/canoe/matrix.c rename to keyboards/percent/canoe/matrix.c diff --git a/keyboards/percent/canoe/readme.md b/keyboards/percent/canoe/readme.md new file mode 100644 index 0000000000..45773e4683 --- /dev/null +++ b/keyboards/percent/canoe/readme.md @@ -0,0 +1,44 @@ +# Canoe + +A 65% keyboard with some RGB + +Keyboard Maintainer: QMK Community +Hardware Supported: Canoe +Hardware Availability: https://geekhack.org/index.php?topic=92418.0 + +Make example for this keyboard (after setting up your build environment): + + make percent/canoe:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). diff --git a/keyboards/percent/canoe/rules.mk b/keyboards/percent/canoe/rules.mk new file mode 100644 index 0000000000..bb14269a2b --- /dev/null +++ b/keyboards/percent/canoe/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = full +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/percent/canoe/usbconfig.h b/keyboards/percent/canoe/usbconfig.h new file mode 100644 index 0000000000..85a915bb46 --- /dev/null +++ b/keyboards/percent/canoe/usbconfig.h @@ -0,0 +1,386 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/percent/readme.md b/keyboards/percent/readme.md new file mode 100644 index 0000000000..8028edf03c --- /dev/null +++ b/keyboards/percent/readme.md @@ -0,0 +1,6 @@ +# Percent Studio + +[Website](https://percent.studio/) +[Facebook](https://www.facebook.com/PercentStudio.CN/) +[Instagram](https://www.instagram.com/percent.studio/) +[Taobao](https://shop140162967.world.taobao.com/?spm=a1z09.1.sellercard.15.15ec3606mPki7O) \ No newline at end of file diff --git a/keyboards/percent/skog/README.md b/keyboards/percent/skog/README.md new file mode 100644 index 0000000000..5b7dacd915 --- /dev/null +++ b/keyboards/percent/skog/README.md @@ -0,0 +1,45 @@ +# Skog TKL + +Keyboard Maintainer: QMK Community +Hardware Supported: Skog PCB +Hardware Availability: https://geekhack.org/index.php?topic=87953.0 + +Make example for this keyboard (after setting up your build environment): + + make percent/skog:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as Pause while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work. + +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). \ No newline at end of file diff --git a/keyboards/skog/backlight.c b/keyboards/percent/skog/backlight.c similarity index 100% rename from keyboards/skog/backlight.c rename to keyboards/percent/skog/backlight.c diff --git a/keyboards/skog/backlight_custom.h b/keyboards/percent/skog/backlight_custom.h similarity index 100% rename from keyboards/skog/backlight_custom.h rename to keyboards/percent/skog/backlight_custom.h diff --git a/keyboards/skog/breathing_custom.h b/keyboards/percent/skog/breathing_custom.h similarity index 100% rename from keyboards/skog/breathing_custom.h rename to keyboards/percent/skog/breathing_custom.h diff --git a/keyboards/percent/skog/config.h b/keyboards/percent/skog/config.h new file mode 100644 index 0000000000..7c68d797d5 --- /dev/null +++ b/keyboards/percent/skog/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2018 Jumail Mundekkat / MxBlue + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 + +#define MANUFACTURER Percent +#define PRODUCT Skog TKL + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define RGBLED_NUM 2 +#define RGBLIGHT_ANIMATIONS + +#define BACKLIGHT_LEVELS 5 + +#define NO_UART 1 + +#endif diff --git a/keyboards/skog/info.json b/keyboards/percent/skog/info.json similarity index 100% rename from keyboards/skog/info.json rename to keyboards/percent/skog/info.json diff --git a/keyboards/skog/keymaps/default/keymap.c b/keyboards/percent/skog/keymaps/default/keymap.c similarity index 100% rename from keyboards/skog/keymaps/default/keymap.c rename to keyboards/percent/skog/keymaps/default/keymap.c diff --git a/keyboards/skog/matrix.c b/keyboards/percent/skog/matrix.c similarity index 100% rename from keyboards/skog/matrix.c rename to keyboards/percent/skog/matrix.c diff --git a/keyboards/percent/skog/rules.mk b/keyboards/percent/skog/rules.mk new file mode 100644 index 0000000000..2b0c1154dd --- /dev/null +++ b/keyboards/percent/skog/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = full +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c + +BACKLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c backlight.c diff --git a/keyboards/percent/skog/skog.c b/keyboards/percent/skog/skog.c new file mode 100644 index 0000000000..8678d483a7 --- /dev/null +++ b/keyboards/percent/skog/skog.c @@ -0,0 +1,48 @@ +/* +Copyright 2018 Jumail Mundekkat / MxBlue + +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 . + +ps2avrGB support code by Kenneth A. (bminiex/.[ch]) +*/ + +#include "skog.h" + +#include "backlight.h" +#include "backlight_custom.h" + +void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +#ifdef BACKLIGHT_ENABLE +/// Overrides functions in `quantum.c` +void backlight_init_ports(void) { + b_led_init_ports(); +} + +void backlight_task(void) { + b_led_task(); +} + +void backlight_set(uint8_t level) { + b_led_set(level); +} +#endif diff --git a/keyboards/skog/skog.h b/keyboards/percent/skog/skog.h similarity index 100% rename from keyboards/skog/skog.h rename to keyboards/percent/skog/skog.h diff --git a/keyboards/percent/skog/usbconfig.h b/keyboards/percent/skog/usbconfig.h new file mode 100644 index 0000000000..3a06286588 --- /dev/null +++ b/keyboards/percent/skog/usbconfig.h @@ -0,0 +1,386 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'P','e','r','c','e','n','t' +#define USB_CFG_VENDOR_NAME_LEN 7 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'S','k','o','g',' ','T','K','L' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/percent/skog_lite/config.h b/keyboards/percent/skog_lite/config.h new file mode 100644 index 0000000000..97d11238e3 --- /dev/null +++ b/keyboards/percent/skog_lite/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 +#define MANUFACTURER Percent +#define PRODUCT Skog Lite + +#define RGBLED_NUM 18 + +#define MATRIX_ROWS 7 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B5 } +#define MATRIX_COL_PINS { C4, C2, D7, C7, C6, A0, A1, A2, A3, A7, A6, A5, A4, C5, C3} +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/percent/skog_lite/info.json b/keyboards/percent/skog_lite/info.json new file mode 100644 index 0000000000..d8e382cce0 --- /dev/null +++ b/keyboards/percent/skog_lite/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Skog Lite", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_7u_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_7u_ansi_blocker": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/percent/skog_lite/keymaps/default/keymap.c b/keyboards/percent/skog_lite/keymaps/default/keymap.c new file mode 100644 index 0000000000..ee1daa34e7 --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi(\ + KC_ESC, 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_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP, \ + 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_DEL ,KC_END ,KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT) \ +}; diff --git a/keyboards/percent/skog_lite/keymaps/default/readme.md b/keyboards/percent/skog_lite/keymaps/default/readme.md new file mode 100644 index 0000000000..c7ec726b03 --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Skog Lite \ No newline at end of file diff --git a/keyboards/percent/skog_lite/readme.md b/keyboards/percent/skog_lite/readme.md new file mode 100644 index 0000000000..369129e86f --- /dev/null +++ b/keyboards/percent/skog_lite/readme.md @@ -0,0 +1,48 @@ +# Skog Lite + +TKL Custom Keyboard. + + +Keyboard Maintainer: [mechmerlin](https://github.com/mechmerlin) +Hardware Supported: Skog Lite PCB +Hardware Availability: [Kono Store](https://kono.store/products/skog-lite) + + +Make example for this keyboard (after setting up your build environment): + + make percent/skog_lite:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K05`, commonly programmed as `F5` while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). diff --git a/keyboards/percent/skog_lite/rules.mk b/keyboards/percent/skog_lite/rules.mk new file mode 100644 index 0000000000..1d2372c77f --- /dev/null +++ b/keyboards/percent/skog_lite/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c + +OPT_DEFS = -DDEBUG_LEVEL=0 + +LAYOUTS = tkl_ansi diff --git a/keyboards/percent/skog_lite/skog_lite.c b/keyboards/percent/skog_lite/skog_lite.c new file mode 100644 index 0000000000..a6c00f5293 --- /dev/null +++ b/keyboards/percent/skog_lite/skog_lite.c @@ -0,0 +1,47 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "skog_lite.h" + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/percent/skog_lite/skog_lite.h b/keyboards/percent/skog_lite/skog_lite.h new file mode 100644 index 0000000000..16dc70bf67 --- /dev/null +++ b/keyboards/percent/skog_lite/skog_lite.h @@ -0,0 +1,75 @@ +/* Copyright 2019 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_tkl_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k6c, \ + k10, k1e, k11, k12, k13, k14, k1d, k15, k16, k17, k18, k19, k1a, k1b, k1c, k6b, k6a, \ + k20, k2e, k21, k22, k23, k24, k2d, k25, k26, k27, k28, k29, k2a, k2b, k2c, k69, k68, \ + k30, k3e, k31, k32, k33, k34, k3d, k35, k36, k37, k38, k39, k3a, \ + k40, k4e, k41, k42, k43, k44, k4d, k45, k46, k47, k48, k4b, k4c, \ + k50, k5e, k51, k54, k56, k57, k58, k5b, k5a, k5c, k67 \ +){ \ + { 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, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, ___, ___, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, ___, ___, k4b, k4c, k4d, k4e }, \ + { k50, k51, ___, ___, k54, ___, k56, k57, k58, ___, k5a, k5b, k5c, ___, k5e }, \ + { ___, ___, ___, ___, ___, ___, ___, k67, k68, k69, k6a, k6b, k6c, ___, ___ }, \ +} + +#define LAYOUT_tkl_7u_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k6c, \ + k10, k1e, k11, k12, k13, k14, k1d, k15, k16, k17, k18, k19, k1a, k1b, k1c, k6b, k6a, \ + k20, k2e, k21, k22, k23, k24, k2d, k25, k26, k27, k28, k29, k2a, k2b, k2c, k69, k68, \ + k30, k3e, k31, k32, k33, k34, k3d, k35, k36, k37, k38, k39, k3a, \ + k40, k4e, k41, k42, k43, k44, k4d, k45, k46, k47, k48, k4b, k4c, \ + k50, k5e, k51, k54, k57, k58, k5b, k5a, k5c, k67 \ +){ \ + { 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, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, ___, ___, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, ___, ___, k4b, k4c, k4d, k4e }, \ + { k50, k51, ___, ___, k54, ___, ___, k57, k58, ___, k5a, k5b, k5c, ___, k5e }, \ + { ___, ___, ___, ___, ___, ___, ___, k67, k68, k69, k6a, k6b, k6c, ___, ___ }, \ +} + +#define LAYOUT_tkl_7u_ansi_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k6c, \ + k10, k1e, k11, k12, k13, k14, k1d, k15, k16, k17, k18, k19, k1a, k1b, k1c, k6b, k6a, \ + k20, k2e, k21, k22, k23, k24, k2d, k25, k26, k27, k28, k29, k2a, k2b, k2c, k69, k68, \ + k30, k3e, k31, k32, k33, k34, k3d, k35, k36, k37, k38, k39, k3a, \ + k40, k4e, k41, k42, k43, k44, k4d, k45, k46, k47, k48, k4b, k4c, \ + k50, k51, k54, k57, k5b, k5a, k5c, k67 \ +){ \ + { 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, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, ___, ___, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, ___, ___, k4b, k4c, k4d, k4e }, \ + { k50, k51, ___, ___, k54, ___, ___, k57, ___, ___, k5a, k5b, k5c, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, k67, k68, k69, k6a, k6b, k6c, ___, ___ }, \ +} diff --git a/keyboards/percent/skog_lite/usbconfig.h b/keyboards/percent/skog_lite/usbconfig.h new file mode 100644 index 0000000000..e65d210ace --- /dev/null +++ b/keyboards/percent/skog_lite/usbconfig.h @@ -0,0 +1,383 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/phantom/keymaps/default/keymap.c b/keyboards/phantom/keymaps/default/keymap.c index eb5db022d8..d7001f0663 100644 --- a/keyboards/phantom/keymaps/default/keymap.c +++ b/keyboards/phantom/keymaps/default/keymap.c @@ -41,22 +41,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/phantom/keymaps/default/rules.mk b/keyboards/phantom/keymaps/default/rules.mk index 597d4046a1..15b7f725b2 100644 --- a/keyboards/phantom/keymaps/default/rules.mk +++ b/keyboards/phantom/keymaps/default/rules.mk @@ -1,34 +1 @@ -# Copyright 2013 Jun Wako -# -# 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 . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +CONSOLE_ENABLE = yes diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/keyboards/phantom/keymaps/xyverz/keymap.c deleted file mode 100644 index 07a743c164..0000000000 --- a/keyboards/phantom/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,92 +0,0 @@ -#include QMK_KEYBOARD_H - -extern keymap_config_t keymap_config; - - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QW 0 -#define _DV 1 -#define _CM 2 -#define _FL 3 - -// Macro name shortcuts -#define QWERTY M(_QW) -#define DVORAK M(_DV) -#define COLEMAK M(_CM) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QW] = LAYOUT_tkl_ansi( /* Layer 0: Qwerty */ \ - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ - 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_DEL, KC_END, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT \ - ), - - [_DV] = LAYOUT_tkl_ansi( /* Layer 1: Dvorak */ \ - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ - KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT \ - ), - - [_CM] = LAYOUT_tkl_ansi( /* Layer 2: Colemak */ \ - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ - KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT \ - ), - -[_FL] = LAYOUT_tkl_ansi( /* Layer 3: Functions */ \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_MPRV, KC_MPLY, KC_MNXT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - QWERTY, DVORAK, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - -}; - -enum function_id { - SHIFT_ESC, -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case _DV: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DV); - } - break; - case _QW: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QW); - } - break; - case _CM: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_CM); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/phantom/rules.mk b/keyboards/phantom/rules.mk index 9ce9fd2444..1c8d7b916d 100644 --- a/keyboards/phantom/rules.mk +++ b/keyboards/phantom/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/pico/config.h b/keyboards/pico/config.h new file mode 100644 index 0000000000..36c8f68b90 --- /dev/null +++ b/keyboards/pico/config.h @@ -0,0 +1,27 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define USE_SERIAL + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + diff --git a/keyboards/pico/info.json b/keyboards/pico/info.json new file mode 100644 index 0000000000..c5c9c8a85f --- /dev/null +++ b/keyboards/pico/info.json @@ -0,0 +1,76 @@ +{ + "keyboard_name": "Pico Keyboard", + "url": "https://github.com/kumaokobo/pico-keyboard/", + "maintainer": "Kumao Kobo", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":9, "y":0}, + {"label":"7", "x":10, "y":0}, + {"label":"8", "x":11, "y":0}, + {"label":"9", "x":12, "y":0}, + {"label":"0", "x":13, "y":0}, + {"label":"-", "x":14, "y":0}, + {"label":"\u2190", "x":15, "y":0}, + {"label":"Tab", "x":0.25, "y":1}, + {"label":"Q", "x":1.25, "y":1}, + {"label":"W", "x":2.25, "y":1}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1}, + {"label":"T", "x":5.25, "y":1}, + {"label":"Y", "x":9.25, "y":1}, + {"label":"U", "x":10.25, "y":1}, + {"label":"I", "x":11.25, "y":1}, + {"label":"O", "x":12.25, "y":1}, + {"label":"P", "x":13.25, "y":1}, + {"label":"[", "x":14.25, "y":1}, + {"label":"]", "x":15.25, "y":1}, + {"label":"Ctrl", "x":0.5, "y":2}, + {"label":"A", "x":1.5, "y":2}, + {"label":"S", "x":2.5, "y":2}, + {"label":"D", "x":3.5, "y":2}, + {"label":"F", "x":4.5, "y":2}, + {"label":"G", "x":5.5, "y":2}, + {"label":"H", "x":9.5, "y":2}, + {"label":"J", "x":10.5, "y":2}, + {"label":"K", "x":11.5, "y":2}, + {"label":"L", "x":12.5, "y":2}, + {"label":";", "x":13.5, "y":2}, + {"label":"'", "x":14.5, "y":2}, + {"label":"Enter", "x":15.5, "y":2}, + {"label":"Shift", "x":0.75, "y":3}, + {"label":"Z", "x":1.75, "y":3}, + {"label":"X", "x":2.75, "y":3}, + {"label":"C", "x":3.75, "y":3}, + {"label":"V", "x":4.75, "y":3}, + {"label":"B", "x":5.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":",", "x":11.75, "y":3}, + {"label":".", "x":12.75, "y":3}, + {"label":"/", "x":13.75, "y":3}, + {"label":"\u2191", "x":14.75, "y":3}, + {"label":"Shift", "x":15.75, "y":3}, + {"label":"Alt", "x":1, "y":4}, + {"label":"Enter", "x":2, "y":4}, + {"label":"Del", "x":3, "y":4}, + {"label":"GUI", "x":4, "y":4}, + {"label":"LANG2", "x":5, "y":4}, + {"label":"Space", "x":6, "y":4}, + {"label":"Space", "x":10, "y":4}, + {"label":"LANG1", "x":11, "y":4}, + {"label":"GUI", "x":12, "y":4}, + {"label":"Del", "x":13, "y":4}, + {"label":"\u2190", "x":14, "y":4}, + {"label":"\u2193", "x":15, "y":4}, + {"label":"\u2192", "x":16, "y":4} + ] + } + } +} diff --git a/keyboards/pico/keymaps/default/config.h b/keyboards/pico/keymaps/default/config.h new file mode 100644 index 0000000000..5cbe7609a3 --- /dev/null +++ b/keyboards/pico/keymaps/default/config.h @@ -0,0 +1,18 @@ +/* +Copyright 2019 Kumao Kobo + +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 . +*/ + +#pragma once diff --git a/keyboards/pico/keymaps/default/keymap.c b/keyboards/pico/keymaps/default/keymap.c new file mode 100644 index 0000000000..17076f20cd --- /dev/null +++ b/keyboards/pico/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) +#define KC_ALES LALT_T(KC_ESC) +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_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_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_UP ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_ENT ,KC_DEL ,KC_LGUI ,KC_L2SYM,KC_SPC , KC_SPC ,KC_L1SYM,KC_RGUI ,KC_DEL ,KC_LEFT ,KC_DOWN ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,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_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_JYEN ,KC_BSLS , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_GRV ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LCBR ,KC_RCBR ,_______ ,_______ ,_______ ,KC_CIRC ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/pico/keymaps/default/readme.md b/keyboards/pico/keymaps/default/readme.md new file mode 100644 index 0000000000..9f8fa53ebf --- /dev/null +++ b/keyboards/pico/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Pico Keyboard + +![Pico Layout Image](https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-layout.png) diff --git a/keyboards/pico/keymaps/jis/config.h b/keyboards/pico/keymaps/jis/config.h new file mode 100644 index 0000000000..5cbe7609a3 --- /dev/null +++ b/keyboards/pico/keymaps/jis/config.h @@ -0,0 +1,18 @@ +/* +Copyright 2019 Kumao Kobo + +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 . +*/ + +#pragma once diff --git a/keyboards/pico/keymaps/jis/keymap.c b/keyboards/pico/keymaps/jis/keymap.c new file mode 100644 index 0000000000..a3d2606613 --- /dev/null +++ b/keyboards/pico/keymaps/jis/keymap.c @@ -0,0 +1,47 @@ +#include QMK_KEYBOARD_H +#include"keymap_jp.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) +#define KC_ALES LALT_T(KC_ESC) +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + 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_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,JP_AT ,JP_CIRC , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,JP_COLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_UP ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_ENT ,KC_DEL ,KC_LGUI ,KC_L2SYM,KC_SPC , KC_SPC ,KC_L1SYM,KC_RGUI ,KC_DEL ,KC_LEFT ,KC_DOWN ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,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_LPRN ,KC_RPRN ,KC_PIPE ,JP_YEN ,JP_TILD ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,JP_GRV ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LCBR ,KC_RCBR ,_______ ,_______ ,_______ ,JP_UNDS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,KC_LT ,_______ ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/pico/keymaps/jis/readme.md b/keyboards/pico/keymaps/jis/readme.md new file mode 100644 index 0000000000..49d2aa7b7a --- /dev/null +++ b/keyboards/pico/keymaps/jis/readme.md @@ -0,0 +1,3 @@ +# The JIS-like keymap for Pico Keyboard + +![Pico JIS like Layout Image](https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-jis-like-layout.png) diff --git a/keyboards/pico/pico.c b/keyboards/pico/pico.c new file mode 100644 index 0000000000..7a7a7a6457 --- /dev/null +++ b/keyboards/pico/pico.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ +#include "pico.h" diff --git a/keyboards/pico/pico.h b/keyboards/pico/pico.h new file mode 100644 index 0000000000..246ed87558 --- /dev/null +++ b/keyboards/pico/pico.h @@ -0,0 +1,23 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#ifdef KEYBOARD_pico_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" diff --git a/keyboards/pico/readme.md b/keyboards/pico/readme.md new file mode 100644 index 0000000000..26bbf1da2e --- /dev/null +++ b/keyboards/pico/readme.md @@ -0,0 +1,17 @@ +# Pico keyboard + +

+ Pico Keyboard rev1.0 +

+ +A split keyboard kit designed for small hands. +Pico adopted the footprint for [Kailh Mid-Height](http://www.kailh.com/en/Products/Ks/KHS/) smaller than Cherry MX compatible switches. + +* Keyboard Maintainer: [Kumao Kobo](https://github.com/kumaokobo) +* Hardware Supported: Pico PCB rev1.0 w/ Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make pico/rev1: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). diff --git a/keyboards/pico/rev1/config.h b/keyboards/pico/rev1/config.h new file mode 100644 index 0000000000..ab22025256 --- /dev/null +++ b/keyboards/pico/rev1/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9692 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Kumao Kobo +#define PRODUCT Pico Keyboard +#define DESCRIPTION Split row staggered 5x7 keyboard (using kailh mid-height) + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/maxr1998/pulse4k/keymaps/default/rules.mk b/keyboards/pico/rev1/rev1.c similarity index 100% rename from keyboards/maxr1998/pulse4k/keymaps/default/rules.mk rename to keyboards/pico/rev1/rev1.c diff --git a/keyboards/pico/rev1/rev1.h b/keyboards/pico/rev1/rev1.h new file mode 100644 index 0000000000..61e32efd2c --- /dev/null +++ b/keyboards/pico/rev1/rev1.h @@ -0,0 +1,24 @@ +#pragma once + +#include "pico.h" +#include "quantum.h" + +#define LAYOUT( \ + L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) \ +{ \ + { KC_NO, L01, L02, L03, L04, L05, L06 }, \ + { KC_NO, L11, L12, L13, L14, L15, L16 }, \ + { KC_NO, L21, L22, L23, L24, L25, L26 }, \ + { KC_NO, L31, L32, L33, L34, L35, L36 }, \ + { KC_NO, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/orthodox/keymaps/default/rules.mk b/keyboards/pico/rev1/rules.mk similarity index 100% rename from keyboards/orthodox/keymaps/default/rules.mk rename to keyboards/pico/rev1/rules.mk diff --git a/keyboards/pico/rules.mk b/keyboards/pico/rules.mk new file mode 100644 index 0000000000..fc6ad1e7eb --- /dev/null +++ b/keyboards/pico/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = pico/rev1 diff --git a/keyboards/pinky/3/3.h b/keyboards/pinky/3/3.h index ca1109d262..8bd2d49faf 100644 --- a/keyboards/pinky/3/3.h +++ b/keyboards/pinky/3/3.h @@ -2,7 +2,6 @@ #include "../pinky.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef USE_I2C @@ -13,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ diff --git a/keyboards/pinky/3/keymaps/default/rules.mk b/keyboards/pinky/3/keymaps/default/rules.mk deleted file mode 100644 index 1768698093..0000000000 --- a/keyboards/pinky/3/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/pinky/3/keymaps/ninjonas/README.md b/keyboards/pinky/3/keymaps/ninjonas/README.md new file mode 100644 index 0000000000..d47fdd995b --- /dev/null +++ b/keyboards/pinky/3/keymaps/ninjonas/README.md @@ -0,0 +1,113 @@ +# ninjonas Keymap for [Pinky3](https://github.com/tamanishi/Pinky3) + +## Keymap +This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](../../../../../users/ninjonas). + +More information about the Pinky3 keyboard can be found [here](https://github.com/tamanishi/Pinky3) + +### QWERTY +```c +/* +,---------------------------------------------------------------------. ,---------------------------------------------------------------------. +| Tab| Q| W| E| R| T| Play| | Mute| Y| U| I| O| P| \| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| Esc/Caps| A| S| D| F| G| [| | ]| H| J| K| L| ;| '| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| Shift| Z| X| C| V| B| Spc/RAI| | Ent/LOW| N| M| ,| .| /| =| +`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' + | ALT| | CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| + `---------------------------------------' `---------------------------------------' +*/ +``` + +### DVORAK +```c +/* +,---------------------------------------------------------------------. ,---------------------------------------------------------------------. +| Tab| '| ,| .| P| Y| Play| | Mute| F| G| C| R| L| \| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| Esc/Caps| A| O| E| U| I| [| | ]| D| H| T| N| S| /| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| Shift| ;| Q| J| K| X| Spc/RAI| | Ent/LOW| B| M| W| V| Z| =| +`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' + | ALT| | CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| + `---------------------------------------' `---------------------------------------' +*/ +``` + +### COLEMAK +```c +/* +,---------------------------------------------------------------------. ,---------------------------------------------------------------------. +| Tab| Q| W| F| P| G| Play| | Mute| J| L| U| Y| ;| \| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| Esc/Caps| A| R| S| T| D| [| | ]| H| N| E| I| O| '| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| Shift| Z| X| C| V| B| Spc/RAI| | Ent/LOW| K| M| ,| .| /| =| +`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' + | ALT| | CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| + `---------------------------------------' `---------------------------------------' +*/ +``` + +### LOWER +```c +/* +,---------------------------------------------------------------------. ,---------------------------------------------------------------------. +| | | | BriUp| Play| Mute| K_CSCN| | | PgUp| Home| Up| End| | K_MDSH| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| | | | BriDn| Next| VolUp| | | | PgDn| Left| Down| Right| K_LOCK| | +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| M_SHFT| | | | Prev| VolDn| | | | | | | | | M_PYNV| +`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' + | | | | | | | | M_CODE| | + `---------------------------------------' `---------------------------------------' +*/ +``` + +### RAISE +```c +/* +,---------------------------------------------------------------------. ,---------------------------------------------------------------------. +| `| 1| 2| 3| 4| 5| | | | 6| 7| 8| 9| 0| -| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| ~| !| @| #| $| %| | | | ^| &| *| (| )| _| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| F11| F2| F3| F4| F4| F5| | | | F6| F7| F8| F9| F10| F12| +`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' + | | | | | | | | | | + `---------------------------------------' `---------------------------------------' +*/ +``` + +### ADJUST +```c +/* +,---------------------------------------------------------------------. ,---------------------------------------------------------------------. +| M_MAKE| EEP_RST| | | | | | | | | | | COLEMAK| DVORAK| QWERTY| +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| M_VRSN| | | | | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| +| M_FLSH| | | | | | | | | | | | | | | +`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' + | | | | | | | | | | + `---------------------------------------' `---------------------------------------' +*/ +``` + + \ No newline at end of file diff --git a/keyboards/pinky/3/keymaps/ninjonas/config.h b/keyboards/pinky/3/keymaps/ninjonas/config.h new file mode 100644 index 0000000000..585bd8cb5d --- /dev/null +++ b/keyboards/pinky/3/keymaps/ninjonas/config.h @@ -0,0 +1,31 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 . + */ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define RETRO_TAPPPING \ No newline at end of file diff --git a/keyboards/pinky/3/keymaps/ninjonas/keymap.c b/keyboards/pinky/3/keymaps/ninjonas/keymap.c new file mode 100644 index 0000000000..2b93c5aa8e --- /dev/null +++ b/keyboards/pinky/3/keymaps/ninjonas/keymap.c @@ -0,0 +1,111 @@ +/* Copyright 2019 @ninjonas + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "ninjonas.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_wrapper( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + _____________________QWERTY_L1______________________, KC_MPLY, KC_MUTE, _____________________QWERTY_R1______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________QWERTY_L2______________________, T_LBRC, T_RBRC, _____________________QWERTY_R2______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________QWERTY_L3______________________, LT_RAI, LT_LOW, _____________________QWERTY_R3______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________MOD_LEFT_________, K_LAPP, K_RAPP, ________MOD_RIGHT________ + //`---------------------------------------' `---------------------------------------' + ), + + [_DVORAK] = LAYOUT_wrapper( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + _____________________DVORAK_L1______________________, KC_MPLY, KC_MUTE, _____________________DVORAK_R1______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________DVORAK_L2______________________, T_LBRC, T_RBRC, _____________________DVORAK_R2______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________DVORAK_L3______________________, LT_RAI, LT_LOW, _____________________DVORAK_R3______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________MOD_LEFT_________, K_LAPP, K_RAPP, ________MOD_RIGHT________ + //`---------------------------------------' `---------------------------------------' + ), + + [_COLEMAK] = LAYOUT_wrapper( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + _____________________COLEMAK_L1_____________________, KC_MPLY, KC_MUTE, _____________________COLEMAK_R1_____________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________COLEMAK_L2_____________________, T_LBRC, T_RBRC, _____________________COLEMAK_R2_____________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________COLEMAK_L3_____________________, LT_RAI, LT_LOW, _____________________COLEMAK_R3_____________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________MOD_LEFT_________, K_LAPP, K_RAPP, ________MOD_RIGHT________ + //`---------------------------------------' `---------------------------------------' + ), + + [_LOWER] = LAYOUT_wrapper( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + _____________________LOWER_L1_______________________, K_CSCN, XXXXXXX, _____________________LOWER_R1_______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________LOWER_L2_______________________, XXXXXXX, XXXXXXX, _____________________LOWER_R2_______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________LOWER_L3_______________________, _______, _______, _____________________LOWER_R3_______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + __________________________________, _______, _______, M_CODE, _______ + //`---------------------------------------' `---------------------------------------' + ), + + [_RAISE] = LAYOUT_wrapper( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + _____________________NUM_LEFT_______________________, XXXXXXX, XXXXXXX, _____________________NUM_RIGHT______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________SYM_LEFT_______________________, XXXXXXX, XXXXXXX, _____________________SYM_RIGHT______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________FUNC_LEFT______________________, _______, _______, _____________________FUNC_RIGHT_____________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + __________________________________, __________________________________ + //`---------------------------------------' `---------------------------------------' + ), + + [_ADJUST] = LAYOUT_wrapper( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + _____________________ADJUST_L1______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R1______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________ADJUST_L2______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R2______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _____________________ADJUST_L3______________________, _______, _______, _____________________ADJUST_R3______________________, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + __________________________________, __________________________________ + //`---------------------------------------' `---------------------------------------' + ), + + /* + [_TEMPLATE] = LAYOUT( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______ + //`---------------------------------------' `---------------------------------------' + ) + */ +}; \ No newline at end of file diff --git a/keyboards/pinky/3/keymaps/ninjonas/rules.mk b/keyboards/pinky/3/keymaps/ninjonas/rules.mk new file mode 100644 index 0000000000..155f56ef9f --- /dev/null +++ b/keyboards/pinky/3/keymaps/ninjonas/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = no +LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file diff --git a/keyboards/pinky/3/rules.mk b/keyboards/pinky/3/rules.mk index 1bb8bf6d7f..e69de29bb2 100644 --- a/keyboards/pinky/3/rules.mk +++ b/keyboards/pinky/3/rules.mk @@ -1 +0,0 @@ -# empty diff --git a/keyboards/pinky/4/4.h b/keyboards/pinky/4/4.h index ad105ce7fc..2550940011 100644 --- a/keyboards/pinky/4/4.h +++ b/keyboards/pinky/4/4.h @@ -2,7 +2,6 @@ #include "../pinky.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef USE_I2C @@ -13,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ diff --git a/keyboards/pinky/4/keymaps/default/rules.mk b/keyboards/pinky/4/keymaps/default/rules.mk deleted file mode 100644 index 1768698093..0000000000 --- a/keyboards/pinky/4/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/pinky/4/rules.mk b/keyboards/pinky/4/rules.mk index 1bb8bf6d7f..e69de29bb2 100644 --- a/keyboards/pinky/4/rules.mk +++ b/keyboards/pinky/4/rules.mk @@ -1 +0,0 @@ -# empty diff --git a/keyboards/pinky/rules.mk b/keyboards/pinky/rules.mk index 1c0059d318..395afeff0e 100644 --- a/keyboards/pinky/rules.mk +++ b/keyboards/pinky/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/plaid/config.h b/keyboards/plaid/config.h index 9da31d700f..8fa8aa85b6 100644 --- a/keyboards/plaid/config.h +++ b/keyboards/plaid/config.h @@ -50,6 +50,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/plaid/keymaps/default/keymap.c b/keyboards/plaid/keymaps/default/keymap.c index 35c22b4983..8982841915 100644 --- a/keyboards/plaid/keymaps/default/keymap.c +++ b/keyboards/plaid/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum plaid_layers { _QWERTY, diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/config.h b/keyboards/plaid/keymaps/thehalfdeafchef/config.h new file mode 100644 index 0000000000..4bcbc6f673 --- /dev/null +++ b/keyboards/plaid/keymaps/thehalfdeafchef/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Ian Canino (ian@thecommittedbug.io) + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c b/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c new file mode 100644 index 0000000000..bdf6c54c31 --- /dev/null +++ b/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c @@ -0,0 +1,182 @@ +#include QMK_KEYBOARD_H + +enum plaid_layers { + _QWERTY, + _DVORAK, + _COLEMAK, + _LOWER, + _RAISE, + _FUNCTION, +}; + +enum plaid_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LED }; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define LED_ON 1 +#define LED_OFF 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LS/( | Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LS/( | Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | + * `-----------------------------------------------------------------------------------' + */ + + [_COLEMAK] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Esc | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | + * `-----------------------------------------------------------------------------------' + */ + + [_DVORAK] = LAYOUT_planck_mit(KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), + + /* LOWER + * ,----------------------------------------------------------------------------. + * | | | MPRV | MPLY | MNXT | | | | PGUP| UP | PGDN|PSCR | + * |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+ + * | | | MUTE | VOLD | VOLU | | | | LEFT| DOWN|RIGHT| | + * |------+------+------+------+------+-----+-----+-----+-----+-----+-----+-----+ + * | | | MAIL | WBAK | WFWD | | | | HOME| | END | | + * |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+ + * | | | | | | DEL | | | | | | + * `----------------------------------------------------------------------------' + */ + + [_LOWER] = LAYOUT_planck_mit(KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_MAIL, KC_WBAK, KC_WFWD, KC_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + /* RAISE + * ,--------------------------------------------------------------------------------. + * | NLCK | 1 | 2 | 3 | - | | | | ! | # | $ | + | + * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ + * | / | 4 | 5 | 6 | + | | | | % | ! | ! | = | + * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ + * | * | 7 | 8 | 9 | , | | | | _ | - | @ | ~ | + * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ + * | | 0 | . | Ent | = | | | | | | ` | + * `--------------------------------------------------------------------------------' + */ + + [_RAISE] = LAYOUT_planck_mit(KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_DLR, KC_PLUS, KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_PERC, KC_ASTR, KC_AMPR, KC_EQL, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PCMM, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_MINS, KC_AT, KC_TILDE, KC_NO, KC_P0, KC_PDOT, KC_PENT, KC_PEQL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV), + + /* Function (Lower + Raise) + * ,-----------------------------------------------------------------------------------------------------------------------. + * | RESET| LCA_T(F1) | LCA_T(F2) | LCA_T(F3) | LCA_T(F4) | LCA_T(F5) | LCA_T(F6) | LCA_T(F7) | | | | | + * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ + * | | | | | | QWERTY | DVORAK | COLEMAK | | | | | + * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ + * | | | | | | | | | | | | | + * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ + * | | | | | | LED | | | | | | + * `-----------------------------------------------------------------------------------------------------------------------' + */ + + [_FUNCTION] = LAYOUT_planck_mit(RESET, LCA_T(KC_F1), LCA_T(KC_F2), LCA_T(KC_F3), LCA_T(KC_F4), LCA_T(KC_F5), LCA_T(KC_F6), LCA_T(KC_F7), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QWERTY, DVORAK, COLEMAK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LED, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)}; + +// constants to toggle LED behavior + +// Setup config struct for LED +typedef union { + uint32_t raw; + struct { + bool red_mode : 1; + bool green_mode : 1; + }; +} led_config_t; +led_config_t led_config; + +void keyboard_post_init_user(void) { led_config.raw = eeconfig_read_user(); } + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LED_ON; + led_config.green_mode = LED_ON; + eeconfig_update_user(led_config.raw); + eeconfig_update_user(led_config.raw); +} + +// When LOWER and RAISE are held together, go to the FUNCTION layer +uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _FUNCTION); } + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _LOWER: + writePinHigh(LED_RED); + break; + case _RAISE: + writePinHigh(LED_GREEN); + break; + default: + writePinLow(LED_GREEN); + writePinLow(LED_RED); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LED: + if (record->event.pressed) { + if (led_config.red_mode == LED_ON && led_config.green_mode == LED_ON) { + led_config.red_mode = LED_OFF; + led_config.green_mode = LED_OFF; + } else if (led_config.red_mode == LED_OFF && led_config.green_mode == LED_OFF) { + led_config.red_mode = LED_ON; + led_config.green_mode = LED_ON; + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + } + return true; +} diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/readme.md b/keyboards/plaid/keymaps/thehalfdeafchef/readme.md new file mode 100644 index 0000000000..bd09965b55 --- /dev/null +++ b/keyboards/plaid/keymaps/thehalfdeafchef/readme.md @@ -0,0 +1,5 @@ +![Plaid Layout Image](https://i.imgur.com/WnVnwEG.png) + +# The Half Deaf Chef Plaid Layout + +Opinionated keymaps optimized for programmers. The Left and Right Shift tap as parenthesis and the bracket keys are to either side of the layer keys (LOWER, RAISE). A 'right-side' up number pad in a layer with a complementary 'symbol' pad on the opposite side. An additional layer is provided to switch to virtual console on Linux based systems running xorg. These changes are propagated among all the layouts. diff --git a/keyboards/plaid/rules.mk b/keyboards/plaid/rules.mk index 507f873ae9..5ac35ee7f3 100644 --- a/keyboards/plaid/rules.mk +++ b/keyboards/plaid/rules.mk @@ -1,44 +1,5 @@ # MCU name -#MCU = at90usb1286 MCU = atmega328p -PROTOCOL = VUSB - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -46,21 +7,9 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID -# -# This uses usbaspbootloader -# BOOTLOADER = atmel-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp # Flash program via avrdude, but default command is not suitable. # You can use plaid:default:program @@ -92,10 +41,5 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - - LAYOUTS = ortho_4x12 planck_mit LAYOUTS_HAS_RGB = no diff --git a/keyboards/plaid/usbconfig.h b/keyboards/plaid/usbconfig.h index ea9fdd8ea6..ba48a32649 100644 --- a/keyboards/plaid/usbconfig.h +++ b/keyboards/plaid/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -239,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'd','m','9','r','e','c','o','r','d','s' diff --git a/keyboards/plain60/config.h b/keyboards/plain60/config.h deleted file mode 100644 index a86c235871..0000000000 --- a/keyboards/plain60/config.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2019 Maarten Dekkers - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4705 -#define PRODUCT_ID 0x0160 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Maartenwut -#define PRODUCT Plain60 -#define DESCRIPTION A plain 60% PCB - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -// ROWS: Top to bottom, COLS: Left to right - -#define MATRIX_ROW_PINS {B4,D7,D6,D4,E6} -#define MATRIX_COL_PINS {D2,D1,D0,D3,D5,B5,F0,B6,C6,C7,F1,F4,F5,F6,F7} - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -#define QMK_ESC_OUTPUT D2 // usually COL -#define QMK_ESC_INPUT B4 // usually ROW - -//VIA -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/plain60/keymaps/yanfali/keymap.c b/keyboards/plain60/keymaps/yanfali/keymap.c deleted file mode 100644 index 3a0bc634f3..0000000000 --- a/keyboards/plain60/keymaps/yanfali/keymap.c +++ /dev/null @@ -1,25 +0,0 @@ -#include QMK_KEYBOARD_H - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _MA 0 -#define _FN 1 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[_FN] = LAYOUT( - _______, 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_DEL, \ - _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ - KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______), - -[_MA] = LAYOUT( - 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_GRV, 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, \ - LCTL_T(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_BSLS, KC_ENT, \ - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN) , \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_RCTRL) -}; diff --git a/keyboards/plain60/keymaps/yanfali/readme.md b/keyboards/plain60/keymaps/yanfali/readme.md deleted file mode 100644 index 790f3af5d9..0000000000 --- a/keyboards/plain60/keymaps/yanfali/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -- Disable VIA -- Tsangan bottom row -- Split Backspace -- Split Right shift -- RESET, F keys, and Cursors (WASD), DEL, Capslock on layer -- Capslock -> LCTL_T(KC_ESC) -- Bootmagic lite -- Command enabled -- Console enabled diff --git a/keyboards/plain60/keymaps/yanfali/rules.mk b/keyboards/plain60/keymaps/yanfali/rules.mk deleted file mode 100644 index 3d1f67763e..0000000000 --- a/keyboards/plain60/keymaps/yanfali/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -BOOTMAGIC = lite -DYNAMIC_KEYMAP_ENABLE = no -CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes diff --git a/keyboards/plain60/rules.mk b/keyboards/plain60/rules.mk deleted file mode 100644 index da9cb9fbd4..0000000000 --- a/keyboards/plain60/rules.mk +++ /dev/null @@ -1,68 +0,0 @@ -SRC += keyboards/wilba_tech/wt_main.c -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index 142382dab1..0cb428dd85 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -43,7 +43,6 @@ #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2 } #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } @@ -139,3 +138,19 @@ #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_WHEN_USB_SUSPENDED true + +#define RGB_MATRIX_LED_PROCESS_LIMIT 5 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 + + +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_TOGGLE 1 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c index e739b90b8c..8369ce50c1 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/planck/ez/ez.c @@ -14,6 +14,10 @@ * along with this program. If not, see . */ #include "ez.h" +#include "ch.h" +#include "hal.h" + +keyboard_config_t keyboard_config; #ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { @@ -102,6 +106,7 @@ led_config_t g_led_config = { { } }; void suspend_power_down_kb(void) { + rgb_matrix_set_color_all(0, 0, 0); rgb_matrix_set_suspend_state(true); suspend_power_down_user(); } @@ -112,39 +117,225 @@ void suspend_power_down_kb(void) { } #endif -void matrix_init_kb(void) { - matrix_init_user(); +/* Left B9 Right B8 */ - palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL); - - palClearPad(GPIOB, 8); - palClearPad(GPIOB, 9); +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } } -void matrix_scan_kb(void) { - matrix_scan_user(); +static PWMConfig pwmCFG = { + 0xFFFF,/* PWM clock frequency */ + 256,/* initial PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, + { + {PWM_OUTPUT_DISABLED, NULL}, /* channel 0 -> TIM1-CH1 = PA8 */ + {PWM_OUTPUT_DISABLED, NULL}, /* channel 1 -> TIM1-CH2 = PA9 */ + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static uint32_t planck_ez_right_led_duty; +static uint32_t planck_ez_left_led_duty; + +void planck_ez_right_led_level(uint8_t level) { + planck_ez_right_led_duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / 255)); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&PWMD4, 2); + } else { + // Turn backlight on + pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,planck_ez_right_led_duty)); + } } -uint32_t layer_state_set_kb(uint32_t state) { - palClearPad(GPIOB, 8); - palClearPad(GPIOB, 9); - state = layer_state_set_user(state); - uint8_t layer = biton32(state); - switch (layer) { - case 3: - palSetPad(GPIOB, 9); - break; - case 4: - palSetPad(GPIOB, 8); - break; - case 6: - palSetPad(GPIOB, 9); - palSetPad(GPIOB, 8); - break; - default: - break; +void planck_ez_right_led_on(void){ + pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,planck_ez_right_led_duty)); +} + +void planck_ez_right_led_off(void){ + pwmDisableChannel(&PWMD4, 2); +} + +void planck_ez_left_led_level(uint8_t level) { + planck_ez_left_led_duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / 255)); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&PWMD4, 3); + } else { + // Turn backlight on + pwmEnableChannel(&PWMD4, 3, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,planck_ez_left_led_duty)); + } +} + +void planck_ez_left_led_on(void){ + pwmEnableChannel(&PWMD4, 3, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,planck_ez_left_led_duty)); +} + +void planck_ez_left_led_off(void){ + pwmDisableChannel(&PWMD4, 3); +} + + +void led_initialize_hardware(void) { + pwmStart(&PWMD4, &pwmCFG); + + // set up defaults + planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); + palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); + planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); + palSetPadMode(GPIOB, 9, PAL_MODE_ALTERNATE(2)); + + + // turn LEDs off by default + planck_ez_left_led_off(); + planck_ez_right_led_off(); +} + +void keyboard_pre_init_kb(void) { + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + // read kb settings from eeprom + keyboard_config.raw = eeconfig_read_kb(); +#if defined(RGB_MATRIX_ENABLE) && defined(ORYX_CONFIGURATOR) + if (keyboard_config.rgb_matrix_enable) { + rgb_matrix_set_flags(LED_FLAG_ALL); + } else { + rgb_matrix_set_flags(LED_FLAG_NONE); + } +#endif + led_initialize_hardware(); + keyboard_pre_init_user(); +} + +#if defined(RGB_MATRIX_ENABLE) && defined(ORYX_CONFIGURATOR) +void keyboard_post_init_kb(void) { + rgb_matrix_enable_noeeprom(); + keyboard_post_init_user(); +} +#endif + +void eeconfig_init_kb(void) { // EEPROM is getting reset! + keyboard_config.raw = 0; + keyboard_config.rgb_matrix_enable = true; + keyboard_config.led_level = 4; + eeconfig_update_kb(keyboard_config.raw); + eeconfig_init_user(); +} + + +#ifdef ORYX_CONFIGURATOR + +#ifndef PLANCK_EZ_USER_LEDS + +#ifndef PLANCK_EZ_LED_LOWER +# define PLANCK_EZ_LED_LOWER 3 +#endif +#ifndef PLANCK_EZ_LED_RAISE +# define PLANCK_EZ_LED_RAISE 4 +#endif +#ifndef PLANCK_EZ_LED_ADJUST +# define PLANCK_EZ_LED_ADJUST 6 +#endif + +layer_state_t layer_state_set_kb(layer_state_t state) { + planck_ez_left_led_off(); + planck_ez_right_led_off(); + state = layer_state_set_user(state); + uint8_t layer = biton32(state); + switch (layer) { + case PLANCK_EZ_LED_LOWER: + planck_ez_left_led_on(); + break; + case PLANCK_EZ_LED_RAISE: + planck_ez_right_led_on(); + break; + case PLANCK_EZ_LED_ADJUST: + planck_ez_right_led_on(); + planck_ez_left_led_on(); + break; + default: + break; } return state; } +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LED_LEVEL: + if (record->event.pressed) { + keyboard_config.led_level++; + if (keyboard_config.led_level > 4) { + keyboard_config.led_level = 0; + } + planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); + planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); + eeconfig_update_kb(keyboard_config.raw); + layer_state_set_kb(layer_state); + } + break; +#ifdef RGB_MATRIX_ENABLE + case TOGGLE_LAYER_COLOR: + if (record->event.pressed) { + keyboard_config.disable_layer_led ^= 1; + if (keyboard_config.disable_layer_led) + rgb_matrix_set_color_all(0, 0, 0); + eeconfig_update_kb(keyboard_config.raw); + } + break; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + keyboard_config.rgb_matrix_enable = false; + rgb_matrix_set_color_all(0, 0, 0); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + keyboard_config.rgb_matrix_enable = true; + } + break; + } + eeconfig_update_kb(keyboard_config.raw); + } + return false; +#endif + } + return process_record_user(keycode, record); +} +#endif + +#ifdef AUDIO_ENABLE +bool music_mask_kb(uint16_t keycode) { + switch (keycode) { + case QK_LAYER_TAP ... QK_ONE_SHOT_LAYER_MAX: + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_MOD_MAX: + case QK_MOD_TAP ... QK_MOD_TAP_MAX: + case AU_ON ... MUV_DE: + case RESET: + case EEP_RST: + return false; + default: + return music_mask_user(keycode); + } +} +#endif diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h index 55c4032422..29bcc1b83c 100644 --- a/keyboards/planck/ez/ez.h +++ b/keyboards/planck/ez/ez.h @@ -50,3 +50,27 @@ LAYOUT_planck_1x2uC( \ #define KEYMAP LAYOUT_ortho_4x12 #define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 + +void planck_ez_right_led_on(void); +void planck_ez_right_led_off(void); +void planck_ez_right_led_level(uint8_t level); +void planck_ez_left_led_on(void); +void planck_ez_left_led_off(void); +void planck_ez_left_led_level(uint8_t level); + +enum planck_ez_keycodes { + LED_LEVEL = SAFE_RANGE, + TOGGLE_LAYER_COLOR, + EZ_SAFE_RANGE, +}; + +typedef union { + uint32_t raw; + struct { + uint8_t led_level :3; + bool disable_layer_led :1; + bool rgb_matrix_enable :1; + }; +} keyboard_config_t; + +extern keyboard_config_t keyboard_config; diff --git a/keyboards/planck/ez/readme.md b/keyboards/planck/ez/readme.md index 9bd161abdf..df8d1b46bb 100644 --- a/keyboards/planck/ez/readme.md +++ b/keyboards/planck/ez/readme.md @@ -13,3 +13,44 @@ Make example for this keyboard (after setting up your build environment): make planck/ez: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). + +## Planck EZ Configuration (from Oryx) + +### Indicator LEDs + +The two front "teeth" LED indicators are PWM controlled. If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, you can use the `LED_LEVEL` to cycle through preset vales (0, 25%, 50%, 75%, 100%), and will be saved to EEPROM (persistent storage) + +Alternatively, you can set the brightness by calling the following functions: + +```c +void planck_ez_right_led_level(uint8_t level); +void planck_ez_left_led_level(uint8_t level); +``` + +These settings are not persistent, so you'd need to reset it every time the board starts. + +These are on a 0-255 scale + +#### Layer indication + +By default, the indicator lights are used for layer indication, expecting the specific layers used in the default keymap. However, this may not work for you. And if that is the case, you can add `#define PLANCK_EZ_USER_LEDS` to your `config.h` file. + +This will remove the default behavior for changing the LEDs based on layer, and allow you to control them manually. + +Alternatively, you can use the following defines in your keymap's `config.h` to control which layers are used, as long as you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h` file, as well. + +```c +#define PLANCK_EZ_LED_LOWER 3 +#define PLANCK_EZ_LED_RAISE 4 +#define PLANCK_EZ_LED_ADJUST 6 +``` + +This will allow you to change the layers that are used, without having to add anything code to your `keymap.c` + +### RGB Matrix Features + +If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`. + +This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off. + +Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already. diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk index 4aa431fdaa..7fb0dec50f 100644 --- a/keyboards/planck/ez/rules.mk +++ b/keyboards/planck/ez/rules.mk @@ -1,8 +1,5 @@ -# Cortex version -MCU = STM32F303 - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# MCU name +MCU = STM32F303 # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/planck/keymaps/angerthosenear/keymap.c b/keyboards/planck/keymaps/angerthosenear/keymap.c index aa75a67715..f22bb1f622 100644 --- a/keyboards/planck/keymaps/angerthosenear/keymap.c +++ b/keyboards/planck/keymaps/angerthosenear/keymap.c @@ -5,34 +5,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, - {KC_LCTL, KC_LGUI, KC_LALT, BL_STEP, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LCTL, KC_LGUI, KC_LALT, BL_STEP, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} // Space is repeated to accommodate for both spacebar wiring positions }, [1] = { /* WASD + NumPad */ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_PMNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PPLS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PENT, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_SPC, KC_P0, FUNC(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_SPC, KC_P0, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} }, [2] = { /* RAISE */ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [3] = { /* LOWER */ {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_DEL}, {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END} } }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), diff --git a/keyboards/planck/keymaps/austin/keymap.c b/keyboards/planck/keymaps/austin/keymap.c index 40f808654e..23dc2d4150 100644 --- a/keyboards/planck/keymaps/austin/keymap.c +++ b/keyboards/planck/keymaps/austin/keymap.c @@ -5,35 +5,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {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}, - {BL_STEP, KC_LGUI, KC_LALT, KC_LCTL, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {BL_STEP, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} // Space is repeated to accommadate for both spacebar wiring positions }, [1] = { /* Colemak */ {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {KC_FN3, KC_LGUI, KC_LALT, KC_LCTL, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_FN3, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, [2] = { /* RAISE */ {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_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [3] = { /* LOWER */ {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} } }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), -}; \ No newline at end of file +}; diff --git a/keyboards/planck/keymaps/basic/keymap.c b/keyboards/planck/keymaps/basic/keymap.c index 748d9acbe4..4458c32a76 100644 --- a/keyboards/planck/keymaps/basic/keymap.c +++ b/keyboards/planck/keymaps/basic/keymap.c @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {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 }, - {KC_RSFT, KC_LCTL, KC_LALT, KC_LGUI, M(1), KC_SPC, KC_SPC, M(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_RSFT, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower @@ -64,24 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case 1: - if (record->event.pressed) { - layer_on(1); - } else { - layer_off(1); - } - break; - case 2: - if (record->event.pressed) { - layer_on(2); - } else { - layer_off(2); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/planck/keymaps/charlie/keymap.c b/keyboards/planck/keymaps/charlie/keymap.c index 966c60d20d..d5e17d7f9c 100644 --- a/keyboards/planck/keymaps/charlie/keymap.c +++ b/keyboards/planck/keymaps/charlie/keymap.c @@ -11,20 +11,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, FUNC(1)}, {KC_O, KC_G, KC_S, KC_U, KC_T, FUNC(27), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9}, {KC_TAB, FUNC(4), FUNC(5), FUNC(6), KC_F1, FUNC(7), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, FUNC(9)}, - {KC_COMM, KC_DOT, KC_R, FUNC(11), FUNC(3), KC_SPC, FUNC(12), KC_F2, FUNC(8), KC_F3, KC_F14} + {KC_COMM, KC_DOT, KC_R, FUNC(11), MO(2), KC_SPC, FUNC(12), KC_F2, FUNC(8), KC_F3, KC_F14} }, [2] = { /* 2: FUNC(3 PHOTOSHOP */ {KC_ESC, FUNC(25), FUNC(26), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FUNC(19), FUNC(20), FUNC(21)}, {KC_C, KC_NO, FUNC(22), FUNC(5), KC_NO, FUNC(23), KC_NO, KC_NO, KC_NO, KC_NO, FUNC(13), KC_NO}, - {FUNC(14), FUNC(15), FUNC(16), FUNC(17), FUNC(3), KC_SPC, FUNC(18), KC_NO, KC_NO, KC_F24, KC_NO} + {FUNC(14), FUNC(15), FUNC(16), FUNC(17), MO(2), KC_SPC, FUNC(18), KC_NO, KC_NO, KC_F24, KC_NO} } }; const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_DEFAULT_LAYER_SET(0), // set Qwerty layout [2] = ACTION_DEFAULT_LAYER_SET(1), // set Photoshop presets - [3] = ACTION_LAYER_MOMENTARY(2), // Photoshop function layer [4] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F9), // photo folder AHK [5] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_I), // select inverse diff --git a/keyboards/planck/keymaps/daniel/keymap.c b/keyboards/planck/keymaps/daniel/keymap.c index 3054d7974b..ae47b9ba3d 100644 --- a/keyboards/planck/keymaps/daniel/keymap.c +++ b/keyboards/planck/keymaps/daniel/keymap.c @@ -5,33 +5,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_TAB, 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_RSFT}, - {FUNC(3), KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} // Space is repeated to accommadate for both spacebar wiring positions }, [1] = { /* RAISE */ {KC_GRV, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_EQL}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, S(KC_MINS), KC_BSLS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [2] = { /* LOWER */ {S(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_EQL)}, {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_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ENT}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [3] = { /* Qwerty */ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, {KC_TAB, 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_RSFT}, - {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} // Space is repeated to accommadate for both spacebar wiring positions } }; - - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(2), // to LOWER - [3] = ACTION_LAYER_MOMENTARY(3) // to LOWER -}; diff --git a/keyboards/planck/keymaps/david/keymap.c b/keyboards/planck/keymaps/david/keymap.c index d8a46aa833..bb0abaab7c 100644 --- a/keyboards/planck/keymaps/david/keymap.c +++ b/keyboards/planck/keymaps/david/keymap.c @@ -5,33 +5,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_A, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {M(10), KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {M(10), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} // Space is repeated to accommadate for both spacebar wiring positions }, [1] = { /* Colemak */ {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, [2] = { /* RAISE */ {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_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {KC_TRNS, KC_F11, KC_F12, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [3] = { /* LOWER */ {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, {KC_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} } }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index cc090200b7..22ff24c92b 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -17,7 +17,6 @@ #include QMK_KEYBOARD_H #include "muse.h" -extern keymap_config_t keymap_config; enum planck_layers { _QWERTY, @@ -46,9 +45,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | @@ -64,9 +63,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | @@ -82,9 +81,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak * ,-----------------------------------------------------------------------------------. * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | @@ -100,9 +99,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | @@ -118,9 +117,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Raise * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | @@ -136,9 +135,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. * | # | # | # | # | # | # | # | # | # | # | # | # | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | S | T | P | H | * | * | F | P | L | T | D | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | S | K | W | R | * | * | R | B | G | S | Z | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Exit | | | A | O | | E | U | | | | @@ -152,12 +151,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -176,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -208,12 +208,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { backlight_step(); #endif #ifdef KEYBOARD_planck_rev5 - PORTE &= ~(1<<6); + writePinLow(E6); #endif } else { unregister_code(KC_RSFT); #ifdef KEYBOARD_planck_rev5 - PORTE |= (1<<6); + writePinHigh(E6); #endif } return false; @@ -288,47 +288,56 @@ void encoder_update(bool clockwise) { } } -void dip_update(uint8_t index, bool active) { - switch (index) { - case 0: - if (active) { - #ifdef AUDIO_ENABLE - PLAY_SONG(plover_song); - #endif - layer_on(_ADJUST); - } else { - #ifdef AUDIO_ENABLE - PLAY_SONG(plover_gb_song); - #endif - layer_off(_ADJUST); - } - break; - case 1: - if (active) { - muse_mode = true; - } else { - muse_mode = false; - #ifdef AUDIO_ENABLE - stop_all_notes(); - #endif - } - } +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_ADJUST); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_ADJUST); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } } void matrix_scan_user(void) { - #ifdef AUDIO_ENABLE +#ifdef AUDIO_ENABLE if (muse_mode) { - if (muse_counter == 0) { - uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; - if (muse_note != last_muse_note) { - stop_note(compute_freq_for_midi_note(last_muse_note)); - play_note(compute_freq_for_midi_note(muse_note), 0xF); - last_muse_note = muse_note; + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; } - } - muse_counter = (muse_counter + 1) % muse_tempo; } - #endif +#endif } bool music_mask_user(uint16_t keycode) { diff --git a/keyboards/planck/keymaps/dodger/rules.mk b/keyboards/planck/keymaps/dodger/rules.mk index 981a3e82be..032f5af689 100644 --- a/keyboards/planck/keymaps/dodger/rules.mk +++ b/keyboards/planck/keymaps/dodger/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. diff --git a/keyboards/planck/keymaps/dsanchezseco/config.h b/keyboards/planck/keymaps/dsanchezseco/config.h index 6fa31cc8a7..3ed041f3bd 100644 --- a/keyboards/planck/keymaps/dsanchezseco/config.h +++ b/keyboards/planck/keymaps/dsanchezseco/config.h @@ -1,39 +1,5 @@ #pragma once #ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PLANCK_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) - - #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND) \ - } + #define STARTUP_SONG SONG(DVORAK_SOUND) #endif - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ - -#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 2 - -// Most tactile encoders have detents every 4 stages -#define ENCODER_RESOLUTION 4 - diff --git a/keyboards/planck/keymaps/dsanchezseco/keymap.c b/keyboards/planck/keymaps/dsanchezseco/keymap.c index 90ad2bc596..adbbe44b89 100644 --- a/keyboards/planck/keymaps/dsanchezseco/keymap.c +++ b/keyboards/planck/keymaps/dsanchezseco/keymap.c @@ -1,22 +1,10 @@ -/* Copyright 2015-2017 Jack Humbert - * - * 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 . - */ - #include QMK_KEYBOARD_H #include "muse.h" +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ESC_CTL LCTL_T(KC_ESC) + extern keymap_config_t keymap_config; enum planck_layers { @@ -26,85 +14,34 @@ enum planck_layers { _ADJUST }; -enum planck_keycodes { - DVORAK, -}; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | AltGr| Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ [_DVORAK] = LAYOUT_planck_grid( KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + ESC_CTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, - KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_LCTL, _______, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, KC_RALT, _______, KC_RCTL ), -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | Del | | Play | Vol- | Vol+ | Next | - * `-----------------------------------------------------------------------------------' - */ [_LOWER] = LAYOUT_planck_grid( - 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_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_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RIGHT,KC_RPRN, + _______, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_LEFT, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ ), -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | Del | | Play | Vol- | Vol+ | Next | - * `-----------------------------------------------------------------------------------' - */ [_RAISE] = LAYOUT_planck_grid( - 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_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_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_RIGHT, KC_0, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ ), -/* Adjust (Lower + Raise) - * ,----------------------------------------------------------------------------------- - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ [_ADJUST] = LAYOUT_planck_grid( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, _______, _______, _______, + _______, KC_PSCR, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/planck/keymaps/dshields/config.h b/keyboards/planck/keymaps/dshields/config.h index 7f9cf74672..857c8164e3 100644 --- a/keyboards/planck/keymaps/dshields/config.h +++ b/keyboards/planck/keymaps/dshields/config.h @@ -1,33 +1,4 @@ #pragma once -#define RGB_MATRIX_KEYPRESSES #define RGB_DIGITAL_RAIN_DROPS 24 -#define USB_MAX_POWER_CONSUMPTION 100 -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_TIMEOUT 3000 -#define RETRO_TAPPING - -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 40 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0 - -// dynamic macro keys -#define DM_PLAY DYN_MACRO_PLAY1 -#define DM_STRT DYN_REC_START1 -#define DM_STOP DYN_REC_STOP - -// one-shot layer keys -#define OSL_RSE OSL(RSE) -#define OSL_LWR OSL(LWR) -#define OSL_FUN OSL(FUN) - -// one-shot modifier keys -#define OSM_CTL OSM(MOD_LCTL) -#define OSM_ALT OSM(MOD_LALT) -#define OSM_SFT OSM(MOD_LSFT) - -// mod-tap keys -#define MT_SPC SFT_T(KC_SPC) diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c index 11abaa6b07..f18102ee2b 100644 --- a/keyboards/planck/keymaps/dshields/keymap.c +++ b/keyboards/planck/keymaps/dshields/keymap.c @@ -1,52 +1,30 @@ #include QMK_KEYBOARD_H -#include "config.h" - -extern keymap_config_t keymap_config; - -enum planck_layers { DEF, LWR, RSE, FUN }; -enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE }; - -#include "dynamic_macro.h" - -#ifdef KEYBOARD_planck_light - #define LGT_TOG RGB_TOG - #define LGT_MOD RGB_MOD -#else - #define LGT_TOG BL_TOGG - #define LGT_MOD BL_STEP -#endif +#include "dshields.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEF] = LAYOUT_planck_grid( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P , KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, - KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, MT_SPC, MT_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_Z, KC_X, KC_C, KC_V, KC_B, OSMLSFT, DM_PLY1, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + OSMLCTL, KC_LGUI, OSMLALT, OSL_FUN, OSL_LWR, MT_SPC, MT_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), [LWR] = LAYOUT_planck_grid( - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_DEL, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DQUO, KC_PIPE, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), [RSE] = LAYOUT_planck_grid( - KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0 , + KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0 , KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), [FUN] = LAYOUT_planck_grid( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, EEP_RST, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, - LGT_TOG, LGT_MOD, _______, _______, _______, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, + LGT_TOG, LGT_MOD, LGT_BRT, LGT_INC, LGT_DEC, DM_REC1, DM_RSTP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R ) }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - return true; -} - diff --git a/keyboards/planck/keymaps/dshields/rules.mk b/keyboards/planck/keymaps/dshields/rules.mk deleted file mode 100644 index a2bec43357..0000000000 --- a/keyboards/planck/keymaps/dshields/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -COMMAND_ENABLE = no # Commands for debug and configuration -CONSOLE_ENABLE = no # Console for debug(+400) -EXTRAKEY_ENABLE = no -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -API_SYSEX_ENABLE = no - -ifeq ($(strip $(KEYBOARD)), planck/rev3) - AUDIO_ENABLE = no - BACKLIGHT_ENABLE = yes - RGB_MATRIX_ENABLE = no -endif -ifeq ($(strip $(KEYBOARD)), planck/rev6) - EXTRALDFLAGS = -Wl,--build-id=none - AUDIO_ENABLE = no - BACKLIGHT_ENABLE = no - RGB_MATRIX_ENABLE = no -endif -ifeq ($(strip $(KEYBOARD)), planck/light) - AUDIO_ENABLE = yes - BACKLIGHT_ENABLE = no - RGB_MATRIX_ENABLE = yes -endif - diff --git a/keyboards/planck/keymaps/dzobert/keymap.c b/keyboards/planck/keymaps/dzobert/keymap.c index 365649ed87..3cd8731b06 100644 --- a/keyboards/planck/keymaps/dzobert/keymap.c +++ b/keyboards/planck/keymaps/dzobert/keymap.c @@ -5,33 +5,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC}, {KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {KC_FN4, KC_RSFT, KC_LGUI, KC_LSFT, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_FN4, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} // Space is repeated to accommadate for both spacebar wiring positions }, [1] = { /* Colemak */ {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB}, {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_BSPC}, {KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {KC_FN3, KC_RSFT, KC_LGUI, KC_LSFT, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_FN3, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, [2] = { /* RAISE */ {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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_DEL}, {KC_TRNS, KC_GRV, KC_MINS, KC_EQL, KC_QUOT, S(KC_QUOT), S(KC_LBRC), S(KC_RBRC), KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_HOME, KC_PGUP, KC_PGDN, KC_END} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGUP, KC_PGDN, KC_END} }, [3] = { /* LOWER */ {KC_POWER,KC_PSCR, KC_SLCK, KC_PAUSE, KC_NLCK, KC_EXECUTE, KC_MENU, KC_APP, KC_7, KC_8, KC_9, KC_KP_SLASH}, {KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_CAPS, KC_CANCEL, KC_UNDO, KC_AGAIN, KC_4, KC_5, KC_6, KC_KP_ASTERISK}, {KC_TRNS, KC_INSERT,KC_CUT, KC_COPY, KC_PASTE, KC_BSLS, KC_9, KC_0, KC_1, KC_2, KC_3, KC_KP_MINUS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS} } }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), diff --git a/keyboards/planck/keymaps/gabriel/keymap.c b/keyboards/planck/keymaps/gabriel/keymap.c index 96e4a17ee6..e0f74804f7 100644 --- a/keyboards/planck/keymaps/gabriel/keymap.c +++ b/keyboards/planck/keymaps/gabriel/keymap.c @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------' */ [_FN] = { /* FUNCTION */ - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DELT}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END} diff --git a/keyboards/planck/keymaps/handwired_binaryplease/rules.mk b/keyboards/planck/keymaps/handwired_binaryplease/rules.mk index efe0c7a5dd..cf37fa6f3b 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/rules.mk +++ b/keyboards/planck/keymaps/handwired_binaryplease/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. diff --git a/keyboards/planck/keymaps/hieax/hiea.sync-conflict-20180501-144403-SMV4TP4.h b/keyboards/planck/keymaps/hieax/hiea.sync-conflict-20180501-144403-SMV4TP4.h deleted file mode 100644 index 53ffb88612..0000000000 --- a/keyboards/planck/keymaps/hieax/hiea.sync-conflict-20180501-144403-SMV4TP4.h +++ /dev/null @@ -1,97 +0,0 @@ - -// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -// .................................................................. BEAKL HIEA -#ifdef DEFAULT - // ,-----------------------------------------------------------------------------------. - // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | - // |------+------+------+------+------+-------------+------+------+------+------+------| - // | H | I | E | A | . |Cursor| Mouse| C | T | R | S | W | - // |------+------+------+------+------+------|------+------+------+------+------+------| - // | J | ; | " | K | , | Num | Regex| B | P | L | F | V | - // |------+------+------+------+------+------+------+------+------+------+------+------| - // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| - // `-----------------------------------------------------------------------------------' - - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, - - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, - - // ,-----------------------------------------------------------------------------------. - // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | - // |------+------+------+------+------+-------------+------+------+------+------+------| - // | H | I | E | A | ? |Cursor| Mouse| C | T | R | S | W | - // |------+------+------+------+------+------|------+------+------+------+------+------| - // | J | : | " | K | / | Num | Regex| B | P | L | F | V | - // |------+------+------+------+------+------+------+------+------+------+------+------| - // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| - // `-----------------------------------------------------------------------------------' - - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, - }, - - // ,-----------------------------------------------------------------------------------. - // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | - // |------+------+------+------+------+-------------+------+------+------+------+------| - // | H | I | E | A | ? |Cursor| Mouse| C | T | R | S | W | - // |------+------+------+------+------+------|------+------+------+------+------+------| - // | J | : | " | K | / | Num | Regex| B | P | L | F | V | - // |------+------+------+------+------+------+------+------+------+------+------+------| - // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| - // `-----------------------------------------------------------------------------------' - - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, - }, -#endif - - // ,-----------------------------------------------------------------------------------. - // | Q | Y | O | U | Z | Fn | Caps | ` | [ | ] | ^ | X | - // |------+------+------+------+------+-------------+------+------+------+------+------| - // | H | I | E | f() | ? |Cursor| Mouse| | | ( | ) | $ | W | - // |------+------+------+------+------+------|------+------+------+------+------+------| - // | J | : | " | K | / | Num | Regex| \ | { | } | # | V | - // |------+------+------+------+------+------+------+------+------+------+------+------| - // | | Esc | Space| + | Space| | - // `-----------------------------------------------------------------------------------' - - [_LSYMBOL] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, TD_GRV, KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, - {HOME_H, HOME_I, HOME_E, ___fn__, KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, S(KC_V)}, - {_______, _______, _______, _______, LT_ESC, TD_SPC, KC_PLUS, KC_SPC, _______, _______, _______, _______}, - }, - - // ,-----------------------------------------------------------------------------------. - // | Q | . | * | & | ~ | Fn | Caps | G | D | N | M | X | - // |------+------+------+------+------+-------------+------+------+------+------+------| - // | H | < | % | > | ? |Cursor| Mouse| C | f() | R | S | W | - // |------+------+------+------+------+------|------+------+------+------+------+------| - // | J | : | @ | ! | / | Num | Regex| B | P | L | F | V | - // |------+------+------+------+------+------+------+------+------+------+------+------| - // | | ↑Tab | = | Ent | Bksp | | - // `-----------------------------------------------------------------------------------' - - [_RSYMBOL] = { - {S(KC_Q), KC_DOT, KC_ASTR, KC_AMPR, TD_TILD, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), TD_LT, KC_PERC, TD_GT, KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), ___fn__, HOME_R, HOME_S, HOME_W }, - {S(KC_J), TD_COLN, KC_AT, KC_EXLM, KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {_______, _______, _______, _______, S_TAB, TD_EQL, TD_ENT, LT_BSPC, _______, _______, _______, _______}, - }, diff --git a/keyboards/planck/keymaps/jarred/keymap.c b/keyboards/planck/keymaps/jarred/keymap.c deleted file mode 100644 index 5911669086..0000000000 --- a/keyboards/planck/keymaps/jarred/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2018 Jarred Steenvoorden - * - * 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 . - */ - -#include "planck.h" -#include "jarred.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = LAYOUT_planck_grid_wrapper(QWERTY_4x12), - [_GAME] = LAYOUT_planck_grid_wrapper(GAME_4x12), - [_LW] = LAYOUT_planck_grid_wrapper(LOWER_4x12), - [_NV] = LAYOUT_planck_grid_wrapper(NAV_4x12), - [_NP] = LAYOUT_planck_grid_wrapper(NUMPAD_4x12), - [_MS] = LAYOUT_planck_grid_wrapper(MOUSE_4x12) -}; - -#ifdef RGB_MATRIX_H -void rgb_matrix_indicators_user(void) { - // Disable light in middle of 2U position - rgb_matrix_set_color(42, 0, 0, 0); -} -#endif diff --git a/keyboards/planck/keymaps/jarred/readme.md b/keyboards/planck/keymaps/jarred/readme.md deleted file mode 100644 index e6be564122..0000000000 --- a/keyboards/planck/keymaps/jarred/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# Jarred's Planck Layout - -Check out [user space readme](../../../../users/jarred/readme.md) for more info - -# Build - -``` -make planck/rev4:jarred:dfu -``` diff --git a/keyboards/planck/keymaps/jeremy-dev/keymap.c b/keyboards/planck/keymaps/jeremy-dev/keymap.c index 89b7e6b84a..de679a3fc0 100644 --- a/keyboards/planck/keymaps/jeremy-dev/keymap.c +++ b/keyboards/planck/keymaps/jeremy-dev/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P}, {KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)}, - {CTL_T(KC_TAB), OSL(FKEY), OSL(NUMS), OSL(SYMB), KC_SPC, ALT_T(KC_BSPC), GUI_T(KC_DELT), KC_ENT, OSL(SYMB), OSL(CURS), TG(CURS), CTL_T(KC_ESC)} + {CTL_T(KC_TAB), OSL(FKEY), OSL(NUMS), OSL(SYMB), KC_SPC, ALT_T(KC_BSPC), GUI_T(KC_DEL), KC_ENT, OSL(SYMB), OSL(CURS), TG(CURS), CTL_T(KC_ESC)} }, [NUMS] = { {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_COMM, KC_7, KC_8, KC_9, KC_SLSH}, @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_NO, KC_NO, KC_TRNS, TG(NUMS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS} }, [CURS] = { - {KC_MPLY, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_MPLY, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, {KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT}, {KC_VOLD, KC_NO, MY_ABVE, MY_TERM, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT}, {KC_MUTE, KC_NO, MY_BELW, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO} diff --git a/keyboards/planck/keymaps/joe/keymap.c b/keyboards/planck/keymaps/joe/keymap.c index 023e1a1201..ff17fa2366 100644 --- a/keyboards/planck/keymaps/joe/keymap.c +++ b/keyboards/planck/keymaps/joe/keymap.c @@ -6,50 +6,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {F(3), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, {F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT}, - {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, F(1), KC_SPC, KC_SPC, F(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} + {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} }, [1] = { /* Joe soft Colemak */ {F(3), CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_MINS}, {KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_ENT }, {F(15), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT}, - {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, F(1), KC_SPC, KC_SPC, F(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} + {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} }, [2] = { /* Joe NUMPAD */ {F(3), KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, LSFT(KC_9), LSFT(KC_0), KC_PSLS, KC_P7, KC_P8, KC_P9 }, {KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, LSFT(KC_5), KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6 }, {F(15), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, F(1), KC_TRNS, KC_TRNS, F(2), KC_PPLS, KC_P0, KC_PDOT, KC_PENT} + {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_PPLS, KC_P0, KC_PDOT, KC_PENT} }, [3] = { /* Joe 1337 haxOr5*/ {F(3), KC_Q, KC_W, KC_F, KC_P, KC_6, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_4, KC_R, KC_5, KC_7, KC_D, KC_H, KC_N, KC_3, KC_1, KC_0, KC_ENT }, {F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT}, - {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, F(1), KC_SPC, KC_SPC, F(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} + {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} }, [4] = { /* Joe LOWER fn1 */ {KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(3), M(2), M(1), M(0) }, {KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, {KC_BSLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_PGUP, KC_EQL }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(1), KC_TRNS, KC_TRNS, F(2), KC_NO, KC_HOME, KC_PGDN, KC_END } + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_NO, KC_HOME, KC_PGDN, KC_END } }, [5] = { /* Joe UPPER fn2 */ {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_DEL, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_WH_U, KC_BTN4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO }, {KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_L, KC_WH_D, KC_WH_R, KC_NO, KC_NO, LCTL(KC_PGUP), LCTL(LALT(KC_UP)), LCTL(KC_PGDN) }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(1), KC_NO, KC_NO, F(2), KC_NO, LCTL(LALT(KC_LEFT)), LCTL(LALT(KC_DOWN)), LCTL(LALT(KC_RGHT))} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_NO, KC_NO, MO(5), KC_NO, LCTL(LALT(KC_LEFT)), LCTL(LALT(KC_DOWN)), LCTL(LALT(KC_RGHT))} }, [6] = { /* Joe SPECIAL fn3 */ {KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, {KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET }, {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, - {F(6), F(7), F(8), F(9), F(1), KC_TRNS, KC_TRNS, F(2), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L))} + {F(6), F(7), F(8), F(9), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L))} } }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(4), // fn1 - [2] = ACTION_LAYER_MOMENTARY(5), // fn2 - /* ESC on tap, fn3 on hold */ [3] = ACTION_LAYER_TAP_KEY(6, KC_ESC), diff --git a/keyboards/planck/keymaps/kloki/rules.mk b/keyboards/planck/keymaps/kloki/rules.mk index 195ad328be..02926bffa6 100644 --- a/keyboards/planck/keymaps/kloki/rules.mk +++ b/keyboards/planck/keymaps/kloki/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. diff --git a/keyboards/planck/keymaps/kyle/keymap.c b/keyboards/planck/keymaps/kyle/keymap.c index f113d0e036..eee5090139 100644 --- a/keyboards/planck/keymaps/kyle/keymap.c +++ b/keyboards/planck/keymaps/kyle/keymap.c @@ -5,33 +5,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_TAB, 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}, - {KC_RCTL, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_RCTL, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} // Space is repeated to accommadate for both spacebar wiring positions }, [1] = { /* Colemak */ {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, {KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, [2] = { /* RAISE */ {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_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [3] = { /* LOWER */ {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} } }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), diff --git a/keyboards/planck/keymaps/leo/keymap.c b/keyboards/planck/keymaps/leo/keymap.c index 25a5e1579d..d45f87a5d2 100644 --- a/keyboards/planck/keymaps/leo/keymap.c +++ b/keyboards/planck/keymaps/leo/keymap.c @@ -5,7 +5,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_LBRC, KC_QUOT, KC_SCLN, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, {KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT}, {KC_LSFT, KC_DOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_COMM}, - {KC_LCTL, KC_LALT, KC_LGUI, FUNC(3), FUNC(2), KC_SPC, KC_SPC, FUNC(1), FUNC(3), KC_RGUI, KC_RALT, KC_RCTL} + {KC_LCTL, KC_LALT, KC_LGUI, MO(4), MO(3), KC_SPC, KC_SPC, MO(2), MO(4), KC_RGUI, KC_RALT, KC_RCTL} }, [2] = { /* RAISE */ {RALT(KC_RBRC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_RBRC)}, @@ -26,10 +26,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} } }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER - [3] = ACTION_LAYER_MOMENTARY(4), // to META - -}; \ No newline at end of file diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c index 491cd1d07d..96393bc35d 100644 --- a/keyboards/planck/keymaps/lucas/keymap.c +++ b/keyboards/planck/keymaps/lucas/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Z, DE_SCLN, DE_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, DE_QUOT}, {M(0), KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, DE_COMM, DE_DOT, DE_SLSH, KC_ENT}, - {KC_LCTL, KC_LGUI, KC_TAB, KC_LALT, F(2), F(3), F(3), F(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LCTL, KC_LGUI, KC_TAB, KC_LALT, MO(3),F(3), F(3), MO(2),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, [1] = { /* Symbols * ,-----------------------------------------------------------------------. @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24}, {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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_NO, KC_NO, KC_NO, RESET, KC_NO}, - {KC_NO, BL_TOGG, BL_DEC, BL_INC, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_NO, BL_TOGG, BL_DEC, BL_INC, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY} }, [5] = { /* Gaming * ,-----------------------------------------------------------------------. @@ -131,8 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER [3] = ACTION_LAYER_TAP_KEY(4,KC_SPC), // to Function [4] = ACTION_LAYER_TOGGLE(5), // toggle Gaming [5] = ACTION_MODS_TAP_KEY(KC_LSFT, KC_CAPS), //Shift on press, Caps on tap diff --git a/keyboards/planck/keymaps/max/keymap.c b/keyboards/planck/keymaps/max/keymap.c index a93b1f47d1..a80d677c64 100644 --- a/keyboards/planck/keymaps/max/keymap.c +++ b/keyboards/planck/keymaps/max/keymap.c @@ -5,34 +5,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, - {KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} // Space is repeated to accommadate for both spacebar wiring positions }, [1] = { /* Colemak */ {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, {KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, - {KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, [2] = { /* RAISE */ {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_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS}, {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_BSLS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [3] = { /* LOWER */ {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, {KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS}, {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_BSLS)}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} } }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), -}; \ No newline at end of file +}; diff --git a/keyboards/planck/keymaps/mikethetiger/keymap.c b/keyboards/planck/keymaps/mikethetiger/keymap.c index bc36825e2e..7a4f0b816a 100644 --- a/keyboards/planck/keymaps/mikethetiger/keymap.c +++ b/keyboards/planck/keymaps/mikethetiger/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2015-2017 Jack Humbert +/* Copyright 2015-2017 Jack Humbert * * 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 diff --git a/keyboards/planck/keymaps/motform/keymap.c b/keyboards/planck/keymaps/motform/keymap.c index 15f0e05fb6..caa9a1899e 100644 --- a/keyboards/planck/keymaps/motform/keymap.c +++ b/keyboards/planck/keymaps/motform/keymap.c @@ -31,8 +31,8 @@ enum planck_layers { #define RAISE MO(_RAISE) /* These definitions can be removed once keymap_swe is properly vetted against MacOS */ -#define NO_DLR_MAC_V ALGR(LALT(KC_4)) -#define NO_AT_MAC_V ALGR(LALT(KC_2)) +#define SE_DLR_MAC_V ALGR(LALT(KC_4)) +#define SE_AT_MAC_V ALGR(LALT(KC_2)) /* Esc when pressed, ctrl when used as a modifier */ #define KC_ECTL MT(MOD_LCTL, KC_ESC) @@ -52,9 +52,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_COLEMAK] = LAYOUT_planck_grid ( - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, NO_OSLH, NO_AA, - KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, NO_AE, - KC_SFTENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_SFTENT, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, SE_OSLH, SE_AA, + KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, SE_AE, + KC_SFTENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_SFTENT, KC_ESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, KC_RALT, KC_HYPR, KC_MEH ), @@ -71,9 +71,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = LAYOUT_planck_grid ( - _______, NO_PIPE_MAC, NO_APOS, NO_AT_MAC_V, NO_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, NO_GRV, NO_GRV, NO_TILD, - _______, KC_EXLM, NO_QUO2, KC_HASH, NO_QUES, KC_PERC, KC_LEFT, NO_SLSH, NO_BSLS_MAC, NO_EQL, KC_PPLS, KC_PAST, - _______, KC_NO, KC_NO, NO_LBRC, NO_LCBR_MAC, KC_NO, KC_UP, NO_RCBR_MAC, NO_RBRC, KC_NO, KC_NO, _______, + _______, SE_PIPE_MAC, SE_APOS, SE_AT_MAC_V, SE_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, SE_GRV, SE_GRV, SE_TILD, + _______, KC_EXLM, SE_QUO2, KC_HASH, SE_QUES, KC_PERC, KC_LEFT, SE_SLSH, SE_BSLS_MAC, SE_EQL, KC_PPLS, KC_PAST, + _______, KC_NO, KC_NO, SE_LBRC, SE_LCBR_MAC, KC_NO, KC_UP, SE_RCBR_MAC, SE_RBRC, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -91,8 +91,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_planck_grid ( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - NO_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_DLR_MAC_V, - _______, KC_NO, KC_NO, NO_LESS_MAC, NO_LPRN, KC_NO, KC_NO, NO_RPRN, NO_GRTR_MAC, KC_PGUP, KC_PGDN, KC_NO, + SE_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_DLR_MAC_V, + _______, KC_NO, KC_NO, SE_LESS_MAC, SE_LPRN, KC_NO, KC_NO, SE_RPRN, SE_GRTR_MAC, KC_PGUP, KC_PGDN, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), diff --git a/keyboards/planck/keymaps/narze/config.h b/keyboards/planck/keymaps/narze/config.h index 19d784b2be..cbdb7d94e3 100644 --- a/keyboards/planck/keymaps/narze/config.h +++ b/keyboards/planck/keymaps/narze/config.h @@ -1,7 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once /* * MIDI options @@ -26,7 +23,8 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 -#define TAPPING_TERM 200 +#undef TAPPING_TERM +#define TAPPING_TERM 100 #define COMBO_TERM 20 #define COMBO_COUNT 1 @@ -38,4 +36,13 @@ #define MOUSEKEY_DELAY 100 +#define USB_POLLING_INTERVAL_MS 1 + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } #endif diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c index 8f6cb06263..c878cf9e44 100644 --- a/keyboards/planck/keymaps/narze/keymap.c +++ b/keyboards/planck/keymaps/narze/keymap.c @@ -1,134 +1,95 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H +#include "narze.h" #ifdef AUDIO_ENABLE - #include "audio.h" + #include "audio.h" #endif -#include "eeconfig.h" #include "keymap_colemak.h" extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. - enum planck_layers { - _QWERTY, - _COLEMAK, - _QWOC, - _LOWER, - _RAISE, - _PLOVER, - _SUPERDUPER, - _MOUSE, - _ADJUST + _QWERTY, + _COLEMAK, + _QWOC, + _LOWER, + _RAISE, + _PLOVER, + _SUPERDUPER, + _DEV, + _MOUSE, + _ADJUST }; enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - QWOC, - PLOVER, - SUPERDUPER, - MOUSE, - LOWER, - RAISE, - BACKLIT, - EXT_PLV, - SDTOGG, // Toggle SuperDuper + QWERTY = SAFE_RANGE, + COLEMAK, + QWOC, + PLOVER, + SUPERDUPER, + DEV, + MOUSE, + LOWER, + RAISE, + BACKLIT, + EXT_PLV, + SDTOGG, // Toggle SuperDuper + GUI_UNDS, + LSFT_LPRN, }; -enum functions { - M_GUI_UNDS, // Simulate GUI_T(KC_UNDS) - M_SFT_PO, // SFT_T(KC_LPRN) -}; - -// Timer for custom mod tap -static uint16_t m_gui_unds_timer; -static uint16_t m_sft_po_timer; - // Narze : Custom Macros #define HPR_ESC ALL_T(KC_ESC) #define SFT_ENT SFT_T(KC_ENT) -#define SFT_PO F(M_SFT_PO) -#define GUI_MINS GUI_T(KC_MINS) -#define GUI_UNDS F(M_GUI_UNDS) - -// Combo : SuperDuper layer from S+D (R+S in Colemak) -#define SUPERDUPER_COMBO_COUNT 3 -#define EECONFIG_SUPERDUPER_INDEX (uint8_t *) 19 enum process_combo_event { - CB_SUPERDUPER, + CB_SUPERDUPER, }; -const uint16_t PROGMEM superduper_combos[SUPERDUPER_COMBO_COUNT][3] = { - [_QWERTY] = {KC_S, KC_D, COMBO_END}, - [_COLEMAK] = {KC_R, KC_S, COMBO_END}, - [_QWOC] = {CM_S, CM_D, COMBO_END}, -}; - -combo_t key_combos[COMBO_COUNT] = { - [CB_SUPERDUPER] = COMBO_ACTION(superduper_combos[_QWERTY]), -}; - -volatile bool superduper_enabled = true; - -const uint16_t empty_combo[] = {COMBO_END}; - -void set_superduper_key_combos(void); -void clear_superduper_key_combos(void); - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Hp/Ec| A | S | D | F | G | H | J | K | L | ; | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Sft/(| Z/Mo | X | C | V | B | N | M | , | . | SD-/ |Sft/Ent| + * | Sft/(| Z/Dv | X | C | V | B | N | M | , | . | SD-/ |Sft/Ent| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Rse/[| Ctrl | Alt | GUI/_|Lower | Space |Raise | GUI/-| Alt | Ctrl | Low/]| + * | Rse/[| Ctrl | Alt | GUI/_|Lower | Space | Raise| Bksp | Alt | Ctrl | Low/]| * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT}, - {LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, GUI_MINS, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC)} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_LPRN, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT, + LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) +), /* Colemak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Hp/Ec| A | R | S | T | D | H | N | E | I | O | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Sft/(| Z/Mo | X | C | V | B | K | M | , | . | SD-/ |Sft/Ent| + * | Sft/(| Z/Dv | X | C | V | B | K | M | , | . | SD-/ |Sft/Ent| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI/_|Lower | Space |Raise | GUI/-| Alt | Ctrl | Low/]| + * | Brite| Ctrl | Alt | GUI/_|Lower | Space | Raise| Bksp | Alt | Ctrl | Low/]| * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {HPR_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT}, - {LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, GUI_MINS, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC)} -}, +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, + HPR_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + LSFT_LPRN, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT, + LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) +), /* Qwerty on software Colemak : Useful for gaming with qwerty keymaps! */ -[_QWOC] = { - {KC_TAB, CM_Q, CM_W, CM_E, CM_R, CM_T, CM_Y, CM_U, CM_I, CM_O, CM_P, KC_BSPC}, - {HPR_ESC, CM_A, CM_S, CM_D, CM_F, CM_G, CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT}, - {SFT_PO, LT(_MOUSE, CM_Z), CM_X, CM_C, CM_V, CM_B, CM_N, CM_M, CM_COMM, CM_DOT, LT(_SUPERDUPER, CM_SLSH), SFT_ENT}, - {LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, GUI_MINS, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC)} -}, +[_QWOC] = LAYOUT_planck_grid( + KC_TAB, CM_Q, CM_W, CM_E, CM_R, CM_T, CM_Y, CM_U, CM_I, CM_O, CM_P, KC_MINS, + HPR_ESC, CM_A, CM_S, CM_D, CM_F, CM_G, CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT, + LSFT_LPRN, LT(_DEV, KC_Z), CM_X, CM_C, CM_V, CM_B, CM_N, CM_M, CM_COMM, CM_DOT, LT(_SUPERDUPER, CM_SLSH), SFT_ENT, + LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -136,17 +97,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Sft/Ent| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ | | | |Sft/Ent| * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_grid( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + 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),_______,_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -154,17 +115,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Sft/Ent| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # | | | |Sft/Ent| * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_grid( + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -178,12 +139,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* SuperDuper : https://gist.github.com/narze/861e2167784842d38771 * /-----------------------------------------------------------------------------------\ @@ -196,12 +157,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Shift | | | | | | * \-----------------------------------------------------------------------------------/ */ -[_SUPERDUPER] = { - {_______, _______, _______, _______, _______, _______, _______, _______, S(LGUI(KC_LBRC)), S(LGUI(KC_RBRC)), _______, _______}, - {_______, KC_LALT, _______, _______, KC_BSPC, KC_LGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, KC_LSFT, KC_LSFT, _______, _______, _______, _______, _______} -}, +[_SUPERDUPER] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, S(LGUI(KC_LBRC)), S(LGUI(KC_RBRC)), _______, _______, + _______, KC_LALT, _______, _______, KC_BSPC, KC_LGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_LSFT, KC_LSFT, _______, _______, _______, _______, _______ +), + +/* Dev Layer + * /-----------------------------------------------------------------------------------\ + * | | | | | | | | - | + | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | _ | [ | ] | { | } | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | = | | | < | > | ? | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | + * \-----------------------------------------------------------------------------------/ + */ +[_DEV] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_MINS, S(KC_EQL), S(KC_9), S(KC_0), _______, + _______, _______, _______, _______, _______, _______, S(KC_MINS), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), _______, + _______, _______, _______, _______, _______, _______, KC_EQL, S(KC_BSLASH), S(KC_COMM), S(KC_DOT), S(KC_SLSH), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Mouse * /-----------------------------------------------------------------------------------\ @@ -214,12 +193,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | M2 | LeftClick | M2 | | | | | * \-----------------------------------------------------------------------------------/ */ -[_MOUSE] = { - {_______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, KC_WH_U, KC_WH_D, _______, _______}, - {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______}, - {_______, _______, _______, _______, _______, KC_BTN3, KC_BTN3, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN1, KC_BTN2, _______, _______, _______, _______} -}, +[_MOUSE] = LAYOUT_planck_grid( + _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, KC_WH_U, KC_WH_D, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, KC_BTN3, KC_BTN3, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN1, KC_BTN2, _______, _______, _______, _______ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -232,290 +211,161 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, QWOC, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, SDTOGG, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, QWOC, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, SDTOGG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BACKLIT +) }; #ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_qwerty[][2] = SONG(QWERTY_SOUND); - float tone_qwoc[][2] = SONG(DVORAK_SOUND); - float tone_colemak[][2] = SONG(COLEMAK_SOUND); - float tone_plover[][2] = SONG(PLOVER_SOUND); - float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); - float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); - float tone_coin[][2] = SONG(COIN_SOUND); - float tone_sonic_ring[][2] = SONG(SONIC_RING); - - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); - float tone_superduper[][2] = SONG(SUPER_DUPER_SOUND); + float tone_plover[][2] = SONG(PLOVER_SOUND); + float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); + float tone_coin[][2] = SONG(VIOLIN_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistant_default_layer_set(1UL<<_QWERTY); + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); - key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWERTY]; - eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistant_default_layer_set(1UL<<_COLEMAK); + set_superduper_key_combo_layer(_QWERTY); + } + return false; - key_combos[CB_SUPERDUPER].keys = superduper_combos[_COLEMAK]; - eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _COLEMAK); - } - return false; - break; - case QWOC: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwoc, false, 0); - #endif - persistant_default_layer_set(1UL<<_QWOC); + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); - key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWOC]; - eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWOC); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - case PLOVER: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); - #endif - layer_off(_RAISE); - layer_off(_LOWER); - layer_off(_ADJUST); - layer_on(_PLOVER); - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - keymap_config.raw = eeconfig_read_keymap(); - keymap_config.nkro = 1; - eeconfig_update_keymap(keymap_config.raw); - } - return false; - break; - case EXT_PLV: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); - #endif - layer_off(_PLOVER); - } - return false; - break; - case SDTOGG: - if (record->event.pressed) { - superduper_enabled = !superduper_enabled; + set_superduper_key_combo_layer(_COLEMAK); + } + return false; - if (superduper_enabled) { - set_superduper_key_combos(); + case QWOC: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWOC); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_sonic_ring, false, 0); - #endif - } else { - clear_superduper_key_combos(); + set_superduper_key_combo_layer(_QWOC); + } + return false; - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_coin, false, 0); - #endif - } - } - return false; - break; - } - return true; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(tone_plover); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_plover_gb); + #endif + layer_off(_PLOVER); + } + return false; + + case SDTOGG: + if (record->event.pressed) { + bool enabled = toggle_superduper_mode(); + + #ifdef AUDIO_ENABLE + if (enabled) { + PLAY_SONG(tone_coin); + } else { + PLAY_SONG(tone_goodbye); + } + #endif + } + return false; + + // Macros + + // 1. Hold for LGUI, tap for Underscore + case GUI_UNDS: + perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + return false; + + // 2. Hold for LSHIFT, tap for Parens open + case LSFT_LPRN: + perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + return false; + + default: + return true; + } + return true; } void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif } void matrix_setup(void) { - set_superduper_key_combos(); -} - -void set_superduper_key_combos(void) { - uint8_t layer = eeprom_read_byte(EECONFIG_SUPERDUPER_INDEX); - - switch (layer) { - case _QWERTY: - case _COLEMAK: - case _QWOC: - key_combos[CB_SUPERDUPER].keys = superduper_combos[layer]; - break; - } -} - -void clear_superduper_key_combos(void) { - key_combos[CB_SUPERDUPER].keys = empty_combo; + set_superduper_key_combos(); } void matrix_scan_user(void) { } -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_NOTE_ARRAY(music_scale, false, 0); -} - -#endif - -// Combos - void process_combo_event(uint8_t combo_index, bool pressed) { - if (pressed) { - switch(combo_index) { - case CB_SUPERDUPER: - layer_on(_SUPERDUPER); - - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_superduper, false, 0); - #endif - break; + if (pressed) { + switch(combo_index) { + case CB_SUPERDUPER: + layer_on(_SUPERDUPER); + break; + } + } else { + layer_off(_SUPERDUPER); + unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them } - } else { - layer_off(_SUPERDUPER); - unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them - } } - -// Macros - -const uint16_t PROGMEM fn_actions[] = { - [M_GUI_UNDS] = ACTION_MACRO_TAP(M_GUI_UNDS), - [M_SFT_PO] = ACTION_MACRO_TAP(M_SFT_PO), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - bool tap_not_interrupted = record->tap.count > 0 && !record->tap.interrupted; - - switch(id) { - // Hold for LGUI, tap for Underscore - case M_GUI_UNDS: - if (record->event.pressed) { - m_gui_unds_timer = timer_read(); - - if (!tap_not_interrupted) { - register_mods(MOD_BIT(KC_LGUI)); - } - } else { - if (tap_not_interrupted && timer_elapsed(m_gui_unds_timer) < TAPPING_TERM) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_superduper, false, 0); - #endif - - add_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - register_code(KC_MINS); - unregister_code(KC_MINS); - del_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - record->tap.count = 0; // ad hoc: cancel tap - } else { - unregister_mods(MOD_BIT(KC_LGUI)); - } - } - break; - // Hold for LSHIFT, tap for Parens open - case M_SFT_PO: - if (record->event.pressed) { - m_sft_po_timer = timer_read(); - - if (!tap_not_interrupted) { - register_mods(MOD_BIT(KC_LSFT)); - } - } else { - if (tap_not_interrupted && timer_elapsed(m_sft_po_timer) < TAPPING_TERM) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_superduper, false, 0); - #endif - - record->tap.count = 0; - return MACRO(D(RSFT), T(9), U(RSFT), END); - } else { - unregister_mods(MOD_BIT(KC_LSFT)); - } - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/planck/keymaps/narze/readme.md b/keyboards/planck/keymaps/narze/readme.md index 6824251e88..737171bca9 100644 --- a/keyboards/planck/keymaps/narze/readme.md +++ b/keyboards/planck/keymaps/narze/readme.md @@ -22,10 +22,11 @@ Press `S+D` simultaneously and hold, then... ## Build instructions - `cd /path/to/qmk_firmware` -- `docker run -e keymap=narze -e subproject=rev4 -e keyboard=planck --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware` -- `dfu-programmer atmega32u4 erase && dfu-programmer atmega32u4 flash .build/planck_rev4_narze.hex` - -## TODO -- [] Make SuperDuper mode fully-compatible in Windows by swapping GUI with Ctrl - - +- Ensure latest libraries are loaded `make git-submodule` +- Build with docker + - Planck Rev. 4 : `util/docker_build.sh planck/rev4:narze` + - Planck Light : `util/docker_build.sh planck/light:narze` +- Flash hex file + - Using dfu-programmer `dfu-programmer atmega32u4 erase --force && dfu-programmer atmega32u4 flash .build/planck_rev4_narze.hex` + - For Planck Light change the target microcontroller `dfu-programmer at90usb1286 erase --force && dfu-programmer at90usb1286 flash .build/planck_light_narze.hex` + - Use [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) diff --git a/keyboards/planck/keymaps/narze/rules.mk b/keyboards/planck/keymaps/narze/rules.mk index 286a2ffdc1..9b56dc18f9 100644 --- a/keyboards/planck/keymaps/narze/rules.mk +++ b/keyboards/planck/keymaps/narze/rules.mk @@ -1,23 +1,25 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +AUDIO_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMBO_ENABLE = yes + +ifeq ($(strip $(KEYBOARD)), planck/rev4) + MOUSEKEY_ENABLE = no # Mouse keys(+4700) + MIDI_ENABLE = no +else + MOUSEKEY_ENABLE = yes + MIDI_ENABLE = yes +endif diff --git a/keyboards/planck/keymaps/oryx/config.h b/keyboards/planck/keymaps/oryx/config.h new file mode 100644 index 0000000000..a9171bf538 --- /dev/null +++ b/keyboards/planck/keymaps/oryx/config.h @@ -0,0 +1,16 @@ +#pragma once + +#ifdef AUDIO_ENABLE +#define STARTUP_SONG SONG(PLANCK_SOUND) +#endif + +#define MIDI_BASIC + +#define ENCODER_RESOLUTION 4 + +#define ORYX_CONFIGURATOR + +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c new file mode 100644 index 0000000000..7892d1a5fb --- /dev/null +++ b/keyboards/planck/keymaps/oryx/keymap.c @@ -0,0 +1,372 @@ +#include QMK_KEYBOARD_H +#include "muse.h" +#include "eeprom.h" +#include "keymap_german.h" +#include "keymap_nordic.h" +#include "keymap_french.h" +#include "keymap_spanish.h" +#include "keymap_hungarian.h" +#include "keymap_swedish.h" +//#include "keymap_br_abnt2.h" +#include "keymap_canadian_multilingual.h" +#include "keymap_german_ch.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define NO_TH ALGR(KC_T) +#define NO_ETH ALGR(KC_D) + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = EZ_SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV, + RGB_SLD +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + 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_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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + 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_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 +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,----------------------------------------------------------------------------------- + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, TOGGLE_LAYER_COLOR, LED_LEVEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { + [0] = { {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255} }, + + [1] = { {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {32,255,234}, {32,255,234}, {32,255,234}, {32,255,234} }, + + [2] = { {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246} }, + + [3] = { {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {249,228,255}, {249,228,255}, {249,228,255}, {216,255,255}, {216,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {216,255,255}, {14,255,255}, {216,255,255}, {216,255,255}, {249,228,255}, {249,228,255}, {249,228,255}, {216,255,255}, {216,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255} }, + +}; + +void set_layer_color(int layer) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + HSV hsv = { + .h = pgm_read_byte(&ledmap[layer][i][0]), + .s = pgm_read_byte(&ledmap[layer][i][1]), + .v = pgm_read_byte(&ledmap[layer][i][2]), + }; + if (!hsv.h && !hsv.s && !hsv.v) { + rgb_matrix_set_color( i, 0, 0, 0 ); + } else { + RGB rgb = hsv_to_rgb( hsv ); + float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX; + rgb_matrix_set_color( i, f * rgb.r, f * rgb.g, f * rgb.b ); + } + } +} + +void rgb_matrix_indicators_user(void) { + if (g_suspend_state || keyboard_config.disable_layer_led) { return; } + switch (biton32(layer_state)) { + case 0: + set_layer_color(0); + break; + case 3: + set_layer_color(1); + break; + case 4: + set_layer_color(2); + break; + case 6: + set_layer_color(3); + break; + default: + if (rgb_matrix_get_flags() == LED_FLAG_NONE) + rgb_matrix_set_color_all(0, 0, 0); + break; + } +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + PORTE |= (1<<6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_DOWN); + unregister_code(KC_MS_WH_DOWN); + #else + register_code(KC_PGDN); + unregister_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_UP); + unregister_code(KC_MS_WH_UP); + #else + register_code(KC_PGUP); + unregister_code(KC_PGUP); + #endif + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } +#endif +} diff --git a/keyboards/planck/keymaps/oryx/rules.mk b/keyboards/planck/keymaps/oryx/rules.mk new file mode 100644 index 0000000000..fb44d6b95e --- /dev/null +++ b/keyboards/planck/keymaps/oryx/rules.mk @@ -0,0 +1,6 @@ +SRC += muse.c +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LINK_TIME_OPTIMIZATION_ENABLE = yes +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c index 2a9b66c42d..6f8f8579c1 100644 --- a/keyboards/planck/keymaps/pete/keymap.c +++ b/keyboards/planck/keymaps/pete/keymap.c @@ -92,13 +92,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______} }, [_MAC] = { /* Mac */ - {CYCLWIN,MACSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DELT}, + {CYCLWIN,MACSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL }, {_______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, MACPRNT,MACPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, {_______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END } }, [_WIN] = { /* Windows */ - {CYCLWIN,WINSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DELT}, + {CYCLWIN,WINSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL }, {_______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, WINPRNT,WINPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, {_______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END } diff --git a/keyboards/planck/keymaps/sascha/keymap.c b/keyboards/planck/keymaps/sascha/keymap.c index 684b61f366..665598c9b5 100644 --- a/keyboards/planck/keymaps/sascha/keymap.c +++ b/keyboards/planck/keymaps/sascha/keymap.c @@ -24,14 +24,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ ` │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ü │ ö │ ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ SINS │ ♥ │ ≈ │ ✓ │ ✗ │ ← │ → │ € │ ß │ Ü │ Ö │ Ä │ + * │ SINS │ ♥ │ ’ │ “ │ ” │ ← │ → │ € │ ß │ Ü │ Ö │ Ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ Rset │ BLSt │ F1 │ Home │ End │ PgUp │ PgDn │ Left │ Down │ Up │ Rght │ │ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL, KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , UC(L'ü') , UC(L'ö') , UC(L'ä'), - S(KC_INS) , UC(L'♥') , UC(L'≈') , UC(L'✓') , UC(L'✗') , UC(L'←') , UC(L'→') , UC(L'€') , UC(L'ß') , UC(L'Ü') , UC(L'Ö') , UC(L'Ä'), + S(KC_INS) , UC(L'♥') , UC(L'’') , UC(L'“') , UC(L'”') , UC(L'←') , UC(L'→') , UC(L'€') , UC(L'ß') , UC(L'Ü') , UC(L'Ö') , UC(L'Ä'), RESET , BL_STEP , KC_F1 , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_TRNS ) }; diff --git a/keyboards/planck/keymaps/skank/keymap.c b/keyboards/planck/keymaps/skank/keymap.c new file mode 100644 index 0000000000..9601cd31fb --- /dev/null +++ b/keyboards/planck/keymaps/skank/keymap.c @@ -0,0 +1,162 @@ +/* Copyright 2019 Khader Syed + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum skank_layers { + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum skank_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + LOWER, + RAISE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | / |Lower | Space|Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_GESC, 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_UP, KC_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSLS, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | / |Lower | Space|Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_GESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSLS, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | _ | + |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + 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_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_UNDS, KC_PLUS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|Qwerty|Colemk| | | | | Reset| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, AU_ON, AU_OFF, QWERTY, COLEMAK, _______, _______, _______, _______, RESET, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + } + return true; +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/skank/readme.md b/keyboards/planck/keymaps/skank/readme.md new file mode 100644 index 0000000000..673956aca1 --- /dev/null +++ b/keyboards/planck/keymaps/skank/readme.md @@ -0,0 +1,8 @@ +# My planck layout + +These are my changes: + +- add a colemak layout +- keep it clean +- add option to enable mouse keys +- and just enable some sound diff --git a/keyboards/planck/keymaps/skank/rules.mk b/keyboards/planck/keymaps/skank/rules.mk new file mode 100644 index 0000000000..4c65d4af1e --- /dev/null +++ b/keyboards/planck/keymaps/skank/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) + diff --git a/keyboards/planck/keymaps/skug/keymap.c b/keyboards/planck/keymaps/skug/keymap.c index 86a1de767b..27efc4759d 100644 --- a/keyboards/planck/keymaps/skug/keymap.c +++ b/keyboards/planck/keymaps/skug/keymap.c @@ -39,7 +39,7 @@ enum planck_keycodes { #define ESC_LOW LT(_LOWER, KC_ESC) #define BSP_RAI LT(_RAISE, KC_BSPC) -#define LFT_CTR CTL_T(NO_APOS) +#define LFT_CTR CTL_T(SE_APOS) #define RGT_CTR CTL_T(KC_TILD) #define UTILITY MO(_UTILITY) @@ -57,10 +57,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DEFAULT] = LAYOUT_planck_grid( - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , NO_AA , - UTILITY, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , NO_OSLH, NO_AE , - KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , NO_MINS, KC_RSPC, - LFT_CTR, KC_LALT, KC_LGUI, NO_AT , ESC_LOW, KC_ENT , KC_SPC , BSP_RAI, _______, KC_ALGR, NO_ASTR, RGT_CTR + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_AA , + UTILITY, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_OSLH, SE_AE , + KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SE_MINS, KC_RSPC, + LFT_CTR, KC_LALT, KC_LGUI, SE_AT , ESC_LOW, KC_ENT , KC_SPC , BSP_RAI, _______, KC_ALGR, SE_ASTR, RGT_CTR ), /* Raise @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_planck_grid( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PLUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, NO_GRTR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, SE_GRTR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -93,9 +93,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - NO_HALF, LSFT(KC_1), NO_QUO2, LSFT(KC_3), NO_BULT, LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL , NO_QUES, + SE_HALF, LSFT(KC_1), SE_QUO2, LSFT(KC_3), SE_BULT, LSFT(KC_5), SE_AMPR, SE_SLSH, SE_LPRN, SE_RPRN, SE_EQL , SE_QUES, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, NO_LESS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, SE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_planck_grid( KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, RESET , MU_MOD , AU_ON , AU_OFF , AG_NORM, AG_SWAP, DEFAULT, XXXXXXX , XXXXXXX, UTILITY, _______, - _______, NO_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, SE_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/planck/keymaps/smittey/config.h b/keyboards/planck/keymaps/smittey/config.h new file mode 100644 index 0000000000..17ffcca383 --- /dev/null +++ b/keyboards/planck/keymaps/smittey/config.h @@ -0,0 +1,16 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MIDI_BASIC + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/smittey/keymap.c b/keyboards/planck/keymaps/smittey/keymap.c new file mode 100644 index 0000000000..fd5e91fb91 --- /dev/null +++ b/keyboards/planck/keymaps/smittey/keymap.c @@ -0,0 +1,375 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + _FN, + _SPACE_FN +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +// Fillers to make layering more clear +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FN MO(_FN) +#define SPACE_FN LT(_SPACE_FN, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | FN | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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, MT(MOD_LSFT, KC_ENT), + KC_LCTL, FN, KC_LALT, KC_LGUI, LOWER, SPACE_FN, SPACE_FN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | * | 4 | 5 | 6 | - | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | / | 1 | 2 | 3 | + |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Space | | 0 | . | = | | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_planck_grid( + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ASTR, KC_4, KC_5, KC_6, KC_MINS, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PLUS, MT(MOD_LSFT, KC_ENT), + _______, XXXXXXX, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_0, KC_DOT, KC_EQL, XXXXXXX + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | ! | " | £ | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ~ | # | / | { | [ | ] | } | \ | - | = | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | _ | + |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Space | | Home | PgDn | PgUp | End | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_EXLM, KC_DQUO, LALT(KC_4), KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + XXXXXXX, KC_TILD, KC_NUHS, KC_SLSH, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, KC_BSLS, KC_MINS, KC_EQL, KC_PIPE, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, MT(MOD_LSFT, KC_ENT), + _______, XXXXXXX, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + + /* fn + * ,-----------------------------------------------------------------------------------. + * |DelWrd| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Space | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_planck_grid( + LALT(KC_BSPC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + + /* Space fn + * ,-----------------------------------------------------------------------------------. + * |PRNT SC| | UP | | | | | | | | |SLEEP | + * |-------+------+------+------+------+-------------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | LEFT | DOWN | UP | RIGHT| | + * |-------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |-------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | MUTE |VOLDWN|VOL UP| | + * `-----------------------------------------------------------------------------------' + */ + [_SPACE_FN] = LAYOUT_planck_grid( + KC_PSCR, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, + XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC__MUTE, KC__VOLDOWN, KC__VOLUP, XXXXXXX + ), + + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | Reset|Qwerty| | | | | | | |MIDIof|MIDIon| Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Dvorak| |AGnorm|AGswap| | |Audoff|Aud on| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | |Colemk| | | | | |Musoff|Mus on| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Plover| | | | | | | |Voice-|Voice+| | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_planck_grid( + RESET, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MI_OFF, MI_ON, KC_DEL, + XXXXXXX, XXXXXXX, XXXXXXX, DVORAK, XXXXXXX, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, AU_OFF, AU_ON, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, XXXXXXX, XXXXXXX, TERM_ON, TERM_OFF, MU_OFF, MU_ON, XXXXXXX, + PLOVER, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, MUV_DE, MUV_IN, XXXXXXX + ), + + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_ENT), + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MT(MOD_LSFT, KC_ENT), + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + + /* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + + [_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX + ), +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return true; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return true; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return true; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + writePinHigh(E6); + #endif + } + return true; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return true; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return true; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/smittey/readme.md b/keyboards/planck/keymaps/smittey/readme.md new file mode 100644 index 0000000000..2808476550 --- /dev/null +++ b/keyboards/planck/keymaps/smittey/readme.md @@ -0,0 +1,28 @@ +# Planck Layout created by [Smittey](https://github.com/smittey) + +A layout with a focus around coding, utilising the home row for symbols. There is an additional FN layer and Space function layer + +Main - Qwerty with ctrl swapped around and enter changed to be shift on hold +Lower - Numbers and calculations +Raise - Symbols +Adjust - Keyboard settings and layout changers +FN - Function keys +Space FN - Navigation and media + +## Main +![Main layer layout](https://i.imgur.com/jRbqGUN.png) + +## Lower +![Lower layer layout](https://i.imgur.com/YmdM1q5.png) + +## Raise +![Raise layer layout](https://i.imgur.com/BXxOK1S.png) + +## Adjust +![Adjust layer layout](https://i.imgur.com/M6qBaXO.png) + +## FN +![FN layer layout](https://i.imgur.com/1eiUOH1.png) + +## Space Function +![Space function layer layout](https://i.imgur.com/RJMFEdy.png) \ No newline at end of file diff --git a/keyboards/planck/keymaps/smittey/rules.mk b/keyboards/planck/keymaps/smittey/rules.mk new file mode 100644 index 0000000000..acf0896a32 --- /dev/null +++ b/keyboards/planck/keymaps/smittey/rules.mk @@ -0,0 +1 @@ +SRC += muse.c \ No newline at end of file diff --git a/keyboards/planck/keymaps/tong92/keymap.c b/keyboards/planck/keymaps/tong92/keymap.c index d85bd6e882..bdde285690 100644 --- a/keyboards/planck/keymaps/tong92/keymap.c +++ b/keyboards/planck/keymaps/tong92/keymap.c @@ -110,10 +110,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------' */ [_WINDOW_SHORTCUT] ={ -{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT}, +{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL}, {_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX}, {_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX}, -{KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DELT)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT} +{KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DEL)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT} }, /* Mac Shortcut * ,-----------------------------------------------------------------------. @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------' */ [_MAC_SHORTCUT] ={ -{KC_ESC ,LGUI(KC_UP) ,LGUI(KC_DOWN) ,XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT}, +{KC_ESC ,LGUI(KC_UP) ,LGUI(KC_DOWN) ,XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL}, {_______,LALT(LSFT(KC_LEFT)),LALT(LSFT(KC_RIGHT)),XXXXXXX,LGUI(LCTL(KC_F)),XXXXXXX,KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX}, {_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX}, {KC_TRNS,_______ ,_______ ,MOUSE ,MOUSE ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT} diff --git a/keyboards/planck/keymaps/vaire/rules.mk b/keyboards/planck/keymaps/vaire/rules.mk index 22e4bd9341..f9dfeb7263 100644 --- a/keyboards/planck/keymaps/vaire/rules.mk +++ b/keyboards/planck/keymaps/vaire/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. diff --git a/keyboards/planck/light/light.h b/keyboards/planck/light/light.h index 2cf46c2a27..3ead109ac3 100644 --- a/keyboards/planck/light/light.h +++ b/keyboards/planck/light/light.h @@ -61,7 +61,7 @@ LAYOUT_ortho_4x12( \ ) #define KEYMAP LAYOUT_ortho_4x12 -#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 #define LAYOUT_kc_ortho_4x12 LAYOUT_kc #define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk index b621a9abb0..0d86bb8a55 100644 --- a/keyboards/planck/light/rules.mk +++ b/keyboards/planck/light/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = at90usb1286 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_brett.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_brett.c index 3ebd82af4f..cdebcd1433 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_brett.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_brett.c @@ -1,26 +1,26 @@ #include "keymap.h" +#define KC_MO1 MO(1) +#define KC_MO2 MO(2) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, LCTL, A, S, D, F, G, H, J, K, L, SCLN, ENT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - TAB, LGUI, RSFT, LALT, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), + TAB, LGUI, RSFT, LALT, MO2, SPC, MO1, LEFT, DOWN, UP, RGHT), [1] = KEYMAP( /* RAISE */ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, TRNS, F1, F2, F3, F4, F5, F6, 4, 5, 6, QUOT, TRNS, TRNS, F7, F8, F9, F10, F11, F12, 1, 2, 3, TRNS, PGUP, - MPRV, MNXT, TRNS, MUTE, TRNS, TRNS, FN1, 0, 0, TRNS, PGDN), + MPRV, MNXT, TRNS, MUTE, TRNS, TRNS, MO1, 0, 0, TRNS, PGDN), [2] = KEYMAP( /* LOWER */ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MINS, TRNS, TRNS, TRNS, PAUSE, TRNS, TRNS, TRNS, TRNS, LBRC, RBRC, BSLS, EQL, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - MPLY, MSTP, VOLU, VOLD, FN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), + MPLY, MSTP, VOLU, VOLD, MO2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_dotcom.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_dotcom.c index d4ec987abd..5a85a6086c 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_dotcom.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_dotcom.c @@ -1,20 +1,20 @@ #include "keymap.h" +#define KC_MO1 MO(1) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, - FN1, A, S, D, F, G, H, J, K, L, SCLN, ENT, + MO1, A, S, D, F, G, H, J, K, L, SCLN, ENT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, LBRC, LCTL, BSLS, QUOT, LALT, FN22, SPC, LEFT, UP, DOWN, RGHT, RBRC), [1] = KEYMAP( GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, TRNS, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, TRNS, TRNS, TRNS, TRNS, FN18, FN19, FN22, EQL, MINS, FN20, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, TRNS, VOLD, VOLU, TRNS), + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MO1, TRNS, VOLD, VOLU, TRNS), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_jack.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_jack.c index 4237949d54..14db7feaa0 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_jack.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_jack.c @@ -1,31 +1,31 @@ #include "keymap.h" +#define KC_MO2 MO(2) +#define KC_MO3 MO(3) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( /* Jack */ TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, ESC, A, S, D, F, G, H, J, K, L, SCLN, QUOT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, - RSFT, LCTL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), + RSFT, LCTL, LALT, LGUI, MO3, SPC, MO2, LEFT, DOWN, UP, RGHT), [1] = KEYMAP( /* Jack colemak */ TAB, Q, W, F, P, G, J, L, U, Y, SCLN, BSPC, ESC, A, R, S, T, D, H, N, E, I, O, QUOT, LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, ENT, - FN3, LCTL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), + FN3, LCTL, LALT, LGUI, MO3, SPC, MO2, LEFT, DOWN, UP, RGHT), [2] = KEYMAP( /* Jack RAISE */ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, TRNS, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, MNXT, VOLD, VOLU, MPLY), + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MO2, MNXT, VOLD, VOLU, MPLY), [3] = KEYMAP( /* Jack LOWER */ FN22, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), + TRNS, TRNS, TRNS, TRNS, MO3, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_joe.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_joe.c index b8251c8573..efd188a8ee 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_joe.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_joe.c @@ -1,26 +1,30 @@ #include "keymap.h" +#define KC_MO2 MO(2) +#define KC_MO3 MO(3) +#define KC_MO4 MO(4) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( /* Joe qwerty */ ESC, Q, W, E, R, T, Y, U, I, O, P, MINS, BSPC, A, S, D, F, G, H, J, K, L, SCLN, ENTER, FN7, Z, X, C, V, B, N, M, COMM, DOT, SLSH, QUOT, - LCTL, LGUI, LALT, LSFT, FN1, SPC, FN0, LEFT, UP, DOWN, RGHT), + LCTL, LGUI, LALT, LSFT, MO3, SPC, MO2, LEFT, UP, DOWN, RGHT), [1] = KEYMAP( /* Joe colemak */ ESC, Q, W, F, P, G, J, L, U, Y, SCLN, MINS, BSPC, A, R, S, T, D, H, N, E, I, O, ENTER, FN7, Z, X, C, V, B, K, M, COMM, DOT, SLSH, QUOT, - LCTL, LGUI, LALT, LSFT, FN1, SPC, FN0, LEFT, UP, DOWN, RGHT), + LCTL, LGUI, LALT, LSFT, MO3, SPC, MO2, LEFT, UP, DOWN, RGHT), [2] = KEYMAP( /* Joe UPPER */ F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MENU, CAPS, INS, PSCR, TRNS, FN5, FN6, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, FN0, FN26, FN27, FN28, FN29), + TRNS, TRNS, TRNS, TRNS, MO4, TRNS, MO2, FN26, FN27, FN28, FN29), [3] = KEYMAP( /* Joe LOWER */ GRV, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN8, FN9, FN30, BSPC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, TRNS, BSLS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, RBRC, TRNS, EQL, - TRNS, TRNS, TRNS, TRNS, FN1, TRNS, FN2, HOME, PGUP, PGDN, END), + TRNS, TRNS, TRNS, TRNS, MO3, TRNS, MO4, HOME, PGUP, PGDN, END), [4] = KEYMAP( /* Joe LOWER + UPPER */ FN3, FN4, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, SLEP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, @@ -35,10 +39,6 @@ enum macro_id { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - [1] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(4), // to Fn overlay - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_matthew.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_matthew.c index 196b2d7773..fe0dfa619c 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_matthew.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_matthew.c @@ -22,12 +22,15 @@ #include "keymap.h" +#define KC_MO1 MO(1) +#define KC_MO2 MO(2) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: dvorak */ [0] = KEYMAP_GRID( ESC, SCLN, COMM, DOT, P, Y, F, G, C, R, L, BSPC, \ GRV, A, O, E, U, I, D, H, T, N, S, MINS, \ TAB, QUOT, Q, J, K, X, B, M, W, V, Z, ENT, \ - LCTL, LGUI, LALT, RALT, FN1, LSFT, SPC, FN2, LEFT, DOWN, UP, RGHT), + LCTL, LGUI, LALT, RALT, MO1, LSFT, SPC, MO2, LEFT, DOWN, UP, RGHT), /* 1: lower (FN1) */ [1] = KEYMAP_GRID( F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, \ @@ -44,9 +47,6 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // lower Fn layer - [2] = ACTION_LAYER_MOMENTARY(2), // raise Fn layer - // lower row1 [17] = ACTION_MODS_KEY(MOD_LSFT, KC_5), // % [18] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // ? diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_nathan.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_nathan.c index f0be4b0306..7cc5e7f0ac 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_nathan.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_nathan.c @@ -3,6 +3,9 @@ #include "keymap.h" +#define KC_MO1 MO(1) +#define KC_MO2 MO(2) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: main layer * ,-----------------------------------------------------------------------. @@ -19,7 +22,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, LCTL, A, S, D, F, G, H, J, K, L, SCLN, ENT, RSFT, Z, X, C, V, B, N, M, LBRC, FN10, FN11, FN12, - LGUI, BSLS, SLSH, LALT, FN0, SPC, SPC, FN1, LEFT, DOWN, UP, RGHT), + LGUI, BSLS, SLSH, LALT, MO1, SPC, SPC, MO2, LEFT, DOWN, UP, RGHT), /* 1: fn left/lower layer * The top row are Visual Studio combos: @@ -73,8 +76,6 @@ enum macro_id { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // left/lower layer - [1] = ACTION_LAYER_MOMENTARY(2), // right/raise layer // Program macros [2] = ACTION_MACRO(M_P0), [3] = ACTION_MACRO(M_P1), diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_paul.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_paul.c index 51d45be75b..829c047be6 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_paul.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_paul.c @@ -1,32 +1,32 @@ #include "keymap.h" +#define KC_MO1 MO(1) +#define KC_MO2 MO(2) +#define KC_MO3 MO(3) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( /* Paul */ TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, - FN1, A, S, D, F, G, H, J, K, L, SCLN, QUOT, + MO1, A, S, D, F, G, H, J, K, L, SCLN, QUOT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, - ESC, LCTL, LALT, LGUI, FN2, SPC, FN3, LEFT, DOWN, UP, RGHT), + ESC, LCTL, LALT, LGUI, MO2, SPC, MO3, LEFT, DOWN, UP, RGHT), [1] = KEYMAP( /* Paul FN */ TRNS, TRNS, TRNS, FN8, FN9, TRNS, TRNS, TRNS, TRNS, MUTE, VOLD, VOLU, - FN1, TRNS, TRNS, HOME, END, TRNS, TRNS, TRNS, TRNS, MPRV, MPLY, MNXT, + MO1, TRNS, TRNS, HOME, END, TRNS, TRNS, TRNS, TRNS, MPRV, MPLY, MNXT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LEFT, DOWN, RGHT), [2] = KEYMAP( /* Paul LOWER */ FN22, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TRNS, MO2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), [3] = KEYMAP( /* Paul RAISE */ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, TRNS, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MO3, TRNS, TRNS, TRNS, TRNS), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn1 overlay (FN) - [2] = ACTION_LAYER_MOMENTARY(2), // to Fn2 overlay (LOWER) - [3] = ACTION_LAYER_MOMENTARY(3), // to Fn3 overlay (RAISE) - [8] = ACTION_MODS_KEY(MOD_LSFT, KC_HOME), [9] = ACTION_MODS_KEY(MOD_LSFT, KC_END), [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_reed.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_reed.c index f721716fde..9e6e953e31 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_reed.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_reed.c @@ -1,5 +1,8 @@ #include "keymap.h" +#define KC_MO2 MO(2) +#define KC_MO3 MO(3) + /* * BUILD: * Simply run the command below in the keyboards/planck directory @@ -23,30 +26,27 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN5, - LCTL, CAPS, LALT, LGUI, FN2, FN7, SPC, FN1, LEFT, DOWN, UP, RGHT), + LCTL, CAPS, LALT, LGUI, MO3, FN7, SPC, MO2, LEFT, DOWN, UP, RGHT), [1] = KEYMAP_GRID( /* Reed EXTREME GAMING */ ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN5, - LCTL, 1, 2, 3, 4, SPC, FN2, FN1, LEFT, DOWN, UP, RGHT), + LCTL, 1, 2, 3, 4, SPC, MO3, MO2, LEFT, DOWN, UP, RGHT), [2] = KEYMAP_GRID( /* Reed RAISE */ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, MNXT, VOLD, VOLU, MPLY), + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MO2, MNXT, VOLD, VOLU, MPLY), [3] = KEYMAP_GRID( /* Reed LOWER */ TRNS, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, DEL, TRNS, TRNS, INS, HOME, PGUP, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, TRNS, TRNS, DEL, END, PGDN, F11, F12, F13, TRNS, VOLD, VOLU, TRNS, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, MPRV, MUTE, MPLY, MNXT), + TRNS, TRNS, TRNS, TRNS, MO3, TRNS, TRNS, TRNS, MPRV, MUTE, MPLY, MNXT), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - LOWER - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), // Actions for the tap/hold modifiers listed above diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_sean.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_sean.c index 27a669e640..10a112986e 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_sean.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_sean.c @@ -8,6 +8,10 @@ enum planck_layers { _ADJUST }; +#define KC_LOWR MO(_LOWER) +#define KC_RAIS MO(_RAISE) +#define KC_ADJS MO(_ADJUST) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak @@ -25,7 +29,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { QUOT, COMM, DOT, P, Y, SLSH, EQL, F, G, C, R, L, A, O, E, U, I, ESC, BSPC, D, H, T, N, S, SCLN, Q, J, K, X, TAB, ENT, B, M, W, V, Z, - LSFT, LCTL, LALT, LGUI, FN1, SPC, FN2, LEFT, DOWN, UP, RGHT), + LSFT, LCTL, LALT, LGUI, LOWR, SPC, RAIS,LEFT, DOWN, UP, RGHT), /* Lower * ,-----------------------------------------------------------------------------------. @@ -42,7 +46,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { F1, F2, F3, F4, F5, FN26, FN27, F6, F7, F8, F9, F10, 1, 2, 3, 4, 5, LBRC, RBRC, 6, 7, 8, 9, 0, FN23, FN25, GRV,MINS, FN24, INS, DEL, FN19, FN20, FN22, EQL, BSLS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN4, HOME, PGDN, PGUP, END), + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ADJS,HOME, PGDN, PGUP, END), /* Raise * ,-----------------------------------------------------------------------------------. @@ -59,7 +63,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { F11, F12, F13, F14, F15,MINS, FN24, F16, F17, F18, F19, F20, FN11, FN12, FN13, FN14, FN15, NO, NO, FN16, FN17, FN18, FN19, FN20, PWR, EJCT, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, - CAPS, TRNS, TRNS, TRNS, FN4, TRNS, FN2, NO, NO, NO, NO), + CAPS, TRNS, TRNS, TRNS, ADJS,TRNS, RAIS, NO, NO, NO, NO), /* Adjust (Lower + Raise or SLower + SRaise) * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | | @@ -79,10 +83,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(_LOWER), // to Fn overlay LOWER - [2] = ACTION_LAYER_MOMENTARY(_RAISE), // to Fn overlay RAISE [3] = ACTION_DEFAULT_LAYER_SET(_DVRK), - [4] = ACTION_LAYER_MOMENTARY(_ADJUST), // RAISE + LOWER [11] = ACTION_MODS_KEY(MOD_LSFT, KC_1), //! [12] = ACTION_MODS_KEY(MOD_LSFT, KC_2), //@ [13] = ACTION_MODS_KEY(MOD_LSFT, KC_3), //# diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_shane.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_shane.c index 2191758c8c..69ce9b8e09 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_shane.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_shane.c @@ -3,6 +3,9 @@ #include "action.h" #include "action_util.h" +#define KC_MO6 MO(6) +#define KC_MO8 MO(8) + /* Shane's Planck Layout http://www.keyboard-layout-editor.com/#/layouts/015d9011102619d7695c86ffe57cf441 @@ -12,7 +15,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, LCTL, A, S, D, F, G, H, J, K, L, SCLN, BSPC, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN5, - /*ALPHA*/FN3, /*HYPER*/ /*SUPER*/LGUI, /*META*/LALT, LCTL, FN2, FN6, FN1, LEFT, DOWN, UP, RGHT), + /*ALPHA*/FN3, /*HYPER*/ /*SUPER*/LGUI, /*META*/LALT, LCTL, MO8, FN6, MO6, LEFT, DOWN, UP, RGHT), [2] = KEYMAP_AND_SWAP( /* More modifiers */ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, @@ -72,8 +75,6 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(6), // to fist Fn overlay - [2] = ACTION_LAYER_MOMENTARY(8), // to second Fn overlay [3] = ACTION_LAYER_TOGGLE(2), // toggle more modifiers [4] = ACTION_LAYER_TOGGLE(4), // toggle wasd [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), @@ -95,4 +96,4 @@ const uint16_t PROGMEM fn_actions[] = { [24] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), [25] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), [26] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), -}; \ No newline at end of file +}; diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_simon.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_simon.c index 8058c2e109..fa948077ce 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_simon.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_simon.c @@ -1,11 +1,14 @@ #include "keymap.h" +#define KC_MO1 MO(1) +#define KC_MO2 MO(2) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( /* Jack */ ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, TAB, A, S, D, F, G, H, J, K, L, DOT, ENT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SCLN, DEL, - LCTL, ENT, LALT, CAPS, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), + LCTL, ENT, LALT, CAPS, MO2, SPC, MO1, LEFT, DOWN, UP, RGHT), [1] = KEYMAP( /* Jack RAISE */ TRNS, F1, F2, F3, F4, NO, FN11, FN9, FN12, NO, FN14, TRNS, TRNS, F5, F6, F7, F8, FN16, SLSH, MINS, EQL, LBRC, FN8, TRNS, @@ -18,9 +21,6 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - [8] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), [9] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_tim.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_tim.c index 64d0b74039..5be56e7256 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_tim.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_tim.c @@ -1,26 +1,26 @@ #include "keymap.h" +#define KC_MO2 MO(2) +#define KC_MO3 MO(3) + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, TAB, A, S, D, F, G, H, J, K, L, SCLN, ENT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - LCTL, LALT, DEL, LGUI, FN2, SPC, FN1, F2, F5, F9, F12), + LCTL, LALT, DEL, LGUI, MO3, SPC, MO2, F2, F5, F9, F12), [2] = KEYMAP( /* RAISE */ TRNS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, GRV, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, QUOT, FN29, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MO2, TRNS, TRNS, TRNS, TRNS), [3] = KEYMAP( /* LOWER */ TRNS, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, FN22, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, QUOT, FN29, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TRNS, MO3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_wilba.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_wilba.c index 22326ebe45..054297b636 100644 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_wilba.c +++ b/keyboards/planck/old_keymap_files/common_keymaps/keymap_wilba.c @@ -1,31 +1,34 @@ #include "keymap.h" +#define KC_MO2 MO(2) +#define KC_MO3 MO(3) +#define KC_BLTG BL_TOGG +#define KC_BLIN BL_INC +#define KC_BLDE BL_DEC + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( /* Wilba */ - FN27, FN28, FN29, E, R, T, Y, U, I, O, P, BSPC, + BLTG, BLIN, BLDE, E, R, T, Y, U, I, O, P, BSPC, TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, - LCTL, LGUI, LALT, RSFT, FN1, SPC, FN2, LEFT, DOWN, UP, RGHT), + LCTL, LGUI, LALT, RSFT, MO2, SPC, MO3, LEFT, DOWN, UP, RGHT), [1] = KEYMAP( /* Wilba Alternate */ ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, - LCTL, LGUI, LALT, RSFT, FN1, SPC, FN2, LEFT, DOWN, UP, RGHT), + LCTL, LGUI, LALT, RSFT, MO2, SPC, MO3, LEFT, DOWN, UP, RGHT), [2] = KEYMAP( /* Wilba LOWER */ TRNS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, TRNS, TRNS, F11, F12, LBRC, RBRC, FN20, EQL, FN23, FN24, MINS, FN21, TRNS, TRNS, BSLS, GRV, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, FN1, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), + TRNS, TRNS, TRNS, TRNS, MO2, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), [3] = KEYMAP( /* Wilba RAISE */ TRNS, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, TRNS, TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, TRNS, FN25, FN22, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MO3, TRNS, TRNS, TRNS, TRNS), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // LOWER - [2] = ACTION_LAYER_MOMENTARY(3), // RAISE - [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), @@ -47,10 +50,5 @@ const uint16_t PROGMEM fn_actions[] = { [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // } [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // | - [26] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE), - - [27] = ACTION_BACKLIGHT_TOGGLE(), - [28] = ACTION_BACKLIGHT_INCREASE(), - [29] = ACTION_BACKLIGHT_DECREASE() - + [26] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE) }; diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index d9e3f00f2b..5a65d5e5f3 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -14,8 +14,8 @@ __attribute__ ((weak)) void matrix_init_kb(void) { // Turn status LED on #ifdef __AVR__ - DDRE |= (1<<6); - PORTE |= (1<<6); + setPinOutput(E6); + writePinHigh(E6); #endif matrix_init_user(); @@ -26,4 +26,4 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_planck_grid( 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 -); \ No newline at end of file +); diff --git a/keyboards/planck/rev1/rev1.h b/keyboards/planck/rev1/rev1.h index f81b36b316..3d1d1d21c5 100644 --- a/keyboards/planck/rev1/rev1.h +++ b/keyboards/planck/rev1/rev1.h @@ -43,7 +43,7 @@ LAYOUT_ortho_4x12( \ ) #define KEYMAP LAYOUT_ortho_4x12 -#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 #define LAYOUT_kc_ortho_4x12 LAYOUT_kc #define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk index be03e4515e..3c85e172be 100644 --- a/keyboards/planck/rev1/rules.mk +++ b/keyboards/planck/rev1/rules.mk @@ -1,8 +1,15 @@ # MCU name MCU = atmega32u4 -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/planck/rev2/rev2.h b/keyboards/planck/rev2/rev2.h index f81b36b316..3d1d1d21c5 100644 --- a/keyboards/planck/rev2/rev2.h +++ b/keyboards/planck/rev2/rev2.h @@ -43,7 +43,7 @@ LAYOUT_ortho_4x12( \ ) #define KEYMAP LAYOUT_ortho_4x12 -#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 #define LAYOUT_kc_ortho_4x12 LAYOUT_kc #define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk index be03e4515e..3c85e172be 100644 --- a/keyboards/planck/rev2/rules.mk +++ b/keyboards/planck/rev2/rules.mk @@ -1,8 +1,15 @@ # MCU name MCU = atmega32u4 -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/planck/rev3/rev3.h b/keyboards/planck/rev3/rev3.h index f81b36b316..3d1d1d21c5 100644 --- a/keyboards/planck/rev3/rev3.h +++ b/keyboards/planck/rev3/rev3.h @@ -43,7 +43,7 @@ LAYOUT_ortho_4x12( \ ) #define KEYMAP LAYOUT_ortho_4x12 -#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 #define LAYOUT_kc_ortho_4x12 LAYOUT_kc #define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index 3de40a66c5..3c85e172be 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/planck/rev4/rev4.h b/keyboards/planck/rev4/rev4.h index f81b36b316..3d1d1d21c5 100644 --- a/keyboards/planck/rev4/rev4.h +++ b/keyboards/planck/rev4/rev4.h @@ -43,7 +43,7 @@ LAYOUT_ortho_4x12( \ ) #define KEYMAP LAYOUT_ortho_4x12 -#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 #define LAYOUT_kc_ortho_4x12 LAYOUT_kc #define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index 390f582494..299ee4aadc 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/planck/rev5/rev5.h b/keyboards/planck/rev5/rev5.h index f81b36b316..3d1d1d21c5 100644 --- a/keyboards/planck/rev5/rev5.h +++ b/keyboards/planck/rev5/rev5.h @@ -43,7 +43,7 @@ LAYOUT_ortho_4x12( \ ) #define KEYMAP LAYOUT_ortho_4x12 -#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 #define LAYOUT_kc_ortho_4x12 LAYOUT_kc #define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk index ca63b39acf..3c95f132c9 100644 --- a/keyboards/planck/rev5/rules.mk +++ b/keyboards/planck/rev5/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 841a621904..3cea2e721e 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -37,16 +37,20 @@ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -/* Note: These are not used for arm boards. They're here purely as documentation. - * #define MATRIX_ROW_PINS { PB0, PB1, PB2, PA15, PA10 } - * #define MATRIX_COL_PINS { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } - * #define UNUSED_PINS - */ +/* Note: These are not used for arm boards. They're here purely as documentation. */ +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS + +#define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2 } +#define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } + +#define UNUSED_PINS -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } +#define DIP_SWITCH_PINS { B14, A15, A0, B9 } + #define MUSIC_MAP #undef AUDIO_VOICES #undef C6_AUDIO @@ -121,14 +125,17 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WS2812_LED_N 2 -#define RGBLED_NUM WS2812_LED_N -#define WS2812_TIM_N 2 -#define WS2812_TIM_CH 2 -#define PORT_WS2812 GPIOA -#define PIN_WS2812 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) +// #define WS2812_LED_N 2 +// #define RGBLED_NUM WS2812_LED_N +// #define WS2812_TIM_N 2 +// #define WS2812_TIM_CH 2 +// #define PORT_WS2812 GPIOA +// #define PIN_WS2812 1 +// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP +#define RGB_DI_PIN A1 +#define RGBLED_NUM 9 +#define RGBLIGHT_ANIMATIONS #endif diff --git a/keyboards/planck/rev6/matrix.c b/keyboards/planck/rev6/matrix.c deleted file mode 100644 index 2df588cefc..0000000000 --- a/keyboards/planck/rev6/matrix.c +++ /dev/null @@ -1,176 +0,0 @@ -#include -#include -#include -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "printf.h" -#include "backlight.h" -#include "matrix.h" -#include "action.h" -#include "keycode.h" -#include - -/* - * col: { B11, B10, B2, B1, A7, B0 } - * row: { A10, A9, A8, B15, C13, C14, C15, A2 } - */ -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_COLS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - -static bool dip_switch[4] = {0, 0, 0, 0}; - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -void matrix_init(void) { - printf("matrix init\n"); - //debug_matrix = true; - - // dip switch setup - palSetPadMode(GPIOB, 14, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOB, 9, PAL_MODE_INPUT_PULLUP); - - // actual matrix setup - palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); - - palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOB, 15, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN); - - - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); - - - matrix_init_quantum(); -} - -__attribute__ ((weak)) -void dip_update(uint8_t index, bool active) { } - -bool last_dip_switch[4] = {0}; - -uint8_t matrix_scan(void) { - // dip switch - dip_switch[0] = !palReadPad(GPIOB, 14); - dip_switch[1] = !palReadPad(GPIOA, 15); - dip_switch[2] = !palReadPad(GPIOA, 10); - dip_switch[3] = !palReadPad(GPIOB, 9); - for (uint8_t i = 0; i < 4; i++) { - if (last_dip_switch[i] ^ dip_switch[i]) - dip_update(i, dip_switch[i]); - } - memcpy(last_dip_switch, dip_switch, sizeof(&dip_switch)); - - // actual matrix - for (int col = 0; col < MATRIX_COLS; col++) { - matrix_row_t data = 0; - - // strobe col { B11, B10, B2, B1, A7, B0 } - switch (col) { - case 0: palSetPad(GPIOB, 11); break; - case 1: palSetPad(GPIOB, 10); break; - case 2: palSetPad(GPIOB, 2); break; - case 3: palSetPad(GPIOB, 1); break; - case 4: palSetPad(GPIOA, 7); break; - case 5: palSetPad(GPIOB, 0); break; - } - - // need wait to settle pin state - wait_us(20); - - // read row data { A10, A9, A8, B15, C13, C14, C15, A2 } - data = ( - (palReadPad(GPIOA, 10) << 0 ) | - (palReadPad(GPIOA, 9) << 1 ) | - (palReadPad(GPIOA, 8) << 2 ) | - (palReadPad(GPIOB, 15) << 3 ) | - (palReadPad(GPIOC, 13) << 4 ) | - (palReadPad(GPIOC, 14) << 5 ) | - (palReadPad(GPIOC, 15) << 6 ) | - (palReadPad(GPIOA, 2) << 7 ) - ); - - // unstrobe col { B11, B10, B2, B1, A7, B0 } - switch (col) { - case 0: palClearPad(GPIOB, 11); break; - case 1: palClearPad(GPIOB, 10); break; - case 2: palClearPad(GPIOB, 2); break; - case 3: palClearPad(GPIOB, 1); break; - case 4: palClearPad(GPIOA, 7); break; - case 5: palClearPad(GPIOB, 0); break; - } - - if (matrix_debouncing[col] != data) { - matrix_debouncing[col] = data; - debouncing = true; - debouncing_time = timer_read(); - } - } - - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix[row] = 0; - for (int col = 0; col < MATRIX_COLS; col++) { - matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); - } - } - debouncing = false; - } - - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & (1<. + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + LOWER = SAFE_RANGE, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty (base layer) + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Esc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Bksp | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | F12 | GUI | Alt |Lower | Space |Raise |AltGr | [ | ] |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, + KC_BSPC, 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_BSLS, + KC_LCTL, KC_F12, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, KC_LBRC, KC_RBRC, KC_ENT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | + | = | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LGUI | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | 4 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | _ | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, 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_MINS, KC_PLUS, KC_EQL, _______, _______, + KC_LGUI, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_4, _______, + _______, _______, _______, _______, _______, KC_UNDS, KC_UNDS, _______, _______, _______, _______, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | Up | Down | Left |Right | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | Home | End | | | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | _ | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT,_______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, KC_UNDS, KC_UNDS, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Sleep| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| Debug| | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap| Vol+ | Vol- | Prev | Next | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Play | | | | | PrScr| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLEP, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, _______, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, KC_PSCR +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/cranium/readme.md b/keyboards/preonic/keymaps/cranium/readme.md new file mode 100644 index 0000000000..0f1d99598c --- /dev/null +++ b/keyboards/preonic/keymaps/cranium/readme.md @@ -0,0 +1,72 @@ +# Cranium's Preonic layout + +This layout is based on the Preonic default with some changes I find interesting to share. + +## Default layer +``` + ,-----------------------------------------------------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | + |------|------|------|------|------|------|------|------|------|------|------|------| + | Tab | Q | W | E | R | T | Y | U | I | O | P | Esc | + |------|------|------|------|------|-------------|------|------|------|------|------| + | Bksp | A | S | D | F | G | H | J | K | L | ; | " | + |------|------|------|------|------|------|------|------|------|------|------|------| + | Shift| Z | X | C | V | B | N | M | , | . | / | | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | Ctrl | F12 | GUI | Alt |Lower | Space |Raise |AltGr | [ | ] |Enter | + `-----------------------------------------------------------------------------------' +``` +- As a Colemak user, Capslock was rebound to Backspace. +- Escape was moved to the top-right of the keyboard +- Enter was moved to the bottom-right of the keyboard. It's now easy to hit and can even be activated with the palm. +- An F12 was put next to the left CTRL => it's the shortcut I use to toggle the Guake terminal. +- I don't really use the key below my Escape (top-right, 2nd row), so I'll consider any ideas for the moment. + + +## Lower +``` + ,-----------------------------------------------------------------------------------. + | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + |------|------|------|------|------|-------------|------|------|------|------|------| + | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + |------|------|------|------|------|-------------|------|------|------|------|------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | + | = | | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | LGUI | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | 4 | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | | | | | | _ | | | | | | + `-----------------------------------------------------------------------------------' +``` +- Not much changes here + +## Raise +``` + ,-----------------------------------------------------------------------------------. + | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + |------|------|------|------|------|-------------|------|------|------|------|------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | Up | Down | Left |Right | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | | F7 | F8 | F9 | F10 | F11 | F12 | Home | End | | | Shift| + |------|------|------|------|------|------|------|------|------|------|------|------| + | | | | | | _ | | | | | | + `-----------------------------------------------------------------------------------' +``` +- Perhaps one of the most interesting change: the arrow keys were moved to the right-hand home row, activated with the Raise layer. It means I can use the arrow keys without moving my hand from the home row, by activating the Raise layer with my thumb. It took a while to adapt but it was totally worth it. To note, I also put Home/End on the same layer but one row below, with I also find really useful. + +## Adjust +``` + ,-----------------------------------------------------------------------------------. + | | | | | | | | | | | | Sleep| + |------|------|------|------|------|------|------|------|------|------|------|------| + | | Reset| Debug| | | | | | | | | | + |------|------|------|------|------|-------------|------|------|------|------|------| + | | | |Aud on|AudOff|AGnorm|AGswap| Vol+ | Vol- | Prev | Next | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | | | | | | Play | | | | | PrScr| + `-----------------------------------------------------------------------------------' +``` +- The "arrow" keys act as Vol+/Vol-/Previous/Next on the Adjust layer (which is quite a natural mapping for these media keys). diff --git a/keyboards/preonic/keymaps/cranium/rules.mk b/keyboards/preonic/keymaps/cranium/rules.mk new file mode 100644 index 0000000000..dcf16bef39 --- /dev/null +++ b/keyboards/preonic/keymaps/cranium/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index d37882eabc..d8bb2d5f75 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -213,12 +213,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { backlight_step(); #endif #ifdef __AVR__ - PORTE &= ~(1<<6); + writePinLow(E6); #endif } else { unregister_code(KC_RSFT); #ifdef __AVR__ - PORTE |= (1<<6); + writePinHigh(E6); #endif } return false; @@ -259,41 +259,44 @@ void encoder_update_user(uint8_t index, bool clockwise) { } } -void dip_update(uint8_t index, bool active) { - switch (index) { - case 0: - if (active) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - break; - case 1: - if (active) { - muse_mode = true; - } else { - muse_mode = false; - #ifdef AUDIO_ENABLE - stop_all_notes(); - #endif - } - } +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } } + void matrix_scan_user(void) { - #ifdef AUDIO_ENABLE +#ifdef AUDIO_ENABLE if (muse_mode) { - if (muse_counter == 0) { - uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; - if (muse_note != last_muse_note) { - stop_note(compute_freq_for_midi_note(last_muse_note)); - play_note(compute_freq_for_midi_note(muse_note), 0xF); - last_muse_note = muse_note; + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; } - } - muse_counter = (muse_counter + 1) % muse_tempo; } - #endif +#endif } bool music_mask_user(uint16_t keycode) { diff --git a/keyboards/preonic/keymaps/egstad/config.h b/keyboards/preonic/keymaps/egstad/config.h new file mode 100644 index 0000000000..e66743f458 --- /dev/null +++ b/keyboards/preonic/keymaps/egstad/config.h @@ -0,0 +1,91 @@ +#pragma once +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + + + + + +/* Leader Key + ========================================================================== */ + +// Activates the leader key +// #define LEADER_PER_KEY_TIMING +// resets the timeout after each key is tapped +// #define LEADER_TIMEOUT 240 + + + + + + +/* Autoshifting + ========================================================================== */ + +// This controls how long you have to hold a key before you get the shifted state. +#define AUTO_SHIFT_TIMEOUT 150 + +// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /? +// #define NO_AUTO_SHIFT_SPECIAL + +// Do not Auto Shift numeric keys, zero through nine. +#define NO_AUTO_SHIFT_NUMERIC + +// Do not Auto Shift alpha characters, which include A through Z. +// #define NO_AUTO_SHIFT_ALPHA + +// Lower the Auto Shift timeout variable (down) +// KC_ASDN + +// Raise the Auto Shift timeout variable (up) +// KC_ASUP + +// Report your current Auto Shift timeout value +// KC_ASRP + +// Turns on the Auto Shift Function +// KC_ASON + +// Turns off the Auto Shift Function +// KC_ASOFF + +// Toggles the state of the Auto Shift feature +// KC_ASTG + + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(COIN_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + diff --git a/keyboards/preonic/keymaps/egstad/keymap.c b/keyboards/preonic/keymaps/egstad/keymap.c new file mode 100644 index 0000000000..07eda66144 --- /dev/null +++ b/keyboards/preonic/keymaps/egstad/keymap.c @@ -0,0 +1,229 @@ +#include QMK_KEYBOARD_H + + + + + + +/* LAYER NAMES + ========================================================================== + 1. To create a layer, define a (readable) name and set layer value + 2. Under "Layer definitions" section, define keymaps + ========================================================================== */ + +enum layer_names { + L_QWERTY, + L_LOWER, + L_RAISE, + L_ADJUST, +}; + + + + +/* TAP DANCE + ========================================================================== + 1. Define TD names here + 2. Register action in tap_dance_actions[] + ========================================================================== */ + +enum { + TD_BRC = 0, + TD_MIN, + TD_GV_ESC, + TD_BS +}; + + + + +/* CUSTOM KEYMAPS + ========================================================================== */ + +// Tap dances +#define TD_ESCP TD(TD_GV_ESC) // Tap for grave, twice for escape +#define TD_MINS TD(TD_MIN) // Tap for minus, twice for equal +#define TD_BRAC TD(TD_BRC) // Tap for open brace, twice for close + +// Layers +#define LT2_TAB LT(L_RAISE, KC_TAB) // Tap for tab, hold for RAISE +#define LT2_ENT LT(L_RAISE, KC_ENT) // Tap for enter, hold for RAISE +#define LT1_BSP LT(L_LOWER, KC_BSPACE) // Tap for backspace, hold for LOWER +#define LT1_SPC LT(L_LOWER, KC_SPC) // Tap for space, hold for LOWER + +// Modifiers +#define LG_ZMIN LGUI(KC_EQUAL) // Command + plus (zoom in) +#define LG_ZMOT LGUI(KC_MINUS) // Command + minus (zoom out) +#define MT_SHFT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for shift +#define MT_HILF S(A(KC_LEFT)) // Press for shift + alt + left +#define MT_HIRT S(A(KC_RGHT)) // Press for shift + alt + right +#define MT_UNTB S(KC_TAB) // Press for shift + tab + + + + + + +/* Layer definitions + ========================================================================== */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------------------------------------------------------------. + * | ` ESC | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | -_ =+ | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | TB/RS | Q | W | E | R | T | Y | U | I | O | P | [{ }] | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | BS/LW | A | S | D | F | G | H | J | K | L | ; | ' | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | SFT | Z | X | C | V | B | N | M | , | . | / | SF/RN | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | LEADR | | CTL | ALT | CMD | BSP | SP/LW | RN/RS | ← | ↑ | ↓ | → | + * `----------------------------------------------------------------------------------------------- + */ + +[L_QWERTY] = LAYOUT_preonic_grid( +/*01 02 03 04 05 06 07 08 09 10 11 12 */ + TD_ESCP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, TD_MINS, \ + LT2_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_BRAC, \ + LT1_BSP, 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, MT_SHFT, \ + LG_ZMOT, LG_ZMIN, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPACE, LT1_SPC, LT2_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + + + + + + + /* LOWER + * ,-----------------------------------------------------------------------------------------------. + * | ASHFT | | | | | | | | | | | BSP | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | UNTAB | | | | | | | - | + | * | / | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | S+A+← | S+A+→ | | | | | ← | ↑ | ↓ | → | RTN | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | [ { | ] } | ( | ) | \ | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | >|| | | << | Vol-U | Vol-D | >> | + * `-----------------------------------------------------------------------------------------------' + */ + +[L_LOWER] = LAYOUT_preonic_grid( +/*01 02 03 04 05 06 07 08 09 10 11 12 */ + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPACE, \ + MT_UNTB, _______, _______, _______, _______, _______, _______, KC_MINUS, KC_PLUS, KC_PAST, KC_PSLS, _______, \ + _______, MT_HILF, MT_HIRT, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_ENTER, \ + _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_BSLASH, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD \ +), + + + + + + +/* RAISE + * ,-----------------------------------------------------------------------------------------------. + * | ASHFT | BTSDN | BTSUP | VUP | VDN | | | / | * | ( | ) | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | 7 | 8 | 9 | + | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | 4 | 5 | 6 | - | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | CAP | | | | | | | 1 | 2 | 3 | / | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | 0 | . | , | | + * `-----------------------------------------------------------------------------------------------' + */ +[L_RAISE] = LAYOUT_preonic_grid( +/*01 02 03 04 05 06 07 08 09 10 11 12 */ + KC_ASTG, KC_F1, KC_F2, KC_VOLU, KC_VOLD, _______, _______, KC_PSLS, KC_PAST, KC_LPRN, KC_RPRN, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PLUS, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_MINUS, _______, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_COMM, _______ \ +), + + + + + + + +/* Adjust (Raise + Lower together) + * ,-----------------------------------------------------------------------------------------------. + * | F12 | FN2 | FN3 | FN4 | FN5 | FN6 | FN7 | FN8 | FN9 | F10 | F11 | FN1 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | TOG SF| | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | DESGN | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------' + */ + +[L_ADJUST] = LAYOUT_preonic_grid( +/*01 02 03 04 05 06 07 08 09 10 11 12 */ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +// this function +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, L_LOWER, L_RAISE, L_ADJUST); +} + + + + + + +/* BLANK + * ,-----------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------' + */ +/* +[L_BLANK] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), +*/ + + + + + + +/* Tap Dance Definitions + ========================================================================== */ + +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for Left Brace, twice for Right Brace + [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + //Tap once for Minus, twice for Equal + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_MINUS, KC_EQUAL), + // Tap once for Grave, tap twice for Escape + [TD_GV_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRAVE, KC_ESCAPE) +}; diff --git a/keyboards/preonic/keymaps/egstad/readme.md b/keyboards/preonic/keymaps/egstad/readme.md new file mode 100644 index 0000000000..2c8e095a4e --- /dev/null +++ b/keyboards/preonic/keymaps/egstad/readme.md @@ -0,0 +1,11 @@ +# Egstad's Layout + +## Build + +- Cd into this directory, run `npm start` +- Cd into root with `npm run qmk`, locate bin file "preonic_rev3_egstad.bin" +- Drop that bin into QMK Toolbox and flash Keeb + +## Learnings + + 1. Combos — Don't fuck with 'em. They made my keys feel sticky and increased typos. Would be great on macropad or something tho! diff --git a/keyboards/preonic/keymaps/egstad/rules.mk b/keyboards/preonic/keymaps/egstad/rules.mk new file mode 100644 index 0000000000..5348bfdf94 --- /dev/null +++ b/keyboards/preonic/keymaps/egstad/rules.mk @@ -0,0 +1,3 @@ +SRC += muse.c +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = yes diff --git a/keyboards/preonic/keymaps/kjwon15/config.h b/keyboards/preonic/keymaps/kjwon15/config.h new file mode 100644 index 0000000000..af7b8bc28a --- /dev/null +++ b/keyboards/preonic/keymaps/kjwon15/config.h @@ -0,0 +1,67 @@ +#pragma once + + +#define TAPPING_TERM 200 + +/* #define MK_3_SPEED */ +#define MK_MOMENTARY_ACCEL +#define MOUSEKEY_MAX_SPEED 8 + +// Must raise 5 halftones +/* #define CUSTOM_STARTUP \ */ +/* Q__NOTE(_FS7), \ */ +/* W__NOTE(_B7), */ + +#undef MUSICAL_NOTE +#define MUSICAL_NOTE(note, duration) {((NOTE##note) * 1.3348398541700344), duration} + +#define CUSTOM_STARTUP \ + QD_NOTE(_A6), \ + QD_NOTE(_C7), \ + QD_NOTE(_A7), \ + QD_NOTE(_F7), \ + QD_NOTE(_G7), \ + HD_NOTE(_C8), + +#undef MUSICAL_NOTE +#define MUSICAL_NOTE(note, duration) {(NOTE##note), duration} + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(CUSTOM_STARTUP) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +#define AUDIO_CLICKY +#define AUDIO_CLICKY_FREQ_DEFAULT 440.f + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + diff --git a/keyboards/preonic/keymaps/kjwon15/keymap.c b/keyboards/preonic/keymaps/kjwon15/keymap.c new file mode 100644 index 0000000000..bca3575fdd --- /dev/null +++ b/keyboards/preonic/keymaps/kjwon15/keymap.c @@ -0,0 +1,376 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _PURE, + _BLANK, + _LOWER, + _RAISE, + _ADJUST, + + _MOUSE +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + PURE, + BLANK, + LOWER, + RAISE, + KC_CESC, + SPC_MOU +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | C/ESC| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | SF/EN| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Enter| Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + KC_ESC, 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_LBRC, \ + KC_CESC, 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_SFTENT, \ + KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPC_MOU, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Pure + * ,-----------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Cntl | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Enter| Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_PURE] = LAYOUT_preonic_grid( + KC_ESC, 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_LBRC, \ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Blank + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | |Raise | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_BLANK] = LAYOUT_preonic_grid( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, LOWER, KC_NO, KC_NO, RAISE, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ESC | ! | @ | # | $ | % | ^ | & | * | - | = | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | HOME | END | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Ralt | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL , 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_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_RALT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |PrtScr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | MUTE | VOL- | VOL+ | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | PLAY | PREV | NEXT | STOP | F11 | F12 |ISO # |ISO / | PGDN | PGUP | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Ralt | Vol- | Vol+ | Mute | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, \ + 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_MUTE, KC_VOLD, KC_VOLU, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_RALT, KC_VOLD, KC_VOLU, KC_MUTE \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LOCK | Reset|Clicky|AudMod|Qwerty|Colemk|Dvorak| WHL_D| MS_U | WHL_U| | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Aud on|AudOff|Rclick|Lclick|AGnorm|AGswap| MS_L | MS_D | MS_R | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + 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_LOCK, RESET, CK_TOGG, MU_MOD, QWERTY, PURE, BLANK, KC_WH_D, KC_MS_U, KC_WH_U, _______, KC_DEL, \ + _______, AU_ON, AU_OFF, KC_BTN2, KC_BTN1, AG_NORM, AG_SWAP, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_ACL0, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, KC_ACL1, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL2 \ +), + +/* Mouse + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | WHL_U|Mclick| | | | LCTL | MS_U | WHL_U| | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | WHL_D|Rclick|Lclick| | | MS_L | MS_D | MS_R | | ACL0 | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | WHL_D| WHL_L| WHL_R| | ACL1 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | ACL2 | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = LAYOUT_preonic_grid( + 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_WH_U, KC_BTN3, _______, _______, _______, KC_LCTL, KC_MS_U, KC_WH_U, _______, KC_DEL, \ + _______, _______, KC_WH_D, KC_BTN2, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_ACL0, \ + _______, _______, _______, _______, _______, _______, _______, KC_WH_D, KC_WH_L, KC_WH_R, _______, KC_ACL1, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL2 \ + ) + + +}; + +static bool cntl_interrupted = 0; +static uint16_t cntl_timer = 0; + +static bool mouse_interrupted = 0; +static uint16_t mouse_timer = 0; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case PURE: + if (record->event.pressed) { + set_single_persistent_default_layer(_PURE); + } + return false; + break; + case BLANK: + if (record->event.pressed) { + set_single_persistent_default_layer(_BLANK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + + // BACKLIT is not used. If you want to use, uncomment below + /* + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + PORTE |= (1<<6); + #endif + } + return false; + break; + */ + + case KC_CESC: + if (record->event.pressed) { + cntl_interrupted = false; + cntl_timer = timer_read(); + register_mods(MOD_BIT(KC_LCTL)); + } else if (!cntl_interrupted && timer_elapsed(cntl_timer) < TAPPING_TERM) { + unregister_mods(MOD_BIT(KC_LCTL)); + tap_code(KC_ESC); + } else { + unregister_mods(MOD_BIT(KC_LCTL)); + } + return false; + break; + + case SPC_MOU: + if (record->event.pressed) { + mouse_interrupted = false; + mouse_timer = timer_read(); + + cntl_interrupted = true; + layer_on(_MOUSE); + } else if (!mouse_interrupted && timer_elapsed(mouse_timer) < TAPPING_TERM) { + layer_off(_MOUSE); + tap_code(KC_SPC); + } else { + layer_off(_MOUSE); + } + return false; + break; + + default: + cntl_interrupted = true; + mouse_interrupted = true; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/kjwon15/readme.md b/keyboards/preonic/keymaps/kjwon15/readme.md new file mode 100644 index 0000000000..5d03a1a0b8 --- /dev/null +++ b/keyboards/preonic/keymaps/kjwon15/readme.md @@ -0,0 +1,27 @@ +# Kjwon15's Preonic layout + + +## It provides almost full functionality for linux + +It has screen capture key which is also used on sysq + + +## Mouse layer + +Press left spacebar to activate mouse mode. +Right hand to move cursor/scroll, Left hand to click + + +## Dual function keys + +Right shift is also Enter key. If you press and hold, that key act as shift. But if you tap that key, It is enter key. +If you want to press and hold enter key, Use left-bottom key. That is pure enter. + +## Blank layout + +If you want to lock your keyboard, switch to this layout. It also useful when you want to clean your keyboard without disconnecting USB. + + +## Pure mode + +Dual function keys are so annoying when you playing game. Then use this layout diff --git a/keyboards/preonic/keymaps/kjwon15/rules.mk b/keyboards/preonic/keymaps/kjwon15/rules.mk new file mode 100644 index 0000000000..5ffe1ff328 --- /dev/null +++ b/keyboards/preonic/keymaps/kjwon15/rules.mk @@ -0,0 +1,2 @@ +SRC += muse.c +KEY_LOCK_ENABLE = yes diff --git a/keyboards/preonic/keymaps/laurentlaurent/config.h b/keyboards/preonic/keymaps/laurentlaurent/config.h new file mode 100644 index 0000000000..36944e9c68 --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/config.h @@ -0,0 +1,41 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Fix Home Row mod keys +#define IGNORE_MOD_TAP_INTERRUPT +//#define RETRO_TAPPING \ No newline at end of file diff --git a/keyboards/preonic/keymaps/laurentlaurent/keymap.c b/keyboards/preonic/keymaps/laurentlaurent/keymap.c new file mode 100644 index 0000000000..c113bcaf64 --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/keymap.c @@ -0,0 +1,603 @@ +/* Laurent's Preonic Layout + */ + +// For IntelliSense + #ifdef __INTELLISENSE__ + #include "../../rev3/config.h" + #include "../../rev3/rev3.h" + enum dynamic_macro_keycodes { + DYN_REC_START1 = DYNAMIC_MACRO_RANGE, + DYN_REC_START2, + DYN_REC_STOP, + DYN_MACRO_PLAY1, + DYN_MACRO_PLAY2, + }; + #define QMK_KEYBOARD_H "rev3.h" + #endif + + #include QMK_KEYBOARD_H + #include "muse.h" + +// ==== These keys allows usage of the home row as modifiers (when held) ==== +// Very bad for gaming, switch to gaming layout + + // For _QWERTY_MAC + // S and L into Ctrl + #define LCT_S LCTL_T(KC_S) + #define LCT_L LCTL_T(KC_L) + // F, J and Z into CMD + #define LWN_F LGUI_T(KC_F) + #define LWN_Z LGUI_T(KC_Z) + #define LWN_J LGUI_T(KC_J) + + // For _QWERTY_WIN + // S and L into WIN + #define LWN_S LGUI_T(KC_S) + #define LWN_L LGUI_T(KC_L) + // F, J and Z into Ctrl + #define LCT_F LCTL_T(KC_F) + #define LCT_Z LCTL_T(KC_Z) + #define LCT_J LCTL_T(KC_J) + +// ============================================================================ + +// ==== For All ==== + + // Layout helper + #define __LYB__ KC_TRANSPARENT + + // Mod Tap + // Changing K and D into Alt + #define LAT_D LALT_T(KC_D) + #define LAT_K LALT_T(KC_K) + // Equal into Ctrl+Alt+Cmd + #define LCAGEQ LCAG_T(KC_EQUAL) + // Esc into Meh + #define LMHESC MEH_T(KC_ESC) + // Space into Shift + #define LSHFSP SFT_T(KC_SPACE) + // Backspace into Shift + #define LSHFBK SFT_T(KC_BSPACE) + + // Switching layers + #define LTO_BS TO(_QWERTY_MAC) // Go to Base Layer + // Go to _NAV + #define LLY_SC LT(_NAV, KC_SCLN) // From ; + #define LLY_A LT(_NAV, KC_A) // From A + // Go to _PUNC + #define LLY_TB LT(_PUNC, KC_TAB) // From Tab + #define LLY_BK LT(_PUNC, KC_BSPACE) // From Backspace + #define LLY_BS LT(_PUNC, KC_BSLASH) // From Backslash + // Others + #define LLY_GR LT(_ONEHD, KC_GRV) // Go to _ONEHD from ` + #define LLY_ET LT(_EXTRA, KC_ENT) // Go to _EXTRA from Enter + #define LLSWIT MO(_LYSWT) // Layer Switcher + #define LLY_DL LT(_NUM, KC_DEL) // Go to _NUM from Delete + + // Shortcuts + // Mac Windows Resizing + #define LMW_L3 LCA(KC_E) // Resize to 2/3 and move to the left + #define LMW_FS LCA(KC_ENTER) // Resize to full screen + #define LMW_R3 LCA(KC_T) // Resize to 2/3 and move to the right + #define LMW_L1 LCA(KC_D) // Resize to 1/3 and move to the left + #define LMW_M1 LCA(KC_F) // Resize to 1/3 and move to middle + #define LMW_R1 LCA(KC_G) // Resize to 1/3 and move to right + #define LMW_TL LCA(KC_U) // Fit on Top Left corner + #define LMW_TR LCA(KC_I) // Fit on Top Left corner + #define LMW_BL LCA(KC_J) // Fit on Top Left corner + #define LMW_BR LCA(KC_K) // Fit on Top Left corner + #define LMW_LT LCA(KC_LEFT) // Resize to 1/2 horizontally and move to the left + #define LMW_BT LCA(KC_DOWN) // Resize to 1/2 vertically and move to the bottom + #define LMW_TP LCA(KC_UP) // Resize to 1/2 vertically and move to the top + #define LMW_RT LCA(KC_RIGHT) // Resize to 1/2 horizontally and move to the right + +// ==== Audio ==== + #ifdef AUDIO_ENABLE + #include "audio.h" + float tone_macro1_record[][2] = SONG(CAPS_LOCK_ON_SOUND); + float tone_macro2_record[][2] = SONG(SCROLL_LOCK_ON_SOUND); + float tone_macro_record_stop[][2] = SONG(SCROLL_LOCK_OFF_SOUND); + #endif + +enum preonic_layers { + _QWERTY_MAC, + _QWERTY_WIN, + _GAMING, + _MUSIC, + _LOWER, + _RAISE, + _ADJUST, + _PUNC, + _EXTRA, + _NUM, + _NAV, + _ONEHD, + _LYSWT }; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + QWWIN, + // COLEMAK, + // DVORAK, + LOWER, + RAISE, + BACKLIT, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty for Mac + * ,-----------------------------------------------------------------------------------. + * | CAG= | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LY|TB| Q | W | E | R | T | Y | U | I | O | P | LY|\ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Hyper| LY|A | CT/S | AT/D | WN/F | G | H | WN/J | AT/K | CT/L | LY|; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| WN/Z | X | C | V | B | N | M | , | . | / | Sh/Bk| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LY|` |ESCMEH| LY|DL|LW|Bkp|LY|Bkp| Shift/Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | + * `-----------------------------------------------------------------------------------' + * LY|` -> To _NUM + * LY|; -> To _NAV + * LY|A -> To _NAV + * LY|TB -> To _PUNC + * LY|\ -> To _PUNC + * LY|Bkp -> To _PUNC + * LY|ENT -> To_EXTRA + */ + [_QWERTY_MAC] = LAYOUT_preonic_grid( \ + LCAGEQ, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + LLY_TB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LLY_BS, + KC_HYPR, LLY_A, LCT_S, LAT_D, LWN_F, KC_G, KC_H, LWN_J, LAT_K, LCT_L, LLY_SC, KC_QUOT, + KC_LSFT, LWN_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LSHFBK, + LLY_GR, LMHESC, LLY_DL, LOWER, LLY_BK, LSHFSP, LSHFSP, LLY_ET, RAISE, KC_LBRC, KC_RBRC, LLSWIT + ), + + /* Qwerty for Windows + * ,-----------------------------------------------------------------------------------. + * | CAG= | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LY|TB| Q | W | E | R | T | Y | U | I | O | P | LY|\ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Hyper| LY|A | WN/S | AT/D | CT/F | G | H | CT/J | AT/K | WN/L | LY/; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| CT/Z | X | C | V | B | N | M | , | . | / | Sh/Bk| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LY|` |MH/ESC| LY|DL|LW|Bkp|LY|Bk | Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY_WIN] = LAYOUT_preonic_grid( \ + LCAGEQ, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + LLY_TB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LLY_BS, + KC_HYPR, LLY_A, LWN_S, LAT_D, LCT_F, KC_G, KC_H, LCT_J, LAT_K, LWN_L, LLY_SC, KC_QUOT, + KC_LSFT, LCT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LSHFBK, + LLY_GR, LMHESC, LLY_DL, LOWER, LLY_BK, LSHFSP, LSHFSP, LLY_ET, RAISE, KC_LBRC, KC_RBRC, LLSWIT + ), + + /* Gaming + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | LY|; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ESC | Alt |LW|Bkp|LY|Bk | Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_GAMING] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LLY_SC, 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_EQUAL, + KC_LCTL, KC_ESC, KC_LALT, LOWER, LLY_BK, KC_SPC, KC_SPC, LLY_ET, RAISE, KC_LBRC, KC_RBRC, LLSWIT + ), + + /* Music Layer (Switch to this layer if want to use music mode) + * ,-----------------------------------------------------------------------------------. + * | Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | | XXXX | Space | XXXX | | XXXX | XXXX |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_MUSIC] = LAYOUT_preonic_grid( \ + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LALT, KC_LGUI, _______, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, LLSWIT + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | Home | Up | End | PGUP | XXXX | XXXX | XXXX | PrSc | Home | PGUP | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | " | Left | Down | Right|PGDWN | XXXX | XXXX | XXXX | Pause| End |PGDWN | F12 | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | CTRL | Alt | CMD | XXXX | XXXX | XXXX | XXXX | Prev | Play | Next | INS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | Alt | CMD | !!!! | Bksp | Space | Enter| | Vol- | Vol+ |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_preonic_grid( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_HOME, KC_PGUP, KC_DEL, + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, KC_END, KC_PGDN, KC_F12, + _______, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_INS, + KC_LCTL, KC_LALT, KC_LGUI, __LYB__, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, _______, KC_VOLD, KC_VOLU, LLSWIT\ + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | SCLK | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | F7 | F8 | F9 | F10 | F11 | XXXX | & | * | { | } | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F1 | F2 | F3 | F4 | F5 | XXXX | - | = | [ | ] | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | XXXX |ISO # |ISO \ | MRC1 | MRC2 | MRSP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | Alt | CMD | | Bksp | Space | Enter| !!!! | MPL1 | MPL2 |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_preonic_grid( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_SLCK, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TAB, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, KC_AMPR, KC_ASTR, KC_LCBR, KC_RCBR, KC_DEL, + KC_CLCK, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, + _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, KC_NUHS, KC_NUBS, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, __LYB__, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, LLSWIT + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Reset| | | | | | | | | | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|QWmac |QWwin |QWmac |QWin | | | F12 | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_preonic_grid( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TAB, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, XXXXXXX, + /*_______, _______, MU_MOD, AU_ON, AU_OFF, QWERTY, QWWIN, QWERTY, COLEMAK, DVORAK, _______, _______, \ Remove this if adding Colemak and Dvorak*/ + _______, _______, MU_MOD, AU_ON, AU_OFF, QWERTY, QWWIN, QWERTY, QWWIN, _______, _______, KC_F12, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LLSWIT + ), + + /* Punctuation Layer + * ,-----------------------------------------------------------------------------------. + * | + | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | !!!! | & | | | { | } | - | - | XXXX | XXXX | { | } | |(!)| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | " | / | * | ( | ) | + | + | XXXX | XXXX | [ | ] | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | \ | % | [ | ] | = | = | XXXX | < | > | ? | INS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | _ | ^ | Del | !!!! | Space | Enter| XXXX | [ | ] |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_PUNC] = LAYOUT_preonic_grid( \ + KC_PLUS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, + __LYB__, KC_AMPR, KC_PIPE, KC_LCBR, KC_RCBR, KC_MINS, KC_MINS, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, + KC_DQUO, KC_SLSH, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, KC_PLUS, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_DQUO, + _______, KC_BSLS, KC_PERC, KC_LBRC, KC_RBRC, KC_EQL, KC_EQL, XXXXXXX, KC_LABK, KC_RABK, KC_QUES, KC_INS, + KC_TILDE, KC_UNDS, KC_CIRC, KC_DEL, __LYB__, KC_SPC, KC_SPC, KC_ENT, XXXXXXX, KC_LBRC, KC_RBRC, LLSWIT + ), + + /* Extra Layer + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | | SCLK | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | MRC1 | MRC2 | MRSP | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | Del | Bksp | Space | !!!! | | MPL1 | MPL2 |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_EXTRA] = LAYOUT_preonic_grid( \ + KC_ESC, _______, _______, _______, _______, KC_SLCK, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + KC_CLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, + KC_LCTL, KC_LALT, KC_LGUI, KC_DEL, KC_BSPC, KC_SPC, KC_SPC, __LYB__, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, LLSWIT + ), + + /* Numeric Pad + * ,-----------------------------------------------------------------------------------. + * | ESC | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | NMLK | NUM/ | NUM* | NUM- | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Home | Up | End | PGUP | XXXX | XXXX | NUM7 | NUM8 | NUM9 | NUM+ | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | XXXX | Left | Down | Right| PGDWN| XXXX | XXXX | NUM4 | NUM5 | NUM6 | NUM+ | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | CTRL | ALT | CMD | XXXX | XXXX | XXXX | NUM1 | NUM2 | NUM3 | NENT | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | XXXX | !!!! | XXXX | Bksp | Space | NUM0 | NUM0 | NUM. | NENT | QMAC | + * `-----------------------------------------------------------------------------------' + */ + [_NUM] = LAYOUT_preonic_grid( \ + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, + KC_DQUO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX, + _______, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, KC_BSPC, + _______, XXXXXXX, __LYB__, XXXXXXX, KC_BSPC, KC_SPC, KC_SPC, KC_P0, KC_P0, KC_PDOT, KC_PENT, LTO_BS + ), + + /* NAV + * ,-----------------------------------------------------------------------------------. + * | ESC | | | MOB3 | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | A | MOB2 | MOUP | MOB1 | MOSU | PGUP | Home | Up | End | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | !!!! | MOLF | MODN | MORT | MOSD | PGDN | Left | Down | Right| !!!! | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | MOB4 | MOB5 | MOSL | MOSR | MOA2 | MOA0 | MPRV | MPLY | MNXT | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | | Bksp | Space | Enter| VILM | VOLD | VOLU | QMAC | + * `-----------------------------------------------------------------------------------' + */ + [_NAV] = LAYOUT_preonic_grid( \ + KC_ESC, _______, _______, KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_A, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_U, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_DEL, + _______, __LYB__, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __LYB__, _______, + _______, _______, KC_BTN4, KC_BTN5, KC_WH_L, KC_WH_R, KC_ACL2, KC_ACL0, KC_MPRV, KC_MPLY, KC_MNXT, _______, + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_MUTE, KC_VOLD, KC_VOLU, LTO_BS + ), + + /* One-Handed + * ,-----------------------------------------------------------------------------------. + * | Esc | 6 | 7 | 8 | 9 | 0 | - | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Y | U | I | O | P | MWL3 | MWFS | MWR3 | MWTL | MWTR | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | H | J | K | L | : | MWL1 | MWM1 | MWR1 | MWBL | MWBR | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | N | M | , | . | / | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | !!!! | Esc | Del | Ent | Bksp | | MWLT | MWBT | MWUP | MWRT |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_ONEHD] = LAYOUT_preonic_grid( \ + KC_ESC , KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_Y, KC_U, KC_I, KC_O, KC_P, LMW_L3, LMW_FS, LMW_R3, LMW_TL, LMW_TR, XXXXXXX, + _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LMW_L1, LMW_M1, LMW_R1, LMW_BL, LMW_BR, XXXXXXX, + _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + __LYB__, KC_ESC, KC_DEL, KC_ENT, KC_BSPACE, KC_SPC, KC_SPC, LMW_LT, LMW_BT, LMW_TP, LMW_RT, LLSWIT + ), + + /* Layer Switcher + * ,-----------------------------------------------------------------------------------. + * | Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Brite | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | XXXX | XXXX | XXXX | XXXX | XXXX | GAME | XXXX | XXXX | XXXX | XXXX | NAV | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | QMAC | XXXX | MUSC | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | XXXX | XXXX | NUM | XXXX | XXXX | XXXXX | XXXX | XXXX | XXXX | XXXX | !!!! | + * `-----------------------------------------------------------------------------------' + */ + [_LYSWT] = LAYOUT_preonic_grid( \ + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + BACKLIT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(_GAMING), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(_NAV), XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LTO_BS, XXXXXXX, TO(_MUSIC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, TO(_NUM), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ + ) //, //Don't forget to add the comma if going to add more layers here +}; + +static uint16_t key_timer; +static uint16_t timer_thresh = 200; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // For dynamic macros + if (!process_record_dynamic_macro(keycode, record)) { +// Play sound on Macro stop +#ifdef AUDIO_ENABLE + switch (keycode) { + case DYN_REC_STOP: + if (record->event.pressed) { + PLAY_SONG(tone_macro_record_stop); + } + return false; + break; + } +#endif + return false; + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY_MAC); + } + return false; + break; + case QWWIN: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY_WIN); + } + return false; + break; + // Reinstate these cases if COLEMAK, DVORAK are included in the layouts + /*case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + */ + case LOWER: + if (record->event.pressed) { + key_timer = timer_read(); // For Backspace on tap + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + // Backspace on tap + if (timer_elapsed(key_timer) < timer_thresh) { + tap_code(KC_BSPC); + } + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + key_timer = timer_read(); // For Backspace on tap + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + // Backspace on tap + if (timer_elapsed(key_timer) < timer_thresh) { + tap_code(KC_BSPC); + } + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif +#ifdef __AVR__ + PORTE &= ~(1 << 6); +#endif + } else { + unregister_code(KC_RSFT); +#ifdef __AVR__ + PORTE |= (1 << 6); +#endif + } + return false; + break; +#ifdef AUDIO_ENABLE + // Play sound on Macro record start + case DYN_REC_START1: + if (record->event.pressed) { + PLAY_SONG(tone_macro1_record); + } + return false; + break; + case DYN_REC_START2: + if (record->event.pressed) { + PLAY_SONG(tone_macro2_record); + } + return false; + break; +#endif + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo += 1; + } else { + muse_tempo -= 1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/laurentlaurent/readme.md b/keyboards/preonic/keymaps/laurentlaurent/readme.md new file mode 100644 index 0000000000..b1909f8e1e --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/readme.md @@ -0,0 +1,252 @@ +# laurentlaurent's Preonic keyboard +Largely similar to his [ErgoDox EZ](https://configure.ergodox-ez.com/ergodox-ez/layouts/jZpmo/latest/0)'s layout + +## Features + +### Special Modifiers for Global Shortcuts +* Hyper key (Ctrl+Alt+Cmd+Shift) +* CAG key (Ctrl+Alt+Cmd) +* Meh key (Ctrl+Alt+Shift) + +### Home Row modifiers +* Home Row modifiers (hold F/J to use CMD/Ctrl, D/L for Alt, ... ) +* Separate layers for Mac and Windows keyboard to improve muscle memory linked to Home Row modifiers (CMD is mapped to F and J on Mac, CTRL for Windows) +* Extra CMD/CTRL key mapped to Z for one-handed CMD+F/CTRL+F + +### Qwerty Layout improvements +* Backspace and Enter are on bottom row (next to Space bar) +* = is where Esc would be expected to be +* "-" is where Backspace would be expected to be +* Grave is where LCTRL would be expected to be +* Esc is where Alt (on Mac)/Win (on PC) would be expected to be +* Del is where CMD (on Mac)/Alt (on PC) would be expected to be +* Hyper key replaces Caps Lock + +### Mod taps +* Home Row modifiers +* Lower and Raise are Backspace on tap +* Holding = is CAG (CTRL+ALT+CMD) +* Holding Esc is MEH (Ctrl+Shift+Alt) +* Right Shift is bound to RShift on hold, Backspace on tap +* Spacebar acts like a LShift on hold, Spacebar on tap +* In instances where repeated keys is needed: + * Tap then tap-hold repeats the key + * Lower, Raise (and most other layers) turns off mod-tap on most keys +* Music layer disables all key mappings, Gaming layer disables modtaps + +### Layer Switching +* Layer switcher key, used to switch layout (allows use of _NAV, _NUM layout without holding their layer keys) +* **Punctuation layer** accessible by holding Tab, Backslash or Backspace +* Grave switches to **One-Handed layer** on hold +* **Mouse and arrow key layer** accessible by holding ; or A +* Del switches to **Numpad** on hold +* Enter switches to **Extra layer** on hold + * Extra layer will be used for applications shortcuts + +## Layers + +### Mac Qwerty +``` +,-----------------------------------------------------------------------------------. +| CAG/=| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| LY|TB| Q | W | E | R | T | Y | U | I | O | P | LY|\ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Hyper| LY|A | CT/S | AT/D | WN/F | G | H | WN/J | AT/K | CT/L | LY|; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| WN/Z | X | C | V | B | N | M | , | . | / | Sh/Bk| +|------+------+------+------+------+------+------+------+------+------+------+------| +| LY|` |MH/ESC| LY|DL|LW|Bkp|LY|Bkp| Shift/Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | +`-----------------------------------------------------------------------------------' +``` +* Hold Tab (LY|TB), Backspace (LY|Bkp) or Backslash (LY|\ ) for **Punctuation Layer** +* Hold Grave (LY|`) for **One-Handed Layer** +* Hold Del (LY|DL) for **Numpad Layer** +* Hold A or ; for **Navigation/Mouse Layer** +* Hold Enter (LY|ENT) for **Extra layer** + +### Win Qwerty +``` +,-----------------------------------------------------------------------------------. +| CAG= | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| LY|TB| Q | W | E | R | T | Y | U | I | O | P | LY|\ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Hyper| LY|A | WN/S | AT/D | CT/F | G | H | CT/J | AT/K | WN/L | LY/; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| CT/Z | X | C | V | B | N | M | , | . | / | Sh/Bk| +|------+------+------+------+------+------+------+------+------+------+------+------| +| LY|` |ESCMEH| LY|DL|LW|Bkp|LY|Bk | Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | +`-----------------------------------------------------------------------------------' +``` +* Hold Tab (LY|TB), Backspace (LY|Bkp) or Backslash (LY|\ ) for **Punctuation Layer** +* Hold Grave (LY|`) for **One-Handed Layer** +* Hold Del (LY|DL) for **Numpad Layer** +* Hold A or ; for **Navigation/Mouse Layer** +* Hold Enter (LY|ENT) for **Extra layer** + +### Gaming Qwerty +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | \ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Ctrl | A | S | D | F | G | H | J | K | L | LY|; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / | = | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Ctrl | ESC | Alt |LW|Bkp|LY|Bk | Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Music Layer +``` +,-----------------------------------------------------------------------------------. +| Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | ALT | CMD | | XXXX | Space | XXXX | | XXXX | XXXX |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Lower Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Tab | Home | Up | End | PGUP | XXXX | XXXX | XXXX | PrSc | Home | PGUP | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| " | Left | Down | Right|PGDWN | XXXX | XXXX | XXXX | Pause| End |PGDWN | F12 | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | CTRL | Alt | CMD | XXXX | XXXX | XXXX | XXXX | Prev | Play | Next | INS | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | Alt | CMD | !!!! | Bksp | Space | Enter| | Vol- | Vol+ |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Raise Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | SCLK | & | * | ( | ) | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | F7 | F8 | F9 | F10 | F11 | XXXX | & | * | { | } | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Caps | F1 | F2 | F3 | F4 | F5 | XXXX | - | = | [ | ] | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | XXXX |ISO # |ISO \ | MRC1 | MRC2 | MRSP | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | Alt | CMD | | Bksp | Space | Enter| !!!! | MPL1 | MPL2 |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Adjust Layer +``` +,-----------------------------------------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Reset| | | | | | | | | | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | |Aud on|AudOff|QWmac |QWwin |QWmac |QWin | | | F12 | +|------+------+------+------+------+------|------+------+------+------+------+------| +| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Punctuation Layer +``` +,-----------------------------------------------------------------------------------. +| + | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| !!!! | & | | | { | } | - | - | XXXX | XXXX | { | } | |(!)| +|------+------+------+------+------+-------------+------+------+------+------+------| +| " | / | * | ( | ) | + | + | XXXX | XXXX | [ | ] | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | \ | % | [ | ] | = | = | XXXX | < | > | ? | INS | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ~ | _ | ^ | Del | !!!! | Space | Enter| XXXX | [ | ] |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Extra Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | | | | | | SCLK | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | | | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Caps | | | | | | | | | | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | | | MRC1 | MRC2 | MRSP | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | ALT | CMD | Del | Bksp | Space | !!!! | | MPL1 | MPL2 |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Numeric Pad Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | NMLK | NUM/ | NUM* | NUM- | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Home | Up | End | PGUP | XXXX | XXXX | NUM7 | NUM8 | NUM9 | NUM+ | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| XXXX | Left | Down | Right| PGDWN| XXXX | XXXX | NUM4 | NUM5 | NUM6 | NUM+ | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | CTRL | ALT | CMD | XXXX | XXXX | XXXX | NUM1 | NUM2 | NUM3 | NENT | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | XXXX | !!!! | XXXX | Bksp | Space | NUM0 | NUM0 | NUM. | NENT | QMAC | +`-----------------------------------------------------------------------------------' +``` + +### Navigation Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | | | MOB3 | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | A | MOB2 | MOUP | MOB1 | MOSU | PGUP | Home | Up | End | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | !!!! | MOLF | MODN | MORT | MOSD | PGDN | Left | Down | Right| !!!! | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | MOB4 | MOB5 | MOSL | MOSR | MOA2 | MOA0 | MPRV | MPLY | MNXT | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | ALT | CMD | | Bksp | Space | Enter| VILM | VOLD | VOLU | QMAC | +`-----------------------------------------------------------------------------------' +``` + +### One-Handed Layer +``` +,-----------------------------------------------------------------------------------. +| Esc | 6 | 7 | 8 | 9 | 0 | - | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Y | U | I | O | P | MWL3 | MWFS | MWR3 | MWTL | MWTR | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | H | J | K | L | : | MWL1 | MWM1 | MWR1 | MWBL | MWBR | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | N | M | , | . | / | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| !!!! | Esc | Del | Ent | Bksp | | MWLT | MWBT | MWUP | MWRT |LY_SW | +`-----------------------------------------------------------------------------------' +``` +The right hand side of the keyboard contains shortcuts for moving windows on Mac (using Magnet) + +### Layer Switcher +``` +,-----------------------------------------------------------------------------------. +| Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +|Brite | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| XXXX | XXXX | XXXX | XXXX | XXXX | GAME | XXXX | XXXX | XXXX | XXXX | NAV | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | XXXX | XXXX | XXXX | XXXX | QMAC | XXXX | MUSC | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| XXXX | XXXX | NUM | XXXX | XXXX | XXXXX | XXXX | XXXX | XXXX | XXXX | !!!! | +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/preonic/keymaps/laurentlaurent/rules.mk b/keyboards/preonic/keymaps/laurentlaurent/rules.mk new file mode 100644 index 0000000000..3a551bd429 --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/rules.mk @@ -0,0 +1,2 @@ +SRC += muse.c +MOUSEKEY_ENABLE = yes diff --git a/keyboards/preonic/keymaps/laurentlaurent/templates.c b/keyboards/preonic/keymaps/laurentlaurent/templates.c new file mode 100644 index 0000000000..0056e088f7 --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/templates.c @@ -0,0 +1,89 @@ +// Templates for Preonic Keyboard + +/* BLANK Pass through + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | | | | | | | |LY_SW | + * `-----------------------------------------------------------------------------------' + */ +[_BLANK] = LAYOUT_preonic_grid( \ + KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, LLSWIT \ +), + +/* BLANK No Pass through + * ,-----------------------------------------------------------------------------------. + * | Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | | XXXX | | XXXX | | XXXX | XXXX |LY_SW | + * `-----------------------------------------------------------------------------------' + */ +[_BLANK] = LAYOUT_preonic_grid( \ + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LCTL, KC_LALT, KC_LGUI, _______, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, LLSWIT \ +), + + +//===== From default preonic layouts +// if you add this, make sure to add _COLEMAK and _DVORAK in the enum + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | XXXX | XXXX | XXXX |LY_SW | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_grid( \ + 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, LLSWIT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | XXXX | XXXX | XXXX |LY_SW | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_preonic_grid( \ + 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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, LLSWIT \ +), diff --git a/keyboards/preonic/keymaps/mguterl/config.h b/keyboards/preonic/keymaps/mguterl/config.h new file mode 100644 index 0000000000..40a9524b46 --- /dev/null +++ b/keyboards/preonic/keymaps/mguterl/config.h @@ -0,0 +1,37 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/preonic/keymaps/mguterl/keymap.c b/keyboards/preonic/keymaps/mguterl/keymap.c new file mode 100644 index 0000000000..ecaf26b8da --- /dev/null +++ b/keyboards/preonic/keymaps/mguterl/keymap.c @@ -0,0 +1,323 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" +#include "mguterl.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |HypTab| Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |EscCtl| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | GESC | Ctrl | Alt | GUI |Lower |SpcUtl|SpcUtl|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + ESC_CTL, 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, SFT_ENT, + KC_GESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SPC_UTL, SPC_UTL, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* + * Gaming is very similar to Qwerty. Certain features from Qwerty are disable + * for better gaming experience. + */ +[_GAMING] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ESC, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______ +), + +/* + * Util is accessed by holding Space. The Util layer contains vimkeys and + * shortcuts that I find myself needing often. + */ +[_UTIL] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, GUI_6, GUI_7, GUI_8, GUI_9, GUI_0, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, GO_BACK, GO_FWD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_grid( \ + 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_preonic_grid( \ + 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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + 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_BSPC, + 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, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + 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_BSPC, + KC_DEL, 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |ToGame| Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + TG_GAME, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + writePinHigh(E6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/mguterl/readme.md b/keyboards/preonic/keymaps/mguterl/readme.md new file mode 100644 index 0000000000..f909976011 --- /dev/null +++ b/keyboards/preonic/keymaps/mguterl/readme.md @@ -0,0 +1,18 @@ +# Michael Guterl's Preonic Layout + +I have a very similar [keymap](/keyboards/planck/keymaps/mguterl) for my +Planck. + +Check out my [userspace](/users/mguterl) for the custom keycodes that are used +in keymap.c. + +At a very high level I use 4 layers: + +* Qwerty - Letters +* Util - Vimkeys for navigation and other convenient things +* Raise - Numbers and F keys +* Lower - Symbols + +```sh +make preonic/rev3:mguterl:flash +``` diff --git a/keyboards/preonic/keymaps/mguterl/rules.mk b/keyboards/preonic/keymaps/mguterl/rules.mk new file mode 100644 index 0000000000..dcf16bef39 --- /dev/null +++ b/keyboards/preonic/keymaps/mguterl/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/preonic/keymaps/mikethetiger/config.h b/keyboards/preonic/keymaps/mikethetiger/config.h index 9e5eb83a64..1640f16829 100644 --- a/keyboards/preonic/keymaps/mikethetiger/config.h +++ b/keyboards/preonic/keymaps/mikethetiger/config.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PREONIC_SOUND) diff --git a/keyboards/preonic/keymaps/mikethetiger/keymap.c b/keyboards/preonic/keymaps/mikethetiger/keymap.c index 2f3963f715..621148a6bf 100644 --- a/keyboards/preonic/keymaps/mikethetiger/keymap.c +++ b/keyboards/preonic/keymaps/mikethetiger/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2015-2017 Jack Humbert +/* Copyright 2015-2017 Jack Humbert * * 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 diff --git a/keyboards/preonic/keymaps/pitty/config.h b/keyboards/preonic/keymaps/pitty/config.h new file mode 100644 index 0000000000..f87dd8f305 --- /dev/null +++ b/keyboards/preonic/keymaps/pitty/config.h @@ -0,0 +1,40 @@ +#pragma once + +#ifdef AUDIO_ENABLE + + +# define STARTUP_SONG SONG(PREONIC_SOUND) +# define GOODBYE_SONG SONG(STARTUP_SOUND) +# define MUSIC_ON_SONG SONG(TERMINAL_SOUND) +#endif + +#undef TEMPO_DEFAULT + +#define TEMPO_DEFAULT 200 + + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + + diff --git a/keyboards/preonic/keymaps/pitty/keymap.c b/keyboards/preonic/keymaps/pitty/keymap.c new file mode 100644 index 0000000000..10957d8ac2 --- /dev/null +++ b/keyboards/preonic/keymaps/pitty/keymap.c @@ -0,0 +1,203 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "keymap_hungarian.h" + +enum preonic_layers { + _QWERTY, + _GAME, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + RAISE, +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Lower | Space | Bksp | Enter|Raise | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, \ + MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_RALT, RAISE, KC_INS, KC_DEL \ +), + + +/* Game + * ,-----------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Raise | Space | Bksp | Enter|Lower | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT_preonic_grid( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, \ + KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_RALT, LOWER, KC_INS, KC_DEL \ +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | + | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | 4 | 5 | 6 | - | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Left | Down | Right| | | | 1 | 2 | 3 | * | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | |Lnxcpy|Lnxpst| | | 0 | | | / | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, HU_7, HU_8, HU_9, HU_PLUS, _______, \ + _______, _______, KC_UP, _______, _______, KC_HOME, KC_PGUP, HU_4, HU_5, HU_6, HU_MINS, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_END, KC_PGDN, HU_1, HU_2, HU_3, HU_ASTR, _______, \ + _______, _______, _______, _______, _______, _______, _______, HU_0, _______, _______, HU_SLSH, HU_EQL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY) \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Left | Down | Right| | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, _______, KC_UP, _______, _______, KC_HOME, KC_PGUP, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_END, KC_PGDN, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY) \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY) \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} + +#ifdef AUDIO_ENABLE + +float raise_low[][2] = SONG(TERMINAL_SOUND); +float gaming[][2] = SONG(AG_SWAP_SOUND); +float adjust[][2] = SONG(UNICODE_LINUX); +float my_song[][2] = SONG(NO_SOUND); + +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _RAISE: + PLAY_SONG (raise_low); + break; + case _LOWER: + PLAY_SONG (raise_low); + break; + case _GAME: + PLAY_SONG (gaming); + break; + case _ADJUST: + PLAY_SONG (adjust); + break; + default: // for any other layers, or the default layer + PLAY_SONG (my_song); + break; + } + return state; +} diff --git a/keyboards/preonic/keymaps/pitty/readme.md b/keyboards/preonic/keymaps/pitty/readme.md new file mode 100644 index 0000000000..42b3076089 --- /dev/null +++ b/keyboards/preonic/keymaps/pitty/readme.md @@ -0,0 +1,5 @@ +My Preonic keymap + +Including Hungarian characters and layer reactive sound feedback + +make preonic/rev3:pitty:dfu-util \ No newline at end of file diff --git a/keyboards/singa/keymaps/default/rules.mk b/keyboards/preonic/keymaps/pitty/rules.mk similarity index 100% rename from keyboards/singa/keymaps/default/rules.mk rename to keyboards/preonic/keymaps/pitty/rules.mk diff --git a/keyboards/preonic/keymaps/senseored/config.h b/keyboards/preonic/keymaps/senseored/config.h new file mode 100644 index 0000000000..61f3488c66 --- /dev/null +++ b/keyboards/preonic/keymaps/senseored/config.h @@ -0,0 +1,45 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC +#define RGBLIGHT_SLEEP +#define TAPPING_TOGGLE 2 +#define ALT_F4 LALT(KC_F4) +#define CTALDEL LSFT(LCTL(KC_ESC)) +#define NO_DEBUG +#define CTLZ LCTL(KC_Z) +#define CTLX LCTL(KC_X) +#define CTLC LCTL(KC_C) +#define CTLV LCTL(KC_V) +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/preonic/keymaps/senseored/keymap.c b/keyboards/preonic/keymaps/senseored/keymap.c new file mode 100644 index 0000000000..6ddf289420 --- /dev/null +++ b/keyboards/preonic/keymaps/senseored/keymap.c @@ -0,0 +1,437 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _FNL1, + _LOWER, + _RAISE, + _FNL2, + _ADJUST, + _GAMEMODE, + _FNL3, + _LOWER2, + _RAISE2 +}; + +enum preonic_keycodes { + TBMACRO = SAFE_RANGE, + DGRMCRO, + WRKMOD, + BACKLIT, + RAISE, + LOWER +}; + +bool bnumlock = false; +bool numlock_changed = false; +bool workmode = true; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FNL1 | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Bksp |Lower | Space |Raise | Bksp | AltGr| * | Esc | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + 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_LBRC, \ + TT(_FNL1), 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, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, TT(_LOWER), KC_SPC, KC_SPC, TT(_RAISE), KC_BSPC, KC_RALT, KC_NUHS, KC_ESC \ +), + +/* FNL1 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |TbMacr| Prev | Play | Next | AltF4| CapsL| Esc | PgUp | Up | PgDn |PrScrn| Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol- | Vol+ | Mute | NumL | Home | Left | Down | Right| | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | End | | | | ? | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | ! | | + * `-----------------------------------------------------------------------------------' + */ +[_FNL1] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, KC_ESC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_BSPC, + TT(_FNL1), _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL, + KC_LSFT, CTLZ, CTLX, CTLC, CTLV, _______, KC_END, _______, _______, _______, LSFT(KC_MINS), _______, + _______, _______, CTALDEL, _______, _______, _______, _______, _______, _______, _______, LSFT(KC_1), _______ +), + + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | § | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ´ | ` | @ | £ | $ | € | ¨ | { | [ | ] | } | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | < | | | > | ° | | | µ | ¨ | ^ | ~ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | AltGr| | | | | | | | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + 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_MINS, + KC_EQL, S(KC_EQL), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_E), KC_RBRC, RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), + KC_LSFT, KC_NUBS, RALT(KC_NUBS), S(KC_NUBS), DGRMCRO, XXXXXXX, XXXXXXX, RALT(KC_M), KC_RBRC, S(KC_RBRC), RALT(KC_RBRC), _______, + _______, _______, KC_RALT, _______,TO(_ADJUST), _______, _______, _______, _______, _______, _______, TO(_QWERTY) +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | F1 | F2 | F3 | F4 | Esc | Bksp | / | 7 | 8 | 9 | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FNL2 | F5 | F6 | F7 | F8 |Insert| Home | PgUp | 4 | 5 | 6 | + | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | Del | End | PgDn | 1 | 2 | 3 | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Alt | | | | * | 0 | , | . | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + 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_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_ESC, KC_BSPC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + TT(_FNL2), KC_F5, KC_F6, KC_F7, KC_F8, KC_INS, KC_HOME, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PENT, + _______, _______, KC_LALT, _______, TO(_QWERTY), _______, _______, KC_PAST, KC_P0, KC_PDOT, KC_DOT, TO(_QWERTY) +), + +/* FNL2 + * ,-----------------------------------------------------------------------------------. + * |TbMacr| Prev | Play | Next | AltF4| CapsL| |PrScrn|Insert| Home | PgUp |ScrLck| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol- | Vol+ | Mute | NumL | | | Del | End | PgDn | Pause| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | Up | | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Left | Down | Right| BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_FNL2] = LAYOUT_preonic_grid( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, _______, KC_PSCR, KC_INS, KC_HOME, KC_PGUP, KC_SLCK, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_PAUS, + _______, CTLZ, CTLX, CTLC, CTLV, _______, _______, _______, _______, KC_UP, _______, KC_ENT, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, TO(_QWERTY) +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | GAME | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + TO(_GAMEMODE), RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY) \ +), + + +/* Game mode + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FNL1 | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | 1 | Lower| Bksp | Alt | Space | Raise| Bksp | BAIL | * | Esc | + * `-----------------------------------------------------------------------------------' + */ +[_GAMEMODE] = LAYOUT_preonic_grid( \ + 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_LBRC, + TT(_FNL3), 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, + KC_LCTL, KC_1, MO(_LOWER2), KC_DEL, KC_LALT, KC_SPC, KC_SPC, MO(_RAISE2), KC_BSPC, TO(_QWERTY), KC_NUHS, KC_ESC +), +/* FNL3 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |TbMacr| Prev | Play | Next | AltF4| CapsL| Esc | PgUp | Up | PgDn |PrScrn| Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol- | Vol+ | Mute | NumL | Home | Left | Down | Right| | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | End | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_FNL3] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, KC_ESC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_BSPC, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL, + KC_LSFT, _______, _______, _______, _______, _______, KC_END, _______, _______, _______, LSFT(KC_MINS), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LSFT(KC_1), _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | F1 | F2 | F3 | F4 | Esc | Bksp | / | 7 | 8 | 9 | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FNL2 | F5 | F6 | F7 | F8 |Insert| Home | PgUp | 4 | 5 | 6 | + | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | Del | End | PgDn | 1 | 2 | 3 | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Alt | | | | * | 0 | , | . | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER2] = LAYOUT_preonic_grid( \ + 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_F1, KC_F2, KC_F3, KC_F4, KC_ESC, KC_BSPC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + TT(_FNL2), KC_F5, KC_F6, KC_F7, KC_F8, KC_INS, KC_HOME, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PENT, + _______, _______, _______, _______, _______, _______, _______, KC_PAST, KC_P0, KC_PDOT, KC_DOT, TO(_GAMEMODE) +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | § | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ´ | ` | @ | £ | $ | € | ¨ | { | [ | ] | } | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | < | | | > | ° | | | µ | ¨ | ^ | ~ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | AltGr| | | | | | | | BAIL | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE2] = LAYOUT_preonic_grid( \ + 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_MINS, + KC_EQL, S(KC_EQL), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_E), KC_RBRC, RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), + KC_LSFT, KC_NUBS, RALT(KC_NUBS), S(KC_NUBS), DGRMCRO, XXXXXXX, XXXXXXX, RALT(KC_M), KC_RBRC, S(KC_RBRC), RALT(KC_RBRC), _______, + _______, _______, KC_RALT, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAMEMODE) +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case TBMACRO: + SEND_STRING(SS_TAP(X_TAB) SS_DOWN(X_LSHIFT) SS_TAP(X_HOME) SS_UP(X_LSHIFT) SS_TAP(X_DELETE)); + return false; + case DGRMCRO: + if(!bnumlock) { + tap_code(KC_NLCK); + bnumlock = true; + } + //SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P0) SS_TAP(X_P1) SS_TAP(X_P7) SS_TAP(X_P6) SS_UP(X_LALT)); + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_KP_0) SS_TAP(X_KP_1) SS_TAP(X_KP_7) SS_TAP(X_KP_6) SS_UP(X_LALT) ); + return false; + + if(bnumlock) { + tap_code(KC_NLCK); + bnumlock = false; + } + case WRKMOD: + if(!workmode) { + workmode = true; + return false; + } + else { + workmode = false; + return false; + } + } + + } + return true; + switch (keycode) { + + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + PORTE |= (1<<6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +uint32_t layer_state_set_user(uint32_t state) { +// if(rgblight_get_mode() == 1) { + switch (biton32(state)) { + case _QWERTY: + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + case _LOWER: + if(!bnumlock) { + tap_code(KC_NLCK); + } + + break; + case _ADJUST: + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + case _RAISE: + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + case _FNL1: + if(bnumlock) { + tap_code(KC_NLCK); + } + break; + case _GAMEMODE: + break; + default: // for any other layers, or the default layer + if(bnumlock) { + tap_code(KC_NLCK); + } + + break; + } + // } + return state; +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/senseored/readme.md b/keyboards/preonic/keymaps/senseored/readme.md new file mode 100644 index 0000000000..1b286acc89 --- /dev/null +++ b/keyboards/preonic/keymaps/senseored/readme.md @@ -0,0 +1 @@ +# Swedish Preonic layout. Still figuring out what to do with numbers/symbols compared to a Planck-layout. \ No newline at end of file diff --git a/keyboards/preonic/keymaps/senseored/rules.mk b/keyboards/preonic/keymaps/senseored/rules.mk new file mode 100644 index 0000000000..dcf16bef39 --- /dev/null +++ b/keyboards/preonic/keymaps/senseored/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/preonic/preonic.c b/keyboards/preonic/preonic.c index ff07f961f2..8d052ea81f 100644 --- a/keyboards/preonic/preonic.c +++ b/keyboards/preonic/preonic.c @@ -12,7 +12,7 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { #endif const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_preonic_grid( - 48, 49, 50, 51, 52, 53, 53, 55, 56, 57, 58, 59, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, diff --git a/keyboards/preonic/preonic.h b/keyboards/preonic/preonic.h index e2aa1545c1..aa184ccbdb 100644 --- a/keyboards/preonic/preonic.h +++ b/keyboards/preonic/preonic.h @@ -4,7 +4,7 @@ /************************************************** ** Include headers specific to keyboard revision ** -***************************************************/ +**************************************************/ #ifdef KEYBOARD_preonic_rev1 #include "rev1.h" #endif @@ -20,7 +20,7 @@ /************************************************** ** Layout macros aliases common to all revisions ** - - Name of Alias Matrix Name: - ----------------- ------------------- ****/ -#define LAYOUT_ortho_5x12 LAYOUT_preonic_grid +** ** +** Name of Alias Matrix Name: ** +******* ----------------- ------------------- ****/ +#define LAYOUT_ortho_5x12 LAYOUT_preonic_grid diff --git a/keyboards/preonic/rev1/rev1.c b/keyboards/preonic/rev1/rev1.c index 4e87796081..fd09d7f2d8 100644 --- a/keyboards/preonic/rev1/rev1.c +++ b/keyboards/preonic/rev1/rev1.c @@ -18,8 +18,8 @@ void matrix_init_kb(void) { // Turn status LED on - DDRE |= (1<<6); - PORTE |= (1<<6); + setPinOutput(E6); + writePinHigh(E6); matrix_init_user(); }; diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index b0d44db82b..2d74f38235 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -1,56 +1,24 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality @@ -65,3 +33,5 @@ API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = ortho_5x12 + +LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/preonic/rev2/rev2.c b/keyboards/preonic/rev2/rev2.c index 30e3110e46..785ac3310b 100644 --- a/keyboards/preonic/rev2/rev2.c +++ b/keyboards/preonic/rev2/rev2.c @@ -18,8 +18,8 @@ void matrix_init_kb(void) { // Turn status LED on - DDRE |= (1<<6); - PORTE |= (1<<6); + setPinOutput(E6); + writePinHigh(E6); matrix_init_user(); }; diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index 748979c790..06315b2c6c 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -1,61 +1,29 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. @@ -65,3 +33,5 @@ API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = ortho_5x12 + +LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index b2a53ee656..b5b2ced5a7 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -27,26 +27,17 @@ #define MATRIX_ROWS 10 #define MATRIX_COLS 6 -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -/* Note: These are not used for arm boards. They're here purely as documentation. - * #define MATRIX_ROW_PINS { PB0, PB1, PB2, PA15, PA10 } - * #define MATRIX_COL_PINS { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } - * #define UNUSED_PINS - */ +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +#define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2, A3, A6 } +#define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } +#define UNUSED_PINS -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } +#define DIP_SWITCH_PINS { B14, A15, A0, B9 } + #define MUSIC_MAP #undef AUDIO_VOICES #undef C6_AUDIO @@ -121,14 +112,18 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WS2812_LED_N 2 -#define RGBLED_NUM WS2812_LED_N -#define WS2812_TIM_N 2 -#define WS2812_TIM_CH 2 -#define PORT_WS2812 GPIOA -#define PIN_WS2812 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) +// #define WS2812_LED_N 2 +// #define RGBLED_NUM WS2812_LED_N +// #define WS2812_TIM_N 2 +// #define WS2812_TIM_CH 2 +// #define PORT_WS2812 GPIOA +// #define PIN_WS2812 1 +// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP +#define RGB_DI_PIN A1 +#define RGBLED_NUM 9 +#define RGBLIGHT_ANIMATIONS + #endif diff --git a/keyboards/preonic/rev3/matrix.c b/keyboards/preonic/rev3/matrix.c deleted file mode 100644 index db7a4f2a3a..0000000000 --- a/keyboards/preonic/rev3/matrix.c +++ /dev/null @@ -1,187 +0,0 @@ -#include -#include -#include -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "printf.h" -#include "backlight.h" -#include "matrix.h" -#include "action.h" -#include "keycode.h" -#include - -/* - * col: { B11, B10, B2, B1, A7, B0 } - * row: { A10, A9, A8, B15, C13, C14, C15, A2 } - */ -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_col_t matrix_debouncing[MATRIX_COLS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - -static bool dip_switch[4] = {0, 0, 0, 0}; - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -void matrix_init(void) { - printf("matrix init\n"); - //debug_matrix = true; - - // dip switch setup - palSetPadMode(GPIOB, 14, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOB, 9, PAL_MODE_INPUT_PULLUP); - - // actual matrix setup - palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); - - palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOB, 15, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 3, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 6, PAL_MODE_INPUT_PULLDOWN); - - - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_col_t)); - - - matrix_init_quantum(); -} - -__attribute__ ((weak)) -void dip_update(uint8_t index, bool active) { } - -__attribute__ ((weak)) -void encoder_update(bool clockwise) { } - -bool last_dip_switch[4] = {0}; - -#ifndef ENCODER_RESOLUTION - #define ENCODER_RESOLUTION 4 -#endif - -uint8_t matrix_scan(void) { - // dip switch - dip_switch[0] = !palReadPad(GPIOB, 14); - dip_switch[1] = !palReadPad(GPIOA, 15); - dip_switch[2] = !palReadPad(GPIOA, 10); - dip_switch[3] = !palReadPad(GPIOB, 9); - for (uint8_t i = 0; i < 4; i++) { - if (last_dip_switch[i] ^ dip_switch[i]) - dip_update(i, dip_switch[i]); - } - memcpy(last_dip_switch, dip_switch, sizeof(&dip_switch)); - - // actual matrix - for (int col = 0; col < MATRIX_COLS; col++) { - matrix_col_t data = 0; - - // strobe col { B11, B10, B2, B1, A7, B0 } - switch (col) { - case 0: palSetPad(GPIOB, 11); break; - case 1: palSetPad(GPIOB, 10); break; - case 2: palSetPad(GPIOB, 2); break; - case 3: palSetPad(GPIOB, 1); break; - case 4: palSetPad(GPIOA, 7); break; - case 5: palSetPad(GPIOB, 0); break; - } - - // need wait to settle pin state - wait_us(20); - - // read row data { A10, A9, A8, B15, C13, C14, C15, A2 } - data = ( - (palReadPad(GPIOA, 10) << 0 ) | - (palReadPad(GPIOA, 9) << 1 ) | - (palReadPad(GPIOA, 8) << 2 ) | - (palReadPad(GPIOB, 15) << 3 ) | - (palReadPad(GPIOC, 13) << 4 ) | - (palReadPad(GPIOC, 14) << 5 ) | - (palReadPad(GPIOC, 15) << 6 ) | - (palReadPad(GPIOA, 2) << 7 ) | - (palReadPad(GPIOA, 3) << 8 ) | - (palReadPad(GPIOA, 6) << 9 ) - ); - - // unstrobe col { B11, B10, B2, B1, A7, B0 } - switch (col) { - case 0: palClearPad(GPIOB, 11); break; - case 1: palClearPad(GPIOB, 10); break; - case 2: palClearPad(GPIOB, 2); break; - case 3: palClearPad(GPIOB, 1); break; - case 4: palClearPad(GPIOA, 7); break; - case 5: palClearPad(GPIOB, 0); break; - } - - if (matrix_debouncing[col] != data) { - matrix_debouncing[col] = data; - debouncing = true; - debouncing_time = timer_read(); - } - } - - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix[row] = 0; - for (int col = 0; col < MATRIX_COLS; col++) { - matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); - } - } - debouncing = false; - } - - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & (1<. // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*13*4*2)) = (35+416) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 451 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 573 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*13*4*2)) = (37+416) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 453 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 571 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/primekb/prime_e/keymaps/jetpacktuxedo/keymap.c b/keyboards/primekb/prime_e/keymaps/jetpacktuxedo/keymap.c new file mode 100644 index 0000000000..cdd1b56430 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/jetpacktuxedo/keymap.c @@ -0,0 +1,122 @@ +/* Copyright 2018 Holten Campbell + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define BLINK_DURATION 512 +#define CAPS_LED_PIN B1 +#define NUM_LED_PIN B2 +#define SCROLL_LED_PIN B3 + +uint8_t CAPS; +uint16_t BLINK_TIMER = 0; +uint8_t CAPS_LED_STATE = 0; + +// Init togg_indicator so the compiler doesn't complain when I declare it last. +static void togg_indicator(uint8_t *state, uint8_t pin); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_BSPC, + LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(2, KC_ENT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LT(3, KC_B), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT( + 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_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( + 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_TRNS, + KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_DQUO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT( + KC_TRNS, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(CAPS_LED_PIN); + writePinLow(CAPS_LED_PIN); + // set NumLock LED to output and low + setPinOutput(NUM_LED_PIN); + writePinLow(NUM_LED_PIN); + // set ScrollLock LED to output and low + setPinOutput(SCROLL_LED_PIN); + writePinLow(SCROLL_LED_PIN); +} + +void matrix_scan_user(void) { + if (CAPS == 1) { + // Blink the first led when capslock is active + if (BLINK_TIMER >= BLINK_DURATION) { + togg_indicator(&CAPS_LED_STATE, CAPS_LED_PIN); + BLINK_TIMER = 0; + } + BLINK_TIMER++; + } +} + +//function for layer indicator LED +layer_state_t layer_state_set_user(layer_state_t state) { + if (layer_state_cmp(state, 1)) { + writePinHigh(CAPS_LED_PIN); + } else { + writePinLow(CAPS_LED_PIN); + } + if (layer_state_cmp(state, 2)) { + writePinHigh(NUM_LED_PIN); + } else { + writePinLow(NUM_LED_PIN); + } + if (layer_state_cmp(state, 3)) { + writePinHigh(SCROLL_LED_PIN); + } else { + writePinLow(SCROLL_LED_PIN); + } + return state; +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + CAPS = 1; + } + else { + CAPS = 0; + } +} + +void togg_indicator(uint8_t *state, uint8_t pin) { + // Toggles a pin based on the current state + if (*state == 0){ + *state = 1; + writePinHigh(pin); + } + else if (*state == 1){ + *state = 0; + writePinLow(pin); + } +} diff --git a/keyboards/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk index 579ddd11eb..752497265c 100644 --- a/keyboards/primekb/prime_e/rules.mk +++ b/keyboards/primekb/prime_e/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -77,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/primekb/prime_l/rules.mk b/keyboards/primekb/prime_l/rules.mk index 5cce4e8113..d7aca43dfc 100644 --- a/keyboards/primekb/prime_l/rules.mk +++ b/keyboards/primekb/prime_l/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk index 72ad8325d3..615750bfb2 100644 --- a/keyboards/primekb/prime_m/rules.mk +++ b/keyboards/primekb/prime_m/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/primekb/prime_o/rules.mk b/keyboards/primekb/prime_o/rules.mk index 8d3b835f18..e9b7f1558b 100644 --- a/keyboards/primekb/prime_o/rules.mk +++ b/keyboards/primekb/prime_o/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/primekb/prime_r/keymaps/default/keymap.c b/keyboards/primekb/prime_r/keymaps/default/keymap.c index 2e620c9cb2..afff0d7dad 100644 --- a/keyboards/primekb/prime_r/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_r/keymaps/default/keymap.c @@ -53,14 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - - switch (id) { - - } - return MACRO_NONE; -} - void matrix_init_user(void) { } diff --git a/keyboards/primekb/prime_r/rules.mk b/keyboards/primekb/prime_r/rules.mk index 0e7a407276..505ffe1e63 100644 --- a/keyboards/primekb/prime_r/rules.mk +++ b/keyboards/primekb/prime_r/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h index 2a6e81f1d7..cc0386ae68 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/config.h @@ -71,7 +71,16 @@ along with this program. If not, see . #define EEPROM_CUSTOM_BACKLIGHT 804 - +#undef EEPROM_MAGIC_ADDR +#define EEPROM_MAGIC_ADDR 34 +#undef EEPROM_VERSION_ADDR +#define EEPROM_VERSION_ADDR 36 +#undef RGB_BACKLIGHT_CONFIG_EEPROM_ADDR +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +#undef DYNAMIC_KEYMAP_EEPROM_ADDR +#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 +#undef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 66 /* * Feature disable options diff --git a/keyboards/projectkb/alice/info.json b/keyboards/projectkb/alice/info.json new file mode 100644 index 0000000000..a94c1352c0 --- /dev/null +++ b/keyboards/projectkb/alice/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Alice", + "url": "https://store.projectkeyboard.com/", + "maintainer": "qmk", + "width": 19.75, + "height": 5.25, + "layouts": { + "LAYOUT_default": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"`", "x":1.75, "y":0.25}, + {"label":"1", "x":2.75, "y":0.25}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0.25}, + {"label":"4", "x":5.75, "y":0.25}, + {"label":"5", "x":6.75, "y":0.25}, + {"label":"6", "x":7.75, "y":0.25}, + {"label":"7", "x":11, "y":0.25}, + {"label":"8", "x":12, "y":0.25}, + {"label":"9", "x":13, "y":0.25}, + {"label":"0", "x":14, "y":0.25}, + {"label":"-", "x":15, "y":0}, + {"label":"=", "x":16, "y":0.25}, + {"label":"Del", "x":17, "y":0.25}, + {"label":"Backspace", "x":18, "y":0.25}, + + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1.25, "w":1.5}, + {"label":"Q", "x":3, "y":1.25}, + {"label":"W", "x":4.25, "y":1.25}, + {"label":"E", "x":5.25, "y":1.25}, + {"label":"R", "x":6.25, "y":1.25}, + {"label":"T", "x":7.25, "y":1.25}, + {"label":"Y", "x":10.5, "y":1.25}, + {"label":"U", "x":11.5, "y":1.25}, + {"label":"I", "x":12.5, "y":1.25}, + {"label":"O", "x":13.5, "y":1.25}, + {"label":"P", "x":14.75, "y":1.25}, + {"label":"{", "x":15.75, "y":1.25}, + {"label":"}", "x":16.75, "y":1.25}, + {"label":"|", "x":17.75, "y":1.25, "w":1.5}, + + {"label":"PgDn", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2.25, "w":1.75}, + {"label":"A", "x":3.25, "y":2.25}, + {"label":"S", "x":4.5, "y":2.25}, + {"label":"D", "x":5.5, "y":2.25}, + {"label":"F", "x":6.5, "y":2.25}, + {"label":"G", "x":7.5, "y":2.25}, + {"label":"H", "x":10.75, "y":2.25}, + {"label":"J", "x":11.75, "y":2.25}, + {"label":"K", "x":12.75, "y":2.25}, + {"label":"L", "x":13.75, "y":2.25}, + {"label":":", "x":15.25, "y":2.25}, + {"label":"\"", "x":16.25, "y":2.25}, + {"label":"Enter", "x":17.25, "y":2.25, "w":2.25}, + + {"label":"Shift", "x":1.5, "y":3.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":3.25}, + {"label":"X", "x":5, "y":3.25}, + {"label":"C", "x":6, "y":3.25}, + {"label":"V", "x":7, "y":3.25}, + {"label":"B", "x":8, "y":3.25}, + {"label":"Fn", "x":10.25, "y":3.25}, + {"label":"N", "x":11.25, "y":3.25}, + {"label":"M", "x":12.25, "y":3.25}, + {"label":"<", "x":13.25, "y":3.25}, + {"label":">", "x":15, "y":3.25}, + {"label":"?", "x":16, "y":3.25}, + {"label":"Shift", "x":17, "y":3.25, "w":1.75}, + {"label":"Fn", "x":18.75, "y":3.25}, + + {"label":"Ctrl", "x":1.5, "y":4.25, "w":1.5}, + {"label":"Alt", "x":5, "y":4.25, "w":1.5}, + {"label":"Space", "x":6.5, "y":4.25, "w":2}, + {"label":"Menu", "x":8.5, "y":4.25}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.75}, + {"label":"Alt", "x":13, "y":4.25, "w":1.5}, + {"label":"Ctrl", "x":18, "y":4.25, "w":1.5} + ] + } + } +} diff --git a/keyboards/projectkb/alice/keymaps/default/keymap.c b/keyboards/projectkb/alice/keymaps/default/keymap.c index bad22f9ae4..a56f24f3ff 100644 --- a/keyboards/projectkb/alice/keymaps/default/keymap.c +++ b/keyboards/projectkb/alice/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -42,4 +41,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, RESET ) }; - diff --git a/keyboards/projectkb/alice/keymaps/devinceble/keymap.c b/keyboards/projectkb/alice/keymaps/devinceble/keymap.c new file mode 100644 index 0000000000..bf46aa95b6 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/devinceble/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 Devinceble AKA Vimwarrior + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_default( + KC_INS, 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_BSLS, KC_GRV, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_default( + KC_TRNS, KC_TRNS, 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_DEL, + KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_default( + RGB_TOG, KC_TRNS, 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_DEL, + RGB_MOD, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAI, RGB_HUI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_RMOD, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, BL_INC, BL_DEC, BL_TOGG, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET + ), +}; diff --git a/keyboards/projectkb/alice/keymaps/devinceble/readme.md b/keyboards/projectkb/alice/keymaps/devinceble/readme.md new file mode 100644 index 0000000000..dfb0392e3d --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/devinceble/readme.md @@ -0,0 +1,9 @@ +# Devinceble AKA Vimwarrior ProjectKeyboard Alice + +Build Hex File: + + make projectkb/alice:devinceble + +Flash Keyboard + + make projectkb/alice:devinceble:flash diff --git a/keyboards/projectkb/alice/keymaps/devinceble/rules.mk b/keyboards/projectkb/alice/keymaps/devinceble/rules.mk new file mode 100644 index 0000000000..522abf46b1 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/devinceble/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/projectkb/alice/keymaps/madhatter/keymap.c b/keyboards/projectkb/alice/keymaps/madhatter/keymap.c new file mode 100644 index 0000000000..bac44f0b3e --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/madhatter/keymap.c @@ -0,0 +1,55 @@ +/* +Copyright 2019 Khader Syed + +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 . +*/ +#include QMK_KEYBOARD_H + +enum my_layers { + _QWERTY, + _FNMS, + _NAVMED +}; + +#define FNMS MO(_FNMS) +#define SPCNAV LT(_NAVMED, KC_SPC) +#define CAPSTL CTL_T(KC_CAPS) +#define CMDENT CMD_T(KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_default( + KC_GESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, + KC_PGUP, 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_PGDN, CAPSTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FNMS, + KC_LCTL, KC_LALT, CMDENT, FNMS, SPCNAV, KC_RALT, KC_RCTL + ), + + [_FNMS] = LAYOUT_default( + RGB_TOG, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, RESET, + VLK_TOG, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN2, _______, _______, + _______, BL_INC, BL_DEC, BL_TOGG, BL_BRTG, _______, RGB_SAI, RGB_HUI, RGB_VAI, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAVMED] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, _______, KC_UP, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/projectkb/alice/keymaps/madhatter/readme.md b/keyboards/projectkb/alice/keymaps/madhatter/readme.md new file mode 100644 index 0000000000..03c20e2fb0 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/madhatter/readme.md @@ -0,0 +1,8 @@ +# The madhatter keymap + +- A layer for all functions and mouse keys +- A layer for arrows and media +- Arrows on IJKL +- Caps and control on caps lock - wonderful +- Velocikey on the map +- Things to reduce my finger travel just about everywhere diff --git a/keyboards/projectkb/alice/keymaps/madhatter/rules.mk b/keyboards/projectkb/alice/keymaps/madhatter/rules.mk new file mode 100644 index 0000000000..1b0f198d06 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/madhatter/rules.mk @@ -0,0 +1 @@ +VELOCIKEY_ENABLE = yes diff --git a/keyboards/projectkb/alice/readme.md b/keyboards/projectkb/alice/readme.md index cc9f22685b..583ddf5920 100644 --- a/keyboards/projectkb/alice/readme.md +++ b/keyboards/projectkb/alice/readme.md @@ -2,11 +2,18 @@ ProjectKeyboard Alice Keyboard Replacement PCB -Keyboard Maintainer: onefiftynine +Keyboard Maintainer: onefiftynine Hardware Supported: STM32F072CBT6 Make example for this keyboard (after setting up your build environment): make projectkb/alice:default +If you are flashing this keyboard/pcb for the first time: + + * Set the dip switch on the reverse of the PCB to 1 + * Hit the reset button and then do + * make projectkb/alice:default:dfu-util + * After flashing the keyboard successfully, you can reset the dip switch back to 0 + 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). diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index cd366c76aa..606ffda183 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk @@ -40,7 +40,7 @@ VPATH += keyboards/cannonkeys/stm32f072 SRC = keyboard.c \ led.c -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -54,3 +54,4 @@ RGBLIGHT_ENABLE = yes # RAW_ENABLE = yes # DYNAMIC_KEYMAP_ENABLE = yes +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave diff --git a/keyboards/proton_c/config.h b/keyboards/proton_c/config.h deleted file mode 100644 index 5ebd17f99e..0000000000 --- a/keyboards/proton_c/config.h +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright 2018 Jack Humbert - * - * 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 . - */ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0006 -#define MANUFACTURER QMK -#define PRODUCT Proton C -#define DESCRIPTION A compact ortholinear keyboard - -/* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 1 - -#define MATRIX_ROW_PINS { B9 } -#define MATRIX_COL_PINS { B0 } - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 6 - -/* 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 - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -// #define WS2812_LED_N 2 -// #define RGBLED_NUM WS2812_LED_N -// #define WS2812_TIM_N 2 -// #define WS2812_TIM_CH 2 -// #define PORT_WS2812 GPIOA -// #define PIN_WS2812 1 -// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) -//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP -//#define WS2812_EXTERNAL_PULLUP diff --git a/keyboards/proton_c/keymaps/default/keymap.c b/keyboards/proton_c/keymaps/default/keymap.c deleted file mode 100644 index a3103432fa..0000000000 --- a/keyboards/proton_c/keymaps/default/keymap.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2018 Jack Humbert - * - * 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 . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = {{ KC_A }} -}; diff --git a/keyboards/proton_c/proton_c.c b/keyboards/proton_c/proton_c.c deleted file mode 100644 index 5256343478..0000000000 --- a/keyboards/proton_c/proton_c.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2018 Jack Humbert - * - * 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 . - */ - -#include "proton_c.h" - -void matrix_init_kb(void) { - // Turn status LED on - setPinOutput(C13); - writePinHigh(C13); - - matrix_init_user(); -} diff --git a/keyboards/proton_c/proton_c.h b/keyboards/proton_c/proton_c.h deleted file mode 100644 index 159f9975a3..0000000000 --- a/keyboards/proton_c/proton_c.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2018 Jack Humbert - * - * 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 . - */ - -#pragma once -#include "quantum.h" diff --git a/keyboards/proton_c/readme.md b/keyboards/proton_c/readme.md deleted file mode 100644 index 5f27795aec..0000000000 --- a/keyboards/proton_c/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -Proton C -=== - -![Proton C](https://i.imgur.com/xZrjIqa.jpg) - -A Pro Micro drop-in replacement. - -Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) -Hardware Supported: QMK Proton C -Hardware Availability: [List of vendors](https://qmk.fm/proton-c) - -Make example for this keyboard (after setting up your build environment): - - make proton_c: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). diff --git a/keyboards/proton_c/rules.mk b/keyboards/proton_c/rules.mk deleted file mode 100644 index 4edc75929e..0000000000 --- a/keyboards/proton_c/rules.mk +++ /dev/null @@ -1,17 +0,0 @@ -MCU = STM32F303 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no -# SERIAL_LINK_ENABLE = yes diff --git a/keyboards/puck/rules.mk b/keyboards/puck/rules.mk index 48144534d4..1bd0b8b1dd 100644 --- a/keyboards/puck/rules.mk +++ b/keyboards/puck/rules.mk @@ -1,50 +1,14 @@ - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options diff --git a/keyboards/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk index 3229957d9c..4b51619da1 100644 --- a/keyboards/quantrik/kyuu/rules.mk +++ b/keyboards/quantrik/kyuu/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/qwertyydox/config.h b/keyboards/qwertyydox/config.h index 67f5d3c16a..3467952140 100644 --- a/keyboards/qwertyydox/config.h +++ b/keyboards/qwertyydox/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" @@ -33,6 +32,16 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 7 +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ // wiring of each half #define MATRIX_ROW_PINS { B6, B2, B3, B1 } #define MATRIX_COL_PINS { F7, F6, F5, C6, D7, D4, D1 } @@ -40,30 +49,139 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 +// #define BACKLIGHT_PIN E6 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 5 -/* Set 0 if debouncing isn't needed */ +#define RGB_DI_PIN D6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 12 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS + // /*== or choose animations ==*/ + // #define RGBLIGHT_EFFECT_BREATHING + // #define RGBLIGHT_EFFECT_RAINBOW_MOOD + // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + // #define RGBLIGHT_EFFECT_SNAKE + // #define RGBLIGHT_EFFECT_KNIGHT + // #define RGBLIGHT_EFFECT_CHRISTMAS + // #define RGBLIGHT_EFFECT_STATIC_GRADIENT + // #define RGBLIGHT_EFFECT_RGB_TEST + // #define RGBLIGHT_EFFECT_ALTERNATING + // /*== customize breathing effect ==*/ + // /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + // /*==== use exp() and sin() ====*/ + // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 -/* serial.c configuration for split keyboard */ -#define SOFT_SERIAL_PIN D0 +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define BACKLIGHT_PIN E6 -#define BACKLIGHT_LEVELS 5 +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE -/* ws2812 RGB LED */ -#define RGB_DI_PIN D6 +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO -#define RGBLED_NUM 12 // Number of LEDs +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +#define MOUSEKEY_DELAY 150 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 10 +#define MOUSEKEY_TIME_TO_MAX 10 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 /* * Feature disable options @@ -83,4 +201,57 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line #endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/qwertyydox/info.json b/keyboards/qwertyydox/info.json index 3dd6b3ec73..8616f274ea 100644 --- a/keyboards/qwertyydox/info.json +++ b/keyboards/qwertyydox/info.json @@ -5,12 +5,66 @@ "url": "", "maintainer": "qmk", "processor": "atmega32u4", - "width": 16, + "width": 16.25, "height": 5, "layouts": { "LAYOUT": { "key_count": 53, - "layout": [{"label":"L00", "x":0, "y":0.375}, {"label":"L01", "x":1, "y":0.25}, {"label":"L02", "x":2, "y":0.125}, {"label":"L03", "x":3, "y":0}, {"label":"L04", "x":4, "y":0.125}, {"label":"L05", "x":5, "y":0.25}, {"label":"L06", "x":6, "y":0.5}, {"label":"R00", "x":9, "y":0.5}, {"label":"R01", "x":10, "y":0.25}, {"label":"R02", "x":11, "y":0.125}, {"label":"R03", "x":12, "y":0}, {"label":"R04", "x":13, "y":0.125}, {"label":"R05", "x":14, "y":0.25}, {"label":"R06", "x":15, "y":0.375}, {"label":"L10", "x":0, "y":1.375}, {"label":"L11", "x":1, "y":1.25}, {"label":"L12", "x":2, "y":1.125}, {"label":"L13", "x":3, "y":1}, {"label":"L14", "x":4, "y":1.125}, {"label":"L15", "x":5, "y":1.25}, {"label":"L16", "x":6, "y":1.5}, {"label":"R10", "x":9, "y":1.5}, {"label":"R11", "x":10, "y":1.25}, {"label":"R12", "x":11, "y":1.125}, {"label":"R13", "x":12, "y":1}, {"label":"R14", "x":13, "y":1.125}, {"label":"R15", "x":14, "y":1.25}, {"label":"R16", "x":15, "y":1.375}, {"label":"L20", "x":0, "y":2.375}, {"label":"L21", "x":1, "y":2.25}, {"label":"L22", "x":2, "y":2.125}, {"label":"L23", "x":3, "y":2}, {"label":"L24", "x":4, "y":2.125}, {"label":"L25", "x":5, "y":2.25}, {"label":"L26", "x":6.5, "y":3}, {"label":"R20", "x":8.5, "y":3}, {"label":"R21", "x":10, "y":2.25}, {"label":"R22", "x":11, "y":2.125}, {"label":"R23", "x":12, "y":2}, {"label":"R24", "x":13, "y":2.125}, {"label":"R25", "x":14, "y":2.25}, {"label":"R26", "x":15, "y":2.375}, {"label":"L30", "x":0, "y":3.375}, {"label":"L31", "x":1, "y":3.25}, {"label":"L32", "x":2, "y":3.125}, {"label":"L33", "x":3, "y":3}, {"label":"L34", "x":5.5, "y":4}, {"label":"L35", "x":6.5, "y":4}, {"label":"R30", "x":8.5, "y":4}, {"label":"R31", "x":9.5, "y":4}, {"label":"R32", "x":12, "y":3}, {"label":"R33", "x":13, "y":3.125}, {"label":"R34", "x":14, "y":3.25}, {"label":"R35", "x":15, "y":3.375}] + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"Y", "x":9, "y":0}, + {"label":"U", "x":10, "y":0}, + {"label":"I", "x":11, "y":0}, + {"label":"O", "x":12, "y":0}, + {"label":"P", "x":13, "y":0}, + {"label":"{", "x":14, "y":0}, + {"label":"}", "x":15, "y":0}, + {"label":"Caps Lock", "x":0.25, "y":1}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":9.25, "y":1}, + {"label":"J", "x":10.25, "y":1}, + {"label":"K", "x":11.25, "y":1}, + {"label":"L", "x":12.25, "y":1}, + {"label":":", "x":13.25, "y":1}, + {"label":"\"", "x":14.25, "y":1}, + {"label":"|", "x":15.25, "y":1}, + {"label":"Shift", "x":0.75, "y":2}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":9.75, "y":2}, + {"label":"M", "x":10.75, "y":2}, + {"label":"<", "x":11.75, "y":2}, + {"label":">", "x":12.75, "y":2}, + {"label":"?", "x":13.75, "y":2}, + {"label":"Shift", "x":14.75, "y":2}, + {"label":"Ctrl", "x":0.75, "y":3}, + {"label":"GUI", "x":1.75, "y":3}, + {"label":"Alt", "x":2.75, "y":3}, + {"label":"\"-QWERTY\"", "x":3.75, "y":3}, + {"label":"Enter", "x":4.75, "y":3.33}, + {"label":"Delete", "x":5.75, "y":3.67}, + {"label":"TO(_NUM)", "x":6.75, "y":4}, + {"label":"TO(_NAV)", "x":8.75, "y":4}, + {"label":"Space", "x":9.75, "y":3.67}, + {"label":"Back Space", "x":10.75, "y":3.33}, + {"label":"Left", "x":11.75, "y":3}, + {"label":"Alt", "x":12.75, "y":3}, + {"label":"GUI", "x":13.75, "y":3}, + {"label":"Ctrl", "x":14.75, "y":3} + ] } } } diff --git a/keyboards/qwertyydox/keymaps/default/config.h b/keyboards/qwertyydox/keymaps/default/config.h index 6b4e3fe96e..cc85e4e2e8 100644 --- a/keyboards/qwertyydox/keymaps/default/config.h +++ b/keyboards/qwertyydox/keymaps/default/config.h @@ -27,17 +27,3 @@ along with this program. If not, see . // #define MASTER_LEFT #define MASTER_RIGHT // #define EE_HANDS - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - -#define MOUSEKEY_DELAY 150 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 10 -#define MOUSEKEY_TIME_TO_MAX 10 -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 \ No newline at end of file diff --git a/keyboards/qwertyydox/keymaps/default/keymap.c b/keyboards/qwertyydox/keymaps/default/keymap.c index 5967c5146f..2884fcfbce 100644 --- a/keyboards/qwertyydox/keymaps/default/keymap.c +++ b/keyboards/qwertyydox/keymaps/default/keymap.c @@ -1,10 +1,12 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; -#define _QWERTY 0 -#define _NUM 1 -#define _NAV 2 +enum layer_names { + _QWERTY, + _NUM, + _NAV +}; + enum custom_keycodes { qwerty = SAFE_RANGE, nav, @@ -12,17 +14,6 @@ enum custom_keycodes { EQL }; -// #define KC_ KC_TRNS -#define __ KC_NO -#define NAV TO(2) -#define NUM TO(1) -#define ALPHA TO(0) -#define NPLUS KC_KP_PLUS -#define NMINUS KC_KP_MINUS -#define NSTAR KC_KP_ASTERISK -#define NSLASH KC_KP_SLASH - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( @@ -31,33 +22,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| 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_BSLS, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, __, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_LGUI, KC_LALT, qwerty, KC_ENT, KC_DEL, NUM, NAV, KC_SPC, KC_BSPC, KC_LEFT, KC_RALT, KC_RGUI, KC_RCTL + KC_LCTL, KC_LGUI, KC_LALT, qwerty, KC_ENT, KC_DEL, TO(1), TO(2), KC_SPC, KC_BSPC, KC_LEFT, KC_RALT, KC_RGUI, KC_RCTL //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' ), [_NUM] = LAYOUT( //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - 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_PSCR, KC_NO, + 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_PSCR, KC_NO, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, __, KC_NO, KC_PPLS, KC_PMNS, EQL, KC_PAST, KC_PSLS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PPLS, KC_PMNS, EQL, KC_PAST, KC_PSLS, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_ESC, KC_NO, num, KC_ENT, KC_LSFT, NAV, ALPHA, KC_SPC, KC_BSPC, KC_LEFT, KC_RALT, KC_RGUI, KC_RCTL + KC_LCTL, KC_ESC, KC_NO, num, KC_ENT, KC_LSFT, TO(2), TO(0), KC_SPC, KC_BSPC, KC_LEFT, KC_RALT, KC_RGUI, KC_RCTL //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' ), [_NAV] = LAYOUT( //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - KC_ESC, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_WH_L, KC_WH_R, KC_ESC, KC_NO, KC_UP, NSLASH, NSTAR, NMINUS, NPLUS, + KC_ESC, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_WH_L, KC_WH_R, KC_ESC, KC_NO, KC_UP, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_WH_U, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO, + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_WH_U, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_INS, KC_HOME, KC_PGUP, KC_BTN1, KC_BTN2, KC_WH_D, __, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_INS, KC_HOME, KC_PGUP, KC_BTN1, KC_BTN2, KC_WH_D, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_NO, KC_NO, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_DEL, KC_END, KC_PGDN, nav, KC_LCTL, KC_SPC, ALPHA, NUM, KC_LSFT, KC_BSPC, KC_NO, KC_NO, KC_NO, RESET + KC_DEL, KC_END, KC_PGDN, nav, KC_LCTL, KC_SPC, TO(0), TO(1), KC_LSFT, KC_BSPC, KC_NO, KC_NO, KC_NO, RESET //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' ) }; diff --git a/keyboards/qwertyydox/qwertyydox.h b/keyboards/qwertyydox/qwertyydox.h index 57bd0dc54a..9eb4073dfe 100644 --- a/keyboards/qwertyydox/qwertyydox.h +++ b/keyboards/qwertyydox/qwertyydox.h @@ -1,24 +1,7 @@ -#ifndef QWERTYYDOX_H -#define QWERTYYDOX_H +#pragma once + +#include "quantum.h" #ifdef KEYBOARD_qwertyydox_rev1 #include "rev1.h" #endif - -#include "quantum.h" - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_kc( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ - ) - -#endif \ No newline at end of file diff --git a/keyboards/qwertyydox/rev1/config.h b/keyboards/qwertyydox/rev1/config.h index 703d62de75..b749fffcb7 100644 --- a/keyboards/qwertyydox/rev1/config.h +++ b/keyboards/qwertyydox/rev1/config.h @@ -15,72 +15,4 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H - -#include QMK_KEYBOARD_CONFIG_H - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB -#define PRODUCT_ID 0x1256 -#define DEVICE_VER 0x0100 -#define MANUFACTURER AYDENandDAD -#define PRODUCT QWERTYdox Keyboard -#define DESCRIPTION Split 40 percent keyboard - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 7 - -// wiring of each half -#define MATRIX_ROW_PINS { B6, B2, B3, B1 } -#define MATRIX_COL_PINS { F7, F6, F5, C6, D7, D4, D1 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* serial.c configuration for split keyboard */ -#define SOFT_SERIAL_PIN D0 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -#define BACKLIGHT_PIN E6 -#define BACKLIGHT_LEVELS 5 - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D6 - -#define RGBLED_NUM 12 // Number of LEDs - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif +#pragma once diff --git a/keyboards/qwertyydox/rev1/rev1.h b/keyboards/qwertyydox/rev1/rev1.h index d620e62108..a7b30b648f 100644 --- a/keyboards/qwertyydox/rev1/rev1.h +++ b/keyboards/qwertyydox/rev1/rev1.h @@ -1,12 +1,7 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "qwertyydox.h" -//void promicro_bootloader_jmp(bool program); -#include "quantum.h" - - #ifdef USE_I2C #include #ifdef __AVR__ @@ -15,12 +10,10 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, \ + L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 \ ) \ { \ @@ -30,8 +23,6 @@ { L30, L31, L32, L33, L34, L35, L36 }, \ { R06, R05, R04, R03, R02, R01, R00 }, \ { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20, }, \ + { R26, R25, R24, R23, R22, R21, KC_NO, }, \ { R36, R35, R34, R33, R32, R31, R30 } \ } - -#endif diff --git a/keyboards/qwertyydox/rev1/rules.mk b/keyboards/qwertyydox/rev1/rules.mk index 7b30c0beff..e69de29bb2 100644 --- a/keyboards/qwertyydox/rev1/rules.mk +++ b/keyboards/qwertyydox/rev1/rules.mk @@ -1 +0,0 @@ -BACKLIGHT_ENABLE = no diff --git a/keyboards/qwertyydox/rules.mk b/keyboards/qwertyydox/rules.mk index 8c6171bc00..4faab2607b 100644 --- a/keyboards/qwertyydox/rules.mk +++ b/keyboards/qwertyydox/rules.mk @@ -1,48 +1,16 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -53,14 +21,12 @@ EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes # I2C is used between the sides # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/rabbit/rabbit68/config.h b/keyboards/rabbit/rabbit68/config.h new file mode 100644 index 0000000000..5a91b37909 --- /dev/null +++ b/keyboards/rabbit/rabbit68/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Kai Eckert + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x68F1 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kai Eckert +#define PRODUCT Rabbit68 +#define DESCRIPTION An ortholinear 68 keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B6, D7, D0, B3, B7 } +#define MATRIX_COL_PINS { D6, D1, B4, D2, B5, F7, F6, F5, F4, F1, F0, B0, B1, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/rabbit/rabbit68/info.json b/keyboards/rabbit/rabbit68/info.json new file mode 100644 index 0000000000..fb24d4d105 --- /dev/null +++ b/keyboards/rabbit/rabbit68/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "Rabbit68", + "url": "", + "maintainer": "kaiec", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k10", "x":0, "y":1}, + {"label":"k11", "x":1, "y":1}, + {"label":"k12", "x":2, "y":1}, + {"label":"k13", "x":3, "y":1}, + {"label":"k14", "x":4, "y":1}, + {"label":"k15", "x":5, "y":1}, + {"label":"k16", "x":6, "y":1}, + {"label":"k17", "x":7, "y":1}, + {"label":"k18", "x":8, "y":1}, + {"label":"k19", "x":9, "y":1}, + {"label":"k1a", "x":10, "y":1}, + {"label":"k1b", "x":11, "y":1}, + {"label":"k1c", "x":12, "y":1}, + {"label":"k1d", "x":13, "y":1}, + {"label":"k20", "x":0, "y":2}, + {"label":"k21", "x":1, "y":2}, + {"label":"k22", "x":2, "y":2}, + {"label":"k23", "x":3, "y":2}, + {"label":"k24", "x":4, "y":2}, + {"label":"k25", "x":5, "y":2}, + {"label":"k26", "x":6, "y":2}, + {"label":"k27", "x":7, "y":2}, + {"label":"k28", "x":8, "y":2}, + {"label":"k29", "x":9, "y":2}, + {"label":"k2a", "x":10, "y":2}, + {"label":"k2b", "x":11, "y":2}, + {"label":"k2c", "x":12, "y":2}, + {"label":"k2d", "x":13, "y":2}, + {"label":"k30", "x":0, "y":3}, + {"label":"k31", "x":1, "y":3}, + {"label":"k32", "x":2, "y":3}, + {"label":"k33", "x":3, "y":3}, + {"label":"k34", "x":4, "y":3}, + {"label":"k35", "x":5, "y":3}, + {"label":"k36", "x":6, "y":3}, + {"label":"k37", "x":7, "y":3}, + {"label":"k38", "x":8, "y":3}, + {"label":"k39", "x":9, "y":3}, + {"label":"k3a", "x":10, "y":3}, + {"label":"k3b", "x":11, "y":3}, + {"label":"k3c", "x":12, "y":3}, + {"label":"k3d", "x":13, "y":3}, + {"label":"k40", "x":0, "y":4}, + {"label":"k41", "x":1, "y":4}, + {"label":"k42", "x":2, "y":4, "w":1.25}, + {"label":"k43", "x":3.25, "y":4, "w":1.25}, + {"label":"k45", "x":4.5, "y":4, "w":1.5}, + {"label":"k46", "x":6, "y":4, "w":1.5}, + {"label":"k48", "x":7.5, "y":4, "w":1.25}, + {"label":"k49", "x":8.75, "y":4, "w":1.25}, + {"label":"k4a", "x":10, "y":4}, + {"label":"k4b", "x":11, "y":4}, + {"label":"k4c", "x":12, "y":4}, + {"label":"k4d", "x":13, "y":4} + ] + } + } +} diff --git a/keyboards/rabbit/rabbit68/keymaps/default/config.h b/keyboards/rabbit/rabbit68/keymaps/default/config.h new file mode 100644 index 0000000000..1da00a2979 --- /dev/null +++ b/keyboards/rabbit/rabbit68/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Kai Eckert + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/rabbit/rabbit68/keymaps/default/keymap.c b/keyboards/rabbit/rabbit68/keymaps/default/keymap.c new file mode 100644 index 0000000000..ef5cfff8d7 --- /dev/null +++ b/keyboards/rabbit/rabbit68/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Kai Eckert + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +// enum custom_keycodes { QMKBEST = SAFE_RANGE, QMKURL }; + + +#define _BASE 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + 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_ENT, KC_PGUP, + KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_SPC, KC_SPC, KC_RALT, MO(_FN), KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/rabbit/rabbit68/keymaps/default/readme.md b/keyboards/rabbit/rabbit68/keymaps/default/readme.md new file mode 100644 index 0000000000..5c7b3de20b --- /dev/null +++ b/keyboards/rabbit/rabbit68/keymaps/default/readme.md @@ -0,0 +1,8 @@ +# The default keymap for rabbit68 + +Based on this layout: http://www.keyboard-layout-editor.com/#/gists/c885816c6b763c657e40474b015e362b + +- US QWERTY Keys +- Esc instead of CAPS +- F Keys on FN Layer + diff --git a/keyboards/rabbit/rabbit68/keymaps/kaiec/config.h b/keyboards/rabbit/rabbit68/keymaps/kaiec/config.h new file mode 100644 index 0000000000..1da00a2979 --- /dev/null +++ b/keyboards/rabbit/rabbit68/keymaps/kaiec/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Kai Eckert + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/rabbit/rabbit68/keymaps/kaiec/keymap.c b/keyboards/rabbit/rabbit68/keymaps/kaiec/keymap.c new file mode 100644 index 0000000000..44b2ca8c6d --- /dev/null +++ b/keyboards/rabbit/rabbit68/keymaps/kaiec/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Kai Eckert + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +// enum custom_keycodes { QMKBEST = SAFE_RANGE, QMKURL }; + + +#define _BASE 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_SPC, KC_SPC, KC_RALT, MO(_FN), KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/rabbit/rabbit68/keymaps/kaiec/readme.md b/keyboards/rabbit/rabbit68/keymaps/kaiec/readme.md new file mode 100644 index 0000000000..e88b30730a --- /dev/null +++ b/keyboards/rabbit/rabbit68/keymaps/kaiec/readme.md @@ -0,0 +1,6 @@ +# Kaiec's personal keymap + +- US Layout +- Y and Z switched (to be closer to German layout) +- Right Alt plus AOUS produces German umlauts +- Escape produces `~ (as this is mapped back to ESC on OS level) diff --git a/keyboards/rabbit/rabbit68/rabbit68.c b/keyboards/rabbit/rabbit68/rabbit68.c new file mode 100644 index 0000000000..a9e4c6533d --- /dev/null +++ b/keyboards/rabbit/rabbit68/rabbit68.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Kai Eckert + * + * 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 . + */ +#include "rabbit68.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/rabbit/rabbit68/rabbit68.h b/keyboards/rabbit/rabbit68/rabbit68.h new file mode 100644 index 0000000000..100863e76f --- /dev/null +++ b/keyboards/rabbit/rabbit68/rabbit68.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Kai Eckert + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k43, k45, k46, k48, k49, k4a, k4b, k4c, k4d \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + { k40, k41, k42, k43, KC_NO, k45, k46, KC_NO, k48, k49, k4a, k4b, k4c, k4d} \ +} diff --git a/keyboards/rabbit/rabbit68/readme.md b/keyboards/rabbit/rabbit68/readme.md new file mode 100644 index 0000000000..e263f6c985 --- /dev/null +++ b/keyboards/rabbit/rabbit68/readme.md @@ -0,0 +1,20 @@ +Rabbit 68 +=== + +![Rabbit 68 Project](https://raw.githubusercontent.com/kaiec/rabbit68/master/images/rabbit68-rev1-rendered-bg.jpg) + +A compact 68 keys ortholinear keyboard. + +Keyboard Maintainer: [Kai Eckert](https://github.com/kaiec) +Hardware Supported: Rabbit68 PCB rev1 +Hardware Availability: [Open Source](https://github.com/kaiec/rabbit68) + +Make example for this keyboard (after setting up your build environment): + + make rabbit/rabbit68:default + +Install examples: + + make rabbit/rabbit68: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). diff --git a/keyboards/rabbit/rabbit68/rules.mk b/keyboards/rabbit/rabbit68/rules.mk new file mode 100644 index 0000000000..1bf19e4e19 --- /dev/null +++ b/keyboards/rabbit/rabbit68/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/rama/koyu/config.h b/keyboards/rama/koyu/config.h deleted file mode 100644 index 4fa8c3d8ad..0000000000 --- a/keyboards/rama/koyu/config.h +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -#include "config_common.h" - -// USB Device descriptor parameter -#define VENDOR_ID 0x5241 // "RW" -#define PRODUCT_ID 0x4B59 // "KY" -#define DEVICE_VER 0x0001 -#define MANUFACTURER RAMA.WORKS -#define PRODUCT RAMA KOYU -#define DESCRIPTION RAMA KOYU Keyboard - - - -// key matrix size -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -// KOYU PCB pin-out -#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } -#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS - -// IS31FL3731 driver -#define DRIVER_COUNT 2 -#define DRIVER_LED_TOTAL 72 - -// COL2ROW or ROW2COL -#define DIODE_DIRECTION COL2ROW - -// Set 0 if debouncing isn't needed -#define DEBOUNCE 5 - -// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -#define LOCKING_SUPPORT_ENABLE -// Locking resynchronize hack -#define LOCKING_RESYNC_ENABLE - - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -// disable debug print -//#define NO_DEBUG - -// disable print -//#define NO_PRINT - -// disable action features -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#define RGB_BACKLIGHT_ENABLED 1 - -// This conditionally compiles the backlight code for KOYU specifics -#define RGB_BACKLIGHT_KOYU - -// enable/disable LEDs based on layout -// they aren't really used if RGB_BACKLIGHT_M60_A defined -#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 -#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 -#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 -#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 -#define RGB_BACKLIGHT_USE_ISO_ENTER 0 -#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 1 - -// disable backlight when USB suspended (PC sleep/hibernate/shutdown) -#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 - -// disable backlight after timeout in minutes, 0 = no timeout -#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 - -// the default brightness -#define RGB_BACKLIGHT_BRIGHTNESS 255 - -// the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 - -// the default effect speed (0-3) -#define RGB_BACKLIGHT_EFFECT_SPEED 0 - -// the default color1 and color2 -#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } -#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } - -// These define which keys in the matrix are alphas/mods -// Used for backlight effects so colors are different for -// alphas vs. mods -// Each value is for a row, bit 0 is column 0 -// Alpha=0 Mod=1 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0110000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0111000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111100000000111 - -#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 66 -// Dynamic macro starts after dynamic keymaps (66+(4*5*15*2)) = (66+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 666 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 358 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/rama/koyu/info.json b/keyboards/rama/koyu/info.json deleted file mode 100644 index 4b6edc7bfa..0000000000 --- a/keyboards/rama/koyu/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "KOYU", - "url": "", - "maintainer": "Wilba", - "bootloader": "DFU", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT_all": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Num Lock", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Insert", "x":15, "y":1}, {"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":"Home", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"/", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Ctrl", "x":11, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] - } - } -} \ No newline at end of file diff --git a/keyboards/rama/koyu/koyu.h b/keyboards/rama/koyu/koyu.h deleted file mode 100644 index c2aaa0273a..0000000000 --- a/keyboards/rama/koyu/koyu.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2018 Jason Williams (Wilba) - * - * 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 . - */ - -#pragma once - -#include "quantum.h" -#include "../../zeal60/rgb_backlight_keycodes.h" -#include "../../zeal60/zeal60_keycodes.h" - -#define ____ KC_NO - -// Right switch of split backspace is at 2,13 and is the only switch -// whose physical position doesn't match switch matrix position :-( -// However, it also makes no sense to view the physical as 16 columns, -// so the numbering goes 00 to 14. Deal with it. - -#define LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ - K400, K401, K402, K407, K411, K412, K413, K414 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ - { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ - { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413, K414 } \ -} diff --git a/keyboards/rama/koyu/readme.md b/keyboards/rama/koyu/readme.md deleted file mode 100644 index c249bf11b6..0000000000 --- a/keyboards/rama/koyu/readme.md +++ /dev/null @@ -1,23 +0,0 @@ -# RAMA KOYU - -![RAMA KOYU](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/5b8bd6e6b8a045c95eac2003/1535891375794/RW-KOYU-A-RENDER-04-TOP.1335.jpg?format=1500w) - -The 'wait' for something isn't the most conscious desire, but that anticipation creates nostalgia. - -At Rama Works, you've embraced this. From updates of the blog, to direct communication with the community, being part of a Rama Works product doesn't just start when you receive it. If you've ever received a Rama Works product, you know that no detail is overlooked. - -Let us take you on a journey that will capture that sensory experience, and explore the gravitational interaction between aesthetic and design. The Rama Works 'X' element personifies the understanding that taking something away doesn't necessarily make it less. - -This is the sound of Rama Works. Never too busy-a feeling of delightful modern weightlessness. A rich sonic experience. Sparse and ethereal, this music boldly inhabits a nondescript, borderless space. Warm, synthetic textures, bespoke musical sound design. percussive elements percolating and accentuating movement on the screen and in the stereo field. a sonic palette full of clicks, taps and resonances evoking a sense of calm comfort and familiarity. - -[More info at RAMA WORKS](https://rama.works/koyu/) - -Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: RAMA KOYU PCB -Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) - -Make example for this keyboard (after setting up your build environment): - - make rama/koyu: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). \ No newline at end of file diff --git a/keyboards/rama/koyu/rules.mk b/keyboards/rama/koyu/rules.mk deleted file mode 100644 index 5e470769d6..0000000000 --- a/keyboards/rama/koyu/rules.mk +++ /dev/null @@ -1,80 +0,0 @@ - - -# project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section -BOOTLOADER = atmel-dfu - -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. -OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes - -#LAYOUTS = ??? diff --git a/keyboards/rama/m10_b/config.h b/keyboards/rama/m10_b/config.h deleted file mode 100644 index 32d1d21ed3..0000000000 --- a/keyboards/rama/m10_b/config.h +++ /dev/null @@ -1,206 +0,0 @@ -/* -Copyright 2018 Wilba - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" -#define PRODUCT_ID 0x00AB // 10-B -#define DEVICE_VER 0x0001 -#define MANUFACTURER RAMA.WORKS -#define PRODUCT RAMA M10-B -#define DESCRIPTION RAMA M10-B - -/* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 10 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { E6 } -#define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -#define BACKLIGHT_PIN C6 -//#define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 3 - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -//#define WT_MONO_BACKLIGHT - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*2)) = (35+80) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 115 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 909 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 - -#endif diff --git a/keyboards/rama/m10_b/info.json b/keyboards/rama/m10_b/info.json deleted file mode 100644 index fb144030d0..0000000000 --- a/keyboards/rama/m10_b/info.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "keyboard_name": "m10-b", - "url": "", - "maintainer": "qmk", - "width": 3, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [ - { "x": 0, "y": 0 }, - { "x": 1, "y": 0 }, - { "x": 2, "y": 0 }, - { "x": 0, "y": 1 }, - { "x": 1, "y": 1 }, - { "x": 2, "y": 1 }, - { "x": 0, "y": 2 }, - { "x": 1, "y": 2 }, - { "x": 2, "y": 2 }, - { "x": 1, "y": 3, "w": 2.0 } - ] - } - } -} diff --git a/keyboards/rama/m10_b/readme.md b/keyboards/rama/m10_b/readme.md deleted file mode 100644 index 9facb5cd34..0000000000 --- a/keyboards/rama/m10_b/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# RAMA M10-B - -![RAMA M10-B](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/5b4997390e2e72d65f7a8e83/5b499748352f534ffb40392b/1531549522790/RAMA-M10-B-04.572.jpg?format=1500w) - -Mechanical Mini Pad. [More info at Massdrop](https://www.massdrop.com/buy/rama-m10-a) - -Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: RAMA M10-B PCB -Hardware Availability: [Massdrop](https://www.massdrop.com/buy/rama-m10-a) - -Make example for this keyboard (after setting up your build environment): - - make rama/m10_b:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. \ No newline at end of file diff --git a/keyboards/rama/m10_b/rules.mk b/keyboards/rama/m10_b/rules.mk deleted file mode 100644 index 70258b9ead..0000000000 --- a/keyboards/rama/m10_b/rules.mk +++ /dev/null @@ -1,68 +0,0 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/rama/m60_a/config.h b/keyboards/rama/m60_a/config.h deleted file mode 100644 index b3e9162311..0000000000 --- a/keyboards/rama/m60_a/config.h +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -#include "config_common.h" - -// USB Device descriptor parameter -#define VENDOR_ID 0x5241 // "RW" -#define PRODUCT_ID 0x060A // 60-A -#define DEVICE_VER 0x0001 -#define MANUFACTURER RAMA.WORKS -#define PRODUCT RAMA M60-A -#define DESCRIPTION RAMA M60-A Keyboard - -// key matrix size -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -// M60-A PCB default pin-out -#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } -#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS - -// IS31FL3731 driver -#define DRIVER_COUNT 2 -#define DRIVER_LED_TOTAL 72 - -// COL2ROW or ROW2COL -#define DIODE_DIRECTION COL2ROW - -// Set 0 if debouncing isn't needed -#define DEBOUNCE 5 - -// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -#define LOCKING_SUPPORT_ENABLE -// Locking resynchronize hack -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -// disable debug print -//#define NO_DEBUG - -// disable print -//#define NO_PRINT - -// disable action features -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#define RGB_BACKLIGHT_ENABLED 1 - -// This conditionally compiles the backlight code for M60-A specifics -#define RGB_BACKLIGHT_M60_A - -// enable/disable LEDs based on layout -// they aren't really used if RGB_BACKLIGHT_M60_A defined -#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 -#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 -#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 -#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 -#define RGB_BACKLIGHT_USE_ISO_ENTER 0 -#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 1 - -// disable backlight when USB suspended (PC sleep/hibernate/shutdown) -#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 - -// disable backlight after timeout in minutes, 0 = no timeout -#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 - -// the default brightness -#define RGB_BACKLIGHT_BRIGHTNESS 255 - -// the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 - -// the default effect speed (0-3) -#define RGB_BACKLIGHT_EFFECT_SPEED 0 - -// the default color1 and color2 -#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } -#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } - -// These define which keys in the matrix are alphas/mods -// Used for backlight effects so colors are different for -// alphas vs. mods -// Each value is for a row, bit 0 is column 0 -// Alpha=0 Mod=1 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0010000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 - -#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 66 -// Dynamic macro starts after dynamic keymaps (66+(4*5*14*2)) = (66+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 626 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/rama/m60_a/info.json b/keyboards/rama/m60_a/info.json deleted file mode 100644 index 577becd219..0000000000 --- a/keyboards/rama/m60_a/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "M60-A", - "url": "", - "maintainer": "Wilba", - "bootloader": "DFU", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_60_hhkb": { - "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":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":2.25}, {"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}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] - } - } -} \ No newline at end of file diff --git a/keyboards/rama/m60_a/m60_a.h b/keyboards/rama/m60_a/m60_a.h deleted file mode 100644 index 3caab6ac0f..0000000000 --- a/keyboards/rama/m60_a/m60_a.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -#include "quantum.h" -#include "../../zeal60/rgb_backlight_keycodes.h" -#include "../../zeal60/zeal60_keycodes.h" - -#define XXX KC_NO - -#define LAYOUT_60_hhkb( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ - 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, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K41, K42, K47, K4B, K4C \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { XXX, K41, K42, XXX, XXX, XXX, XXX, K47, XXX, XXX, XXX, K4B, K4C, XXX } \ -} - diff --git a/keyboards/rama/m60_a/readme.md b/keyboards/rama/m60_a/readme.md deleted file mode 100644 index fe54f0163a..0000000000 --- a/keyboards/rama/m60_a/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# RAMA M60-A - -![RAMA M60-A](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/5aafa6a20e2e7254480b21bf/1535873164793/RAMA-M60-A-03.688.jpg?format=1500w) - -The M60-A represents the benchmark and equilibrium between function and design for us at Rama Works. The gently exaggerated design of the frame is not understated, but rather provocative. Inspiration and evolution from previous models are evident in the beautifully articulated design and the well defined aesthetic, the fingerprint of our 'Industrial Modern' designs. The M60-A offers a unique contender in the traditional 60% form factor. [More info at RAMA WORKS](https://rama.works/m60-a/) - -Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: RAMA M60-A PCB -Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) - -Make example for this keyboard (after setting up your build environment): - - make rama/m60_a:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/rama/m60_a/rules.mk b/keyboards/rama/m60_a/rules.mk deleted file mode 100644 index 09ed03e951..0000000000 --- a/keyboards/rama/m60_a/rules.mk +++ /dev/null @@ -1,80 +0,0 @@ - - -# project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section -BOOTLOADER = atmel-dfu - -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. -OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes - -LAYOUTS = 60_hhkb diff --git a/keyboards/rama/m6_a/config.h b/keyboards/rama/m6_a/config.h deleted file mode 100644 index 341e29b958..0000000000 --- a/keyboards/rama/m6_a/config.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright 2018 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" -#define PRODUCT_ID 0x006A // 6-A -#define DEVICE_VER 0x0001 -#define MANUFACTURER RAMA.WORKS -#define PRODUCT RAMA M6-A -#define DESCRIPTION RAMA M6-A Macropad - -/* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 6 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { E6 } -#define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -#define RGB_BACKLIGHT_ENABLED 0 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 - -// NOTE: M6-A doesn't use RGB backlight, but we keep this -// consistent with M6-B which does. - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+43) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 78 -// Dynamic macro starts after dynamic keymaps (78+(4*6*2)) = (78+48) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 126 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 898 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/rama/m6_a/info.json b/keyboards/rama/m6_a/info.json deleted file mode 100644 index 28dd733dac..0000000000 --- a/keyboards/rama/m6_a/info.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "keyboard_name": "m6-a", - "url": "", - "maintainer": "qmk", - "width": 3, - "height": 2, - "layouts": { - "LAYOUT": { - "layout": [ - { "x": 0, "y": 0 }, - { "x": 1, "y": 0 }, - { "x": 2, "y": 0 }, - { "x": 0, "y": 1 }, - { "x": 1, "y": 1 }, - { "x": 2, "y": 1 } - ] - } - } -} diff --git a/keyboards/rama/m6_a/readme.md b/keyboards/rama/m6_a/readme.md deleted file mode 100644 index ceaf6a88de..0000000000 --- a/keyboards/rama/m6_a/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# RAMA M6-A - -![RAMA M6-A](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/59fc7b1053450adf5bf9a852/1515932239307/RAMA-RAMA-M6-DSA-XO-CAPS.73-3_1.jpg?format=1500w) - -A 6-key companion keyboard. [More info at RAMA WORKS](https://rama.works/m6a) - -Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: RAMA M6-A PCB -Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) - -Make example for this keyboard (after setting up your build environment): - - make rama/m6_a:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/rama/m6_a/rules.mk b/keyboards/rama/m6_a/rules.mk deleted file mode 100644 index 399e9e80d6..0000000000 --- a/keyboards/rama/m6_a/rules.mk +++ /dev/null @@ -1,74 +0,0 @@ -# project specific files -SRC = keyboards/zeal60/zeal60.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section -BOOTLOADER = atmel-dfu - -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. -OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = no - diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h deleted file mode 100644 index 015bc6df8a..0000000000 --- a/keyboards/rama/m6_b/config.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright 2018 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" -#define PRODUCT_ID 0x006B // 6-B -#define DEVICE_VER 0x0001 -#define MANUFACTURER RAMA.WORKS -#define PRODUCT RAMA M6-B -#define DESCRIPTION RAMA M6-B Macropad - -/* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 6 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { E6 } -#define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -#define RGB_BACKLIGHT_ENABLED 1 - -// This conditionally compiles the backlight code for M6-B specifics -#define RGB_BACKLIGHT_M6_B - -// enable/disable LEDs based on layout -#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 -#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 -#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 -#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 -#define RGB_BACKLIGHT_USE_ISO_ENTER 0 -#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 - -// disable backlight when USB suspended (PC sleep/hibernate/shutdown) -#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 - -// disable backlight after timeout in minutes, 0 = no timeout -#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 - -// the default brightness -#define RGB_BACKLIGHT_BRIGHTNESS 255 - -// the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 - -// the default effect speed (0-3) -#define RGB_BACKLIGHT_EFFECT_SPEED 0 - -// the default color1 and color2 -#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } -#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } - -// These define which keys in the matrix are alphas/mods -// Used for backlight effects so colors are different for -// alphas vs. mods -// Each value is for a row, bit 0 is column 0 -// Alpha=0 Mod=1 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0 - -#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+43) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 78 -// Dynamic macro starts after dynamic keymaps (78+(4*6*2)) = (78+48) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 126 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 898 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/rama/m6_b/info.json b/keyboards/rama/m6_b/info.json deleted file mode 100644 index c88a3cc618..0000000000 --- a/keyboards/rama/m6_b/info.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "keyboard_name": "m6-b", - "url": "", - "maintainer": "qmk", - "width": 3, - "height": 2, - "layouts": { - "LAYOUT": { - "layout": [ - { "x": 0, "y": 0 }, - { "x": 1, "y": 0 }, - { "x": 2, "y": 0 }, - { "x": 0, "y": 1 }, - { "x": 1, "y": 1 }, - { "x": 2, "y": 1 } - ] - } - } -} diff --git a/keyboards/rama/m6_b/readme.md b/keyboards/rama/m6_b/readme.md deleted file mode 100644 index d6bdd0c4c2..0000000000 --- a/keyboards/rama/m6_b/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# RAMA M6-B - -![RAMA M6-B](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/59fc7b1053450adf5bf9a852/1515932239307/RAMA-RAMA-M6-DSA-XO-CAPS.73-3_1.jpg?format=1500w) - -A 6-key companion keyboard. [More info at RAMA WORKS](https://rama.works/m6a) - -Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: RAMA M6-B PCB -Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) - -Make example for this keyboard (after setting up your build environment): - - make rama/m6_b:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/rama/m6_b/rules.mk b/keyboards/rama/m6_b/rules.mk deleted file mode 100644 index b7a76b8ddd..0000000000 --- a/keyboards/rama/m6_b/rules.mk +++ /dev/null @@ -1,79 +0,0 @@ -# project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3218.c \ - drivers/avr/i2c_master.c - - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section -BOOTLOADER = atmel-dfu - -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. -OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes - diff --git a/keyboards/rama/readme.md b/keyboards/rama/readme.md deleted file mode 100644 index c7ddf6d111..0000000000 --- a/keyboards/rama/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# RAMA - -Firmware for keyboards designed by [RAMA WORKS](https://rama.works) - -[RAMA M6-A](https://rama.works/m6a) - -[RAMA M60-A](https://rama.works/#/m60-a/) - -[RAMA U80-A](https://rama.works/#/tkl-a/) - -[RAMA M10-B](https://www.massdrop.com/buy/rama-m10-a?mode=guest_open) diff --git a/keyboards/rama/u80_a/config.h b/keyboards/rama/u80_a/config.h deleted file mode 100644 index 44d9e21333..0000000000 --- a/keyboards/rama/u80_a/config.h +++ /dev/null @@ -1,202 +0,0 @@ -/* Copyright 2018 Jason Williams (Wilba) - * - * 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 . - */ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" -#define PRODUCT_ID 0x080A // 80-A -#define DEVICE_VER 0x0001 -#define MANUFACTURER RAMA.WORKS -#define PRODUCT RAMA U80-A -#define DESCRIPTION RAMA U80-A Keyboard - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 17 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } -#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION ROW2COL - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#define WT_MONO_BACKLIGHT - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x07 -#define EEPROM_VERSION_ADDR 34 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*6*17*2)) = (35+816) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 851 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 173 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/rama/u80_a/info.json b/keyboards/rama/u80_a/info.json deleted file mode 100644 index cb61c89b88..0000000000 --- a/keyboards/rama/u80_a/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "RAMA U80-A", - "url": "https://rama.works/#/tkl-a/", - "maintainer": "Wilba", - "bootloader": "atmel-dfu", - "width": 18.25, - "height": 6.5, - "layouts": { - "LAYOUT_all": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5}, {"x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] - } - } -} diff --git a/keyboards/rama/u80_a/keymaps/default/keymap.c b/keyboards/rama/u80_a/keymaps/default/keymap.c deleted file mode 100644 index 036a57b689..0000000000 --- a/keyboards/rama/u80_a/keymaps/default/keymap.c +++ /dev/null @@ -1,37 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_all( - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - 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_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - [1] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -}; - diff --git a/keyboards/rama/u80_a/readme.md b/keyboards/rama/u80_a/readme.md deleted file mode 100644 index c98d00cb6b..0000000000 --- a/keyboards/rama/u80_a/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# RAMA U80-A - -![RAMA U80-A](https://something.com/something.jpg) - -A TKL keyboard. [More info at RAMA WORKS](https://rama.works/#/tkl-a/) - -Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: RAMA U80-A PCB -Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) - -Make example for this keyboard (after setting up your build environment): - - make rama/u80_a:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/rama/u80_a/rules.mk b/keyboards/rama/u80_a/rules.mk deleted file mode 100644 index 54479529be..0000000000 --- a/keyboards/rama/u80_a/rules.mk +++ /dev/null @@ -1,71 +0,0 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/rama/u80_a/u80_a.h b/keyboards/rama/u80_a/u80_a.h deleted file mode 100644 index 26403ef347..0000000000 --- a/keyboards/rama/u80_a/u80_a.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2018 Jason Williams (Wilba) - * - * 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 . - */ - -#pragma once - -#include "quantum.h" - -#define ____ KC_NO - -// Right switch of split backspace is at 3,13 and is the only switch -// whose physical position doesn't match switch matrix position :-( -// However, it also makes no sense to view the physical as 18 columns, -// so the numbering goes 00 to 16. Deal with it. - -#define LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K313, K114, K115, K116, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ - K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ - K500, K501, K502, K506, K510, K511, K512, K513, K514, K515, K516 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014, K015, K016 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, ____, ____, ____ }, \ - { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, ____, K415, ____ }, \ - { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, K514, K515, K516 } \ -} - diff --git a/keyboards/readme.md b/keyboards/readme.md index 8b6e40721c..db2a18cc93 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -59,5 +59,6 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [TheVan 44](/keyboards/tv44) — A 44-key staggered keybard by Evangs. * [WhiteFox](/keyboards/whitefox) — A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club * [Vision Division](/keyboards/vision_division) — Full Size / Split Linear Keyboard by IBNobody. +* [XD004](/keyboards/xd004) — 1x4 macro keyboard sold by KPrepublic. * [XD75](/keyboards/xd75) — 15x5 ortholinear keyboard by XIUDI. * [YMDK NP21](/keyboards/ymdk_np21) — ps2avrGB based number pad (numpad) sold by YMDK on Aliexpress. diff --git a/keyboards/redox/keymaps/KL1RL/config.h b/keyboards/redox/keymaps/KL1RL/config.h new file mode 100644 index 0000000000..ea7525b388 --- /dev/null +++ b/keyboards/redox/keymaps/KL1RL/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Mattia Dal Ben + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ +//#define MASTER_LEFT +//#define MASTER_RIGHT +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/redox/keymaps/KL1RL/keymap.c b/keyboards/redox/keymaps/KL1RL/keymap.c new file mode 100644 index 0000000000..2986a51ceb --- /dev/null +++ b/keyboards/redox/keymaps/KL1RL/keymap.c @@ -0,0 +1,90 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _NAV 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SYMB, + NAV, + ADJUST, +}; + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALAS LALT_T(KC_PAST) +#define KC_CTES LCTL_T(KC_ESC) +#define KC_CTQU RCTL_T(KC_QUOT) + +#define KC_NAGR LT(_NAV, KC_GRV) +#define KC_NAMI LT(_NAV, KC_MINS) + +#define KC_ADEN LT(_ADJUST, KC_END) +#define KC_ADPU LT(_ADJUST, KC_PGUP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CTES ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOTE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,KC_F6 , KC_F7 ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,KC_WH_U ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,KC_MS_L ,KC_MS_D ,KC_MS_U ,KC_MS_R ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_WH_D ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,KC_BTN3 , KC_BTN3 ,KC_BTN2 , KC_BTN1 , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_MUTE , KC_VOLD ,KC_VOLU , KC_BRID ,KC_BRIU , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/redox/keymaps/KL1RL/readme.md b/keyboards/redox/keymaps/KL1RL/readme.md new file mode 100644 index 0000000000..520d004813 --- /dev/null +++ b/keyboards/redox/keymaps/KL1RL/readme.md @@ -0,0 +1,22 @@ +# A tweaked keymap for Redox + +I copied fculpo's layout and made a few modifcations more suited for my own needs. In general it seems to be a fairly straight foward adaptation +of a standard QWERTY full size keyboard. At least for me. + +![fculpo Layout Image](https://i.imgur.com/OXT8boJ.png) + +## Changes to the default keymap + +Keymap changes from the default keymap are: + +- Move `GUI` (`SUPER`) key to where default left `CTRL` is +- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive +- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?` +- Change default `ESC` into `ESC` on tap, `CTRL` on hold - for the love of the UNIX-ey `CTRL` key location and to keep `ESC` in the original position +- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer)S +- Access ADJUST layer by holding either `END` or `PAGEUP` off default layer. + +Changes by KL1RL are: +- Remove the right hand `CTRL` combo key, it was bugging me. +- Add Brightness Up and Brightness Down on the right hand thumb cluster on the ADJUST layer. +- Add Mute, Vol Down and Vol Up on LH thumb cluster also on the ADJUST layer. diff --git a/keyboards/keebio/chocopad/keymaps/default/rules.mk b/keyboards/redox/keymaps/KL1RL/rules.mk similarity index 100% rename from keyboards/keebio/chocopad/keymaps/default/rules.mk rename to keyboards/redox/keymaps/KL1RL/rules.mk diff --git a/keyboards/redox/keymaps/default/keymap.c b/keyboards/redox/keymaps/default/keymap.c index ef8eeb2e14..56c80878f4 100644 --- a/keyboards/redox/keymaps/default/keymap.c +++ b/keyboards/redox/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -19,11 +17,10 @@ enum custom_keycodes { }; // Shortcut to make keymap more readable -#define KC_BKSL KC_BSLASH #define SYM_L MO(_SYMB) #define KC_ALAS LALT_T(KC_PAST) -#define KC_CTPL LCTL_T(KC_PSLS) +#define KC_CTPL LCTL_T(KC_BSLS) #define KC_NAGR LT(_NAV, KC_GRV) #define KC_NAMI LT(_NAV, KC_MINS) @@ -41,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,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_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_BKSL ,KC_RSFT , + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ @@ -51,13 +48,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX , + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PMNS ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), @@ -88,5 +85,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ) - }; diff --git a/keyboards/redox/keymaps/default/rules.mk b/keyboards/redox/keymaps/default/rules.mk deleted file mode 100644 index a81250cdf6..0000000000 --- a/keyboards/redox/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -RGBLIGHT_ENABLE = yes - diff --git a/keyboards/redox/keymaps/tw1t611/config.h b/keyboards/redox/keymaps/tw1t611/config.h new file mode 100644 index 0000000000..2110642c54 --- /dev/null +++ b/keyboards/redox/keymaps/tw1t611/config.h @@ -0,0 +1,17 @@ +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/redox/keymaps/tw1t611/keymap.c b/keyboards/redox/keymaps/tw1t611/keymap.c new file mode 100644 index 0000000000..1309831b23 --- /dev/null +++ b/keyboards/redox/keymaps/tw1t611/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +enum { + QWERTZ = 0, + MOD, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [QWERTZ] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,_______ , _______ ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_AE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_BSPC , KC_DEL ,KC_H ,KC_J ,KC_K ,KC_L ,DE_EQL ,DE_OE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + DE_UNDS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LCTL ,KC_BSPC , KC_DEL ,KC_RCTL ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,DE_SS ,DE_UE , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , KC_LALT , KC_SPC ,KC_LSFT , MO(MOD) ,KC_ENT , KC_LGUI , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + [MOD] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + DE_CIRC ,DE_QUOT ,DE_DQOT ,DE_LCBR ,DE_RCBR ,DE_GRV ,RGB_MOD , RESET ,DE_PERC ,DE_PLUS ,DE_MINS ,DE_ASTR ,DE_SLSH ,DE_BSLS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + DE_TILD ,DE_EXLM ,DE_DLR ,DE_LPRN ,DE_RPRN ,DE_AMPR ,RGB_TOG , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,DE_QST ,DE_PIPE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,DE_AT ,DE_EURO ,DE_LBRC ,DE_RBRC ,_______ ,RGB_M_P ,_______ , _______ ,_______ ,DE_HASH ,DE_LESS ,DE_SCLN ,DE_COLN ,DE_MORE ,DE_PARA , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/redox/keymaps/tw1t611/readme.md b/keyboards/redox/keymaps/tw1t611/readme.md new file mode 100644 index 0000000000..1bb928f58d --- /dev/null +++ b/keyboards/redox/keymaps/tw1t611/readme.md @@ -0,0 +1 @@ +# Keymap for Redox by tw1t611 diff --git a/keyboards/redox/rev1/rules.mk b/keyboards/redox/rev1/rules.mk index f845616741..e69de29bb2 100644 --- a/keyboards/redox/rev1/rules.mk +++ b/keyboards/redox/rev1/rules.mk @@ -1 +0,0 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/redox/rules.mk b/keyboards/redox/rules.mk index c0edb5428b..165008f1f0 100644 --- a/keyboards/redox/rules.mk +++ b/keyboards/redox/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/redox_w/keymaps/default/keymap.c b/keyboards/redox_w/keymaps/default/keymap.c index 9cfc1734eb..91fc7afa97 100644 --- a/keyboards/redox_w/keymaps/default/keymap.c +++ b/keyboards/redox_w/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -19,11 +17,10 @@ enum custom_keycodes { }; // Shortcut to make keymap more readable -#define KC_BKSL KC_BSLASH #define SYM_L MO(_SYMB) #define KC_ALAS LALT_T(KC_PAST) -#define KC_CTPL LCTL_T(KC_PSLS) +#define KC_CTPL LCTL_T(KC_BSLS) #define KC_NAGR LT(_NAV, KC_GRV) #define KC_NAMI LT(_NAV, KC_MINS) @@ -41,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,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_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_BKSL ,KC_RSFT , + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), @@ -51,13 +48,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX , + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PMNS ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), @@ -71,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), @@ -85,16 +82,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ) }; -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - switch (layer) { +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { case _QWERTY: set_led_off; break; @@ -110,6 +105,7 @@ void matrix_scan_user(void) { default: break; } -}; + return state; +} diff --git a/keyboards/redox_w/redox_w.h b/keyboards/redox_w/redox_w.h index 3adcb121d1..727c3050dc 100644 --- a/keyboards/redox_w/redox_w.h +++ b/keyboards/redox_w/redox_w.h @@ -1,9 +1,6 @@ #pragma once #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include #define red_led_off PORTF |= (1<<5) #define red_led_on PORTF &= ~(1<<5) diff --git a/keyboards/redox_w/rules.mk b/keyboards/redox_w/rules.mk index f2f73d5c5f..22e8cb6b31 100644 --- a/keyboards/redox_w/rules.mk +++ b/keyboards/redox_w/rules.mk @@ -1,58 +1,16 @@ - -OPT_DEFS += -DREDOX_W_PROMICRO -INTERPHASE_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -72,5 +30,12 @@ UNICODE_ENABLE = YES # Unicode USB = /dev/ttyACM0 +OPT_DEFS += -DREDOX_W_PROMICRO +INTERPHASE_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c + # upload: build # $(REDOX_W_UPLOAD_COMMAND) diff --git a/keyboards/redscarf_iiplus/verb/rules.mk b/keyboards/redscarf_iiplus/verb/rules.mk index 6ee7fe4383..169e69d39f 100755 --- a/keyboards/redscarf_iiplus/verb/rules.mk +++ b/keyboards/redscarf_iiplus/verb/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/redscarf_iiplus/verc/rules.mk b/keyboards/redscarf_iiplus/verc/rules.mk index 5a7706b487..e62b78dc65 100755 --- a/keyboards/redscarf_iiplus/verc/rules.mk +++ b/keyboards/redscarf_iiplus/verc/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -82,4 +35,4 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes SRC += matrix.c -LAYOUTS = 65_ansi \ No newline at end of file +LAYOUTS = 65_ansi diff --git a/keyboards/redscarf_iiplus/verd/config.h b/keyboards/redscarf_iiplus/verd/config.h new file mode 100644 index 0000000000..5c19f2abe5 --- /dev/null +++ b/keyboards/redscarf_iiplus/verd/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 Andy Lee +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x7778 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RedScarf +#define PRODUCT RedScarfII+ +#define DESCRIPTION QMK Firmware for the RedScarf II+ + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 18 + + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { } +#define MATRIX_COL_PINS { F4, F1, F0, B3, D0, D1, D4, D5, D6, D7, F7, F6, D2, D3, B6, B5, B4, F5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/redscarf_iiplus/verd/info.json b/keyboards/redscarf_iiplus/verd/info.json new file mode 100644 index 0000000000..65152a341c --- /dev/null +++ b/keyboards/redscarf_iiplus/verd/info.json @@ -0,0 +1,190 @@ +{ + "keyboard_name": "Red Scarf II+ Ver D", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_numpad_split0": { + "key_count": 79, + "layout": [ + + {"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Num Lock", "x":15, "y":0}, + {"label":"/", "x":16, "y":0}, + {"label":"*", "x":17, "y":0}, + {"label":"-", "x":18, "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":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"7", "x":15, "y":1}, + {"label":"8", "x":16, "y":1}, + {"label":"9", "x":17, "y":1}, + + {"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":"4", "x":15, "y":2}, + {"label":"5", "x":16, "y":2}, + {"label":"6", "x":17, "y":2}, + {"label":"+", "x":18, "y":1, "h":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"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":2.75}, + {"label":"1", "x":15, "y":3}, + {"label":"2", "x":16, "y":3}, + {"label":"3", "x":17, "y":3}, + + {"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}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, + + {"label":"0", "x":15, "y":4}, + {"label":"0", "x":16, "y":4}, + {"label":".", "x":17, "y":4}, + {"label":"Enter", "x":18, "y":3, "h":2} + ] + + }, + "LAYOUT_60_ansi_numpad": { + "key_count": 78, + "layout": [ + + {"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Num Lock", "x":15, "y":0}, + {"label":"/", "x":16, "y":0}, + {"label":"*", "x":17, "y":0}, + {"label":"-", "x":18, "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":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"7", "x":15, "y":1}, + {"label":"8", "x":16, "y":1}, + {"label":"9", "x":17, "y":1}, + + {"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":"4", "x":15, "y":2}, + {"label":"5", "x":16, "y":2}, + {"label":"6", "x":17, "y":2}, + {"label":"+", "x":18, "y":1, "h":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"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":2.75}, + {"label":"1", "x":15, "y":3}, + {"label":"2", "x":16, "y":3}, + {"label":"3", "x":17, "y":3}, + + {"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}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, + + {"label":"0", "x":15, "y":4, "w":2}, + {"label":".", "x":17, "y":4}, + {"label":"Enter", "x":18, "y":3, "h":2} + ] + } + + } +} diff --git a/keyboards/redscarf_iiplus/verd/keymaps/alittlepeace/keymap.c b/keyboards/redscarf_iiplus/verd/keymaps/alittlepeace/keymap.c new file mode 100644 index 0000000000..df26eec6cc --- /dev/null +++ b/keyboards/redscarf_iiplus/verd/keymaps/alittlepeace/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2019 Andy Lee + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + KC_P00 = SAFE_RANGE, + +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_ansi_numpad_split0( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, TG(1), KC_PSLS, KC_PAST, KC_PMNS, + 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_INS, KC_HOME, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_DEL, KC_END, KC_PGDN, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, C(S(KC_TAB)), KC_UP, LCTL(KC_TAB), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PENT + ), + + [1] = LAYOUT_60_ansi_numpad_split0( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_P00, KC_DOT, _______ + ), + + [2] = LAYOUT_60_ansi_numpad_split0( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_P00: + if (record->event.pressed) { + SEND_STRING("00"); + } + break; + case TG(1): + if (record->event.pressed) { + tap_code(KC_NUMLOCK); + return true; + } + break; + + } + return true; +} + +void matrix_init_user (void) { + if (!host_keyboard_led_state ().num_lock) { + tap_code(KC_NUMLOCK); + } +} + +bool led_update_user(led_t led_state) { + if (led_state.num_lock) { + layer_on(1); + } else { + layer_off(1); + } + return true; +} diff --git a/keyboards/redscarf_iiplus/verd/keymaps/default/keymap.c b/keyboards/redscarf_iiplus/verd/keymaps/default/keymap.c new file mode 100644 index 0000000000..7bf7eb7c66 --- /dev/null +++ b/keyboards/redscarf_iiplus/verd/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 Andy Lee + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_ansi_numpad( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, + 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT_60_ansi_numpad( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + diff --git a/keyboards/redscarf_iiplus/verd/keymaps/default/readme.md b/keyboards/redscarf_iiplus/verd/keymaps/default/readme.md new file mode 100644 index 0000000000..cf396a4255 --- /dev/null +++ b/keyboards/redscarf_iiplus/verd/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Red Scarf II+ ver D. diff --git a/keyboards/redscarf_iiplus/verd/matrix.c b/keyboards/redscarf_iiplus/verd/matrix.c new file mode 100644 index 0000000000..28568653c5 --- /dev/null +++ b/keyboards/redscarf_iiplus/verd/matrix.c @@ -0,0 +1,391 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar +Port done by Andy Lee +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 . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +// static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< + * 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 . + */ +#include "verd.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(C7); + writePinHigh(C7); + setPinOutput(E6); + writePinHigh(E6); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(C7, !led_state.caps_lock); + writePin(E6, !led_state.num_lock); + } + return true; +} diff --git a/keyboards/redscarf_iiplus/verd/verd.h b/keyboards/redscarf_iiplus/verd/verd.h new file mode 100644 index 0000000000..b96dd0f6b3 --- /dev/null +++ b/keyboards/redscarf_iiplus/verd/verd.h @@ -0,0 +1,55 @@ +/* Copyright 2019 Andy Lee + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_60_ansi_numpad_split0( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, K215, K216, K217, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, \ + K400, K401, K402, K409, K410, K411, K412, K413, K414, K415, K416, K417 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K217 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, ____, K213, K214, K215, K216, ____ }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, ____ }, \ + { K400, K401, K402, ____, ____, ____, ____, ____, ____, K409, K410, K411, K412, K413, K414, K415, K416, K417 } \ +} + +#define LAYOUT_60_ansi_numpad( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, K215, K216, K217, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, \ + K400, K401, K402, K409, K410, K411, K412, K413, K414, K416, K417 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K217 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, ____, K213, K214, K215, K216, ____ }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, ____ }, \ + { K400, K401, K402, ____, ____, ____, ____, ____, ____, K409, K410, K411, K412, K413, K414, ____, K416, K417 } \ +} diff --git a/keyboards/retro_75/chconf.h b/keyboards/retro_75/chconf.h new file mode 100644 index 0000000000..99fa8ce398 --- /dev/null +++ b/keyboards/retro_75/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/retro_75/config.h b/keyboards/retro_75/config.h new file mode 100644 index 0000000000..a6b8ec672f --- /dev/null +++ b/keyboards/retro_75/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 zvecr + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x5275 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PheonixStarr +#define PRODUCT Retro75 +#define DESCRIPTION A custom 75% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { A8, B15, B14, B13, B12, B8 } +#define MATRIX_COL_PINS { A5, A4, A3, F0, C15, C14, C13, A6, B11, B10, B2, B1, B0, A7, A14, A15 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN A9 +// #ifdef RGB_DI_PIN +#define RGBLED_NUM 18 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +#define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/chibios_test/stm32_f072_onekey/halconf.h b/keyboards/retro_75/halconf.h similarity index 100% rename from keyboards/chibios_test/stm32_f072_onekey/halconf.h rename to keyboards/retro_75/halconf.h diff --git a/keyboards/retro_75/info.json b/keyboards/retro_75/info.json new file mode 100644 index 0000000000..6a6253c375 --- /dev/null +++ b/keyboards/retro_75/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Retro75", + "url": "", + "maintainer": "zvecr", + "width": 16, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":6, "y":0}, {"label":"F6", "x":7, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "y":0}, {"label":"F9", "x":10.5, "y":0}, {"label":"F10", "x":11.5, "y":0}, {"label":"F11", "x":12.5, "y":0}, {"label":"F12", "x":13.5, "y":0}, {"label":"Prt Sc", "x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"label":"Delete", "x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Page Up", "x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Page Down", "x":15, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14, "y":4.25}, {"label":"Fn", "x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":2.25, "y":5.25, "w":1.5}, {"x":3.75, "y":5.25, "w":7}, {"label":"Alt", "x":10.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13, "y":5.25}, {"label":"\u2193", "x":14, "y":5.25}, {"label":"\u2192", "x":15, "y":5.25}] + }, + "LAYOUT_split_bs": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":6, "y":0}, {"label":"F6", "x":7, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "y":0}, {"label":"F9", "x":10.5, "y":0}, {"label":"F10", "x":11.5, "y":0}, {"label":"F11", "x":12.5, "y":0}, {"label":"F12", "x":13.5, "y":0}, {"label":"Prt Sc", "x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"label":"Delete", "x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Page Up", "x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Page Down", "x":15, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14, "y":4.25}, {"label":"Fn", "x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":2.25, "y":5.25, "w":1.5}, {"x":3.75, "y":5.25, "w":7}, {"label":"Alt", "x":10.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13, "y":5.25}, {"label":"\u2193", "x":14, "y":5.25}, {"label":"\u2192", "x":15, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/retro_75/keymaps/default/keymap.c b/keyboards/retro_75/keymaps/default/keymap.c new file mode 100644 index 0000000000..602eb695ba --- /dev/null +++ b/keyboards/retro_75/keymaps/default/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_PSCR, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/retro_75/keymaps/split_backspace/keymap.c b/keyboards/retro_75/keymaps/split_backspace/keymap.c new file mode 100644 index 0000000000..58993b8bb3 --- /dev/null +++ b/keyboards/retro_75/keymaps/split_backspace/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_split_bs( + KC_ESC, 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_PSCR, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_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_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_split_bs( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h b/keyboards/retro_75/mcuconf.h similarity index 100% rename from keyboards/chibios_test/stm32_f072_onekey/mcuconf.h rename to keyboards/retro_75/mcuconf.h diff --git a/keyboards/retro_75/readme.md b/keyboards/retro_75/readme.md new file mode 100644 index 0000000000..0eb0afff32 --- /dev/null +++ b/keyboards/retro_75/readme.md @@ -0,0 +1,15 @@ +# Retro75 + +![Retro75](https://i.imgur.com/spS7PHo.jpg) + +A 75% ARM STM32F072 keyboard, with WS2812 LEDs. + +* Keyboard Maintainer: [zvecr](https://github.com/zvecr) +* Hardware Supported: Retro75 PCB +* Hardware Availability: Private Group-Buy + +Make example for this keyboard (after setting up your build environment): + + make retro_75: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). diff --git a/keyboards/retro_75/retro_75.c b/keyboards/retro_75/retro_75.c new file mode 100644 index 0000000000..d47def3720 --- /dev/null +++ b/keyboards/retro_75/retro_75.c @@ -0,0 +1 @@ +#include "retro_75.h" diff --git a/keyboards/retro_75/retro_75.h b/keyboards/retro_75/retro_75.h new file mode 100644 index 0000000000..7a7d10e42e --- /dev/null +++ b/keyboards/retro_75/retro_75.h @@ -0,0 +1,61 @@ +/* Copyright 2019 zvecr + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ____ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K505, K509, K511, K512, K515 \ +) \ +{ \ + { K000, ____, K002, K003, K004, K005, K006, K007, K008, K009, ____, K011, K012, K013, K014, K015}, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, ____, K115}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, K315}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, ____, K415}, \ + { K500, K501, ____, ____, ____, K505, ____, ____, ____, K509, ____, K511, K512, ____, ____, K515}, \ +} + +#define LAYOUT_split_bs( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K505, K509, K511, K512, K515 \ +) \ +{ \ + { K000, ____, K002, K003, K004, K005, K006, K007, K008, K009, ____, K011, K012, K013, K014, K015}, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, K315}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, ____, K415}, \ + { K500, K501, ____, ____, ____, K505, ____, ____, ____, K509, ____, K511, K512, ____, ____, K515}, \ +} diff --git a/keyboards/retro_75/rules.mk b/keyboards/retro_75/rules.mk new file mode 100644 index 0000000000..82a2cfb06f --- /dev/null +++ b/keyboards/retro_75/rules.mk @@ -0,0 +1,54 @@ +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p df11 -v 0483 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/reviung34/config.h b/keyboards/reviung34/config.h new file mode 100755 index 0000000000..5ebb631209 --- /dev/null +++ b/keyboards/reviung34/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 gtips + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER gtips +#define PRODUCT reviung34 +#define DESCRIPTION A 34-key split keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F5, F6, F7} +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/reviung34/info.json b/keyboards/reviung34/info.json new file mode 100755 index 0000000000..5c49422060 --- /dev/null +++ b/keyboards/reviung34/info.json @@ -0,0 +1,47 @@ +{ + "keyboard_name": "reviung34", + "url": "", + "maintainer": "gtips", + "width": 11, + "height": 4, + "layouts": { + "LAYOUT_reviung34": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":6, "y":0}, + {"label":"K06", "x":7, "y":0}, + {"label":"K07", "x":8, "y":0}, + {"label":"K08", "x":9, "y":0}, + {"label":"K35", "x":10, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":6, "y":1}, + {"label":"K16", "x":7, "y":1}, + {"label":"K17", "x":8, "y":1}, + {"label":"K18", "x":9, "y":1}, + {"label":"K36", "x":10, "y":1}, + {"label":"K20", "x":0, "y":2}, + {"label":"K21", "x":1, "y":2}, + {"label":"K22", "x":2, "y":2}, + {"label":"K23", "x":3, "y":2}, + {"label":"K24", "x":4, "y":2}, + {"label":"K25", "x":6, "y":2}, + {"label":"K26", "x":7, "y":2}, + {"label":"K27", "x":8, "y":2}, + {"label":"K28", "x":9, "y":2}, + {"label":"K37", "x":10, "y":2}, + {"label":"K32", "x":2, "y":3}, + {"label":"K33", "x":3, "y":3}, + {"label":"K34", "x":4, "y":3}, + {"label":"K38", "x":6, "y":3, "w":2} + ] + } + } +} diff --git a/keyboards/reviung34/keymaps/default/config.h b/keyboards/reviung34/keymaps/default/config.h new file mode 100755 index 0000000000..1924c64a1e --- /dev/null +++ b/keyboards/reviung34/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 gtips + * + * 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 . + */ + +#pragma once + +// place overrides here + diff --git a/keyboards/reviung34/keymaps/default/keymap.c b/keyboards/reviung34/keymaps/default/keymap.c new file mode 100755 index 0000000000..4d497a76b7 --- /dev/null +++ b/keyboards/reviung34/keymaps/default/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_TB LCTL_T(KC_TAB) +#define CT_Q LCTL_T(KC_Q) +#define SF_Z LSFT_T(KC_Z) +#define SF_SS RSFT_T(KC_SLSH) +#define AL_X LALT_T(KC_X) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung34( + CT_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SF_SS, + CT_TB, LOWER, RAISE, KC_SPC + ), + + [_LOWER] = LAYOUT_reviung34( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_CAPS, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, + _______, _______, _______, KC_BSPC + ), + + [_RAISE] = LAYOUT_reviung34( + 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_DQUO, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_CAPS, KC_TAB, KC_RALT, KC_RCTL, KC_RSFT, KC_BSPC, + _______, _______, _______, KC_ENT + ), + + [_ADJUST] = LAYOUT_reviung34( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, XXXXXXX + ), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/keyboards/reviung34/keymaps/default/readme.md b/keyboards/reviung34/keymaps/default/readme.md new file mode 100755 index 0000000000..2e4619fae8 --- /dev/null +++ b/keyboards/reviung34/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung34 diff --git a/keyboards/reviung34/readme.md b/keyboards/reviung34/readme.md new file mode 100755 index 0000000000..48b054cf94 --- /dev/null +++ b/keyboards/reviung34/readme.md @@ -0,0 +1,18 @@ +# reviung34 + +![REVIUNG34 SPLIT](https://github.com/gtips/reviung/blob/master/reviung34split/image/REVIUNG34.jpg) + +The REVIUNG34 SPLIT is 34-key split ortholinear keyboard. +Use one ProMicro. +And connect the left and right keyboards using a LAN cable. + +Keyboard Maintainer: [gtips](https://github.com/gtips) +Hardware Supported: The REVIUNG34 PCBs, Pro Micro supported +Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung/tree/master/reviung34split) + +Make example for this keyboard (after setting up your build environment): + + make reviung34: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). + diff --git a/keyboards/reviung34/reviung34.c b/keyboards/reviung34/reviung34.c new file mode 100755 index 0000000000..9a10f96f56 --- /dev/null +++ b/keyboards/reviung34/reviung34.c @@ -0,0 +1,51 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include "reviung34.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/reviung34/reviung34.h b/keyboards/reviung34/reviung34.h new file mode 100755 index 0000000000..ccf9762f7b --- /dev/null +++ b/keyboards/reviung34/reviung34.h @@ -0,0 +1,39 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_reviung34( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K35, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K36, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K37, \ + K32, K33, K34, K38 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, K38 } \ +} diff --git a/keyboards/reviung34/rules.mk b/keyboards/reviung34/rules.mk new file mode 100755 index 0000000000..67f2386e03 --- /dev/null +++ b/keyboards/reviung34/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/reviung39/config.h b/keyboards/reviung39/config.h new file mode 100644 index 0000000000..6bd3eb7602 --- /dev/null +++ b/keyboards/reviung39/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 gtips + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER gtips +#define PRODUCT reviung39 +#define DESCRIPTION A 39-key keyboard + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/reviung39/info.json b/keyboards/reviung39/info.json new file mode 100644 index 0000000000..c75d3f05d1 --- /dev/null +++ b/keyboards/reviung39/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "reviung39", + "url": "", + "maintainer": "gtips", + "width": 13, + "height": 4.54, + "layouts": { + "LAYOUT_reviung39": { + "layout": [ + {"label":"K00", "x":0, "y":0.54}, + {"label":"K01", "x":1, "y":0.36}, + {"label":"K02", "x":2, "y":0.18}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0.18}, + {"label":"K05", "x":5, "y":0.36}, + + {"label":"K30", "x":7, "y":0.36}, + {"label":"K31", "x":8, "y":0.18}, + {"label":"K32", "x":9, "y":0}, + {"label":"K33", "x":10, "y":0.18}, + {"label":"K34", "x":11, "y":0.36}, + {"label":"K35", "x":12, "y":0.54}, + + {"label":"K10", "x":0, "y":1.54}, + {"label":"K11", "x":1, "y":1.36}, + {"label":"K12", "x":2, "y":1.18}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1.18}, + {"label":"K15", "x":5, "y":1.36}, + + {"label":"K40", "x":7, "y":1.36}, + {"label":"K41", "x":8, "y":1.18}, + {"label":"K42", "x":9, "y":1}, + {"label":"K43", "x":10, "y":1.18}, + {"label":"K44", "x":11, "y":1.36}, + {"label":"K45", "x":12, "y":1.54}, + + {"label":"K20", "x":0, "y":2.54}, + {"label":"K21", "x":1, "y":2.36}, + {"label":"K22", "x":2, "y":2.18}, + {"label":"K23", "x":3, "y":2}, + {"label":"K24", "x":4, "y":2.18}, + {"label":"K25", "x":5, "y":2.36}, + + {"label":"K50", "x":7, "y":2.36}, + {"label":"K51", "x":8, "y":2.18}, + {"label":"K52", "x":9, "y":2}, + {"label":"K53", "x":10, "y":2.18}, + {"label":"K54", "x":11, "y":2.36}, + {"label":"K55", "x":12, "y":2.54}, + + {"label":"K60", "x":4.125, "y":3.54, "w":1.25}, + {"label":"K61", "x":5.375, "y":3.54, "w":2.25}, + {"label":"K62", "x":7.625, "y":3.54, "w":1.25} + ] + } + } +} diff --git a/keyboards/reviung39/keymaps/default/config.h b/keyboards/reviung39/keymaps/default/config.h new file mode 100644 index 0000000000..70c641fca0 --- /dev/null +++ b/keyboards/reviung39/keymaps/default/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 gtips + * + * 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 . + */ + +#pragma once + +// place overrides here + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 11 + #define RGBLIGHT_HUE_STEP 16 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 16 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif \ No newline at end of file diff --git a/keyboards/reviung39/keymaps/default/keymap.c b/keyboards/reviung39/keymaps/default/keymap.c new file mode 100644 index 0000000000..9f0d0debc2 --- /dev/null +++ b/keyboards/reviung39/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung39( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), + LOWER, KC_SPC, RAISE + ), + + [_LOWER] = LAYOUT_reviung39( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_GRV, KC_TILD, + _______, KC_ESC, KC_LGUI, KC_LALT, KC_CAPS, KC_DQUO, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_PSCR, RSFT_T(KC_SPC), + _______, KC_ENT, _______ + ), + + [_RAISE] = LAYOUT_reviung39( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, KC_ESC, KC_RGUI, KC_RALT, KC_CAPS, KC_QUOT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, KC_BSPC, _______ + ), + + [_ADJUST] = LAYOUT_reviung39( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, _______ + ), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/reviung39/keymaps/default/readme.md b/keyboards/reviung39/keymaps/default/readme.md new file mode 100644 index 0000000000..0c8f52d105 --- /dev/null +++ b/keyboards/reviung39/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for REVIUNG39 + +__REVIUNG39 is regular version__ diff --git a/keyboards/reviung39/keymaps/default/rules.mk b/keyboards/reviung39/keymaps/default/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/reviung39/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/reviung39/keymaps/default_s/config.h b/keyboards/reviung39/keymaps/default_s/config.h new file mode 100644 index 0000000000..48be04a5b1 --- /dev/null +++ b/keyboards/reviung39/keymaps/default_s/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 gtips + * + * 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 . + */ + +#pragma once + +// place overrides here + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 + #define RGBLIGHT_HUE_STEP 16 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 16 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif \ No newline at end of file diff --git a/keyboards/reviung39/keymaps/default_s/keymap.c b/keyboards/reviung39/keymaps/default_s/keymap.c new file mode 100644 index 0000000000..9f0d0debc2 --- /dev/null +++ b/keyboards/reviung39/keymaps/default_s/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung39( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), + LOWER, KC_SPC, RAISE + ), + + [_LOWER] = LAYOUT_reviung39( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_GRV, KC_TILD, + _______, KC_ESC, KC_LGUI, KC_LALT, KC_CAPS, KC_DQUO, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_PSCR, RSFT_T(KC_SPC), + _______, KC_ENT, _______ + ), + + [_RAISE] = LAYOUT_reviung39( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, KC_ESC, KC_RGUI, KC_RALT, KC_CAPS, KC_QUOT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, KC_BSPC, _______ + ), + + [_ADJUST] = LAYOUT_reviung39( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, _______ + ), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/reviung39/keymaps/default_s/readme.md b/keyboards/reviung39/keymaps/default_s/readme.md new file mode 100644 index 0000000000..b882ec40c2 --- /dev/null +++ b/keyboards/reviung39/keymaps/default_s/readme.md @@ -0,0 +1,6 @@ +# The default keymap for REVIUNG39S + +__REVIUNG39S is simple version__ + +The number of RGB LEDs is set to 6. +To change the number of RGB LEDs, change the "#define RGBLED_NUM 6" number in "default_s / config.h". diff --git a/keyboards/reviung39/keymaps/default_s/rules.mk b/keyboards/reviung39/keymaps/default_s/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/reviung39/keymaps/default_s/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/reviung39/keymaps/toshi0383/config.h b/keyboards/reviung39/keymaps/toshi0383/config.h new file mode 100644 index 0000000000..cd201ebfbb --- /dev/null +++ b/keyboards/reviung39/keymaps/toshi0383/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 gtips + * + * 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 . + */ + +#pragma once + +// place overrides here + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 11 + #define RGBLIGHT_HUE_STEP 16 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 16 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif diff --git a/keyboards/reviung39/keymaps/toshi0383/keymap.c b/keyboards/reviung39/keymaps/toshi0383/keymap.c new file mode 100644 index 0000000000..da94181db1 --- /dev/null +++ b/keyboards/reviung39/keymaps/toshi0383/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung39( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RGUI, KC_RSFT, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_RGUI, KC_RALT, RGUI(KC_RSFT), + LOWER, KC_ENT, RAISE + ), + + [_LOWER] = LAYOUT_reviung39( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, + _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, + _______, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, KC_ENT, KC_RGUI + ), + + [_RAISE] = LAYOUT_reviung39( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, ADJUST, _______, _______, _______, _______, _______, + KC_LGUI, KC_ENT, _______ + ), + + [_ADJUST] = LAYOUT_reviung39( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, KC_Y, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, _______ + ), +}; diff --git a/keyboards/reviung39/keymaps/toshi0383/readme.md b/keyboards/reviung39/keymaps/toshi0383/readme.md new file mode 100644 index 0000000000..5a09f2559a --- /dev/null +++ b/keyboards/reviung39/keymaps/toshi0383/readme.md @@ -0,0 +1,3 @@ +# toshi0383's keymap for REVIUNG39 + +__REVIUNG39 is regular version__ diff --git a/keyboards/reviung39/keymaps/toshi0383/rules.mk b/keyboards/reviung39/keymaps/toshi0383/rules.mk new file mode 100644 index 0000000000..7ad666d1a3 --- /dev/null +++ b/keyboards/reviung39/keymaps/toshi0383/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/reviung39/readme.md b/keyboards/reviung39/readme.md new file mode 100644 index 0000000000..efc13f7341 --- /dev/null +++ b/keyboards/reviung39/readme.md @@ -0,0 +1,15 @@ +# reviung39 + +![reviung39](https://github.com/gtips/reviung/blob/master/reviung39/image/REVIUNG39-1.jpg) + +The REVIUNG39 is 39-key (37.5%) column staggered keyboard. + +Keyboard Maintainer: [gtips](https://github.com/gtips) +Hardware Supported: The REVIUNG39 PCBs, Pro Micro supported +Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung) + +Make example for this keyboard (after setting up your build environment): + + make reviung39: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). diff --git a/keyboards/reviung39/reviung39.c b/keyboards/reviung39/reviung39.c new file mode 100644 index 0000000000..1ea816e5ae --- /dev/null +++ b/keyboards/reviung39/reviung39.c @@ -0,0 +1,51 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include "reviung39.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/reviung39/reviung39.h b/keyboards/reviung39/reviung39.h new file mode 100644 index 0000000000..89776c5aa2 --- /dev/null +++ b/keyboards/reviung39/reviung39.h @@ -0,0 +1,42 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_reviung39( \ + K00, K01, K02, K03, K04, K05, K30, K31, K32, K33, K34, K35, \ + K10, K11, K12, K13, K14, K15, K40, K41, K42, K43, K44, K45, \ + K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K54, K55, \ + K60, K61, K62 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05 }, \ + { K10, K11, K12, K13, K14, K15 }, \ + { K20, K21, K22, K23, K24, K25 }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K40, K41, K42, K43, K44, K45 }, \ + { K50, K51, K52, K53, K54, K55 }, \ + { K60, K61, K62, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/reviung39/rules.mk b/keyboards/reviung39/rules.mk new file mode 100644 index 0000000000..67f2386e03 --- /dev/null +++ b/keyboards/reviung39/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/rgbkb/sol/common/glcdfont.c b/keyboards/rgbkb/sol/common/glcdfont.c index f772e31811..61b40c092e 100644 --- a/keyboards/rgbkb/sol/common/glcdfont.c +++ b/keyboards/rgbkb/sol/common/glcdfont.c @@ -168,11 +168,11 @@ static const unsigned char font[] PROGMEM = { 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, - 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, - 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0xE0, 0xEC, 0xDF, - 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xF0, 0xF4, 0xEC, 0xDE, + 0xDE, 0xBE, 0x3E, 0x3E, 0x3F, 0x3F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, + 0x3F, 0x3E, 0x3E, 0xBE, 0xDE, 0xDE, + 0xEC, 0xF4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80, 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80, @@ -200,11 +200,11 @@ static const unsigned char font[] PROGMEM = { 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x40, 0x7C, 0x3F, 0x3F, 0x23, 0x01, - 0x23, 0x3F, 0x37, 0x6C, 0x40, 0x00, + 0x00, 0x00, 0x01, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFC, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xE0, 0xFC, 0xFF, 0xFF, 0xFF, + 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -233,8 +233,8 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, + 0xFE, 0xFC, 0x00, 0xFC, 0xFE, 0x7F, + 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/keyboards/rgbkb/sol/config.h b/keyboards/rgbkb/sol/config.h index 1afd973e90..9b136db058 100644 --- a/keyboards/rgbkb/sol/config.h +++ b/keyboards/rgbkb/sol/config.h @@ -35,17 +35,9 @@ along with this program. If not, see . #define MATRIX_COLS 7 #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 } -// Encoder support -#define NUMBER_OF_ENCODERS 1 -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D6 } - /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -/* ws2812 RGB LED */ -#define RGB_DI_PIN B3 - #ifdef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 40 #elif RGBLIGHT_FULL_POWER diff --git a/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk b/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk index 12c8779467..47dd9a7e27 100644 --- a/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk @@ -1,38 +1,15 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# Overridden build options from rev1 + +# RGB Options +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) + +# Misc +OLED_DRIVER_ENABLE = yes # Enable the OLED Driver + + -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix -RGBLIGHT_ANIMATIONS = yes # LED animations -LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) -RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) -RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) -IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Do not edit past here -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) - OPT_DEFS += -DRGBLIGHT_FULL_POWER -endif - -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES -endif - -ifeq ($(strip $(LED_MIRRORED)), yes) - OPT_DEFS += -DLED_MIRRORED -endif +include keyboards/$(KEYBOARD)/post_rules.mk diff --git a/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk b/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk index 09b0e201d5..2993bdacc3 100644 --- a/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk @@ -1,38 +1,14 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# Overridden build options from rev1 + +# Debug Options +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration + + -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix -RGBLIGHT_ANIMATIONS = yes # LED animations -LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) -RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) -RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) -IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Do not edit past here -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) - OPT_DEFS += -DRGBLIGHT_FULL_POWER -endif +include keyboards/$(KEYBOARD)/post_rules.mk -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES -endif - -ifeq ($(strip $(LED_MIRRORED)), yes) - OPT_DEFS += -DLED_MIRRORED -endif diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index ca73524822..51039e48e2 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -5,13 +5,6 @@ #include "split_util.h" #endif -extern keymap_config_t keymap_config; - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -23,22 +16,18 @@ enum layer_number { _ADJ }; +// Keycode defines for layers +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) +#define FN MO(_FN) +#define ADJ MO(_ADJ) + enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - FN, - ADJ, - BACKLIT, - RGBRST + RGBRST = SAFE_RANGE, + RGB_MENU }; -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - - - -#define FN_ESC LT(_FN, KC_ESC) +#define FN_ESC LT(_FN, KC_ESC) #define FN_CAPS LT(_FN, KC_CAPS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -50,9 +39,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * |FN(CAPS)| A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shift | + * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | + * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' * | Space| DEL | | Enter| Space| * `-------------' `-------------' @@ -74,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * |FN(CAPS)| A | R | S | T | G | ( | | ) | K | N | E | I | O | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Shift | + * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Enter | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' @@ -83,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_COLEMAK] = LAYOUT( \ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ - FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LPRN, KC_RPRN, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LCBR, KC_RCBR, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LPRN, KC_RPRN, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, \ KC_SPC, KC_DEL, KC_ENT, KC_SPC \ ), @@ -107,8 +96,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = LAYOUT( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_SLCK, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_NLCK, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ _______, _______, _______, _______ \ @@ -122,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * | | SPD | | SPI | | | | | | | |RGBTOG| HUI | SAI | VAI | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | |RGBMOD(| | | | | | | |RGBRMOD| HUD | SAD | VAD | * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' @@ -134,120 +123,184 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, RGB_SPI, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ _______, _______, _______, _______ \ ) }; +// For RGBRST Keycode +#if defined(RGB_MATRIX_ENABLE) +void rgb_matrix_increase_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } +} +void rgb_matrix_decrease_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_enable_noeeprom(); + } + break; + } +} +#endif -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; +#ifdef RGB_OLED_MENU +uint8_t rgb_encoder_state = 4; + +typedef void (*rgb_matrix_f)(void); + +const rgb_matrix_f rgb_matrix_functions[6][2] = { + { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, + { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, + { rgb_matrix_increase_val, rgb_matrix_decrease_val }, + { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, + { rgb_matrix_step, rgb_matrix_step_reverse }, + { rgb_matrix_increase_flags, rgb_matrix_decrease_flags } +}; +#endif #ifdef ENCODER_ENABLE + +static pin_t encoders_pad_a[] = ENCODERS_PAD_A; +#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) + +const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { + [_QWERTY] = ENCODER_LAYOUT( \ + KC_VOLU, KC_VOLD, + KC_VOLU, KC_VOLD + ), + [_COLEMAK] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_FN] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_ADJ] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ) +}; + void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { /* First encoder */ - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } else if (index == 1) { /* Second encoder*/ - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); + if (!is_keyboard_master()) + return; + +#ifdef RGB_OLED_MENU + if (index == RGB_OLED_MENU) { + (*rgb_matrix_functions[rgb_encoder_state][clockwise])(); + } else +#endif + { + uint8_t layer = biton32(layer_state); + uint16_t keycode = encoders[layer][index][clockwise]; + while (keycode == KC_TRANSPARENT && layer > 0) + { + layer--; + if ((layer_state & (1 << layer)) != 0) + keycode = encoders[layer][index][clockwise]; } + if (keycode != KC_TRANSPARENT) + tap_code16(keycode); } } #endif -// Setting ADJ layer RGB back to default -void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(RGB_current_mode); - #endif - layer_on(layer3); - } else { - layer_off(layer3); - } -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); - + static uint16_t reset_timer; switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if(record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case FN: - if (record->event.pressed) { - //not sure how to have keyboard check mode and set it to a variable, so my work around - //uses another variable that would be set to true after the first time a reactive key is pressed. - if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false - } else { - TOG_STATUS = !TOG_STATUS; - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(15); - #endif - } - layer_on(_FN); - } else { - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - #endif - layer_off(_FN); - TOG_STATUS = false; - } - return false; - break; - case ADJ: - if (record->event.pressed) { - layer_on(_ADJ); - } else { - layer_off(_ADJ); - } - return false; - break; - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released case RGBRST: - #ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); - RGB_current_mode = rgblight_config.mode; } - #endif - break; +#elif defined(RGB_MATRIX_ENABLE) + if (record->event.pressed) { + eeconfig_update_rgb_matrix_default(); + } +#endif + return false; + case RESET: + if (record->event.pressed) { + reset_timer = timer_read(); + } else { + if (timer_elapsed(reset_timer) >= 500) { + reset_keyboard(); + } + } + return false; +#if defined(RGB_MATRIX_ENABLE) && defined(KEYBOARD_rgbkb_sol_rev2) + case RGB_TOG: + if (record->event.pressed) { + rgb_matrix_increase_flags(); + } + return false; +#endif + case RGB_MENU: +#ifdef RGB_OLED_MENU + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + rgb_encoder_state = (rgb_encoder_state - 1); + if (rgb_encoder_state > 5) { + rgb_encoder_state = 5; + } + } else { + rgb_encoder_state = (rgb_encoder_state + 1) % 6; + } + } +#endif + return false; } return true; } -void matrix_init_user(void) { -#ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; -#endif -} - - // OLED Driver Logic #ifdef OLED_DRIVER_ENABLE - oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (!has_usb()) - return OLED_ROTATION_180; // flip 180 for offhand + if (is_keyboard_master()) + return OLED_ROTATION_270; return rotation; } @@ -255,62 +308,64 @@ static void render_logo(void) { static const char PROGMEM sol_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; oled_write_P(sol_logo, false); } -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_FN (1<<_FN) -#define L_ADJ (1<<_ADJ) -#define L_ADJ_TRI (L_ADJ|L_FN) - static void render_status(void) { // Render to mode icon - static const char PROGMEM mode_logo[4][4] = { - {0x95,0x96,0x0a,0}, - {0xb5,0xb6,0x0a,0}, - {0x97,0x98,0x0a,0}, - {0xb7,0xb8,0x0a,0} }; + static const char PROGMEM sol_icon[] = { + 0x9b,0x9c,0x9d,0x9e,0x9f, + 0xbb,0xbc,0xbd,0xbe,0xbf, + 0xdb,0xdc,0xdd,0xde,0xdf,0 + }; + oled_write_P(sol_icon, false); - if (keymap_config.swap_lalt_lgui != false) { - oled_write_P(mode_logo[0], false); - oled_write_P(mode_logo[1], false); - } else { - oled_write_P(mode_logo[2], false); - oled_write_P(mode_logo[3], false); - } - - // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - oled_write_P(PSTR("Layer: "), false); - switch (layer_state) { - case L_BASE: - oled_write_P(PSTR("Default\n"), false); + // Define layers here + oled_write_P(PSTR("Layer"), false); + uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + switch (layer) { + case _QWERTY: + oled_write_P(PSTR("BASE "), false); break; - case L_FN: - oled_write_P(PSTR("FN \n"), false); + case _COLEMAK: + oled_write_P(PSTR("CLMK "), false); break; - case L_ADJ: - case L_ADJ_TRI: - oled_write_P(PSTR("ADJ \n"), false); + case _FN: + oled_write_P(PSTR("FN "), false); + break; + case _ADJ: + oled_write_P(PSTR("ADJ "), false); break; default: - oled_write_P(PSTR("UNDEF \n"), false); + oled_write_P(PSTR("UNDEF"), false); } // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(led_usb_state & (1< +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +// Xulkal custom stuff +#if KEYBOARD_rgbkb_sol_rev2 + #define OLED_90ROTATION + #define RGB_MATRIX_TOG_LAYERS + #define RGB_MATRIX_HUE_STEP 8 + #define RGB_MATRIX_SAT_STEP 8 + #define RGB_MATRIX_VAL_STEP 8 + #define RGB_MATRIX_SPD_STEP 8 +#endif diff --git a/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c index e51edd9071..c508b0ca88 100644 --- a/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctl- | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctl= | + * | Ctl- | Win | LOWER| RAISE| Alt | Space| ENC1 | | ENC2 | Space| Left | Up | Down | Right| Ctl= | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' * | Space| DEL | | Enter| Space| * `-------------' `-------------' @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________QWERTY_L2_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R2_________________, \ _________________QWERTY_L3_________________, KC_GRV, KC_QUOT, _________________QWERTY_R3_________________, \ _________________QWERTY_L4_________________, RGB_TOG, RGBRST, _________________QWERTY_R4_________________, \ - _________________QWERTY_L5_________________, RGB_RMOD, RGB_MOD, _________________QWERTY_R5_________________, \ + _________________QWERTY_L5_________________, KC_ENC1, KC_ENC2, _________________QWERTY_R5_________________, \ KC_SPC, TD_DEL, KC_ENT, KC_SPC \ ), @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ___________________GAME_L2_________________, KC_LBRC, KC_RBRC, ___________________GAME_R2_________________, \ ___________________GAME_L3_________________, KC_GRV, KC_QUOT, ___________________GAME_R3_________________, \ ___________________GAME_L4_________________, RGB_TOG, RGBRST, ___________________GAME_R4_________________, \ - ___________________GAME_L5_________________, RGB_RMOD, RGB_MOD, ___________________GAME_R5_________________, \ + ___________________GAME_L5_________________, KC_ENC1, KC_ENC2, ___________________GAME_R5_________________, \ KC_SPC, KC_DEL, KC_ENT, KC_SPC \ ), #endif diff --git a/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk b/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk index ad0c480349..6a14a99af5 100644 --- a/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk @@ -1,37 +1,25 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix -RGBLIGHT_ANIMATIONS = no # LED animations -LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) -RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) -RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) -ENCODER_ENABLE = no # Enable rotary encoder (+90) -IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +# Overridden build options from rev1 & rev2 + +# RGB Options +RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = no # LED animations +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +FULLHAND_ENABLE = yes # Enables the additional 24 Full Hand LEDs + +# Misc +OLED_DRIVER_ENABLE = yes # Enable the OLED Driver + +# Not using the encoder for rev1 +ifeq ($(strip $(KEYBOARD)), rgbkb/sol/rev1) + ENCODER_ENABLE = no + RGB_OLED_MENU = no +else + ENCODER_ENABLE = yes + RGB_OLED_MENU = 0 +endif # Do not edit past here -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) - OPT_DEFS += -DRGBLIGHT_FULL_POWER -endif +include keyboards/$(KEYBOARD)/post_rules.mk -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES -endif - -ifeq ($(strip $(LED_MIRRORED)), yes) - OPT_DEFS += -DLED_MIRRORED -endif diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/config.h b/keyboards/rgbkb/sol/keymaps/xyverz/config.h new file mode 100644 index 0000000000..334eee608c --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/config.h @@ -0,0 +1,26 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +// place overrides here + +/* #define SSD1306OLED */ diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..e38663dbb3 --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -0,0 +1,361 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +enum layer_number { + _DVORAK = 0, + _DESTINY, + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + DESTINY, + QWERTY, + COLEMAK, + LOWER, + RAISE, + ADJUST, + RGBRST, + RGB_MENU +}; + +// Aliases to make the keymap clearer. +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DVORAK] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_END, KC_PGDN, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ + + ), + + [_DESTINY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_END, KC_PGDN, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_DEL, KC_ENT, KC_SPC \ + + ), + + [_QWERTY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_END, KC_PGDN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH, \ + KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ + ), + + [_COLEMAK] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_END, KC_PGDN, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_SLSH, \ + KC_RCTL, KC_A, KC_R, KC_S, KC_T, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, XXXXXXX, XXXXXXX, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ + ), + + [_LOWER] = LAYOUT( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, XXXXXXX, XXXXXXX, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ), + + [_RAISE] = LAYOUT( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, XXXXXXX, XXXXXXX, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ), + + [_ADJUST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_NLCK, _______, _______, \ + KC_CAPS, _______, QWERTY, COLEMAK, DVORAK, DESTINY, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, \ + _______, _______, _______, RGB_SPI, RGB_SPD, _______, XXXXXXX, XXXXXXX, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case DESTINY: + set_single_persistent_default_layer(_DESTINY); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case RGBRST: +#if defined(RGBLIGHT_ENABLE) + eeconfig_update_rgblight_default(); + rgblight_enable(); +#elif defined(RGB_MATRIX_ENABLE) + eeconfig_update_rgb_matrix_default(); +#endif + return false; +#if defined(RGB_MATRIX_ENABLE) && defined(KEYBOARD_rgbkb_sol_rev2) + case RGB_TOG: + if (record->event.pressed) { + rgb_matrix_increase_flags(); + } + return false; +#endif + case RGB_MENU: +#ifdef RGB_OLED_MENU + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + rgb_encoder_state = (rgb_encoder_state - 1); + if (rgb_encoder_state > 5) { + rgb_encoder_state = 5; + } + } else { + rgb_encoder_state = (rgb_encoder_state + 1) % 6; + } + } +#endif + return false; + } + } + return true; +}; + +// For RGBRST Keycode +#if defined(RGB_MATRIX_ENABLE) +void rgb_matrix_increase_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } +} + +void rgb_matrix_decrease_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_enable_noeeprom(); + } + break; + } +} +#endif + +#ifdef RGB_OLED_MENU +uint8_t rgb_encoder_state = 4; + +typedef void (*rgb_matrix_f)(void); + +const rgb_matrix_f rgb_matrix_functions[6][2] = { + { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, + { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, + { rgb_matrix_increase_val, rgb_matrix_decrease_val }, + { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, + { rgb_matrix_step, rgb_matrix_step_reverse }, + { rgb_matrix_increase_flags, rgb_matrix_decrease_flags } +}; +#endif + +#ifdef ENCODER_ENABLE + +static pin_t encoders_pad_a[] = ENCODERS_PAD_A; +#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) + +const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { + [_QWERTY] = ENCODER_LAYOUT( \ + KC_VOLU, KC_VOLD, + KC_VOLU, KC_VOLD + ), + [_COLEMAK] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_FN] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_ADJ] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (!is_keyboard_master()) + return; + +#ifdef RGB_OLED_MENU + if (index == RGB_OLED_MENU) { + (*rgb_matrix_functions[rgb_encoder_state][clockwise])(); + } else +#endif + { + uint8_t layer = biton32(layer_state); + uint16_t keycode = encoders[layer][index][clockwise]; + while (keycode == KC_TRANSPARENT && layer > 0) + { + layer--; + if ((layer_state & (1 << layer)) != 0) + keycode = encoders[layer][index][clockwise]; + } + if (keycode != KC_TRANSPARENT) + tap_code16(keycode); + } +} +#endif + +// OLED Driver Logic +#ifdef OLED_DRIVER_ENABLE + oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) + return OLED_ROTATION_270; + return rotation; +} + +static void render_logo(void) { + static const char PROGMEM sol_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; + oled_write_P(sol_logo, false); +} + +static void render_status(void) { + // Render to mode icon + static const char PROGMEM sol_icon[] = { + 0x9b,0x9c,0x9d,0x9e,0x9f, + 0xbb,0xbc,0xbd,0xbe,0xbf, + 0xdb,0xdc,0xdd,0xde,0xdf,0 + }; + oled_write_P(sol_icon, false); + + // Define layers here + oled_write_P(PSTR(" Layer-----"), false); + uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + switch (layer) { + case _DVORAK: + oled_write_P(PSTR("DVRAK"), false); + break; + case _DESTINY: + oled_write_P(PSTR("DSTNY"), false); + break; + case _QWERTY: + oled_write_P(PSTR("QWRTY"), false); + break; + case _COLEMAK: + oled_write_P(PSTR("COLMK"), false); + break; + case _LOWER: + oled_write_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_P(PSTR("RAISE"), false); + break; + case _ADJUST: + oled_write_P(PSTR("ADJST"), false); + break; + default: + oled_write_P(PSTR("UNDEF"), false); + } + + // Host Keyboard LED Status + uint8_t led_state = host_keyboard_leds(); + oled_write_P(PSTR("-----"), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); + +#ifdef RGB_OLED_MENU + static char buffer[31] = { 0 }; + snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d e%3d ", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_get_flags()); + buffer[4 + rgb_encoder_state * 5] = '<'; + + oled_write_P(PSTR("-----"), false); + oled_write(buffer, false); +#endif +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); + } +} + +#endif \ No newline at end of file diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/readme.md b/keyboards/rgbkb/sol/keymaps/xyverz/readme.md new file mode 100644 index 0000000000..485426f8e4 --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/readme.md @@ -0,0 +1,132 @@ +# Xyverz's Sol Layout +## Layout + +### Base modifier layout +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | ESC | | | | | | - | | = | | | | | | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | | | | | | [ | | ] | | | | | | / | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Del | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * |Shift | | | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Adj | Alt | ` | Left | Rght | Ctrl | Alt | | Alt | Ctrl | Up | Down | / | = | Adj | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | BkSp | Win | | Enter| Space| + * `-------------' `-------------' +``` + +### Qwerty alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | S | D | F | G | | | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Z | X | C | V | B | | | | N | M | , | . | / | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Dvorak alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | " | , | . | P | Y | | | | F | G | C | R | L | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | O | E | U | I | | | | D | H | T | N | S | - | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | ; | Q | J | K | X | | | | B | M | W | V | Z | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `--------=----' +``` +### Colemak alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | Q | W | F | P | B | | | | J | L | U | Y | ; | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | R | S | T | G | | | | K | N | E | I | O | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Z | X | C | D | V | | | | M | H | , | . | / | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Adjust (ADJ) +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | RESET| | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | |QWERTY|DVORAK|COLEMK| | | | | | PrSc | ScLk | NmLk | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | | Mute | Vol- | Vol+ | | | | |RGBTOG|RGBMOD| HUI | SAI | VAI | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | Prev | Play | Next | | | | | |RGBRMD| HUD | SAD | VAD | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | Home | End | | | | | | PgUp | PgDn | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Del | | | | Ins | + * `-------------' `-------------' +``` + +## Customize + +see `qmk_firmware/keyboards/sol/rev1/keymaps/default/rules.mk` + +``` + +# Variables you can set for SOL + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = ne # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +LED_ANIMATIONS = yes # LED animations +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder + +OLED_ENABLE = yes # OLED_ENABLE +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + + +``` +## Compile + +go to qmk top directory. +``` +$ cd qmk_firmware +``` + +build +``` +$ make sol:xyverz +``` + +After the initial flash with AVRdudess, you should be able to flash using this: +``` +$ make sol:xyverz:flash +``` diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk new file mode 100644 index 0000000000..903d4619b0 --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk @@ -0,0 +1,54 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys + +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE_CUSTOM = no # Enable rotary encoder +AUDIO_ENABLE = no + +OLED_ENABLE = no # OLED_ENABLE +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +DEFAULT_FOLDER = rgbkb/sol/rev1 +ENCODER_ENABLE = no +OLED_DRIVER_ENABLE = yes + +# Do not edit past here + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes) + OPT_DEFS += -DENCODER_ENABLE_CUSTOM + SRC += common/knob_v2.c + +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE + +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(LED_MIRRORED)), yes) + OPT_DEFS += -DLED_MIRRORED +endif \ No newline at end of file diff --git a/keyboards/rgbkb/sol/readme.md b/keyboards/rgbkb/sol/readme.md index 391189095c..7e7946d573 100644 --- a/keyboards/rgbkb/sol/readme.md +++ b/keyboards/rgbkb/sol/readme.md @@ -1,15 +1,15 @@ # Sol -![Sol](https://cdn.shopify.com/s/files/1/0008/8827/5005/products/CqdJAno_2048x2048.jpg?v=1533825028) +![Sol](https://imgur.com/1chZff9) -Sol is a split ergonomic keyboard with ortholinear alphas and several modifier layouts. It can use up to 88 RGB LEDs, with per-key backlighting and underglow. The boards have presoldered components, including type C ports and ATmega32U4. Sol, when used with dual power supplies, is the brightest keyboard on earth. +Sol is a split ergonomic keyboard with ortholinear alphas and several modifier layouts. It can use up to 180 RGB LEDs, with per-key backlighting, perimeter, and optional underglow. The boards have presoldered components, including type C ports and ATmega32U4. Sol, when used with dual power supplies, is the brightest keyboard on earth. Keyboard Maintainer: [Legonut](https://github.com/Legonut) -Hardware Supported: Sol PCB R1.0, R1.1 +Hardware Supported: Sol PCB R1.0, R1.1, R2.0, R2.1 Hardware Availability: [RGBKB](https://www.rgbkb.net) Make example for this keyboard (after setting up your build environment): - make rgbkb/sol:default + make rgbkb/sol/rev2: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). diff --git a/keyboards/rgbkb/sol/rev1/config.h b/keyboards/rgbkb/sol/rev1/config.h index 51c4bbb65b..3cfc3eef94 100644 --- a/keyboards/rgbkb/sol/rev1/config.h +++ b/keyboards/rgbkb/sol/rev1/config.h @@ -26,6 +26,9 @@ along with this program. If not, see . #define PRODUCT Sol #define DESCRIPTION "An RGB, split, ortho-esque keyboard" +/* ws2812 RGB LED */ +#define RGB_DI_PIN B3 + #ifdef LED_MIRRORED #define RGBLED_NUM 35 #else @@ -34,3 +37,7 @@ along with this program. If not, see . #define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_CENTER { 112, 35 } + +// Encoder support +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D6 } diff --git a/keyboards/rgbkb/sol/rev1/post_rules.mk b/keyboards/rgbkb/sol/rev1/post_rules.mk new file mode 100644 index 0000000000..ede37a1ad7 --- /dev/null +++ b/keyboards/rgbkb/sol/rev1/post_rules.mk @@ -0,0 +1,19 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(LED_MIRRORED)), yes) + OPT_DEFS += -DLED_MIRRORED +endif diff --git a/keyboards/rgbkb/sol/rev1/rev1.c b/keyboards/rgbkb/sol/rev1/rev1.c index 6ee4b610b3..21b4503ab9 100644 --- a/keyboards/rgbkb/sol/rev1/rev1.c +++ b/keyboards/rgbkb/sol/rev1/rev1.c @@ -2,18 +2,18 @@ #ifdef RGB_MATRIX_ENABLE led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6 }, - { 7, 8, 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, 18, 19, 20 }, - { 21, 22, 23, 24, 25, 26, 27 }, - { 28, 29, 30, 31, 32, 33, 34 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 }, - { 35, 36, 37, 38, 39, 40, 41 }, - { 42, 43, 44, 45, 46, 47, 48 }, - { 49, 50, 51, 52, 53, 54, 55 }, - { 56, 57, 58, 59, 60, 61, 62 }, - { 63, 64, 65, 66, 67, 68, 68 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } + { 0, 1, 2, 3, 4, 5, 6 }, + { 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20 }, + { 21, 22, 23, 24, 25, 26, 27 }, + { 28, 29, 30, 31, 32, 33, 34 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 }, + { 35, 36, 37, 38, 39, 40, 41 }, + { 42, 43, 44, 45, 46, 47, 48 }, + { 49, 50, 51, 52, 53, 54, 55 }, + { 56, 57, 58, 59, 60, 61, 62 }, + { 63, 64, 65, 66, 67, 68, 68 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } }, { // Left Hand Mapped Left to Right { 0, 0 }, { 21, 0 }, { 38, 0 }, { 56, 0 }, { 73, 0 }, { 91, 0 }, { 112, 0 }, diff --git a/keyboards/rgbkb/sol/rev1/rules.mk b/keyboards/rgbkb/sol/rev1/rules.mk index e69de29bb2..dd6d25eb98 100644 --- a/keyboards/rgbkb/sol/rev1/rules.mk +++ b/keyboards/rgbkb/sol/rev1/rules.mk @@ -0,0 +1,28 @@ +# RGBKB Sol Rev1 Defaults + +# Keycode Options +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +UNICODE_ENABLE = no # Unicode keycodes +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + +# Debug Options +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration + +# RGB Options +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) + +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGB_MATRIX_FRAMEBUFFER_EFFECTS = no # Enable frame buffer effects like the typing heatmap. + +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness for RGBLIGHT or RGB_MATRIX. Otherwise, limited to a safe level for a normal USB-A port +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + +# Misc +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h new file mode 100644 index 0000000000..af74b7e46f --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER RGBKB +#define PRODUCT Sol +#define DESCRIPTION "An RGB, split, ortho-esque keyboard" + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B7 + +#define BACKLIGHT_LEDS 124 + +#ifdef FULLHAND_ENABLE + #define FULLHAND_LEDS 24 +#else + #define FULLHAND_LEDS 0 +#endif + +// Underglow / DIY Tent Glow are parallel to the top row leds, no separate define + +#ifdef LED_MIRRORED + #define RGBLED_NUM ((BACKLIGHT_LEDS + FULLHAND_LEDS) / 2) +#else + #define RGBLED_NUM (BACKLIGHT_LEDS + FULLHAND_LEDS) +#endif +#define DRIVER_LED_TOTAL RGBLED_NUM + +#define RGB_MATRIX_CENTER { 112, 37 } + +// Encoder support +#ifndef EXTRA_ENCODERS_ENABLE +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D6 } +#else +#ifdef OLED_DRIVER_ENABLE + #error Extra encoders cannot be enabled at the same time as the OLED Driver as they use the same pins. +#endif +#define ENCODERS_PAD_A { D2, D1, B0 } +#define ENCODERS_PAD_B { D6, B1, D0 } +#endif diff --git a/keyboards/rgbkb/sol/rev2/info.json b/keyboards/rgbkb/sol/rev2/info.json new file mode 100644 index 0000000000..e252ea2e2d --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/info.json @@ -0,0 +1,87 @@ +{ + "keyboard_name": "Sol", + "url": "", + "maintainer": "Legonut", + "width": 17, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0, "w":1.5}, + {"label":"L01", "x":1.5, "y":0}, + {"label":"L02", "x":2.5, "y":0}, + {"label":"L03", "x":3.5, "y":0}, + {"label":"L04", "x":4.5, "y":0}, + {"label":"L05", "x":5.5, "y":0}, + {"label":"L06", "x":6.75, "y":0}, + {"label":"R06", "x":9.25, "y":0}, + {"label":"R00", "x":10.5, "y":0}, + {"label":"R01", "x":11.5, "y":0}, + {"label":"R02", "x":12.5, "y":0}, + {"label":"R03", "x":13.5, "y":0}, + {"label":"R04", "x":14.5, "y":0}, + {"label":"R05", "x":15.5, "y":0, "w":1.5}, + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + {"label":"L16", "x":6.75, "y":1}, + {"label":"R16", "x":9.25, "y":1}, + {"label":"R10", "x":10.5, "y":1}, + {"label":"R11", "x":11.5, "y":1}, + {"label":"R12", "x":12.5, "y":1}, + {"label":"R13", "x":13.5, "y":1}, + {"label":"R14", "x":14.5, "y":1}, + {"label":"R15", "x":15.5, "y":1, "w":1.5}, + {"label":"L20", "x":0, "y":2, "w":1.5}, + {"label":"L21", "x":1.5, "y":2}, + {"label":"L22", "x":2.5, "y":2}, + {"label":"L23", "x":3.5, "y":2}, + {"label":"L24", "x":4.5, "y":2}, + {"label":"L25", "x":5.5, "y":2}, + {"label":"L26", "x":6.75, "y":2}, + {"label":"R26", "x":9.25, "y":2}, + {"label":"R20", "x":10.5, "y":2}, + {"label":"R21", "x":11.5, "y":2}, + {"label":"R22", "x":12.5, "y":2}, + {"label":"R23", "x":13.5, "y":2}, + {"label":"R24", "x":14.5, "y":2}, + {"label":"R25", "x":15.5, "y":2, "w":1.5}, + {"label":"L30", "x":0, "y":3, "w":1.5}, + {"label":"L31", "x":1.5, "y":3}, + {"label":"L32", "x":2.5, "y":3}, + {"label":"L33", "x":3.5, "y":3}, + {"label":"L34", "x":4.5, "y":3}, + {"label":"L35", "x":5.5, "y":3}, + {"label":"L36", "x":6.75, "y":3}, + {"label":"R36", "x":9.25, "y":3}, + {"label":"R30", "x":10.5, "y":3}, + {"label":"R31", "x":11.5, "y":3}, + {"label":"R32", "x":12.5, "y":3}, + {"label":"R33", "x":13.5, "y":3}, + {"label":"R34", "x":14.5, "y":3}, + {"label":"R35", "x":15.5, "y":3, "w":1.5}, + {"label":"L40", "x":0, "y":4, "w":1.5}, + {"label":"L41", "x":1.5, "y":4}, + {"label":"L42", "x":2.5, "y":4}, + {"label":"L43", "x":3.5, "y":4}, + {"label":"L44", "x":4.5, "y":4}, + {"label":"L45", "x":6, "y":4.5}, + {"label":"L46", "x":7, "y":4.5}, + {"label":"R46", "x":9, "y":4.5}, + {"label":"R40", "x":10, "y":4.5}, + {"label":"R41", "x":11.5, "y":4}, + {"label":"R42", "x":12.5, "y":4}, + {"label":"R43", "x":13.5, "y":4}, + {"label":"R44", "x":14.5, "y":4}, + {"label":"R45", "x":15.5, "y":4, "w":1.5}, + {"label":"L55", "x":6, "y":5.5}, + {"label":"L56", "x":7, "y":5.5}, + {"label":"R56", "x":9, "y":5.5}, + {"label":"R50", "x":10, "y":5.5} + ] + } + } +} diff --git a/keyboards/rgbkb/sol/rev2/post_rules.mk b/keyboards/rgbkb/sol/rev2/post_rules.mk new file mode 100644 index 0000000000..0cbf430ad3 --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/post_rules.mk @@ -0,0 +1,37 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(LED_MIRRORED)), yes) + OPT_DEFS += -DLED_MIRRORED +endif + +ifeq ($(strip $(FULLHAND_ENABLE)), yes) + OPT_DEFS += -DFULLHAND_ENABLE +endif + +ifeq ($(strip $(EXTRA_ENCODERS_ENABLE)), yes) + OPT_DEFS += -DEXTRA_ENCODERS_ENABLE +endif + +ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) + ifeq ($(strip $(ENCODER_ENABLE)), yes) + ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) + ifneq ($(strip $(RGB_OLED_MENU)), no) + OPT_DEFS += -DRGB_OLED_MENU=$(strip $(RGB_OLED_MENU)) + endif + endif + endif +endif diff --git a/keyboards/rgbkb/sol/rev2/rev2.c b/keyboards/rgbkb/sol/rev2/rev2.c new file mode 100644 index 0000000000..467aa18e44 --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/rev2.c @@ -0,0 +1,89 @@ +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6 }, + { 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20 }, + { 21, 22, 23, 24, 25, 26, 27 }, + { 28, 29, 30, 31, 32, 33, 34 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 }, +// Need to shift Right hand indexes if full hand LEDs are enabled +#define LO (FULLHAND_LEDS / 2) + { LO+62, LO+63, LO+64, LO+65, LO+66, LO+67, LO+68 }, + { LO+69, LO+70, LO+71, LO+72, LO+73, LO+74, LO+75 }, + { LO+76, LO+77, LO+78, LO+79, LO+80, LO+81, LO+82 }, + { LO+83, LO+84, LO+85, LO+86, LO+87, LO+88, LO+89 }, + { LO+90, LO+91, LO+92, LO+93, LO+94, LO+95, LO+95 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, LO+95, LO+95 } +#undef LO +}, { +// Left Hand Mapped Left to Right + { 11, 14 }, { 28, 14 }, { 42, 14 }, { 56, 14 }, { 70, 14 }, { 84, 14 }, { 102, 14 }, + { 11, 28 }, { 28, 28 }, { 42, 28 }, { 56, 28 }, { 70, 28 }, { 84, 28 }, { 98, 25 }, + { 11, 42 }, { 28, 42 }, { 42, 42 }, { 56, 42 }, { 70, 42 }, { 84, 42 }, { 98, 39 }, + { 11, 56 }, { 28, 56 }, { 42, 56 }, { 56, 56 }, { 70, 56 }, { 84, 56 }, { 98, 53 }, + { 11, 70 }, { 28, 70 }, { 42, 70 }, { 56, 70 }, { 70, 70 }, { 83, 87 }, { 93, 97 }, +// Edge Light Left + { 0, 66 }, { 0, 52 }, { 0, 38 }, { 0, 24 }, { 0, 10 }, { 31, 0 }, { 38, 0 }, + { 46, 0 }, { 54, 0 }, { 61, 0 }, { 69, 0 }, { 76, 0 }, { 84, 0 }, { 109, 11 }, + { 109, 24 }, { 109, 39 }, { 109, 53 }, { 110, 73 }, { 112, 85 }, { 106, 95 }, { 95, 98 }, + { 83, 91 }, { 71, 84 }, { 58, 77 }, { 42, 74 }, { 28, 74 }, { 14, 74 }, +// Full Hand Left +#ifdef FULLHAND_ENABLE + { 2, 88 }, { 2, 103 }, { 2, 117 }, { 2, 132 }, { 10, 145 }, { 25, 145 }, { 39, 145 }, + { 54, 145 }, { 69, 145 }, { 79, 136 }, { 87, 124 }, { 94, 111 }, +#endif +// Left Hand Mapped Right to Left + { 213, 14 }, { 196, 14 }, { 182, 14 }, { 168, 14 }, { 154, 14 }, { 140, 14 }, { 122, 14 }, + { 213, 28 }, { 196, 28 }, { 182, 28 }, { 168, 28 }, { 154, 28 }, { 140, 28 }, { 126, 25 }, + { 213, 42 }, { 196, 42 }, { 182, 42 }, { 168, 42 }, { 154, 42 }, { 140, 42 }, { 126, 39 }, + { 213, 56 }, { 196, 56 }, { 182, 56 }, { 168, 56 }, { 154, 56 }, { 140, 56 }, { 126, 53 }, + { 213, 70 }, { 196, 70 }, { 182, 70 }, { 168, 70 }, { 154, 70 }, { 141, 87 }, { 131, 97 }, +// Edge Light Right + { 224, 66 }, { 224, 52 }, { 224, 38 }, { 224, 24 }, { 224, 10 }, { 193, 0 }, { 186, 0 }, + { 178, 0 }, { 170, 0 }, { 163, 0 }, { 155, 0 }, { 148, 0 }, { 140, 0 }, { 115, 11 }, + { 115, 24 }, { 115, 39 }, { 115, 53 }, { 114, 73 }, { 112, 85 }, { 118, 95 }, { 129, 98 }, + { 141, 91 }, { 153, 84 }, { 166, 77 }, { 182, 74 }, { 196, 74 }, { 210, 74 } +// Full Hand Right +#ifdef FULLHAND_ENABLE + ,{ 222, 88 }, { 222, 103 }, { 222, 117 }, { 222, 132 }, { 214, 145 }, { 199, 145 }, { 185, 145 }, + { 170, 145 }, { 155, 145 }, { 145, 136 }, { 137, 124 }, { 130, 111 } +#endif +}, { +// Left Hand Mapped Left to Right + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, +// Edge Light Left + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, +// Full Hand Left +#ifdef FULLHAND_ENABLE + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, +#endif +// Left Hand Mapped Right to Left + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, +// Edge Light Right + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2 +// Full Hand Right +#ifdef FULLHAND_ENABLE + ,2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2 +#endif +} }; + +#endif + diff --git a/keyboards/rgbkb/sol/rev2/rev2.h b/keyboards/rgbkb/sol/rev2/rev2.h new file mode 100644 index 0000000000..6f70f09bee --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/rev2.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/rgbkb/sol/rev2/rules.mk b/keyboards/rgbkb/sol/rev2/rules.mk new file mode 100644 index 0000000000..87b400fa14 --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/rules.mk @@ -0,0 +1,35 @@ +# RGBKB Sol Rev2 Defaults + +# Keycode Options +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration( +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +UNICODE_ENABLE = no # Unicode keycodes +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + +# Debug Options +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration + +# RGB Options +RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = no # LED animations +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) + +RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGB_MATRIX_FRAMEBUFFER_EFFECTS = no # Enable frame buffer effects like the typing heatmap. + +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness for RGBLIGHT or RGB_MATRIX. Otherwise, limited to a safe level for a normal USB-A port +FULLHAND_ENABLE = no # Enables the additional 24 Full Hand LEDs +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + +# Misc +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +EXTRA_ENCODERS_ENABLE = no # Enables 3 encoders per side (up from 1, not compatible with OLED_DRIVER_ENABLE) +SWAP_HANDS_ENABLE = no # Enable one-hand typing +LINK_TIME_OPTIMIZATION_ENABLE = yes # Enable Link Time Optimizations greatly reducing firmware size by disabling the old Macros and Functions features + +# Special RGB Matrix, OLED, & Encoder Control Menu! +RGB_OLED_MENU = no # Enabled by setting this to the encoder index (0-5) you wish to use to control the menu. + # Use the RGB_MENU keycode in the keymap for the encoder to advance the menu to the next option. diff --git a/keyboards/rgbkb/sol/rules.mk b/keyboards/rgbkb/sol/rules.mk index 62dd969aa7..e3d3953df6 100644 --- a/keyboards/rgbkb/sol/rules.mk +++ b/keyboards/rgbkb/sol/rules.mk @@ -1,66 +1,20 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Custom local font file OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -DEFAULT_FOLDER = rgbkb/sol/rev1 +DEFAULT_FOLDER = rgbkb/sol/rev2 diff --git a/keyboards/rgbkb/sol/sol.h b/keyboards/rgbkb/sol/sol.h index d26546006c..1bc87cb0aa 100644 --- a/keyboards/rgbkb/sol/sol.h +++ b/keyboards/rgbkb/sol/sol.h @@ -3,6 +3,8 @@ #include "quantum.h" #ifdef KEYBOARD_rgbkb_sol_rev1 #include "rev1.h" +#else +#include "rev2.h" #endif @@ -29,6 +31,32 @@ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, R50, R56 } \ } +#define ENCODER_LAYOUT( \ + E10, E11, \ + E20, E21 \ +) \ +{ \ + { E10, E11 }, \ + { E20, E21 } \ +} + +#define EXTRA_ENCODER_LAYOUT( \ + E10, E11, \ + E20, E21, \ + E30, E31, \ + E40, E41, \ + E50, E51, \ + E60, E61 \ +) \ +{ \ + { E10, E11 }, \ + { E20, E21 }, \ + { E30, E31 }, \ + { E40, E41 }, \ + { E50, E51 }, \ + { E60, E61 } \ +} + #define KC________ KC_TRNS #define KC_RGB_MOD RGB_MOD #define KC_FN FN diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c index 54462ec0ff..9eee643113 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/rgbkb/zen/rev1/rev1.h b/keyboards/rgbkb/zen/rev1/rev1.h index a12f2ea789..470a26a43f 100644 --- a/keyboards/rgbkb/zen/rev1/rev1.h +++ b/keyboards/rgbkb/zen/rev1/rev1.h @@ -2,10 +2,8 @@ #include "zen.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \ diff --git a/keyboards/rgbkb/zen/rev2/config.h b/keyboards/rgbkb/zen/rev2/config.h index b9f3d2228b..c2bb360bdb 100644 --- a/keyboards/rgbkb/zen/rev2/config.h +++ b/keyboards/rgbkb/zen/rev2/config.h @@ -41,8 +41,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C6, E6, B5, D7, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B3, B1, B2 } -#define NUMBER_OF_ENCODERS 1 - #define ENCODERS_PAD_A { D4 } #define ENCODERS_PAD_B { D2 } diff --git a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c index dba4a2ddd8..2f0138c8e0 100644 --- a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/rgbkb/zen/rev2/rev2.h b/keyboards/rgbkb/zen/rev2/rev2.h index 101622988d..c545710abb 100644 --- a/keyboards/rgbkb/zen/rev2/rev2.h +++ b/keyboards/rgbkb/zen/rev2/rev2.h @@ -2,10 +2,8 @@ #include "zen.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifdef CONVERT_TO_PROTON_C #define LAYOUT( \ k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk index 7473b61cfc..4193d23e01 100644 --- a/keyboards/rgbkb/zen/rules.mk +++ b/keyboards/rgbkb/zen/rules.mk @@ -1,11 +1,15 @@ -# Pro Micro or Elite-C -# Automagically converted to Proton-C +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = dfu -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina ifeq ($(strip $(CTPC)), yes) CONVERT_TO_PROTON_C=yes diff --git a/keyboards/rgbkb/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h index ad58761cc5..6e55a6a5f5 100644 --- a/keyboards/rgbkb/zygomorph/rev1/config.h +++ b/keyboards/rgbkb/zygomorph/rev1/config.h @@ -40,7 +40,6 @@ along with this program. If not, see . #define SOFT_SERIAL_PIN D3 -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { D7 } diff --git a/keyboards/rgbkb/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk index 9bafc7b1d6..955221fdf2 100644 --- a/keyboards/rgbkb/zygomorph/rules.mk +++ b/keyboards/rgbkb/zygomorph/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change yes to no to disable # diff --git a/keyboards/romac/keymaps/default/keymap.c b/keyboards/romac/keymaps/default/keymap.c deleted file mode 100644 index 35636f36b3..0000000000 --- a/keyboards/romac/keymaps/default/keymap.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2018 Jack Humbert - * - * 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 . - */ - -#include QMK_KEYBOARD_H - -#define _BASE 0 -#define _FN1 1 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_BASE] = LAYOUT( - KC_7, KC_8, KC_9, \ - KC_4, KC_5, KC_6, \ - KC_1, KC_2, KC_3, \ - MO(_FN1), KC_0, KC_ENT \ - ), - - [_FN1] = LAYOUT( - KC_TRNS, KC_HOME, KC_PGUP, \ - KC_TRNS, KC_END, KC_PGDN, \ - KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_DOT \ - ) -}; diff --git a/keyboards/romac/readme.md b/keyboards/romac/readme.md deleted file mode 100644 index 98ed21502a..0000000000 --- a/keyboards/romac/readme.md +++ /dev/null @@ -1,16 +0,0 @@ - -# RoMac - -![RoMac](https://i.imgur.com/hAOyoqj.jpg) - -A “Plaid” Inspired 12-Key (3x4) Macropad. - -- Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) -- Hardware Supported: RoMac rev.1, rev.2, Pro Micro, Elite-C, Proton C, BlueMicro. -- Hardware Availability: Through GB or Direct Message (If extra stock is available). - -Make example for this keyboard (after setting up your build environment): - - make romac: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). diff --git a/keyboards/romac/rules.mk b/keyboards/romac/rules.mk deleted file mode 100644 index b500f1b885..0000000000 --- a/keyboards/romac/rules.mk +++ /dev/null @@ -1,57 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no - diff --git a/keyboards/ropro/config.h b/keyboards/ropro/config.h deleted file mode 100644 index 0966faf540..0000000000 --- a/keyboards/ropro/config.h +++ /dev/null @@ -1,59 +0,0 @@ -#pragma once - -/* Copyright 2019 Garret G. (TheRoyalSweatshirt) - * - * 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 .#pragma once - */ - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0002 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Kingly-Keys -#define PRODUCT The_RoPro -#define DESCRIPTION A 75-key ortholinear keyboard with rotary encoder - - /* key matrix size */ -#define MATRIX_ROWS 7 -#define MATRIX_COLS 14 - -#define NUMBER_OF_ENCODERS 1 -#define ENCODERS_PAD_A { B7 } -#define ENCODERS_PAD_B { D5 } - - /* key matrix pins */ -#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, F1, NO_PIN } -#define MATRIX_COL_PINS { F0, D1, D0, D4, C6, D7, E6, B4, B5, B3, B2, B6, D2, C7 } -#define UNUSED_PINS - - /* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - - /* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - - /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* ws2812 RGB LED --- DIN Pin Routed to VIA on main PCB marked "RGB" */ -#define RGB_DI_PIN D3 - -#define RGBLIGHT_ANIMATIONS - -#define RGBLED_NUM 16 diff --git a/keyboards/ropro/keymaps/default/keymap.c b/keyboards/ropro/keymaps/default/keymap.c deleted file mode 100644 index 6e6da8f9a5..0000000000 --- a/keyboards/ropro/keymaps/default/keymap.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright 2019 Garret G. (TheRoyalSweatshirt) - * - * 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 . - */ - -#include QMK_KEYBOARD_H - -enum layer_names { - _BASE, - _LOWER -}; - -#define LOWER MO(_LOWER) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* BASE - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | - * |+------+------+------+------+-----+------+------+------+------+------+------+------|--------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | Rotary Click | - * ,------+------+------+------+------+------+------+------+------+------+------+------+------|--------------' - * | PgUp | Ctrl | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------+-------------+------+------+------+------+------| - * | Lower| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------+------| - * | PgDn | Del | Ctrl | GUI | ALT |Lower |SPACE |SPACE | End | Left | Down | Up |Right | - * `------------------------------------------------------------------------------------------' - */ - [_BASE] = LAYOUT( - 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, -KC_CAPS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_PGUP, KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - LOWER, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - KC_PGDN, KC_DEL, KC_RCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - ), - - /* LOWER - * ,-----------------------------------------------------------------------------------. - * |TOGRGB| | | |Sat(-)|Hue(-)|Hue(+)|Sat(+)| | |Brght-|Brght+| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ` | | | | | | | | | | | = | - * |+------+------+------+------+-----+------+------+------+------+------+------+------|--------------. - * | | | Up | | | | | | | [ | ] | \ | NumLock | - * ,------+------+------+------+------+------+------+------+------+------+------+------+------|--------------' - * | Home | | Left | Down |Right | | | | | | | | | - * |------+------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------| - * | End | | | | | | | | | | | |PrScn | - * `------------------------------------------------------------------------------------------' - */ - [_LOWER] = LAYOUT( - RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, - KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL, -KC_NLCK, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, - KC_HOME, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR - ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - if (clockwise) { - tap_code(KC_WH_L); - } else { - tap_code(KC_WH_R); - } - } -} diff --git a/keyboards/ropro/readme.md b/keyboards/ropro/readme.md deleted file mode 100644 index 0a90c87f8a..0000000000 --- a/keyboards/ropro/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -The RoPro -=== - -![The_RoPro](https://i.imgur.com/hfOzBPI.jpg) - -A Compact 75-Key + Rotary Encoder Ortholinear keyboard by [Garret G.](https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal) - -Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) -Hardware Supported: The_RoPro rev1.0, rev1.5, rev2.0 PCB; Elite-C & Proton-C Compatible. -Hardware Availability: [Kingly-Keys.xyz](https://kingly-keys.xyz/) - (Through GB or when in stock) - -Make example for this keyboard (after setting up your build environment): - - make ropro: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) diff --git a/keyboards/ropro/rules.mk b/keyboards/ropro/rules.mk deleted file mode 100644 index c63f62146e..0000000000 --- a/keyboards/ropro/rules.mk +++ /dev/null @@ -1,67 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = caterina - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -ENCODER_ENABLE = yes -RGBLIGHT_ENABLE = yes -LAYOUTS_HAS_RGB = yes diff --git a/keyboards/runner3680/3x6/keymaps/default/keymap.c b/keyboards/runner3680/3x6/keymaps/default/keymap.c index 9ccb2ad235..99ab7ff2d7 100644 --- a/keyboards/runner3680/3x6/keymaps/default/keymap.c +++ b/keyboards/runner3680/3x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/3x6/keymaps/default/rules.mk b/keyboards/runner3680/3x6/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/3x6/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/3x7/keymaps/default/keymap.c b/keyboards/runner3680/3x7/keymaps/default/keymap.c index e5de1efd0b..795999cf5b 100644 --- a/keyboards/runner3680/3x7/keymaps/default/keymap.c +++ b/keyboards/runner3680/3x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/3x7/keymaps/default/rules.mk b/keyboards/runner3680/3x7/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/3x7/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/3x8/keymaps/default/keymap.c b/keyboards/runner3680/3x8/keymaps/default/keymap.c index cad7e859a3..ae5d2ba650 100644 --- a/keyboards/runner3680/3x8/keymaps/default/keymap.c +++ b/keyboards/runner3680/3x8/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/3x8/keymaps/default/rules.mk b/keyboards/runner3680/3x8/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/3x8/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x6/keymaps/default/keymap.c b/keyboards/runner3680/4x6/keymaps/default/keymap.c index 9af15c703e..d0c07ddd04 100644 --- a/keyboards/runner3680/4x6/keymaps/default/keymap.c +++ b/keyboards/runner3680/4x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/4x6/keymaps/default/rules.mk b/keyboards/runner3680/4x6/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/4x6/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x7/keymaps/default/keymap.c b/keyboards/runner3680/4x7/keymaps/default/keymap.c index 091d44d815..95e2a67ebe 100644 --- a/keyboards/runner3680/4x7/keymaps/default/keymap.c +++ b/keyboards/runner3680/4x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/4x7/keymaps/default/rules.mk b/keyboards/runner3680/4x7/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/4x7/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x8/keymaps/default/keymap.c b/keyboards/runner3680/4x8/keymaps/default/keymap.c index 9b1f9d237b..5ff0c0d691 100644 --- a/keyboards/runner3680/4x8/keymaps/default/keymap.c +++ b/keyboards/runner3680/4x8/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/4x8/keymaps/default/rules.mk b/keyboards/runner3680/4x8/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/4x8/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x6/keymaps/default/keymap.c b/keyboards/runner3680/5x6/keymaps/default/keymap.c index d8f50e49e3..6d78e8a2e8 100644 --- a/keyboards/runner3680/5x6/keymaps/default/keymap.c +++ b/keyboards/runner3680/5x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/5x6/keymaps/default/rules.mk b/keyboards/runner3680/5x6/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/5x6/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x7/keymaps/default/keymap.c b/keyboards/runner3680/5x7/keymaps/default/keymap.c index 44c0b20bd2..e04e5fb5fb 100644 --- a/keyboards/runner3680/5x7/keymaps/default/keymap.c +++ b/keyboards/runner3680/5x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/5x7/keymaps/default/rules.mk b/keyboards/runner3680/5x7/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/5x7/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x8/keymaps/JIS/rules.mk b/keyboards/runner3680/5x8/keymaps/JIS/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/5x8/keymaps/JIS/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x8/keymaps/default/keymap.c b/keyboards/runner3680/5x8/keymaps/default/keymap.c index 9f0084e896..b9efd44ef7 100644 --- a/keyboards/runner3680/5x8/keymaps/default/keymap.c +++ b/keyboards/runner3680/5x8/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/5x8/keymaps/default/rules.mk b/keyboards/runner3680/5x8/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c..0000000000 --- a/keyboards/runner3680/5x8/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/rules.mk b/keyboards/runner3680/rules.mk index 624dd2e507..3a0b190aef 100644 --- a/keyboards/runner3680/rules.mk +++ b/keyboards/runner3680/rules.mk @@ -1,39 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -F_CPU = 16000000 - -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/s7_elephant/rules.mk b/keyboards/s7_elephant/rules.mk index 7f0ad6d3c5..6cbcb56aea 100644 --- a/keyboards/s7_elephant/rules.mk +++ b/keyboards/s7_elephant/rules.mk @@ -1,41 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/satan/keymaps/isoHHKB/keymap.c b/keyboards/satan/keymaps/isoHHKB/keymap.c deleted file mode 100644 index 701095907e..0000000000 --- a/keyboards/satan/keymaps/isoHHKB/keymap.c +++ /dev/null @@ -1,106 +0,0 @@ -#include QMK_KEYBOARD_H - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 - -#define KC_ENYE M(0) -#define KC_CEDL M(1) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,-----------------------------------------------------------. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Ret | - * |-------------------------------------------------------. | - * |Ctrl | A| S| D| F| G| H| J| K| L| Ñ| ;| ' |urn| - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Fn| - * |-----------------------------------------------------------| - * | |Alt|WinK | Space |WinK |Alt| | - * `-----------------------------------------------------------' - * - */ - [_BL] = LAYOUT_60_iso_split_rshift( \ - F(0), 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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENYE, KC_SCLN, KC_QUOT, KC_ENT, - OSM(MOD_LSFT), _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), MO(_FL), - _______, KC_LGUI, KC_LALT, KC_SPC, _______, KC_RALT, KC_RGUI, _______ - ), - - /* Keymap _FL: (Function Layer) Second Layer - * ,-----------------------------------------------------------. - * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|PSR| RESET| - * |-----------------------------------------------------------| - * | | |VUP| | | | | | | | | | | | - * |-------------------------------------------------------. | - * |CapsLck|PRV|VDN|NXT| |RGB|FRW|BRT|VAI|VAD|INC|DEC| | | - * |-----------------------------------------------------------| - * | | | | Ç| |BTG| |MUT| | | | | | - * |-----------------------------------------------------------| - * | | | | PLY/PAU | | | | - * `-----------------------------------------------------------' - */ - [_FL] = LAYOUT_60_iso_split_rshift(\ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_PSCR, RESET, - _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, RGB_TOG, RGB_MOD, RGB_M_B, RGB_VAI, RGB_VAD, BL_INC, BL_DEC, _______, - _______, _______, _______, _______, KC_CEDL, _______, BL_TOGG, _______, KC_MUTE, _______, _______, _______, _______, _______, - _______, _______, _______, KC_MPLY, _______, _______, _______, _______ - ) - -}; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case 0: // Ñ - return MACRO(D(LALT), T(KP_0), T(KP_2), T(KP_4), T(KP_1), U(LALT), END); - case 1: // Ç - return MACRO(D(LALT), T(KP_0), T(KP_2), T(KP_3), T(KP_1), U(LALT), END); - } - } - return MACRO_NONE; -}; diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c deleted file mode 100644 index f05c46ff91..0000000000 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ /dev/null @@ -1,133 +0,0 @@ - -#include QMK_KEYBOARD_H - -// TODO: replace your ugly german brckets with #defines - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _DEF 0 -#define _SPC 1 -#define _TAB 2 -#define _SFX 3 - -// dual-role shortcuts -#define TABDUAL LT(_TAB, KC_TAB) -#define CAPSDUAL CTL_T(KC_ESC) -#define SPACEDUAL LT(_SPC, KC_SPACE) -#define ENTERDUAL CTL_T(KC_ENT) -// arrow cluster duality bottom right corner -#define ARRLEFT ALT_T(KC_LEFT) -#define ARRDOWN GUI_T(KC_DOWN) -#define ARRUP SFT_T(KC_UP) -#define ARRRIGHT CTL_T(KC_RIGHT) -// german brackets -#define GER_CUR_L RALT(KC_7) // [ -#define GER_CUR_R RALT(KC_0) // ] -#define GER_PAR_L LSFT(KC_8) // ( -#define GER_PAR_R LSFT(KC_9) // ) -#define GER_ANG_L KC_NUBS // < -#define GER_ANG_R LSFT(KC_NUBS) // > -#define GER_BRC_L RALT(KC_8) // [ -#define GER_BRC_R RALT(KC_9) // ] - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _DEF: Default Layer - * ,-----------------------------------------------------------. - * |Grv| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1 - * |-----------------------------------------------------------| - * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return | - * |-----------------------------------------------------------| - * |Sft | < | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| RShift is UP - * |-----------------------------------------------------------| - * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is - * `-----------------------------------------------------------' LEFT DWN RIGHT - */ - [_DEF] = LAYOUT_60_iso_split_rshift( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - TABDUAL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \ - CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ARRUP, TG(_SFX), \ - KC_LCTL, KC_LGUI, KC_LALT, SPACEDUAL, KC_RALT, ARRLEFT, ARRDOWN, ARRRIGHT), - - /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) - * ,-----------------------------------------------------------. - * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete| - * |-----------------------------------------------------------| - * | |Paus| Up| [ | ] | | | | ( | ) | | | | | - * |-----------------------------------------------------------| - * | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY | - * |-----------------------------------------------------------| - * | | | | | < | > | |M0 | | | | | Vol+ | | - * |-----------------------------------------------------------| - * | | | | |Alt |Prev|Vol-|Next| - * `-----------------------------------------------------------' - */ - [_SPC] = LAYOUT_60_iso_split_rshift( - KC_PSCR, 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_DEL, \ - _______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ - _______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \ - _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), - - /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) - * ,-----------------------------------------------------------. - * |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE - * |-----------------------------------------------------------| - * | | | | | | | | | { | } | | | | | - * |-----------------------------------------------------------| - * | | | | | | |Pos1|PgDn|PgUp|End| | |Retrn | - * |-----------------------------------------------------------| - * | | | | | | | |AF2| | | | | PgUp | | - * |-----------------------------------------------------------| - * | | | | |Alt |Pos1|PgDn|End | - * `-----------------------------------------------------------' - */ - [_TAB] = LAYOUT_60_iso_split_rshift( - KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ - _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ - _______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, KC_PGUP, _______, \ - _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), - - /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) - * ,-----------------------------------------------------------. - * |RSET| | | | | | | 7| 8| 9| | | |Backsp | - * |-----------------------------------------------------------| - * | | | | | | | | 4 | 5 | 6 | | | | \ | - * |-----------------------------------------------------------| - * | | L | L | | | | | 1 | 2 | 3 | | | Return | - * |-----------------------------------------------------------| - * | | | L | L | L | L | L | L | | 0 | | /| Up | | All "L"s represent - * |-----------------------------------------------------------| LED controlling - * |Ctrl|Win |Alt | |Alt |Left|Down|Right| - * `-----------------------------------------------------------' - */ - [_SFX] = LAYOUT_60_iso_split_rshift( - RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ - _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ - _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ - _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ - _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - return (record->event.pressed ? - MACRO( D(RALT), T(SPC), U(RALT), END ) - :MACRO( END )); - break; - case 1: - return (record->event.pressed ? - MACRO( D(LALT), T(F2), U(LALT), END ) - :MACRO( END )); - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/satan/keymaps/iso_split_rshift/resetboard.sh b/keyboards/satan/keymaps/iso_split_rshift/resetboard.sh deleted file mode 100755 index d955ccf545..0000000000 --- a/keyboards/satan/keymaps/iso_split_rshift/resetboard.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -sudo dfu-programmer atmega32u4 erase --force -sudo dfu-programmer atmega32u4 flash clear_flash.hex -sudo dfu-programmer atmega32u4 reset diff --git a/keyboards/satan/readme.md b/keyboards/satan/readme.md deleted file mode 100644 index 7eb272cf30..0000000000 --- a/keyboards/satan/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# Satan GH60 - -A clone of the GH60 60% keyboard, with full backlighting support. - -Keyboard Maintainer: QMK Community -Hardware Supported: Satan GH60 PCB -Hardware Availability: https://www.1upkeyboards.com/shop/controllers/gh60-satan-pcb/ - -Make example for this keyboard (after setting up your build environment): - - make satan: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). - -## RGB Underglow (WS2812B LED Strip) - -This board also supports underglow with a slight mod. - -Connect the DIN pad of the LED strip to PE2 on the ATmega32U4, like so: - -![controller](https://i.imgur.com/9vyRBoT.jpg) - -Then connect VCC and GND to pins 1 and 6 at the bottom of the PCB: - -![power](https://i.imgur.com/pHMZHLP.jpg) - -## ISP Header - -If you want to flash another bootloader (such as QMK-DFU), or can't get into the bootloader in the first place, the row of pins at the bottom can be used to ISP flash the board: - -| 1 | 2 | 3 | 4 | 5 | 6 | 7 | -|---|----|---|----|-----|---|----| -|VCC|MISO|SCK|MOSI|RESET|GND|*NC*| diff --git a/keyboards/satan/rules.mk b/keyboards/satan/rules.mk deleted file mode 100644 index 51161490e4..0000000000 --- a/keyboards/satan/rules.mk +++ /dev/null @@ -1,63 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID - -LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift diff --git a/keyboards/scarletbandana/keymaps/default/keymap.c b/keyboards/scarletbandana/keymaps/default/keymap.c index 3d4c96160c..55d8f07c1b 100644 --- a/keyboards/scarletbandana/keymaps/default/keymap.c +++ b/keyboards/scarletbandana/keymaps/default/keymap.c @@ -82,21 +82,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - #ifdef AUDIO_ENABLE float tone_qwerty[][2] = SONG(QWERTY_SOUND); diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index 2767697c52..a3461f3142 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk @@ -1,53 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/sck/gtm/config.h b/keyboards/sck/gtm/config.h new file mode 100644 index 0000000000..952f484bde --- /dev/null +++ b/keyboards/sck/gtm/config.h @@ -0,0 +1,44 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6090 +#define DEVICE_VER 0x0002 +#define MANUFACTURER SpaceCityKeyboards +#define PRODUCT GTM Pad +#define DESCRIPTION Grand Theft Macro Pad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 6 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C4, C5, D1 } +#define MATRIX_COL_PINS { B4, B5, B6, B7, C7, D0 } +#define UNUSED_PINS + + +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D3 } +#define ENCODER_RESOLUTION 1 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN B0 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 +#endif diff --git a/keyboards/sck/gtm/gtm.c b/keyboards/sck/gtm/gtm.c new file mode 100644 index 0000000000..6adb9b39b6 --- /dev/null +++ b/keyboards/sck/gtm/gtm.c @@ -0,0 +1 @@ +#include "gtm.h" diff --git a/keyboards/sck/gtm/gtm.h b/keyboards/sck/gtm/gtm.h new file mode 100644 index 0000000000..47625f417f --- /dev/null +++ b/keyboards/sck/gtm/gtm.h @@ -0,0 +1,12 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, K25 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO }, \ + { K10, K11, K12, K13, K14, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K25 }, \ +} diff --git a/keyboards/sck/gtm/keymaps/default/keymap.c b/keyboards/sck/gtm/keymaps/default/keymap.c new file mode 100644 index 0000000000..218a1d107e --- /dev/null +++ b/keyboards/sck/gtm/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } +} + diff --git a/keyboards/sck/gtm/keymaps/tabs/keymap.c b/keyboards/sck/gtm/keymaps/tabs/keymap.c new file mode 100644 index 0000000000..9a60e0f053 --- /dev/null +++ b/keyboards/sck/gtm/keymaps/tabs/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code16(C(KC_T)); + } else { + tap_code16(C(KC_W)); + } +} + diff --git a/keyboards/sck/gtm/keymaps/vol/keymap.c b/keyboards/sck/gtm/keymaps/vol/keymap.c new file mode 100644 index 0000000000..e3d01439d3 --- /dev/null +++ b/keyboards/sck/gtm/keymaps/vol/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} diff --git a/keyboards/sck/gtm/readme.md b/keyboards/sck/gtm/readme.md new file mode 100644 index 0000000000..d46716735e --- /dev/null +++ b/keyboards/sck/gtm/readme.md @@ -0,0 +1,16 @@ +# Grand Theft Macro Pad + +![Grand Theft Macropad](https://i.imgur.com/ON7m7RI.jpg) + +A 2x5 macropad/numpad with a rotary encoder, cloned from the 2Key2Crawl macropad that was exclusively available at Austin Keycrawl 2018 (12-01-2018). + +Keyboard Maintainer: jrfhoutx +Keyboard Designer: [jrfhoutx](https://github.com/jrfhoutx) +Hardware Supported: GTM Pad +Hardware Availability: Coming Soon + +Make example for this keyboard (after setting up your build environment): + + make sck/gtm: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). diff --git a/keyboards/sck/gtm/rules.mk b/keyboards/sck/gtm/rules.mk new file mode 100644 index 0000000000..a6320386fa --- /dev/null +++ b/keyboards/sck/gtm/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # [Crawlpad] Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port. +ENCODER_ENABLE = yes # [2Key2crawl] Make the knobs turn diff --git a/keyboards/sck/m0116b/config.h b/keyboards/sck/m0116b/config.h new file mode 100644 index 0000000000..03fa9f2557 --- /dev/null +++ b/keyboards/sck/m0116b/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 jrfhoutx + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER jrfhoutx +#define PRODUCT Golden Delicious +#define DESCRIPTION Golden Delicious (M0116B) - Apple M0116/M0118 Replacement PCB + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D1, F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { D5, D3, D2, D0, B3, B2, B1, B0, E6, B5, B6, C6, C7, F7, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ + #define BOOTMAGIC_LITE_ROW 0 + #define BOOTMAGIC_LITE_COLUMN 6 diff --git a/keyboards/sck/m0116b/info.json b/keyboards/sck/m0116b/info.json new file mode 100644 index 0000000000..e8d8fb221f --- /dev/null +++ b/keyboards/sck/m0116b/info.json @@ -0,0 +1,183 @@ +{ + "keyboard_name": "Golden Delicious - M0116B", + "url": "https://github.com/jrfhoutx", + "maintainer": "jrfhoutx", + "width": 19.5, + "height": 6.25, + "layouts": { + "LAYOUT_m0116_ansi": { + "key_count": 81, + "layout": [ + {"label":"K06 (D1,B2)", "x":5, "y":0, "w":2}, + {"label":"K10 (F0,D5)", "x":0, "y":1.25}, + {"label":"K11 (F0,D3)", "x":1, "y":1.25}, + {"label":"K12 (F0,D2)", "x":2, "y":1.25}, + {"label":"K13 (F0,D0)", "x":3, "y":1.25}, + {"label":"K14 (F0,B7)", "x":4, "y":1.25}, + {"label":"K15 (F0,B3)", "x":5, "y":1.25}, + {"label":"K16 (F0,B2)", "x":6, "y":1.25}, + {"label":"K17 (F0,B1)", "x":7, "y":1.25}, + {"label":"K18 (F0,B0)", "x":8, "y":1.25}, + {"label":"K19 (F0,B5)", "x":9, "y":1.25}, + {"label":"K1A (F0,B6)", "x":10, "y":1.25}, + {"label":"K1B (F0,C6)", "x":11, "y":1.25}, + {"label":"K1C (F0,C7)", "x":12, "y":1.25}, + {"label":"K1D (F0,F7)", "x":13, "y":1.25, "w":1.5}, + {"label":"K1E (F0,D4)", "x":15.5, "y":1.25}, + {"label":"K1F (F0,D6)", "x":16.5, "y":1.25}, + {"label":"K1G (F0,D7)", "x":17.5, "y":1.25}, + {"label":"K1H (F0,B4)", "x":18.5, "y":1.25}, + {"label":"K20 (F1,D5)", "x":0, "y":2.25, "w":1.5}, + {"label":"K21 (F1,D3)", "x":1.5, "y":2.25}, + {"label":"K22 (F1,D2)", "x":2.5, "y":2.25}, + {"label":"K23 (F1,D0)", "x":3.5, "y":2.25}, + {"label":"K24 (F1,B7)", "x":4.5, "y":2.25}, + {"label":"K25 (F1,B3)", "x":5.5, "y":2.25}, + {"label":"K26 (F1,B2)", "x":6.5, "y":2.25}, + {"label":"K27 (F1,B1)", "x":7.5, "y":2.25}, + {"label":"K28 (F1,B0)", "x":8.5, "y":2.25}, + {"label":"K29 (F1,B5)", "x":9.5, "y":2.25}, + {"label":"K2A (F1,B6)", "x":10.5, "y":2.25}, + {"label":"K2B (F1,C6)", "x":11.5, "y":2.25}, + {"label":"K2C (F1,C7)", "x":12.5, "y":2.25}, + {"label":"K2D (F1,F7)", "x":13.5, "y":2.25, "h":2}, + {"label":"K2E (F1,D4)", "x":15.5, "y":2.25}, + {"label":"K2F (F1,D6)", "x":16.5, "y":2.25}, + {"label":"K2G (F1,D7)", "x":17.5, "y":2.25}, + {"label":"K2H (F1,B4)", "x":18.5, "y":2.25}, + {"label":"K30 (F4,D5)", "x":0, "y":3.25, "w":1.75}, + {"label":"K31 (F4,D3)", "x":1.75, "y":3.25}, + {"label":"K32 (F4,D2)", "x":2.75, "y":3.25}, + {"label":"K33 (F4,D0)", "x":3.75, "y":3.25}, + {"label":"K34 (F4,B7)", "x":4.75, "y":3.25}, + {"label":"K35 (F4,B3)", "x":5.75, "y":3.25}, + {"label":"K36 (F4,B2)", "x":6.75, "y":3.25}, + {"label":"K37 (F4,B1)", "x":7.75, "y":3.25}, + {"label":"K38 (F4,B0)", "x":8.75, "y":3.25}, + {"label":"K39 (F4,B5)", "x":9.75, "y":3.25}, + {"label":"K3A (F4,B6)", "x":10.75, "y":3.25}, + {"label":"K3B (F4,C6)", "x":11.75, "y":3.25}, + {"label":"K3C (F4,D4)", "x":15.5, "y":3.25}, + {"label":"K3D (F4,D6)", "x":16.5, "y":3.25}, + {"label":"K3E (F4,D7)", "x":17.5, "y":3.25}, + {"label":"K3F (F4,B4)", "x":18.5, "y":3.25}, + {"label":"K40 (F5,D5)", "x":0, "y":4.25, "w":2.25}, + {"label":"K42 (F5,D2)", "x":2.25, "y":4.25}, + {"label":"K43 (F5,D0)", "x":3.25, "y":4.25}, + {"label":"K44 (F5,B7)", "x":4.25, "y":4.25}, + {"label":"K45 (F5,B3)", "x":5.25, "y":4.25}, + {"label":"K46 (F5,B2)", "x":6.25, "y":4.25}, + {"label":"K47 (F5,B1)", "x":7.25, "y":4.25}, + {"label":"K48 (F5,B0)", "x":8.25, "y":4.25}, + {"label":"K49 (F5,B5)", "x":9.25, "y":4.25}, + {"label":"K4A (F5,B6)", "x":10.25, "y":4.25}, + {"label":"K4B (F5,C6)", "x":11.25, "y":4.25}, + {"label":"K4C (F5,C7)", "x":12.25, "y":4.25, "w":2.25}, + {"label":"K4E (F5,D4)", "x":15.5, "y":4.25}, + {"label":"K4F (F5,D6)", "x":16.5, "y":4.25}, + {"label":"K4G (F5,D7)", "x":17.5, "y":4.25}, + {"label":"K4H (F4,B4)", "x":18.5, "y":4.25, "h":2}, + {"label":"K50 (F6,D5)", "x":0, "y":5.25}, + {"label":"K51 (F6,D3)", "x":1, "y":5.25}, + {"label":"K52 (F6,D2)", "x":2, "y":5.25, "w":1.75}, + {"label":"K53 (F6,D0)", "x":3.75, "y":5.25}, + {"label":"K56 (F6,B2)", "x":4.75, "y":5.25, "w":4.75}, + {"label":"K59 (F6,B5)", "x":9.5, "y":5.25}, + {"label":"K5A (F6,B6)", "x":10.5, "y":5.25}, + {"label":"K5B (F6,C6)", "x":11.5, "y":5.25}, + {"label":"K5C (F6,C7)", "x":12.5, "y":5.25}, + {"label":"K5D (F6,F7)", "x":13.5, "y":5.25}, + {"label":"K5E (F6,D4)", "x":15.5, "y":5.25, "w":2}, + {"label":"K5G (F6,D7)", "x":17.5, "y":5.25} + ] + }, + "LAYOUT_m0118_iso": { + "key_count": 82, + "layout": [ + {"label":"K06 (D1,B2)", "x":5, "y":0, "w":2}, + {"label":"K10 (F0,D5)", "x":0, "y":1.25}, + {"label":"K11 (F0,D3)", "x":1, "y":1.25}, + {"label":"K12 (F0,D2)", "x":2, "y":1.25}, + {"label":"K13 (F0,D0)", "x":3, "y":1.25}, + {"label":"K14 (F0,B7)", "x":4, "y":1.25}, + {"label":"K15 (F0,B3)", "x":5, "y":1.25}, + {"label":"K16 (F0,B2)", "x":6, "y":1.25}, + {"label":"K17 (F0,B1)", "x":7, "y":1.25}, + {"label":"K18 (F0,B0)", "x":8, "y":1.25}, + {"label":"K19 (F0,B5)", "x":9, "y":1.25}, + {"label":"K1A (F0,B6)", "x":10, "y":1.25}, + {"label":"K1B (F0,C6)", "x":11, "y":1.25}, + {"label":"K1C (F0,C7)", "x":12, "y":1.25}, + {"label":"K1D (F0,F7)", "x":13, "y":1.25, "w":1.5}, + {"label":"K1E (F0,D4)", "x":15.5, "y":1.25}, + {"label":"K1F (F0,D6)", "x":16.5, "y":1.25}, + {"label":"K1G(F0,D7)", "x":17.5, "y":1.25}, + {"label":"K1H (F0,B4)", "x":18.5, "y":1.25}, + {"label":"K20 (F1,D5)", "x":0, "y":2.25, "w":1.5}, + {"label":"K21 (F1,D3)", "x":1.5, "y":2.25}, + {"label":"K22 (F1,D2)", "x":2.5, "y":2.25}, + {"label":"K23 (F1,D0)", "x":3.5, "y":2.25}, + {"label":"K24 (F1,B7)", "x":4.5, "y":2.25}, + {"label":"K25 (F1,B3)", "x":5.5, "y":2.25}, + {"label":"K26 (F1,B2)", "x":6.5, "y":2.25}, + {"label":"K27 (F1,B1)", "x":7.5, "y":2.25}, + {"label":"K28 (F1,B0)", "x":8.5, "y":2.25}, + {"label":"K29 (F1,B5)", "x":9.5, "y":2.25}, + {"label":"K2A (F1,B6)", "x":10.5, "y":2.25}, + {"label":"K2B (F1,C6)", "x":11.5, "y":2.25}, + {"label":"K2C (F1,C7)", "x":12.5, "y":2.25}, + {"label":"K2D (F1,F7)", "x":13.75, "y":2.25, "w":0.75, "h":2}, + {"label":"K2E (F1,D4)", "x":15.5, "y":2.25}, + {"label":"K2F (F1,D6)", "x":16.5, "y":2.25}, + {"label":"K2G (F1,D7)", "x":17.5, "y":2.25}, + {"label":"K2H (F1,B4)", "x":18.5, "y":2.25}, + {"label":"K30 (F4,D5)", "x":0, "y":3.25, "w":1.75}, + {"label":"K31 (F4,D3)", "x":1.75, "y":3.25}, + {"label":"K32 (F4,D2)", "x":2.75, "y":3.25}, + {"label":"K33 (F4,D0)", "x":3.75, "y":3.25}, + {"label":"K34 (F4,B7)", "x":4.75, "y":3.25}, + {"label":"K35 (F4,B3)", "x":5.75, "y":3.25}, + {"label":"K36 (F4,B2)", "x":6.75, "y":3.25}, + {"label":"K37 (F4,B1)", "x":7.75, "y":3.25}, + {"label":"K38 (F4,B0)", "x":8.75, "y":3.25}, + {"label":"K39 (F4,B5)", "x":9.75, "y":3.25}, + {"label":"K3A (F4,B6)", "x":10.75, "y":3.25}, + {"label":"K3B (F4,C6)", "x":11.75, "y":3.25}, + {"label":"K3C (F4,C7)", "x":12.75, "y":3.25}, + {"label":"K3E (F4,D4)", "x":15.5, "y":3.25}, + {"label":"K3F (F4,D6)", "x":16.5, "y":3.25}, + {"label":"K3G (F4,D7)", "x":17.5, "y":3.25}, + {"label":"K3H (F4,B4)", "x":18.5, "y":3.25}, + {"label":"K40 (F5,D5)", "x":0, "y":4.25, "w":1.25}, + {"label":"K41 (F5,D3)", "x":1.25, "y":4.25}, + {"label":"K42 (F5,D2)", "x":2.25, "y":4.25}, + {"label":"K43 (F5,D0)", "x":3.25, "y":4.25}, + {"label":"K44 (F5,B7)", "x":4.25, "y":4.25}, + {"label":"K45 (F5,B3)", "x":5.25, "y":4.25}, + {"label":"K46 (F5,B2)", "x":6.25, "y":4.25}, + {"label":"K47 (F5,B1)", "x":7.25, "y":4.25}, + {"label":"K48 (F5,B0)", "x":8.25, "y":4.25}, + {"label":"K49 (F5,B5)", "x":9.25, "y":4.25}, + {"label":"K4A (F5,B6)", "x":10.25, "y":4.25}, + {"label":"K4B (F5,C6)", "x":11.25, "y":4.25}, + {"label":"K4C (F5,C7)", "x":12.25, "y":4.25, "w":1.25}, + {"label":"K4D (F5,F7)", "x":13.5, "y":4.25}, + {"label":"K4E (F5,D4)", "x":15.5, "y":4.25}, + {"label":"K4F (F5,D6)", "x":16.5, "y":4.25}, + {"label":"K4G (F5,D7)", "x":17.5, "y":4.25}, + {"label":"K4H (F5,B4)", "x":18.5, "y":4.25, "h":2}, + {"label":"K50 (F6,D5)", "x":0, "y":5.25, "w":1.25}, + {"label":"K51 (F6,D3)", "x":1.25, "y":5.25, "w":1.5}, + {"label":"K52 (F6,D2)", "x":2.75, "y":5.25, "w":1.75}, + {"label":"K56 (F6,B2)", "x":4.5, "y":5.25, "w":5.25}, + {"label":"K5A (F6,B6)", "x":9.75, "y":5.25, "w":1.75}, + {"label":"K5B (F6,C6)", "x":11.5, "y":5.25}, + {"label":"K5C (F6,C7)", "x":12.5, "y":5.25}, + {"label":"K5D (F6,F7)", "x":13.5, "y":5.25}, + {"label":"K5E (F6,D4)", "x":15.5, "y":5.25, "w":2}, + {"label":"K5G (F6,D7)", "x":17.5, "y":5.25} + ] + } + } + +} diff --git a/keyboards/sck/m0116b/keymaps/default/config.h b/keyboards/sck/m0116b/keymaps/default/config.h new file mode 100644 index 0000000000..015191d1b6 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +#define TAPPING_TERM 200 +// place overrides here diff --git a/keyboards/sck/m0116b/keymaps/default/keymap.c b/keyboards/sck/m0116b/keymaps/default/keymap.c new file mode 100644 index 0000000000..b8ae5931f2 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/default/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + M0116B = SAFE_RANGE, +}; + +#define CALTDEL LCTL(LALT(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,---------------------------------------------------------------------------------. + * | | CALTDEL | | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |MO(1)| / | * |Paus| + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7 | 8 | 9 | + | + * |-----------------------------------------------------| | |-------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | - | + * |-----------------------------------------------------------' |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------' `--------------| | + * |CAPS|Opt |Cmd | ` | Space | \ |Left|Up|Down|Right| | 0 | . | | + * `-----------------------------------------------------------' `-------------------' + */ +[0] = LAYOUT_m0116_ansi( /* Base */ + CALTDEL, + 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_NLCK, KC_PEQL, KC_PSLS, KC_PAST, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, KC_PMNS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCAP, KC_LALT, KC_LGUI, KC_GRV, KC_SPC, LT(1, KC_BSLS), KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT +), +/* Keymap Layer 1: (Layer 1) Layer 1 + * ,---------------------------------------------------------------------------------. + * | |RESET| | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------| | |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' `--------------| | + * | | | | | M0116B | | | | | | | | | | + * `-----------------------------------------------------------' `-------------------' + */ +[1] = LAYOUT_m0116_ansi( /* Layer 1 */ + RESET, + KC_TRNS, 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_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M0116B, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M0116B: + if (record->event.pressed) { + // when keycode M0116B is pressed + SEND_STRING("Golden Delicious - aka M0116B - The Apple M0116/M0118 Replacement PCB."); + } else { + // when keycode M0116B is released + } + break; + + } + return true; +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/m0116b/keymaps/default/readme.md b/keyboards/sck/m0116b/keymaps/default/readme.md new file mode 100644 index 0000000000..ebc0b3e92c --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/default/readme.md @@ -0,0 +1 @@ +# A keymap for the Golden Delicious, this is for the M0116 diff --git a/keyboards/sck/m0116b/keymaps/m0116/config.h b/keyboards/sck/m0116b/keymaps/m0116/config.h new file mode 100644 index 0000000000..015191d1b6 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0116/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +#define TAPPING_TERM 200 +// place overrides here diff --git a/keyboards/sck/m0116b/keymaps/m0116/keymap.c b/keyboards/sck/m0116b/keymaps/m0116/keymap.c new file mode 100644 index 0000000000..b8ae5931f2 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0116/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + M0116B = SAFE_RANGE, +}; + +#define CALTDEL LCTL(LALT(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,---------------------------------------------------------------------------------. + * | | CALTDEL | | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |MO(1)| / | * |Paus| + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7 | 8 | 9 | + | + * |-----------------------------------------------------| | |-------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | - | + * |-----------------------------------------------------------' |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------' `--------------| | + * |CAPS|Opt |Cmd | ` | Space | \ |Left|Up|Down|Right| | 0 | . | | + * `-----------------------------------------------------------' `-------------------' + */ +[0] = LAYOUT_m0116_ansi( /* Base */ + CALTDEL, + 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_NLCK, KC_PEQL, KC_PSLS, KC_PAST, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, KC_PMNS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCAP, KC_LALT, KC_LGUI, KC_GRV, KC_SPC, LT(1, KC_BSLS), KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT +), +/* Keymap Layer 1: (Layer 1) Layer 1 + * ,---------------------------------------------------------------------------------. + * | |RESET| | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------| | |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' `--------------| | + * | | | | | M0116B | | | | | | | | | | + * `-----------------------------------------------------------' `-------------------' + */ +[1] = LAYOUT_m0116_ansi( /* Layer 1 */ + RESET, + KC_TRNS, 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_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M0116B, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M0116B: + if (record->event.pressed) { + // when keycode M0116B is pressed + SEND_STRING("Golden Delicious - aka M0116B - The Apple M0116/M0118 Replacement PCB."); + } else { + // when keycode M0116B is released + } + break; + + } + return true; +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/m0116b/keymaps/m0116/readme.md b/keyboards/sck/m0116b/keymaps/m0116/readme.md new file mode 100644 index 0000000000..6f9eee3e22 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0116/readme.md @@ -0,0 +1 @@ +# The default keymap for the Golden Delicious when used with a M0116 diff --git a/keyboards/sck/m0116b/keymaps/m0118/config.h b/keyboards/sck/m0116b/keymaps/m0118/config.h new file mode 100644 index 0000000000..499a4753f4 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0118/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/m0116b/keymaps/m0118/keymap.c b/keyboards/sck/m0116b/keymaps/m0118/keymap.c new file mode 100644 index 0000000000..094d700661 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0118/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + M0116B = SAFE_RANGE, +}; + +#define CALTDEL LCTL(LALT(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,---------------------------------------------------------------------------------. + * | | CALTDEL | | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |MO(1)| = | / | * | + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter| | 7 | 8 | 9 | + | + * |--------------------------------------------------------| | |-------------------| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '| # | | | 4 | 5 | 6 | - | + * |-----------------------------------------------------------' |-------------------| + * |Shift|<>| Z| X| C| V| B| N| M| ,| .| /|Shift| Up | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------' `--------------| | + * |Ctrl | Opt | Cmd | Space |Cmd |Left|Right|Down| | 0 | . | | + * `-----------------------------------------------------------' `-------------------' + */ +[0] = LAYOUT_m0118_iso( /* Base */ + CALTDEL, + 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_NLCK, KC_PEQL, KC_PSLS, KC_PAST, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HASH, KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_LSFT, KC_LABK, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(1, KC_RALT), KC_LEFT, KC_RGHT, KC_DOWN, KC_P0, KC_PDOT +), +/* Keymap Layer 1: (Layer 1) Layer 1 + * ,---------------------------------------------------------------------------------. + * | | Reset | | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |--------------------------------------------------------| | |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' `--------------| | + * | | | | M0116B | | | | | | | | | + * `-----------------------------------------------------------' `-------------------' + */ +[1] = LAYOUT_m0118_iso( /* Layer 1 */ + RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, M0116B, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M0116B: + if (record->event.pressed) { + // when keycode M0116B is pressed + SEND_STRING("Golden Delicious - M0116B - The Apple M0116/M0118 Replacement PCB."); + } else { + // when keycode M0116B is released + } + break; + + } + return true; +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/m0116b/keymaps/m0118/readme.md b/keyboards/sck/m0116b/keymaps/m0118/readme.md new file mode 100644 index 0000000000..049dad83af --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0118/readme.md @@ -0,0 +1 @@ +# The default keymap for the Golden Delicious when used with a M0118 diff --git a/keyboards/sck/m0116b/m0116b.c b/keyboards/sck/m0116b/m0116b.c new file mode 100644 index 0000000000..2e0a4ae2c7 --- /dev/null +++ b/keyboards/sck/m0116b/m0116b.c @@ -0,0 +1,51 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include "m0116b.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/sck/m0116b/m0116b.h b/keyboards/sck/m0116b/m0116b.h new file mode 100644 index 0000000000..e315925121 --- /dev/null +++ b/keyboards/sck/m0116b/m0116b.h @@ -0,0 +1,58 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_m0116_ansi( \ + K06, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E, K3F, K3G, K3H, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, K4F, K4G, K4H, \ + K50, K51, K52, K53, K56, K59, K5A, K5B, K5C, K5D, K5E, K5G \ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, KC_NO, K3E, K3F, K3G, K3H }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E, K4F, K4G, K4H }, \ + { K50, K51, K52, K53, KC_NO, KC_NO, K56, KC_NO, KC_NO, K59, K5A, K5B, K5C, K5D, K5E, KC_NO, K5G, KC_NO }, \ + } + +#define LAYOUT_m0118_iso( \ + K06, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5G \ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, KC_NO, K5G, KC_NO }, \ + } diff --git a/keyboards/sck/m0116b/readme.md b/keyboards/sck/m0116b/readme.md new file mode 100644 index 0000000000..c8bb36d994 --- /dev/null +++ b/keyboards/sck/m0116b/readme.md @@ -0,0 +1,26 @@ +# Golden Delicious aka M0116B + +The Golden Delicious (aka M0116B) is a replacement PCB for the Apple M0116 and M0118 keyboards, the best keyboard Apple ever made... + +Installation Information: + +The Golden Delicious comes with new daughter boards that use USB-B connectors. When installing the PCB you can use these new connectors, or you can reuse the old DIN type ADB connectors. Reusing the original ADB daughter boards will require you to put a USB-A connector on an original ADB cable and make sure that you are connecting the pins correctly (and is therefore slightly more advanced to use and setup as it requres a multimeter). + +The daughter boards can easily be snapped off from the main PCB. In order to electrically connect them to the main PCB you will need to reuse the 6 wire ribbon cable from your original PCB (or use the supplied pieces of ribbon cable if the originals are damaged during desoldering). + +When installing the PCB assembly back into the case, if you are using the new USB-B daughter boards, you will need to trim a small amount of the support brackets inside the case. This is to fit the new USB-B connectors in place of the original DIN type ADB connectors, since the new USB-B connectors are longer than the original ADB connectors. As can be seen [HERE](https://imgur.com/a/a1zIFUC). + +Repo Information: + +Keyboard Maintainer: jrfhoutx +Keyboard Designer: [jrfhoutx](https://github.com/jrfhoutx) +Hardware Supported: M0116B, ATMEGA32U4 +Hardware Availability: Space City Keyboards + +Make example for this keyboard (after setting up your build environment): + + make sck/m0116b:default + make sck/m0116b:m0116 + make sck/m0116b:m0118 + +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). diff --git a/keyboards/sck/m0116b/rules.mk b/keyboards/sck/m0116b/rules.mk new file mode 100644 index 0000000000..562bad5d56 --- /dev/null +++ b/keyboards/sck/m0116b/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/sck/neiso/config.h b/keyboards/sck/neiso/config.h new file mode 100644 index 0000000000..43530f2c02 --- /dev/null +++ b/keyboards/sck/neiso/config.h @@ -0,0 +1,170 @@ +/* +Copyright 2019 jrfhoutx + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Space City Keyboards +#define PRODUCT NEISO +#define DESCRIPTION A five key ISO Macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { F4 } +#define MATRIX_COL_PINS \ + { B3, D2, F5, F7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 4 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/sck/neiso/info.json b/keyboards/sck/neiso/info.json new file mode 100644 index 0000000000..1484cd7f27 --- /dev/null +++ b/keyboards/sck/neiso/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "NEISO", + "url": "", + "maintainer": "jrfhoutx", + "width": 9.25, + "height": 14.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":0.25, "y":0, "w":2, "h":1.25}, {"x":2.75, "y":0.25, "w":1.25, "h":2}, {"x":1.5, "y":1.5}, {"x":0, "y":1.75, "w":1.25, "h":2}, {"x":1.75, "y":2.75, "w":2, "h":1.25}] + } + } +} diff --git a/keyboards/sck/neiso/keymaps/default/config.h b/keyboards/sck/neiso/keymaps/default/config.h new file mode 100644 index 0000000000..499a4753f4 --- /dev/null +++ b/keyboards/sck/neiso/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/neiso/keymaps/default/keymap.c b/keyboards/sck/neiso/keymaps/default/keymap.c new file mode 100644 index 0000000000..05335947b5 --- /dev/null +++ b/keyboards/sck/neiso/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { QMKBEST = SAFE_RANGE, QMKURL }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(/* Base */ + KC_1, KC_2, + KC_3, + KC_4, KC_5 +), + [1] = LAYOUT(/* Base */ + KC_1, KC_2, + QMKBEST, + KC_4, KC_5 +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/keyboards/sck/neiso/keymaps/default/readme.md b/keyboards/sck/neiso/keymaps/default/readme.md new file mode 100644 index 0000000000..af21756197 --- /dev/null +++ b/keyboards/sck/neiso/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the NEISO Macropad diff --git a/keyboards/sck/neiso/neiso.c b/keyboards/sck/neiso/neiso.c new file mode 100644 index 0000000000..4b817bdd57 --- /dev/null +++ b/keyboards/sck/neiso/neiso.c @@ -0,0 +1,30 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include "neiso.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/sck/neiso/neiso.h b/keyboards/sck/neiso/neiso.h new file mode 100644 index 0000000000..7058fab5bf --- /dev/null +++ b/keyboards/sck/neiso/neiso.h @@ -0,0 +1,34 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT( \ + k01, k02, \ + k00, \ + k03, k04 \ +) \ + { {k00, k01, k02, k03, k04} } diff --git a/keyboards/sck/neiso/readme.md b/keyboards/sck/neiso/readme.md new file mode 100644 index 0000000000..c21897b065 --- /dev/null +++ b/keyboards/sck/neiso/readme.md @@ -0,0 +1,16 @@ +# neiso + +![neiso](https://i.imgur.com/8uj89kN.jpg) + +A ProMicro/Teensy 2.0/Elite C controlled 5 key macropad using 4 ISO enter keys. Initially based on the I-S-hOle macropad. + +Keyboard Maintainer: jrfhoutx +Keyboard Designer: [jrfhoutx](https://github.com/jrfhoutx) +Hardware Supported: N-E-ISO PCB; ProMicro, Teensy 2.0, Elite C, Proton C +Hardware Availability: Space City Keyboards + +Make example for this keyboard (after setting up your build environment): + + make sck/neiso: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). diff --git a/keyboards/sck/neiso/rules.mk b/keyboards/sck/neiso/rules.mk new file mode 100644 index 0000000000..becaf5e1e0 --- /dev/null +++ b/keyboards/sck/neiso/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h new file mode 100644 index 0000000000..1b574a0997 --- /dev/null +++ b/keyboards/sck/osa/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 jrfhoutx + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Space City Keyboards +#define PRODUCT OSA +#define DESCRIPTION PCB for the OSA (A no longer open source version of the TGR Alice) + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { B4, D7, D5, D3, D2, D0, D1, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + #define RGB_DI_PIN D4 + #ifdef RGB_DI_PIN + #define RGBLED_NUM 9 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + // #define RGBLIGHT_ANIMATIONS + /*== or choose animations ==*/ + //#define RGBLIGHT_EFFECT_BREATHING + // #define RGBLIGHT_EFFECT_RAINBOW_MOOD + // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + // #define RGBLIGHT_EFFECT_SNAKE + // #define RGBLIGHT_EFFECT_KNIGHT + // #define RGBLIGHT_EFFECT_CHRISTMAS + // #define RGBLIGHT_EFFECT_STATIC_GRADIENT + // #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING + /*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + // #define RGBLIGHT_BREATHE_TABLE_SIZE 128 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 + #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/sck/osa/info.json b/keyboards/sck/osa/info.json new file mode 100644 index 0000000000..64ed057e4a --- /dev/null +++ b/keyboards/sck/osa/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "OSA", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT_default_ansi": { + "key_count": 64, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":10.25, "y":0}, {"label":"*", "x":11.25, "y":0}, {"label":"(", "x":12.25, "y":0}, {"label":")", "x":13.25, "y":0}, {"label":"_", "x":14.25, "y":0}, {"label":"+", "x":15.25, "y":0}, {"label":"Backspace", "x":16.25, "y":0, "w":2}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"|", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":2.75}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_split_backspace": { + "key_count": 65, + "layout": [{"label":"Delete", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":10.25, "y":0}, {"label":"*", "x":11.25, "y":0}, {"label":"(", "x":12.25, "y":0}, {"label":")", "x":13.25, "y":0}, {"label":"_", "x":14.25, "y":0}, {"label":"+", "x":15.25, "y":0}, {"label":"~", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"Backspace", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":2.75}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_split_right_shift": { + "key_count": 65, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":10.25, "y":0}, {"label":"*", "x":11.25, "y":0}, {"label":"(", "x":12.25, "y":0}, {"label":")", "x":13.25, "y":0}, {"label":"_", "x":14.25, "y":0}, {"label":"+", "x":15.25, "y":0}, {"label":"Backspace", "x":16.25, "y":0, "w":2}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"|", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":1.75}, {"label":"Fn", "x":17.25, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_all": { + "key_count": 66, + "layout": [{"label":"Delete", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":10.25, "y":0}, {"label":"*", "x":11.25, "y":0}, {"label":"(", "x":12.25, "y":0}, {"label":")", "x":13.25, "y":0}, {"label":"_", "x":14.25, "y":0}, {"label":"+", "x":15.25, "y":0}, {"label":"~", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"Backspace", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":1.75}, {"label":"Fn", "x":17.25, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/sck/osa/keymaps/all/config.h b/keyboards/sck/osa/keymaps/all/config.h new file mode 100644 index 0000000000..499a4753f4 --- /dev/null +++ b/keyboards/sck/osa/keymaps/all/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/all/keymap.c b/keyboards/sck/osa/keymaps/all/keymap.c new file mode 100644 index 0000000000..378f8ed58f --- /dev/null +++ b/keyboards/sck/osa/keymaps/all/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[0] = LAYOUT_all( /* OSA Base */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| UP| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl |LFT| DN|RGHT| F| G| |LFT|DN| UP |RGHT| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[1] = LAYOUT_all( /* OSA Layer 1 */ + KC_SLCK, 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_GRV, KC_BSLS, + KC_NLCK, KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CLCK, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/osa/keymaps/all/readme.md b/keyboards/sck/osa/keymaps/all/readme.md new file mode 100644 index 0000000000..03a0b5463e --- /dev/null +++ b/keyboards/sck/osa/keymaps/all/readme.md @@ -0,0 +1 @@ +# The split backspace and split right shift keymap for osa diff --git a/keyboards/sck/osa/keymaps/default/config.h b/keyboards/sck/osa/keymaps/default/config.h new file mode 100644 index 0000000000..499a4753f4 --- /dev/null +++ b/keyboards/sck/osa/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/default/keymap.c b/keyboards/sck/osa/keymaps/default/keymap.c new file mode 100644 index 0000000000..d6cfddc468 --- /dev/null +++ b/keyboards/sck/osa/keymaps/default/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 || ~ | 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =|Backsp | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] | \ | + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ + [0] = LAYOUT_default_ansi( /* Base */ + KC_DEL, 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_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .--------.,----------------------------------------------------------------------. + * |RGB_TOG || ~ | 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =|Backsp | + * |--------||----------------------------------------------------------------------| + * |RGB_MOD ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] | \ | + * |--------||----------------------------------------------------------------------| + * |RGB_RMOD||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `--------'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ + [1] = LAYOUT_default_ansi( /* OSA Layer 1 */ + RGB_TOG, RGB_M_T, RGB_VAI, RGB_VAD, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + RGB_MOD, 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, + RGB_RMOD, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +//void led_set_user(uint16_t usb_led) { +// +//} diff --git a/keyboards/sck/osa/keymaps/default/readme.md b/keyboards/sck/osa/keymaps/default/readme.md new file mode 100644 index 0000000000..982042494a --- /dev/null +++ b/keyboards/sck/osa/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default ANSI keymap for OSA diff --git a/keyboards/sck/osa/keymaps/ocm/config.h b/keyboards/sck/osa/keymaps/ocm/config.h new file mode 100644 index 0000000000..499a4753f4 --- /dev/null +++ b/keyboards/sck/osa/keymaps/ocm/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/ocm/keymap.c b/keyboards/sck/osa/keymaps/ocm/keymap.c new file mode 100644 index 0000000000..cd48b57291 --- /dev/null +++ b/keyboards/sck/osa/keymaps/ocm/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[0] = LAYOUT_all( /* OSA Base */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[1] = LAYOUT_all( /* OSA Layer 1 */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[2] = LAYOUT_all( /* OSA Layer 2 */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/osa/keymaps/ocm/readme.md b/keyboards/sck/osa/keymaps/ocm/readme.md new file mode 100644 index 0000000000..3624b1078e --- /dev/null +++ b/keyboards/sck/osa/keymaps/ocm/readme.md @@ -0,0 +1 @@ +# OneCreativeMind's keymap for OSA diff --git a/keyboards/sck/osa/keymaps/splitbs/config.h b/keyboards/sck/osa/keymaps/splitbs/config.h new file mode 100644 index 0000000000..499a4753f4 --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitbs/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/splitbs/keymap.c b/keyboards/sck/osa/keymaps/splitbs/keymap.c new file mode 100644 index 0000000000..528e45329b --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitbs/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[0] = LAYOUT_split_backspace( /* OSA Base */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[1] = LAYOUT_split_backspace( /* OSA Layer 1 */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/osa/keymaps/splitbs/readme.md b/keyboards/sck/osa/keymaps/splitbs/readme.md new file mode 100644 index 0000000000..33fb31b336 --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitbs/readme.md @@ -0,0 +1 @@ +# The split backspace keymap for osa diff --git a/keyboards/sck/osa/keymaps/splitrs/config.h b/keyboards/sck/osa/keymaps/splitrs/config.h new file mode 100644 index 0000000000..499a4753f4 --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitrs/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/splitrs/keymap.c b/keyboards/sck/osa/keymaps/splitrs/keymap.c new file mode 100644 index 0000000000..a59b66334e --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitrs/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 || ~ | 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =|Backsp | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] | \ | + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[0] = LAYOUT_split_right_shift( /* OSA Base */ + KC_DEL, 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_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 || ~ | 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =|Backsp | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] | \ | + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[1] = LAYOUT_split_right_shift( /* OSA Layer 1 */ + KC_DEL, 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_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/osa/keymaps/splitrs/readme.md b/keyboards/sck/osa/keymaps/splitrs/readme.md new file mode 100644 index 0000000000..9f2315c2a2 --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitrs/readme.md @@ -0,0 +1 @@ +# The split right shift keymap for osa diff --git a/keyboards/sck/osa/osa.c b/keyboards/sck/osa/osa.c new file mode 100644 index 0000000000..138a28893b --- /dev/null +++ b/keyboards/sck/osa/osa.c @@ -0,0 +1,73 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include "osa.h" + + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} +*/ + +void matrix_init_board(void){ + setPinOutput(C7); + setPinOutput(C6); + setPinOutput(B6); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(C7); + } else { + writePinLow(C7); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(C6); + } else { + writePinLow(C6); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(B6); + } else { + writePinLow(B6); + } + led_set_user(usb_led); +} + diff --git a/keyboards/sck/osa/osa.h b/keyboards/sck/osa/osa.h new file mode 100644 index 0000000000..46cb3cd85f --- /dev/null +++ b/keyboards/sck/osa/osa.h @@ -0,0 +1,117 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +/* LAYOUT + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐┌────────┐ + * │10 │ │00 │01 │02 │03 │04 │05 │06 │ │56 │55 │54 │53 │52 │51 │50 │57 ││57 │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤└────────┘ + * │20 │ │11 │12 │13 │14 │15 │16 │ │66 │65 │64 │63 │62 │61 │60 │67 │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │30 │ │21 │22 │23 │24 │25 │26 │ │76 │75 │74 │73 │72 │71 │77 │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤┌──────────┐ + * │31 │32 │33 │34 │35 │36 │ │86 │85 │84 │83 │82 │81 │80 │87 ││87 │ + * ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤└──────────┘ + * │41 │ │43 │45 │46 │ │95 │93 │ │90 │ + * └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘ + */ +#define LAYOUT_default_ansi( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_split_backspace( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K50, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_split_right_shift( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K80, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_all( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K50, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K80, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} diff --git a/keyboards/sck/osa/readme.md b/keyboards/sck/osa/readme.md new file mode 100644 index 0000000000..024df5cee6 --- /dev/null +++ b/keyboards/sck/osa/readme.md @@ -0,0 +1,19 @@ +# osa + +![osa](https://i.imgur.com/U2x7TQ8.jpg) + +About the OSA: + +The OSA was run as a private group buy of 20 units. It is an Alice layout keyboard based on the Open Source Alice files, altered by BlindAssassin111 based on input from the private group buy members. +All case and other design files have been either reworked or created from scratch by BlindAssassin111. PCB was designed from scratch by BlindAssassin111. +The OSA PCB is an ATMega32u4 powered, USB Type C, Alice compatible PCB and was created specifically for the OSA case, but with considerations to make it compatible with the Lubrigante acrylic cases (except for the Type C connector it should also be compatible with original TGR Alice cases). + +Keyboard Maintainer: [jrfhoutx](https://github.com/jrfhoutx) +Hardware Supported: OSA PCB by BlindAssassin111, ATMEGA32u4 +Hardware Availability: Currently unavailable outside of the private group buy + +Make example for this keyboard (after setting up your build environment): + + make sck/osa: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). diff --git a/keyboards/sck/osa/rules.mk b/keyboards/sck/osa/rules.mk new file mode 100644 index 0000000000..2d4a95c9e9 --- /dev/null +++ b/keyboards/sck/osa/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/scythe/config.h b/keyboards/scythe/config.h index 66d47c3566..d577192db3 100644 --- a/keyboards/scythe/config.h +++ b/keyboards/scythe/config.h @@ -114,13 +114,6 @@ along with this program. If not, see . * */ -/* key combination for magic key command */ -/* -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) -*/ - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/scythe/rules.mk b/keyboards/scythe/rules.mk index 1ad80dc898..54f2f7a529 100644 --- a/keyboards/scythe/rules.mk +++ b/keyboards/scythe/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/sentraq/number_pad/rules.mk b/keyboards/sentraq/number_pad/rules.mk index 8678b7f886..8df6c4c7c5 100644 --- a/keyboards/sentraq/number_pad/rules.mk +++ b/keyboards/sentraq/number_pad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/sentraq/s60_x/default/rules.mk b/keyboards/sentraq/s60_x/default/rules.mk index af43bf6c5c..8b3674cd81 100644 --- a/keyboards/sentraq/s60_x/default/rules.mk +++ b/keyboards/sentraq/s60_x/default/rules.mk @@ -1,55 +1,16 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -64,5 +25,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb \ No newline at end of file +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c index 08780a28c1..f7a66b96f5 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c @@ -31,14 +31,13 @@ along with this program. If not, see . #define KC_SPACEFN KC_FN0 #define KC_OSLS KC_FN3 #define KC_GMLK KC_FN1 -#define KC_FUNC KC_FN2 +#define KC_FUNC MO(2) #define MICMUTE RCTL(KC_LCTL) enum function_codes { F_SPACEFN = 0, F_OSLS = 3, F_GMLK = 1, - F_FUNC = 2 }; enum layer_names { @@ -154,15 +153,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { [F_SPACEFN] = ACTION_LAYER_TAP_KEY(2, KC_SPACE), // SpaceFn layout 1 [F_GMLK] = ACTION_LAYER_TOGGLE(1), // Disable SpaceFn and Oneshot Shift - [F_FUNC] = ACTION_LAYER_MOMENTARY(2), // SpaceFn layout 1 [F_OSLS] = ACTION_MODS_ONESHOT(MOD_LSFT) // Oneshot Leftshift }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -}; - void matrix_init_user(void) { } diff --git a/keyboards/sentraq/s60_x/keymaps/custom/readme.md b/keyboards/sentraq/s60_x/keymaps/custom/readme.md index fd79d53607..88ecdbbfc4 100644 --- a/keyboards/sentraq/s60_x/keymaps/custom/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/custom/readme.md @@ -1,4 +1,4 @@ -### 8 Custom +### 8 Custom The custom keymap - [keymap.c](keymap.c) - is where I tested all the switches, not being concerned with a specific layout or layers. It's a plain layout option with the extra keys used on ISO & HHKB layouts being assigned some other keys. #### 8.0 Default layer diff --git a/keyboards/sentraq/s60_x/keymaps/default/readme.md b/keyboards/sentraq/s60_x/keymaps/default/readme.md index 01cda9df9b..8154d114a1 100644 --- a/keyboards/sentraq/s60_x/keymaps/default/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/default/readme.md @@ -1,4 +1,4 @@ -### 1 Standard - ANSI +### 1 Standard - ANSI The standard keymap is the one that is pre-flashed on the S60-X. #### 1.0 Default layer diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c index 76398697c2..077f1c6277 100644 --- a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c @@ -1,5 +1,9 @@ #include QMK_KEYBOARD_H +#define KC_MO4 MO(4) +#define KC_MO6 MO(6) +#define KC_MO7 MO(7) + /* * Hasu */ @@ -22,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ CAPS, A, S, D, F, G, H, J, K, L, FN2, QUOT, NO, ENT, \ LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, FN1, NO, FN9, NO, \ - LCTL, LGUI, LALT, SPC, RALT, FN3, FN3, FN0), + LCTL, LGUI, LALT, SPC, RALT, MO6, MO6, MO4), /* Keymap 1: colemak ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ @@ -41,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, F, P, G, J, L, U, Y, SCLN, LBRC, RBRC, BSLS, \ BSPC, A, R, S, T, D, H, N, E, I, O, QUOT, NO, ENT, \ LSFT, NO, Z, X, C, V, B, K, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, FN0), + LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, MO4), /* Keymap 2: dvorak ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] │▒▒▒▒▒│BKSPC│ @@ -60,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, QUOT, COMM, DOT, P, Y, F, G, C, R, L, SLSH, EQL, BSLS, \ CAPS, A, O, E, U, I, D, H, T, N, S, MINS, NO, ENT, \ LSFT, NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, FN0), + LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, MO4), /* Keymap 3: workman ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ @@ -79,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, D, R, W, B, J, F, U, P, SCLN, LBRC, RBRC, BSLS, \ BSPC, A, S, H, T, G, Y, N, E, O, I, QUOT, NO, ENT, \ LSFT, NO, Z, X, M, C, V, K, L, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, FN0), + LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, MO4), /* Overlay 4: HHKB mode ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │Grave│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ Del │ @@ -98,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CAPS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PSCR, SLCK, PAUS, UP, TRNS, INS, \ LCTL, VOLD, VOLU, MUTE, TRNS, TRNS, PAST, PSLS, HOME, PGUP, LEFT, RGHT, TRNS, ENT, \ LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PPLS, PMNS, END, PGDN, DOWN, TRNS, RSFT, TRNS, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, FN4, TRNS), + LCTL, LGUI, LALT, SPC, RALT, RGUI, MO7, TRNS), /* Overlay 5: Vi mode (Slash) ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │Grave│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│BkSpc│ @@ -169,11 +173,8 @@ Lw: set Workman layout * Fn action definition */ const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(4), [1] = ACTION_LAYER_TAP_KEY(5, KC_SLASH), [2] = ACTION_LAYER_TAP_KEY(6, KC_SCLN), - [3] = ACTION_LAYER_MOMENTARY(6), - [4] = ACTION_LAYER_MOMENTARY(7), // to Layout selector [5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout [6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout [7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/readme.md b/keyboards/sentraq/s60_x/keymaps/hasu/readme.md index b79d0e97a5..7a8104472f 100644 --- a/keyboards/sentraq/s60_x/keymaps/hasu/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/hasu/readme.md @@ -1,4 +1,4 @@ -### 5. Hasu +### 5. Hasu This is Hasu's favorite keymap with HHKB Fn, Vi cursor and Mousekey layer. See [keymap.c](keymap.c) for detail. (Hasu is the initial creator of the TMK firmware, in case you weren't aware.) \ No newline at end of file diff --git a/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c b/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c index b572b4484b..1ccefb6dd1 100644 --- a/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c @@ -1,5 +1,7 @@ #include QMK_KEYBOARD_H +#define KC_MO1 MO(1) + /* * HHKB Layout */ @@ -21,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSLS, GRV, \ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSPC, \ LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \ - LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, FN0, \ + LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, MO1, \ NO, LGUI, LALT, SPC, NO, RALT, RGUI, NO), /* 1: HHKB Fn layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -43,10 +45,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PPLS, PMNS, END, PGDN, DOWN, NO, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; diff --git a/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md b/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md index c7dcec899f..08df14e483 100644 --- a/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md @@ -1,4 +1,4 @@ -### 7. HHKB +### 7. HHKB [keymap.c](keymap.c) emulates original HHKB layers. #### 7.0: Default layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ diff --git a/keyboards/sentraq/s60_x/keymaps/iso/readme.md b/keyboards/sentraq/s60_x/keymaps/iso/readme.md index 2c06bf86f0..6b846617d5 100644 --- a/keyboards/sentraq/s60_x/keymaps/iso/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/iso/readme.md @@ -1,4 +1,4 @@ -### 2 Standard - ISO +### 2 Standard - ISO The same as the standard keymap, but with additional ISO keys. diff --git a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c index 4d84396e31..4b7208a9e2 100644 --- a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c @@ -16,6 +16,8 @@ along with this program. If not, see . #include QMK_KEYBOARD_H +#define KC_MO1 MO(1) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layout 0: Default Layer * ,-----------------------------------------------------------. @@ -35,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NUHS, ENT, \ LSFT, NUBS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - FN1, LGUI, LALT, FN0, RALT, RGUI, APP, RCTL), + MO1, LGUI, LALT, FN0, RALT, RGUI, APP, RCTL), /* Layout 1: Function Layer * ,-----------------------------------------------------------. @@ -63,7 +65,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), /* SpaceFn layout 1 */ - [1] = ACTION_LAYER_MOMENTARY(1), /* Momentary layout 1 */ [2] = ACTION_MODS_KEY(MOD_LSFT, KC_DEL), /* Cut */ [3] = ACTION_MODS_KEY(MOD_LCTL, KC_INS), /* Copy */ [4] = ACTION_MODS_KEY(MOD_LSFT, KC_INS), /* Paste */ diff --git a/keyboards/sentraq/s60_x/keymaps/plain/readme.md b/keyboards/sentraq/s60_x/keymaps/plain/readme.md index 02f524495e..402aa1bf9d 100644 --- a/keyboards/sentraq/s60_x/keymaps/plain/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/plain/readme.md @@ -1,4 +1,4 @@ -### 4. Plain +### 4. Plain Without any Fn layer this will be useful if you want to use key remapping tool like AHK on host. See [keymap.c](keymap.c) for detail. diff --git a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c index 61685b477a..3b38ed501b 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c @@ -1,5 +1,8 @@ #include QMK_KEYBOARD_H +#define KC_MO6 MO(6) +#define KC_MO7 MO(7) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -19,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \ LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, FN0, RGUI, APP, RCTL), + LCTL, LGUI, LALT, SPC, MO6, RGUI, APP, RCTL), /* 1: colemak ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ @@ -38,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, F, P, G, J, L, U, Y, SCLN, LBRC, RBRC, BSLS, \ BSPC, A, R, S, T, D, H, N, E, I, O, QUOT, NO, ENT, \ LSFT, NO, Z, X, C, V, B, K, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, FN0, RGUI, APP, RCTL), + LCTL, LGUI, LALT, SPC, MO6, RGUI, APP, RCTL), /* 2: dvorak ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] │▒▒▒▒▒│BKSPC│ @@ -57,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, QUOT, COMM, DOT, P, Y, F, G, C, R, L, SLSH, EQL, BSLS, \ CAPS, A, O, E, U, I, D, H, T, N, S, MINS, NO, ENT, \ LSFT, NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, FN0, RGUI, APP, RCTL), + LCTL, LGUI, LALT, SPC, MO6, RGUI, APP, RCTL), /* 3: workman ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ @@ -76,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, D, R, W, B, J, F, U, P, SCLN, LBRC, RBRC, BSLS, \ BSPC, A, S, H, T, G, Y, N, E, O, I, QUOT, NO, ENT, \ LSFT, NO, Z, X, M, C, V, K, L, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, FN0, RGUI, APP, RCTL), + LCTL, LGUI, LALT, SPC, MO6, RGUI, APP, RCTL), /* 4: Poker with Arrow ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ @@ -136,7 +139,7 @@ FnS: toggle Arrow overlay */ LAYOUT_kc( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ - TRNS, FN2, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, FN4, \ + TRNS, FN2, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, MO7, \ TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN3, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), @@ -168,11 +171,9 @@ Lw: set Workman layout }; const uint16_t PROGMEM fn_actions[] = { /* Poker Layout */ - [0] = ACTION_LAYER_MOMENTARY(6), // to Fn overlay [1] = ACTION_LAYER_TOGGLE(4), // toggle arrow overlay [2] = ACTION_LAYER_TOGGLE(5), // toggle Esc overlay [3] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // Task(RControl,RShift+Esc) - [4] = ACTION_LAYER_MOMENTARY(7), // to Layout selector [5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout [6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout [7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout diff --git a/keyboards/sentraq/s60_x/keymaps/poker/readme.md b/keyboards/sentraq/s60_x/keymaps/poker/readme.md index 04d2b78bef..2fdc9d702c 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/poker/readme.md @@ -1,4 +1,4 @@ -### 3 Poker +### 3 Poker [keymap_poker](../poker/readme.md) emulates original Poker layers while both [keymap_poker_bit](../poker_bit/readme.md) and [keymap_poker_set](../poker_set/readme.md) implements same layout in different way and they fix a minor issue of original Poker and enhance arrow keys. diff --git a/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md b/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md index 04d2b78bef..2fdc9d702c 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md @@ -1,4 +1,4 @@ -### 3 Poker +### 3 Poker [keymap_poker](../poker/readme.md) emulates original Poker layers while both [keymap_poker_bit](../poker_bit/readme.md) and [keymap_poker_set](../poker_set/readme.md) implements same layout in different way and they fix a minor issue of original Poker and enhance arrow keys. diff --git a/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md b/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md index 04d2b78bef..2fdc9d702c 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md @@ -1,4 +1,4 @@ -### 3 Poker +### 3 Poker [keymap_poker](../poker/readme.md) emulates original Poker layers while both [keymap_poker_bit](../poker_bit/readme.md) and [keymap_poker_set](../poker_set/readme.md) implements same layout in different way and they fix a minor issue of original Poker and enhance arrow keys. diff --git a/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md b/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md index fd657f6526..3fe215afcc 100644 --- a/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md @@ -1,4 +1,4 @@ -### 6. SpaceFN +### 6. SpaceFN This layout proposed by spiceBar uses space bar to change layer with using Dual role key technique. See [keymap.c](keymap.c) and [SpaceFN discussion](http://geekhack.org/index.php?topic=51069.0). #### 6.0 Default layer diff --git a/keyboards/sentraq/s60_x/rgb/rules.mk b/keyboards/sentraq/s60_x/rgb/rules.mk index 409d60abf5..efd66a1ba1 100644 --- a/keyboards/sentraq/s60_x/rgb/rules.mk +++ b/keyboards/sentraq/s60_x/rgb/rules.mk @@ -1,55 +1,16 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -69,5 +30,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable RGB light - -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb \ No newline at end of file +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb diff --git a/keyboards/sentraq/s65_plus/rules.mk b/keyboards/sentraq/s65_plus/rules.mk index 08dd2d93c8..f4da10aa16 100644 --- a/keyboards/sentraq/s65_plus/rules.mk +++ b/keyboards/sentraq/s65_plus/rules.mk @@ -1,53 +1,15 @@ - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c index 7a0de8559d..371c2b8ef6 100644 --- a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c @@ -140,7 +140,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(_FL), // Momentary Fn overlay [1] = ACTION_LAYER_TOGGLE(_CM), //Toggle Colemak Layer overlay [2] = ACTION_LAYER_TOGGLE(_DV), // Toggle Dvorak Layer overlay [3] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay diff --git a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c index a5daed006a..37bd742b59 100644 --- a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c @@ -94,7 +94,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(_FL), // Momentary Fn overlay [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay diff --git a/keyboards/sentraq/s65_x/rules.mk b/keyboards/sentraq/s65_x/rules.mk index 598e269cbf..a6a2319c23 100644 --- a/keyboards/sentraq/s65_x/rules.mk +++ b/keyboards/sentraq/s65_x/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/setta21/config.h b/keyboards/setta21/config.h new file mode 100644 index 0000000000..cfb6bf4ffc --- /dev/null +++ b/keyboards/setta21/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/setta21/info.json b/keyboards/setta21/info.json new file mode 100644 index 0000000000..a1143fb03d --- /dev/null +++ b/keyboards/setta21/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "setta21", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_numpad_6x4": { + "layout": [ + {"label":"ESC", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"\uff1d", "x":2, "y":0}, + {"label":"Del", "x":3, "y":0}, + {"label":"Num Lock", "x":0, "y":1.25}, + {"label":"/", "x":1, "y":1.25}, + {"label":"*", "x":2, "y":1.25}, + {"label":"-", "x":3, "y":1.25}, + {"label":"7", "x":0, "y":2.25}, + {"label":"8", "x":1, "y":2.25}, + {"label":"9", "x":2, "y":2.25}, + {"label":"+", "x":3, "y":2.25, "h":2}, + {"label":"4", "x":0, "y":3.25}, + {"label":"5", "x":1, "y":3.25}, + {"label":"6", "x":2, "y":3.25}, + {"label":"1", "x":0, "y":4.25}, + {"label":"2", "x":1, "y":4.25}, + {"label":"3", "x":2, "y":4.25}, + {"label":"Enter", "x":3, "y":4.25, "h":2}, + {"label":"0", "x":0, "y":5.25, "w":2}, + {"label":".", "x":2, "y":5.25} + ] + } + } +} diff --git a/keyboards/setta21/keymaps/default/config.h b/keyboards/setta21/keymaps/default/config.h new file mode 100644 index 0000000000..e35fe2ccd7 --- /dev/null +++ b/keyboards/setta21/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + diff --git a/keyboards/setta21/keymaps/default/keymap.c b/keyboards/setta21/keymaps/default/keymap.c new file mode 100644 index 0000000000..fa33c08f26 --- /dev/null +++ b/keyboards/setta21/keymaps/default/keymap.c @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE, + _ARROW, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_numpad_6x4( + //,-----------------------------------| +LT(_ADJUST,KC_ESC), KC_F2, KC_EQL, KC_DEL, + //|--------+--------+--------+--------| + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + //|--------+--------+--------+--------| + KC_P7, KC_P8, KC_P9, + //|--------+--------+--------+--------| + KC_P4, KC_P5, KC_P6, KC_PPLS, + //|--------+--------+--------+--------| + KC_P1, KC_P2, KC_P3, + //|--------+--------+--------+--------| +LT(_ARROW, KC_P0), KC_PDOT,KC_PENT + //`-----------------------------------' + ), + + [_ARROW] = LAYOUT_numpad_6x4( + //,-----------------------------------| + KC_ESC, _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, KC_UP, XXXXXXX, + //|--------+--------+--------+--------| + KC_LEFT, KC_DOWN,KC_RIGHT, _______, + //|--------+--------+--------+--------| + XXXXXXX, KC_DOWN, XXXXXXX, + //|--------+--------+--------+--------| + MO(_ARROW), _______, _______ + //`-----------------------------------' + ), + + [_ADJUST] = LAYOUT_numpad_6x4( /* Base */ + //,-----------------------------------| + MO(_ADJUST), _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------| + RGB_SAD, RGB_SAI, XXXXXXX, + //|--------+--------+--------+--------| + RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, + //|--------+--------+--------+--------| + RGB_VAD, RGB_VAI, XXXXXXX, + //|--------+--------+--------+--------| + XXXXXXX, XXXXXXX, RGB_MOD + //`-----------------------------------' + ) +}; diff --git a/keyboards/setta21/keymaps/default/readme.md b/keyboards/setta21/keymaps/default/readme.md new file mode 100644 index 0000000000..1028d848c5 --- /dev/null +++ b/keyboards/setta21/keymaps/default/readme.md @@ -0,0 +1,38 @@ +# The default keymap for setta21 + +## Base +| 1 | 2 | 3 | 4 | +|:----------:|:----:|:----:|:----:| +|Adjust , ESC| F2 | = | Del | +| NumLock | / | * | minus| +| 7 | 8 | 9 | | +| 4 | 5 | 6 | + | +| 1 | 2 | 3 | | +| Arrow , 0 | | . | Ent | + + + +## Arrow +| 1 | 2 | 3 | 4 | +|:----------:|:----:|:----:|:----:| +| ESC | F2 | = | Del | +| XXXXX | / | * | minus| +| XXXXX | UP | XXXXX| | +| LEFT | DOWN | RIGHT| + | +| XXXXX | DOWN | XXXXX| | +| Arrow | | . | Ent | + + + + +## Adjust +| 1 | 2 | 3 | 4 | +|:----------:|:-----:|:----:|:------:| +| Adjust | F2 | = | Del | +| XXXXX | XXXXX | XXXXX| XXXXX | +| XXXXX |RGB_SAI| XXXXX| | +| LEFT |RGB_HUI| XXXXX| RGB_TOG| +| RGB_VAD |RGB_VAI| XXXXX| | +| XXXXX | | XXXXX| RGB_MOD| + + diff --git a/keyboards/setta21/keymaps/salicylic/config.h b/keyboards/setta21/keymaps/salicylic/config.h new file mode 100644 index 0000000000..44b34aa2fd --- /dev/null +++ b/keyboards/setta21/keymaps/salicylic/config.h @@ -0,0 +1,40 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define DRIVER_LED_TOTAL RGBLED_NUM + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_LIMIT_VAL 50 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 +#endif + diff --git a/keyboards/setta21/keymaps/salicylic/keymap.c b/keyboards/setta21/keymaps/salicylic/keymap.c new file mode 100644 index 0000000000..d1db2ff9a2 --- /dev/null +++ b/keyboards/setta21/keymaps/salicylic/keymap.c @@ -0,0 +1,197 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +#ifdef OLED_DRIVER_ENABLE +static uint32_t oled_timer = 0; +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE = 0, + _ARROW, + _MACRO, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_numpad_6x4( + //,-----------------------------------| + KC_ESC, KC_F2, JP_EQL, KC_DEL, + //|--------+--------+--------+--------| + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + //|--------+--------+--------+--------| + KC_P7, KC_P8, KC_P9, + //|--------+--------+--------+--------| + KC_P4, KC_P5, KC_P6, KC_PPLS, + //|--------+--------+--------+--------| + KC_P1, KC_P2, KC_P3, + //|--------+--------+--------+--------| +LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT + //`-----------------------------------' + ), + + [_ARROW] = LAYOUT_numpad_6x4( + //,-----------------------------------| + _______, _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, KC_UP, XXXXXXX, + //|--------+--------+--------+--------| + KC_LEFT, KC_DOWN,KC_RIGHT, _______, + //|--------+--------+--------+--------| + XXXXXXX, KC_DOWN, XXXXXXX, + //|--------+--------+--------+--------| + MO(_ARROW), MO(_MACRO), _______ + //`-----------------------------------' + ), + + [_MACRO] = LAYOUT_numpad_6x4( + //,-----------------------------------| + _______, _______, _______, _______, + //|--------+--------+--------+--------| + SEND_MIN,SEND_MAX,SEND_CIF,SEND_AVE, + //|--------+--------+--------+--------| + KC_F7, KC_F8, KC_F9, + //|--------+--------+--------+--------| + KC_F4, KC_F5, KC_F6,SEND_SUM, + //|--------+--------+--------+--------| + KC_F11, KC_F12, KC_F3, + //|--------+--------+--------+--------| + _______, _______, JP_RPRN + //`-----------------------------------' + ), + + [_ADJUST] = LAYOUT_numpad_6x4( /* Base */ + //,-----------------------------------| + _______, _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------| + RGB_SAD, RGB_SAI, XXXXXXX, + //|--------+--------+--------+--------| + RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, + //|--------+--------+--------+--------| + RGB_VAD, RGB_VAI, XXXXXXX, + //|--------+--------+--------+--------| + _______, _______, RGB_MOD + //`-----------------------------------' + ) +}; + + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _ARROW, _MACRO, _ADJUST); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool result = false; + if (record->event.pressed) { + #ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + #endif + } + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("_SUM*"); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("_AVERAGE*"); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("_COUNTIF*"); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("_MAX*"); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("_MIN*"); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } + + +void render_layer_state(void) { + oled_write_P(PSTR("LAYER: "), false); + oled_write_P(PSTR(" Arrow "), layer_state_is(_ARROW)); + oled_write_P(PSTR(" Macro "), layer_state_is(_MACRO)); +} + +void render_keylock_status(uint8_t led_usb_state) { + oled_write_P(PSTR("NumLock"), led_usb_state & (1 << USB_LED_NUM_LOCK)); + oled_write_P(PSTR(" "), false); +} + +void render_layer_messages(void) { + oled_write_P(PSTR("Setta21 For Your Good Job. "), false); +} + + +void render_status(void) { + /* Show Keyboard Layout */ + render_layer_messages(); + render_keylock_status(host_keyboard_leds()); + render_layer_state(); +} + +void oled_task_user(void) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) +} + +#endif diff --git a/keyboards/setta21/keymaps/salicylic/readme.md b/keyboards/setta21/keymaps/salicylic/readme.md new file mode 100644 index 0000000000..ad27736d2b --- /dev/null +++ b/keyboards/setta21/keymaps/salicylic/readme.md @@ -0,0 +1,49 @@ +# The salicylic keymap for setta21 + +## Base +| 1 | 2 | 3 | 4 | +|:----------:|:----:|:---------:|:----:| +| ESC | F2 | = | Del | +| NumLock | / | * | minus| +| 7 | 8 | 9 | | +| 4 | 5 | 6 | + | +| 1 | 2 | 3 | | +| Arrow , 0 | | Macro , . | Ent | + + + +## Arrow +| 1 | 2 | 3 | 4 | +|:----------:|:----:|:-----:|:----:| +| ESC | F2 | = | Del | +| XXXXX | / | * | minus| +| XXXXX | UP | XXXXX | | +| LEFT | DOWN | RIGHT | + | +| XXXXX | DOWN | XXXXX | | +| Arrow | | Macro | Ent | + + + +## Macro +| 1 | 2 | 3 | 4 | +|:----------:|:------:|:---------:|:--------:| +| ESC | F2 | = | Del | +| =MIN( | =MAX( | =COUNTIF( | =AVERAGE(| +| F7 | F8 | F9 | | +| F4 | F5 | F6 | =SUM( | +| F11 | F12 | F3 | | +| Arrow | | Macro | ) | + + + +## Adjust +| 1 | 2 | 3 | 4 | +|:----------:|:-----:|:----:|:------:| +| Adjust | F2 | = | Del | +| XXXXX | XXXXX | XXXXX| XXXXX | +| XXXXX |RGB_SAI| XXXXX| | +| LEFT |RGB_HUI| XXXXX| RGB_TOG| +| RGB_VAD |RGB_VAI| XXXXX| | +| Arrow | | Macro| RGB_MOD| + + diff --git a/keyboards/setta21/keymaps/salicylic/rules.mk b/keyboards/setta21/keymaps/salicylic/rules.mk new file mode 100644 index 0000000000..be8d10c9a6 --- /dev/null +++ b/keyboards/setta21/keymaps/salicylic/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 + diff --git a/keyboards/setta21/readme.md b/keyboards/setta21/readme.md new file mode 100644 index 0000000000..c940079997 --- /dev/null +++ b/keyboards/setta21/readme.md @@ -0,0 +1,17 @@ +# setta21 + +![setta21](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190315/20190315022018.jpg) + +This is 21 keys tenkeypad. + +* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +* Hardware Supported: setta21 PCB, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1271667) + +Make example for this keyboard (after setting up your build environment): + + make setta21: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). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/setta21-build-guide) diff --git a/keyboards/setta21/rev1/config.h b/keyboards/setta21/rev1/config.h new file mode 100644 index 0000000000..57451a7e30 --- /dev/null +++ b/keyboards/setta21/rev1/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0011 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT setta21 +#define DESCRIPTION A custom tenkeypad + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 21 // Number of LEDs +#define RGBLIGHT_ANIMATIONS + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/setta21/rev1/rev1.c b/keyboards/setta21/rev1/rev1.c new file mode 100644 index 0000000000..3c0823870b --- /dev/null +++ b/keyboards/setta21/rev1/rev1.c @@ -0,0 +1,25 @@ +#include "rev1.h" + +#ifdef RGB_MATRIX_ENABLE + led_config_t g_led_config = { { + // Key Matrix to LED Index + { 14,13, 7, 6, 0,20 }, + { 12, 8, 5, 1,19 }, + { 15,11, 9, 4, 2,18 }, + { 16, 10, 3,17 } + }, { + // LED Index to Physical Position + { 0, 179 }, { 21, 179 }, { 43, 179 }, { 64, 179 }, { 43, 134 }, { 21, 134 }, { 0, 134 }, { 0, 90 }, { 21, 90 }, { 43, 90 }, + { 64, 112 }, { 43, 45 }, { 21, 45 }, { 0, 45 }, { 11, 0 }, { 43, 0 }, { 64, 23 }, { 64, 224 }, { 43, 224 }, { 21, 224 }, + { 0, 224 } + }, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4 +} }; +#endif + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/setta21/rev1/rev1.h b/keyboards/setta21/rev1/rev1.h new file mode 100644 index 0000000000..772c843c57 --- /dev/null +++ b/keyboards/setta21/rev1/rev1.h @@ -0,0 +1,18 @@ +#pragma once + +#include "setta21.h" + +#define LAYOUT_numpad_6x4( \ + L05, L15, L25, L35, \ + L04, L14, L24, L34, \ + L03, L13, L23, \ + L02, L12, L22, L32, \ + L01, L11, L21, \ + L00, L20, L30 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + {KC_NO, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30,KC_NO, L32,KC_NO, L34, L35 } \ + } diff --git a/keyboards/singa/keymaps/test/rules.mk b/keyboards/setta21/rev1/rules.mk similarity index 100% rename from keyboards/singa/keymaps/test/rules.mk rename to keyboards/setta21/rev1/rules.mk diff --git a/keyboards/setta21/rules.mk b/keyboards/setta21/rules.mk new file mode 100644 index 0000000000..f9c4106343 --- /dev/null +++ b/keyboards/setta21/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +TAP_DANCE_ENABLE = no +OLED_DRIVER_ENABLE = yes +USE_I2C = no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +DEFAULT_FOLDER = setta21/rev1 + +LAYOUTS = numpad_6x4 diff --git a/keyboards/setta21/setta21.c b/keyboards/setta21/setta21.c new file mode 100644 index 0000000000..73c07682f7 --- /dev/null +++ b/keyboards/setta21/setta21.c @@ -0,0 +1 @@ +#include "setta21.h" diff --git a/keyboards/setta21/setta21.h b/keyboards/setta21/setta21.h new file mode 100644 index 0000000000..0409f6cbc2 --- /dev/null +++ b/keyboards/setta21/setta21.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_setta21_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/shiro/config.h b/keyboards/shiro/config.h new file mode 100644 index 0000000000..d97be0cd29 --- /dev/null +++ b/keyboards/shiro/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 T.Shinohara + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER T.Shinohara +#define PRODUCT Shiro +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/shiro/info.json b/keyboards/shiro/info.json new file mode 100644 index 0000000000..944cdb84c5 --- /dev/null +++ b/keyboards/shiro/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "Shiro", + "url": "https://github.com/ShinoharaTa/keyboards/blob/master/Shiro/manual/build_guide_ja.md", + "maintainer": "T.Shinohara", + "width": 3, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 15, + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4} + ] + } + } +} diff --git a/keyboards/shiro/keymaps/check/config.h b/keyboards/shiro/keymaps/check/config.h new file mode 100644 index 0000000000..369388adad --- /dev/null +++ b/keyboards/shiro/keymaps/check/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/shiro/keymaps/check/keymap.c b/keyboards/shiro/keymaps/check/keymap.c new file mode 100644 index 0000000000..1f41f61dd4 --- /dev/null +++ b/keyboards/shiro/keymaps/check/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + TEST_A1 = SAFE_RANGE, + TEST_A2, + TEST_A3, + TEST_B1, + TEST_B2, + TEST_B3, + TEST_C1, + TEST_C2, + TEST_C3, + TEST_D1, + TEST_D2, + TEST_D3, + TEST_E1, + TEST_E2, + TEST_E3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + TEST_A1, TEST_A2, TEST_A3, + TEST_B1, TEST_B2, TEST_B3, + TEST_C1, TEST_C2, TEST_C3, + TEST_D1, TEST_D2, TEST_D3, + TEST_E1, TEST_E2, TEST_E3 + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TEST_A1: if(record->event.pressed){ SEND_STRING("A1"); } break; + case TEST_A2: if(record->event.pressed){ SEND_STRING("A2"); } break; + case TEST_A3: if(record->event.pressed){ SEND_STRING("A3"); } break; + case TEST_B1: if(record->event.pressed){ SEND_STRING("B1"); } break; + case TEST_B2: if(record->event.pressed){ SEND_STRING("B2"); } break; + case TEST_B3: if(record->event.pressed){ SEND_STRING("B3"); } break; + case TEST_C1: if(record->event.pressed){ SEND_STRING("C1"); } break; + case TEST_C2: if(record->event.pressed){ SEND_STRING("C2"); } break; + case TEST_C3: if(record->event.pressed){ SEND_STRING("C3"); } break; + case TEST_D1: if(record->event.pressed){ SEND_STRING("D1"); } break; + case TEST_D2: if(record->event.pressed){ SEND_STRING("D2"); } break; + case TEST_D3: if(record->event.pressed){ SEND_STRING("D3"); } break; + case TEST_E1: if(record->event.pressed){ SEND_STRING("E1"); } break; + case TEST_E2: if(record->event.pressed){ SEND_STRING("E2"); } break; + case TEST_E3: if(record->event.pressed){ SEND_STRING("E3"); } break; + } + return true; +} diff --git a/keyboards/shiro/keymaps/check/readme.md b/keyboards/shiro/keymaps/check/readme.md new file mode 100644 index 0000000000..715ddd3358 --- /dev/null +++ b/keyboards/shiro/keymaps/check/readme.md @@ -0,0 +1 @@ +# The default keymap for Shiro \ No newline at end of file diff --git a/keyboards/shiro/keymaps/default/config.h b/keyboards/shiro/keymaps/default/config.h new file mode 100644 index 0000000000..369388adad --- /dev/null +++ b/keyboards/shiro/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/shiro/keymaps/default/keymap.c b/keyboards/shiro/keymaps/default/keymap.c new file mode 100644 index 0000000000..b80c294525 --- /dev/null +++ b/keyboards/shiro/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_number { + _NUMBER = 0, + _CURSOL, + _MOUSE +}; + +#define NUMBER TO(_NUMBER) +#define CURSOL TO(_CURSOL) +#define MOUSE TO(_MOUSE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMBER] = LAYOUT( + NUMBER, CURSOL, MOUSE, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_BSPC, KC_ENT + ), + [_CURSOL] = LAYOUT( + NUMBER, CURSOL, MOUSE, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_ESC, KC_RIGHT, + KC_END, KC_DOWN, KC_PGDN, + KC_DEL, KC_BSPC, KC_ENT + ), + [_MOUSE] = LAYOUT( + NUMBER, CURSOL, MOUSE, + KC_CUT, KC_COPY, KC_PSTE, + KC_UNDO, KC_FIND, KC_AGIN, + XXXXXXX, XXXXXXX, XXXXXXX, + KC_DEL, KC_BSPC, KC_ENT + ), +}; diff --git a/keyboards/shiro/keymaps/default/readme.md b/keyboards/shiro/keymaps/default/readme.md new file mode 100644 index 0000000000..715ddd3358 --- /dev/null +++ b/keyboards/shiro/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Shiro \ No newline at end of file diff --git a/keyboards/shiro/keymaps/default_mac/config.h b/keyboards/shiro/keymaps/default_mac/config.h new file mode 100644 index 0000000000..369388adad --- /dev/null +++ b/keyboards/shiro/keymaps/default_mac/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/shiro/keymaps/default_mac/keymap.c b/keyboards/shiro/keymaps/default_mac/keymap.c new file mode 100644 index 0000000000..58ee063704 --- /dev/null +++ b/keyboards/shiro/keymaps/default_mac/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_number { + _NUMBER = 0, + _CURSOL, + _MOUSE +}; + +#define NUMBER TO(_NUMBER) +#define CURSOL TO(_CURSOL) +#define MOUSE TO(_MOUSE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMBER] = LAYOUT( + NUMBER, CURSOL, MOUSE, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_BSPC, KC_ENT + ), + [_CURSOL] = LAYOUT( + NUMBER, CURSOL, MOUSE, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_ESC, KC_RIGHT, + KC_END, KC_DOWN, KC_PGDN, + KC_DEL, KC_BSPC, KC_ENT + ), + [_MOUSE] = LAYOUT( + NUMBER, CURSOL, MOUSE, + LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), + LGUI(KC_Z), LGUI(KC_F), KC_AGIN, + XXXXXXX, XXXXXXX, XXXXXXX, + KC_DEL, KC_BSPC, KC_ENT + ), +}; diff --git a/keyboards/shiro/keymaps/default_mac/readme.md b/keyboards/shiro/keymaps/default_mac/readme.md new file mode 100644 index 0000000000..715ddd3358 --- /dev/null +++ b/keyboards/shiro/keymaps/default_mac/readme.md @@ -0,0 +1 @@ +# The default keymap for Shiro \ No newline at end of file diff --git a/keyboards/shiro/readme.md b/keyboards/shiro/readme.md new file mode 100644 index 0000000000..7c4c024a6b --- /dev/null +++ b/keyboards/shiro/readme.md @@ -0,0 +1,27 @@ +# 素 - Shiro + +![Shiro](https://cdn.discordapp.com/attachments/536423734144401422/597447002288291861/P7070070_cp.jpg) + +これは日本の名刺(55mmx91mm)に、3x5の15キーを詰め込んだとても小さいキーパッドです。 + +This product is a 3x5 very small keypad. +It is made in 55mm x 91mm according to the Japanese business card. + +Keyboard Maintainer: [T.Shinohara](https://github.com/ShinoharaTa) +Hardware Supported: The Shiro PCBs, ProMicro supported. Using only Kailh Low Profile Switches. +Hardware Availability: [Booth (Japanese Site)](https://shino3.booth.pm/items/1444895) +日本国内ではBoothで入手できます: [Booth (Japanese Site)](https://shino3.booth.pm/items/1444895) + +![Shiro-backside](https://cdn.discordapp.com/attachments/536423734144401422/597464086640328724/20190707_033520.jpg) + +Make for this keyboard default keymap (after setting up your build environment): + + make shiro:default + +Make for this keyboard build check keymap (after setting up your build environment): + + make shiro:check + +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). + +[Build guide - Japanese](https://github.com/ShinoharaTa/keyboards/blob/master/Shiro/manual/build_guide_ja.md) \ No newline at end of file diff --git a/keyboards/shiro/rules.mk b/keyboards/shiro/rules.mk new file mode 100644 index 0000000000..03c1bc8f86 --- /dev/null +++ b/keyboards/shiro/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/shiro/shiro.c b/keyboards/shiro/shiro.c new file mode 100644 index 0000000000..b30329d339 --- /dev/null +++ b/keyboards/shiro/shiro.c @@ -0,0 +1,51 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ +#include "shiro.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/shiro/shiro.h b/keyboards/shiro/shiro.h new file mode 100644 index 0000000000..9e088ba555 --- /dev/null +++ b/keyboards/shiro/shiro.h @@ -0,0 +1,41 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22, \ + k30, k31, k32, \ + k40, k41, k42 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 }, \ + { k30, k31, k32 }, \ + { k40, k41, k42 } \ +} diff --git a/keyboards/signum/3_0/elitec/config.h b/keyboards/signum/3_0/elitec/config.h index 88e45ef450..1e045e2e10 100644 --- a/keyboards/signum/3_0/elitec/config.h +++ b/keyboards/signum/3_0/elitec/config.h @@ -10,6 +10,9 @@ #define PRODUCT Signum #define DESCRIPTION q.m.k. keyboard firmware for Signum 3.0 +/* mouse settings */ +#define MK_KINETIC_SPEED + /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 diff --git a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c index 0269077917..15cf215305 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c +++ b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c @@ -632,14 +632,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ------------------------------------------------- ------------------------------------------------- * |LShift(| z | x | c | v | b | | n | m | , | . | / |RShift)| * ----------------------------------------------------------------------------------------------------------------- - * LCtrl LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RAlt RCtrl + * LCtrl[ LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RLAlt RCtrl] * ------------------------------------------------- */ LAYOUT_ortho_4x12( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, LCTL_T(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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LCTL, KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, KC_RALT, KC_RCTL + LCTL_T(KC_LBRC), KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, LALT_T(KC_RALT), RCTL_T(KC_RBRC) ), /* @@ -651,14 +651,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ------------------------------------------------- ------------------------------------------------- * |LShift(| z | x | c | v | b | | k | m | , | . | / |RShift)| * ----------------------------------------------------------------------------------------------------------------- - * LCtrl LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RAlt RCtrl + * LCtrl[ LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RLAlt RCtrl] * ------------------------------------------------- */ LAYOUT_ortho_4x12( KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, LCTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LCTL, KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, KC_RALT, KC_RCTL + LCTL_T(KC_LBRC), KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, LALT_T(KC_RALT), RCTL_T(KC_RBRC) ), /* diff --git a/keyboards/signum/3_0/elitec/keymaps/default/layout.py b/keyboards/signum/3_0/elitec/keymaps/default/layout.py index 635a6bb192..ab9bce4226 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/layout.py +++ b/keyboards/signum/3_0/elitec/keymaps/default/layout.py @@ -357,9 +357,10 @@ qmk_dict = { # Command keycodes missing (Execute, Help, ..., Find) # Basic Keycodes missing from Print Screen onwards, included as fallback # random Keycodes - "RGui": "KC_RGUI", "LGui": "KC_LGUI", "LAlt": "KC_LALT", "RAlt": "KC_RALT", "LShift": "KC_LSFT", "LCtrl": "KC_LCTL", "LCtTEsc": "LCTL_T(KC_ESC)", "RCtrl": "KC_RCTL", + "RGui": "KC_RGUI", "LGui": "KC_LGUI", "LAlt": "KC_LALT", "RLAlt": "LALT_T(KC_RALT)", "RAlt": "KC_RALT", "LShift": "KC_LSFT", "LCtrl": "KC_LCTL", "LCtTBsp": "LCTL_T(KC_BSPC)", "LCtTEsc": "LCTL_T(KC_ESC)", "RCtrl": "KC_RCTL", "LShift(": "KC_LSPO", "RShift)": "KC_RSPC", # "LShift(": "LSFT_T(KC_9)", "RShift)": "RSFT_T(RSFT(KC_0))", + "LCtrl[": "LCTL_T(KC_LBRC)", "RCtrl]": "RCTL_T(KC_RBRC)", "L1_ENT": "LT(1, KC_ENT)", "LT2_BSP": "LT(2,KC_BSPC)", "LT4_DEL": "LT(4,KC_DEL)", "LT4_ENT": "LT(4,KC_ENT)", "LT6_SPC": "LT(6,KC_SPC)", "CPg Dn": "LCTL(KC_PGDN)", "CPg Up": "LCTL(KC_PGUP)", "S_Enter": "S(KC_ENT)", "S_Tab": "S(KC_TAB)", "Compose": "KC_ALGR", @@ -431,8 +432,8 @@ static = ["NEO", "GREEK", "GREEK", "GREEK", "GREEK", "MOUSE"] qwerty = [ "Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "LCtTEsc", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", - "LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)", - "LCtrl", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RAlt", "RCtrl", + "LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)", + "LCtrl[", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RLAlt", "RCtrl]", ] # 1 @@ -440,7 +441,7 @@ colemak = [ "Tab", "q", "w", "f", "p", "g", "j", "l", "u", "y", ";", "[", "LCtTEsc", "a", "r", "s", "t", "d", "h", "n", "e", "i", "o", "'", "LShift(", "z", "x", "c", "v", "b", "k", "m", ",", ".", "/", "RShift)", - "LCtrl", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RAlt", "RCtrl", + "LCtrl[", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RLAlt", "RCtrl]", ] # 2 @@ -448,7 +449,7 @@ numpad = [ "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]", "", "DF0", "DF1", "XXX", "MO3", "MO3", "4", "4", "5", "6", "-", "=", "", "MO5", "XXX", "XXX", "XXX", "XXX", "1", "1", "2", "3", "\\", "", - "TG2", "", "", "", "", "Del", "", "0", "BSpace", "", "", "", + "TG2", "", "", "", "", "Del", "", "0", "BSpace", "", "", "", ] # 3 diff --git a/keyboards/signum/3_0/elitec/rules.mk b/keyboards/signum/3_0/elitec/rules.mk index 6a68eb443b..6393e0f93f 100644 --- a/keyboards/signum/3_0/elitec/rules.mk +++ b/keyboards/signum/3_0/elitec/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h index 29110bd4ea..badaef5136 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 #define MANUFACTURER Singa Keyboards #define PRODUCT Singa @@ -36,6 +37,5 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/singa/readme.md b/keyboards/singa/readme.md index 4400717c80..faeb816ec1 100644 --- a/keyboards/singa/readme.md +++ b/keyboards/singa/readme.md @@ -20,6 +20,8 @@ Flashing ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. +**Reset Key:** Hold down the key located at `K00`, commonly programmed as `Esc` while plugging in the keyboard. + Windows: 1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). 2. Place your keyboard into reset. @@ -41,9 +43,10 @@ macOS: brew install python3 pip3 install pyusb brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +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). diff --git a/keyboards/singa/rules.mk b/keyboards/singa/rules.mk index 7e46696891..54328d248d 100644 --- a/keyboards/singa/rules.mk +++ b/keyboards/singa/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,11 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC = i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c index ee49ba65c1..144065d029 100644 --- a/keyboards/singa/singa.c +++ b/keyboards/singa/singa.c @@ -13,49 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "singa.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/singa/usbconfig.h b/keyboards/singa/usbconfig.h index 54a7d20f14..e65d210ace 100644 --- a/keyboards/singa/usbconfig.h +++ b/keyboards/singa/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk index c35487b18c..53cf934c40 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -1,17 +1,16 @@ # MCU name MCU = atmega32u4 -F_CPU = 16000000 - -ARCH = AVR8 - -F_USB = $(F_CPU) - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # diff --git a/keyboards/sixkeyboard/keymaps/default/keymap.c b/keyboards/sixkeyboard/keymaps/default/keymap.c index 393974b5d0..3b39892a93 100644 --- a/keyboards/sixkeyboard/keymaps/default/keymap.c +++ b/keyboards/sixkeyboard/keymaps/default/keymap.c @@ -9,11 +9,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -}; - void matrix_scan_user(void) { // jump to bootloaer when all keys are pressed if (matrix_get_row(0) == 0b111 && matrix_get_row(1) == 0b111) { diff --git a/keyboards/sixkeyboard/rules.mk b/keyboards/sixkeyboard/rules.mk index 6aedc71485..5b89ff4e62 100644 --- a/keyboards/sixkeyboard/rules.mk +++ b/keyboards/sixkeyboard/rules.mk @@ -1,56 +1,15 @@ - - -SRC = matrix.c - # MCU name -#MCU = at90usb1287 MCU = atmega16u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -67,4 +26,6 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -CUSTOM_MATRIX = yes \ No newline at end of file +CUSTOM_MATRIX = yes + +SRC = matrix.c diff --git a/keyboards/skog/README.md b/keyboards/skog/README.md deleted file mode 100644 index 51a792b6bd..0000000000 --- a/keyboards/skog/README.md +++ /dev/null @@ -1,61 +0,0 @@ -Skog TKL by Percent -========================== - -Keyboard Maintainer: QMK Community -Hardware Supported: Skog PCB -Hardware Availability: https://geekhack.org/index.php?topic=87953.0 - -Make example for this keyboard (after setting up your build environment): - - make skog:default - -## Setting the board to bootloader mode - -If you're lucky, the programming script does this automagically for you. If -however this doesn't work for you, you need to enter the bootloader mode manually -by plugging the keyboard in while holding the bootloader key. If you did this -correctly the LEDs will blink and you'll be able to flash your firmware. - -The bootloader key is in the top-right (Pause). - -## Flashing - -ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. - -Windows: -1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). -2. Place your keyboard into reset. -3. Press the `Find Device` button and ensure that your keyboard is found. -4. Press the `Open .hex File` button and locate the `.hex` file you created. -5. Press the `Flash Device` button and wait for the process to complete. - -macOS: -1. Install homebrew by typing the following: - ``` - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - ``` -2. Install `crosspack-avr`. - ``` - brew cask install crosspack-avr - ``` -3. Install the following packages: - ``` - brew install python - brew install pyusb - brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb - -4. Place your keyboard into reset. -5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. - -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). - -## Troubleshooting - -From my experience, it's really hard to brick these boards. But these -tricks have been useful when it got stuck in a weird scenario. - -1. Try plugging the board in while holding the bootloader key. This will force - it to boot only the bootloader without loading the firmware. Once this is - done, just reflash the board with the original firmware. -2. Sometimes USB hubs can act weird, so try connecting the board directly - to your computer or plugging/unplugging the USB hub. diff --git a/keyboards/skog/config.h b/keyboards/skog/config.h deleted file mode 100644 index f518da8c9b..0000000000 --- a/keyboards/skog/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2018 Jumail Mundekkat / MxBlue - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D - -#define MANUFACTURER Percent -#define PRODUCT Skog TKL - -/* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 14 - -#define RGBLED_NUM 2 -#define RGBLIGHT_ANIMATIONS - -#define BACKLIGHT_LEVELS 5 - -#define NO_UART 1 -#define BOOTLOADHID_BOOTLOADER 1 - -#endif diff --git a/keyboards/skog/i2c.c b/keyboards/skog/i2c.c deleted file mode 100644 index a4f9521352..0000000000 --- a/keyboards/skog/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#pragma once - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - diff --git a/keyboards/skog/rules.mk b/keyboards/skog/rules.mk deleted file mode 100644 index bce0c442a6..0000000000 --- a/keyboards/skog/rules.mk +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2018 Jumail Mundekkat / MxBlue -# -# 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 . - -# MCU name -MCU = atmega32a -PROTOCOL = VUSB - -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = bootloadHID - -# build options -BOOTMAGIC_ENABLE = full -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes - -BACKLIGHT_CUSTOM_DRIVER = yes -RGBLIGHT_CUSTOM_DRIVER = yes - -OPT_DEFS = -DDEBUG_LEVEL=0 - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/skog/skog.c b/keyboards/skog/skog.c deleted file mode 100644 index 3d1eb0e1a1..0000000000 --- a/keyboards/skog/skog.c +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2018 Jumail Mundekkat / MxBlue - -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 . - -ps2avrGB support code by Kenneth A. (bminiex/.[ch]) -*/ - -#include "skog.h" - -#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -#include "backlight.h" -#include "backlight_custom.h" - -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} - -#ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` -void backlight_init_ports(void) { - b_led_init_ports(); -} - -void backlight_task(void) { - b_led_task(); -} - -void backlight_set(uint8_t level) { - b_led_set(level); -} -#endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i> 8) & 0xFF) -/* USB vendor ID for the device, low byte first. If you have registered your - * own Vendor ID, define it here. Otherwise you may use one of obdev's free - * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) -/* This is the ID of the product, low byte first. It is interpreted in the - * scope of the vendor ID. If you have registered your own VID with usb.org - * or if you have licensed a PID from somebody else, define it here. Otherwise - * you may use one of obdev's free shared VID/PID pairs. See the file - * USB-IDs-for-free.txt for details! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 -/* Version number of the device: Minor number first, then major number. - */ -#define USB_CFG_VENDOR_NAME 'P','e','r','c','e','n','t' -#define USB_CFG_VENDOR_NAME_LEN 7 -/* These two values define the vendor name returned by the USB device. The name - * must be given as a list of characters under single quotes. The characters - * are interpreted as Unicode (UTF-16) entities. - * If you don't want a vendor name string, undefine these macros. - * ALWAYS define a vendor name containing your Internet domain name if you use - * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for - * details. - */ -#define USB_CFG_DEVICE_NAME 'S','k','o','g',' ','T','K','L' -#define USB_CFG_DEVICE_NAME_LEN 8 -/* Same as above for the device name. If you don't want a device name, undefine - * the macros. See the file USB-IDs-for-free.txt before you assign a name if - * you use a shared VID/PID. - */ -/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ -/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ -/* Same as above for the serial number. If you don't want a serial number, - * undefine the macros. - * It may be useful to provide the serial number through other means than at - * compile time. See the section about descriptor properties below for how - * to fine tune control over USB descriptors such as the string descriptor - * for the serial number. - */ -#define USB_CFG_DEVICE_CLASS 0 -#define USB_CFG_DEVICE_SUBCLASS 0 -/* See USB specification if you want to conform to an existing device class. - * Class 0xff is "vendor specific". - */ -#define USB_CFG_INTERFACE_CLASS 3 /* HID */ -#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ -#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ -/* See USB specification if you want to conform to an existing device class or - * protocol. The following classes must be set at interface level: - * HID class is 3, no subclass and protocol required (but may be useful!) - * CDC class is 2, use subclass 2 and protocol 1 for ACM - */ -#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 -/* Define this to the length of the HID report descriptor, if you implement - * an HID device. Otherwise don't define it or define it to 0. - * If you use this define, you must add a PROGMEM character array named - * "usbHidReportDescriptor" to your code which contains the report descriptor. - * Don't forget to keep the array and this define in sync! - */ - -/* #define USB_PUBLIC static */ -/* Use the define above if you #include usbdrv.c instead of linking against it. - * This technique saves a couple of bytes in flash memory. - */ - -/* ------------------- Fine Control over USB Descriptors ------------------- */ -/* If you don't want to use the driver's default USB descriptors, you can - * provide our own. These can be provided as (1) fixed length static data in - * flash memory, (2) fixed length static data in RAM or (3) dynamically at - * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more - * information about this function. - * Descriptor handling is configured through the descriptor's properties. If - * no properties are defined or if they are 0, the default descriptor is used. - * Possible properties are: - * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched - * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is - * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if - * you want RAM pointers. - * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found - * in static memory is in RAM, not in flash memory. - * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), - * the driver must know the descriptor's length. The descriptor itself is - * found at the address of a well known identifier (see below). - * List of static descriptor names (must be declared PROGMEM if in flash): - * char usbDescriptorDevice[]; - * char usbDescriptorConfiguration[]; - * char usbDescriptorHidReport[]; - * char usbDescriptorString0[]; - * int usbDescriptorStringVendor[]; - * int usbDescriptorStringDevice[]; - * int usbDescriptorStringSerialNumber[]; - * Other descriptors can't be provided statically, they must be provided - * dynamically at runtime. - * - * Descriptor properties are or-ed or added together, e.g.: - * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) - * - * The following descriptors are defined: - * USB_CFG_DESCR_PROPS_DEVICE - * USB_CFG_DESCR_PROPS_CONFIGURATION - * USB_CFG_DESCR_PROPS_STRINGS - * USB_CFG_DESCR_PROPS_STRING_0 - * USB_CFG_DESCR_PROPS_STRING_VENDOR - * USB_CFG_DESCR_PROPS_STRING_PRODUCT - * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER - * USB_CFG_DESCR_PROPS_HID - * USB_CFG_DESCR_PROPS_HID_REPORT - * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) - * - * Note about string descriptors: String descriptors are not just strings, they - * are Unicode strings prefixed with a 2 byte header. Example: - * int serialNumberDescriptor[] = { - * USB_STRING_DESCRIPTOR_HEADER(6), - * 'S', 'e', 'r', 'i', 'a', 'l' - * }; - */ - -#define USB_CFG_DESCR_PROPS_DEVICE 0 -#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 -#define USB_CFG_DESCR_PROPS_STRINGS 0 -#define USB_CFG_DESCR_PROPS_STRING_0 0 -#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 -#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 -#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 -#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID 0 -#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 -#define USB_CFG_DESCR_PROPS_UNKNOWN 0 - -#define usbMsgPtr_t unsigned short -/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to - * a scalar type here because gcc generates slightly shorter code for scalar - * arithmetics than for pointer arithmetics. Remove this define for backward - * type compatibility or define it to an 8 bit type if you use data in RAM only - * and all RAM is below 256 bytes (tiny memory model in IAR CC). - */ - -/* ----------------------- Optional MCU Description ------------------------ */ - -/* The following configurations have working defaults in usbdrv.h. You - * usually don't need to set them explicitly. Only if you want to run - * the driver on a device which is not yet supported or with a compiler - * which is not fully supported (such as IAR C) or if you use a differnt - * interrupt than INT0, you may have to define some of these. - */ -/* #define USB_INTR_CFG MCUCR */ -/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE GIMSK */ -/* #define USB_INTR_ENABLE_BIT INT0 */ -/* #define USB_INTR_PENDING GIFR */ -/* #define USB_INTR_PENDING_BIT INTF0 */ -/* #define USB_INTR_VECTOR INT0_vect */ - -/* Set INT1 for D- falling edge to count SOF */ -/* #define USB_INTR_CFG EICRA */ -#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE EIMSK */ -#define USB_INTR_ENABLE_BIT INT1 -/* #define USB_INTR_PENDING EIFR */ -#define USB_INTR_PENDING_BIT INTF1 -#define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/smk60/config.h b/keyboards/smk60/config.h new file mode 100644 index 0000000000..b30912f908 --- /dev/null +++ b/keyboards/smk60/config.h @@ -0,0 +1,53 @@ +/** + * config.h + * + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xDEAD +#define PRODUCT_ID 0x6585 +#define DEVICE_VER 0x0001 +#define MANUFACTURER astro +#define PRODUCT smk 60 +#define DESCRIPTION 60% keyboard for smk switch + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, F0, F1, F5, B2 } +#define MATRIX_COL_PINS { B4, B5, B6, C6, C7, F6, F7, F4, B1, B3, D0, D1, D2, D3, D5} +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//rgb light setting +#define RGBLED_NUM 4 +#define RGB_DI_PIN E6 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/smk60/info.json b/keyboards/smk60/info.json new file mode 100644 index 0000000000..f4a5e42bda --- /dev/null +++ b/keyboards/smk60/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "rgb60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_wkl": { + "key_count":61, + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_ansi": { + "key_count":61, + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_hhkb": { + "key_count":60, + "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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":2.25}, {"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}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] + } + } +} diff --git a/keyboards/smk60/keymaps/60_ansi/keymap.c b/keyboards/smk60/keymaps/60_ansi/keymap.c new file mode 100644 index 0000000000..95d2fb0f26 --- /dev/null +++ b/keyboards/smk60/keymaps/60_ansi/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------' + * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_ansi( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + [1] = LAYOUT_60_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______, + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______,_______), +}; diff --git a/keyboards/smk60/keymaps/60_ansi_split_bs_shift/keymap.c b/keyboards/smk60/keymaps/60_ansi_split_bs_shift/keymap.c new file mode 100644 index 0000000000..095f98d151 --- /dev/null +++ b/keyboards/smk60/keymaps/60_ansi_split_bs_shift/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_split_bs_shift( + 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_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_END, + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, KC_RGUI, TG(1), KC_RCTL), + [1] = LAYOUT_60_ansi_split_bs_shift( + _______, 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_PSCR, + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,TG(0),_______), +}; diff --git a/keyboards/smk60/keymaps/60_hhkb/keymap.c b/keyboards/smk60/keymaps/60_hhkb/keymap.c new file mode 100644 index 0000000000..2732abc06b --- /dev/null +++ b/keyboards/smk60/keymaps/60_hhkb/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_hhkb( + 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_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1)), + [1] = LAYOUT_60_hhkb( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,_______, + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______, _______, _______,_______), +}; diff --git a/keyboards/smk60/keymaps/60_iso/keymap.c b/keyboards/smk60/keymaps/60_iso/keymap.c new file mode 100644 index 0000000000..684bbb62f4 --- /dev/null +++ b/keyboards/smk60/keymaps/60_iso/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_iso( + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_GRV, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, KC_RGUI, MO(1), KC_RCTL), + [1] = LAYOUT_60_iso( + 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,_______, + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT, _______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______,_______), +}; diff --git a/keyboards/smk60/keymaps/60_wkl/keymap.c b/keyboards/smk60/keymaps/60_wkl/keymap.c new file mode 100644 index 0000000000..979fc93d67 --- /dev/null +++ b/keyboards/smk60/keymaps/60_wkl/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_wkl( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, + 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_BSPC, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_DEL, + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL), + [1] = LAYOUT_60_wkl( + KC_ESC, 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_DEL, + RESET, RGB_TOG, RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,TG(0),_______), +}; diff --git a/keyboards/smk60/keymaps/60_wkl_split_bs/keymap.c b/keyboards/smk60/keymaps/60_wkl_split_bs/keymap.c new file mode 100644 index 0000000000..22405cdc5f --- /dev/null +++ b/keyboards/smk60/keymaps/60_wkl_split_bs/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_wkl_split_bs( + 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_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_END, + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL), + [1] = LAYOUT_60_wkl_split_bs( + _______, 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_PSCR, + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,TG(0),_______), +}; diff --git a/keyboards/smk60/keymaps/default/keymap.c b/keyboards/smk60/keymaps/default/keymap.c new file mode 100644 index 0000000000..95d2fb0f26 --- /dev/null +++ b/keyboards/smk60/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------' + * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_ansi( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + [1] = LAYOUT_60_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______, + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______,_______), +}; diff --git a/keyboards/smk60/readme.md b/keyboards/smk60/readme.md new file mode 100644 index 0000000000..59470705c2 --- /dev/null +++ b/keyboards/smk60/readme.md @@ -0,0 +1,12 @@ +# 60% pcb for smk 2nd switch + +A gh60 campatible pcb for [smk 2nd switch](https://deskthority.net/wiki/SMK_second_generation) + +Keyboard Maintainer: [astro](https://github.com/yulei) +Hardware Supported: GH60 campatible + +Make example for this keyboard (after setting up your build environment): + + make smk60: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). diff --git a/keyboards/smk60/rules.mk b/keyboards/smk60/rules.mk new file mode 100644 index 0000000000..cbb1c8b74b --- /dev/null +++ b/keyboards/smk60/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = yes # Use RGB bottom light +LAYOUTS = 60_ansi 60_hhkb 60_iso diff --git a/keyboards/smk60/smk60.c b/keyboards/smk60/smk60.c new file mode 100644 index 0000000000..947bec03a0 --- /dev/null +++ b/keyboards/smk60/smk60.c @@ -0,0 +1,5 @@ +/** + * smk60.c + */ + +#include "smk60.h" diff --git a/keyboards/smk60/smk60.h b/keyboards/smk60/smk60.h new file mode 100644 index 0000000000..2e71c96538 --- /dev/null +++ b/keyboards/smk60/smk60.h @@ -0,0 +1,98 @@ + /** + * smk60.h + * + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, KC_NO, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, KC_NO, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, KC_NO, k4a, k4b} \ +} + +#define LAYOUT_60_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c,\ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, KC_NO, k17, k18, k19, k1a, k1b, k1c, KC_NO}, \ + {k20, k22, k23, k24, k25, k26, k27, KC_NO, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, KC_NO, k4a, k4b} \ +} + +#define LAYOUT_60_wkl( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, KC_NO, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, KC_NO, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, KC_NO, k4a, k4b} \ +} + +#define LAYOUT_60_hhkb( \ + 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, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k42, k43, k47, k49, k4a \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, KC_NO, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, KC_NO, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d}, \ + {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, KC_NO, k4a, KC_NO} \ +} +#define LAYOUT_60_wkl_split_bs( \ + 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, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, KC_NO, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, KC_NO, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, KC_NO, k4a, k4b} \ +} +#define LAYOUT_60_ansi_split_bs_shift( \ + 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, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, KC_NO, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, KC_NO, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, KC_NO, k4a, k4b} \ +} diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index 9503ae25f9..a4ab9d5e26 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h @@ -48,25 +48,22 @@ #define RGBLIGHT_VAL_STEP 8 #endif -// Does not use WT_MONO_BACKLIGHT -// #define WT_MONO_BACKLIGHT - #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*5*4*2)) = (35+160) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 195 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 829 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*5*4*2)) = (37+160) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 197 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 827 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file diff --git a/keyboards/snagpad/info.json b/keyboards/snagpad/info.json index f6b19ee81e..6e3ab601a0 100644 --- a/keyboards/snagpad/info.json +++ b/keyboards/snagpad/info.json @@ -7,11 +7,50 @@ "height": 5, "layouts": { - "LAYOUT_ortho_5x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] - }, + "LAYOUT_ortho_5x4": { + "layout": [ + {"label":"Num Lock", "x":0, "y":0}, + {"label":"/", "x":1, "y":0}, + {"label":"*", "x":2, "y":0}, + {"label":"-", "x":3, "y":0}, + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + {"label":"+", "x":3, "y":1}, + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"+", "x":3, "y":2}, + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3}, + {"label":"Enter", "x":3, "y":3}, + {"label":"0", "x":0, "y":4}, + {"label":"0", "x":1, "y":4}, + {"label":".", "x":2, "y":4}, + {"label":"Enter", "x":3, "y":4} + ] + }, "LAYOUT_numpad_5x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}] - } + "layout": [ + {"label":"Num Lock", "x":0, "y":0}, + {"label":"/", "x":1, "y":0}, + {"label":"*", "x":2, "y":0}, + {"label":"-", "x":3, "y":0}, + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"+", "x":3, "y":1, "h":2}, + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3}, + {"label":"0", "x":0, "y":4, "w":2}, + {"label":".", "x":2, "y":4}, + {"label":"Enter", "x":3, "y":3, "h":2} + ] + } } } diff --git a/keyboards/snagpad/readme.md b/keyboards/snagpad/readme.md index eeafceba9a..b59bd75886 100644 --- a/keyboards/snagpad/readme.md +++ b/keyboards/snagpad/readme.md @@ -1,21 +1,21 @@ # Snagpad -QMK for Snagpad -This PCB can be used as a standard numpad, or a ortho 5x4 macropad. +A five-row PCB that can be built as a standard numpad or an ortholinear 5x4 macropad. Can be built as single PCB with custom case, or as two PCB style with standoffs. Requires a Pro Micro. -For QMK Configurator, the info.json is utilised. -- For 2U keys on numpad, the first 1u row/column key assignment is the same as the 2u position. +Keyboard Maintainer: [Flehrad](https://github.com/flehrad) +Hardware Supported: Snagpad PCB, Pro Micro +Hardware Availability: [GitHub](https://github.com/flehrad/Snagpad) -Build requires a pro micro. +Make example for this keyboard (after setting up your build environment): -Can be built as single PCB with custom case, or as two PCB style with standoffs. + make snagpad:default -If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast +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). + +If you like this simple PCB and want to make a donation, you can do so at https://paypal.me/theboardpodcast. Check out our: -YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) - -Podcast (www.libsyn.com/theboardpodcast) - -Patreon (www.patreon.com/theboardpodcast) +- [YouTube](https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) +- [Podcast](https://podcasts.apple.com/au/podcast/theboard-mechanical-keyboard/id1147089749?mt=2) +- [Patreon](https://www.patreon.com/theboardpodcast) diff --git a/keyboards/snagpad/rules.mk b/keyboards/snagpad/rules.mk index 624ed262ec..9256eaed12 100644 --- a/keyboards/snagpad/rules.mk +++ b/keyboards/snagpad/rules.mk @@ -1,54 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/snagpad/snagpad.h b/keyboards/snagpad/snagpad.h index d6a62ddf7e..f1e5e34e62 100644 --- a/keyboards/snagpad/snagpad.h +++ b/keyboards/snagpad/snagpad.h @@ -3,28 +3,28 @@ #include "quantum.h" #define LAYOUT_ortho_5x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33, \ - K40, K41, K42, K43 \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 }, \ - { K30, K31, K32, K33 }, \ - { K40, K41, K42, K43 } \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ } #define LAYOUT_numpad_5x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, \ - K20, K21, K22, K13, \ - K30, K31, K32, \ - K40, K42, K33 \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K13, \ + K30, K31, K32, \ + K40, K42, K33 \ ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, KC_NO }, \ - { K30, K31, K32, K33 }, \ - { K40, KC_NO, K42, KC_NO } \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, KC_NO }, \ + { K30, K31, K32, K33 }, \ + { K40, KC_NO, K42, KC_NO } \ } diff --git a/keyboards/snampad/info.json b/keyboards/snampad/info.json index e69de29bb2..2974eab861 100644 --- a/keyboards/snampad/info.json +++ b/keyboards/snampad/info.json @@ -0,0 +1,35 @@ +{ + "keyboard_name": "snampad", + "url": "", + "maintainer": "ptillemans", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_numpad_6x4": { + "key_count": 21, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"Tab", "x":1, "y":0}, + {"label":"Fn", "x":2, "y":0}, + {"label":"Back", "x":3, "y":0}, + {"label":"Num Lock", "x":0, "y":1}, + {"label":"/", "x":1, "y":1}, + {"label":"*", "x":2, "y":1}, + {"label":"-", "x":3, "y":1}, + {"label":"7", "x":0, "y":2}, + {"label":"8", "x":1, "y":2}, + {"label":"9", "x":2, "y":2}, + {"label":"4", "x":0, "y":3}, + {"label":"5", "x":1, "y":3}, + {"label":"6", "x":2, "y":3}, + {"label":"+", "x":3, "y":2, "h":2}, + {"label":"1", "x":0, "y":4}, + {"label":"2", "x":1, "y":4}, + {"label":"3", "x":2, "y":4}, + {"label":"0", "x":0, "y":5, "w":2}, + {"label":".", "x":2, "y":5}, + {"label":"Enter", "x":3, "y":4, "h":2} + ] + } + } +} diff --git a/keyboards/snampad/rules.mk b/keyboards/snampad/rules.mk index ec3208fd0e..1a1fbe6bc5 100644 --- a/keyboards/snampad/rules.mk +++ b/keyboards/snampad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/southpole/info.json b/keyboards/southpole/info.json new file mode 100644 index 0000000000..4078824aeb --- /dev/null +++ b/keyboards/southpole/info.json @@ -0,0 +1,98 @@ +{ + "keyboard_name": "southpole", + "url": "", + "maintainer": "qmk", + "width": 20.5, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 84, + "layout": [ + {"label":"Num Lock", "x":0, "y":0}, + {"label":"/", "x":1, "y":0}, + {"label":"*", "x":2, "y":0}, + {"label":"-", "x":3, "y":0}, + {"label":"Esc", "x":4.5, "y":0}, + {"label":"1", "x":5.5, "y":0}, + {"label":"2", "x":6.5, "y":0}, + {"label":"3", "x":7.5, "y":0}, + {"label":"4", "x":8.5, "y":0}, + {"label":"5", "x":9.5, "y":0}, + {"label":"6", "x":10.5, "y":0}, + {"label":"7", "x":11.5, "y":0}, + {"label":"8", "x":12.5, "y":0}, + {"label":"9", "x":13.5, "y":0}, + {"label":"0", "x":14.5, "y":0}, + {"label":"-", "x":15.5, "y":0}, + {"label":"=", "x":16.5, "y":0}, + {"label":"\\", "x":17.5, "y":0}, + {"label":"Delete", "x":18.5, "y":0}, + {"label":"Insert", "x":19.5, "y":0}, + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + {"label":"+", "x":3, "y":1, "h":2}, + {"label":"Tab", "x":4.5, "y":1, "w":1.5}, + {"label":"Q", "x":6, "y":1}, + {"label":"W", "x":7, "y":1}, + {"label":"E", "x":8, "y":1}, + {"label":"R", "x":9, "y":1}, + {"label":"T", "x":10, "y":1}, + {"label":"Y", "x":11, "y":1}, + {"label":"U", "x":12, "y":1}, + {"label":"I", "x":13, "y":1}, + {"label":"O", "x":14, "y":1}, + {"label":"P", "x":15, "y":1}, + {"label":"[", "x":16, "y":1}, + {"label":"]", "x":17, "y":1}, + {"label":"Backspace", "x":18, "y":1, "w":1.5}, + {"label":"Vol +", "x":19.5, "y":1}, + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"Enter", "x":3, "y":3, "h":2}, + {"label":"Caps Lock", "x":4.5, "y":2, "w":1.75}, + {"label":"A", "x":6.25, "y":2}, + {"label":"S", "x":7.25, "y":2}, + {"label":"D", "x":8.25, "y":2}, + {"label":"F", "x":9.25, "y":2}, + {"label":"G", "x":10.25, "y":2}, + {"label":"H", "x":11.25, "y":2}, + {"label":"J", "x":12.25, "y":2}, + {"label":"K", "x":13.25, "y":2}, + {"label":"L", "x":14.25, "y":2}, + {"label":";", "x":15.25, "y":2}, + {"label":"'", "x":16.25, "y":2}, + {"label":"Enter", "x":17.25, "y":2, "w":2.25}, + {"label":"Vol -", "x":19.5, "y":2}, + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3}, + {"label":"Shift", "x":4.5, "y":3, "w":2.25}, + {"label":"Z", "x":6.75, "y":3}, + {"label":"X", "x":7.75, "y":3}, + {"label":"C", "x":8.75, "y":3}, + {"label":"V", "x":9.75, "y":3}, + {"label":"B", "x":10.75, "y":3}, + {"label":"N", "x":11.75, "y":3}, + {"label":"M", "x":12.75, "y":3}, + {"label":",", "x":13.75, "y":3}, + {"label":".", "x":14.75, "y":3}, + {"label":"/", "x":15.75, "y":3}, + {"label":"Shift", "x":16.75, "y":3, "w":1.75}, + {"label":"Up", "x":18.5, "y":3}, + {"label":"Mute", "x":19.5, "y":3}, + {"label":"0", "x":0, "y":4, "w":2}, + {"label":".", "x":2, "y":4}, + {"label":"Ctrl", "x":4.5, "y":4, "w":1.25}, + {"label":"GUI", "x":5.75, "y":4, "w":1.25}, + {"label":"Alt", "x":7, "y":4, "w":1.25}, + {"label":"Space", "x":8.25, "y":4, "w":7}, + {"label":"Fn", "x":15.25, "y":4, "w":1.5}, + {"label":"Left", "x":17.5, "y":4}, + {"label":"Down", "x":18.5, "y":4}, + {"label":"Right", "x":19.5, "y":4} + ] + } + } +} diff --git a/keyboards/southpole/rules.mk b/keyboards/southpole/rules.mk index 356b75bb6c..d6b65e9609 100644 --- a/keyboards/southpole/rules.mk +++ b/keyboards/southpole/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality #AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no diff --git a/keyboards/spacetime/rules.mk b/keyboards/spacetime/rules.mk index 62e8f9955e..aa1a889259 100644 --- a/keyboards/spacetime/rules.mk +++ b/keyboards/spacetime/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/speedo/keymaps/default/keymap.c b/keyboards/speedo/keymaps/default/keymap.c index ccfc608565..f5365b1223 100644 --- a/keyboards/speedo/keymaps/default/keymap.c +++ b/keyboards/speedo/keymaps/default/keymap.c @@ -55,22 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/speedo/rules.mk b/keyboards/speedo/rules.mk index 45eb6ee376..4295e2ad7e 100644 --- a/keyboards/speedo/rules.mk +++ b/keyboards/speedo/rules.mk @@ -1,52 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/standaside/rules.mk b/keyboards/standaside/rules.mk index a7ebc21fa4..1d92c731c3 100644 --- a/keyboards/standaside/rules.mk +++ b/keyboards/standaside/rules.mk @@ -1,54 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = atmel_dfu +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -70,4 +31,3 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) RGBLIGHT_ENABLE = yes # Enable RGB underlighting support - diff --git a/keyboards/staryu/rules.mk b/keyboards/staryu/rules.mk index ad4873a39a..52bb72ca7f 100755 --- a/keyboards/staryu/rules.mk +++ b/keyboards/staryu/rules.mk @@ -1,61 +1,16 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = lufa-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/stella/config.h b/keyboards/stella/config.h new file mode 100644 index 0000000000..18a8c5a22a --- /dev/null +++ b/keyboards/stella/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2019 HnahKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER HnahKB +#define PRODUCT Stella +#define DESCRIPTION Custom PCB TKL keyboard for vgs community + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, B2, B1, B0, E6, F0, D2, D5, F4, F1 } +#define MATRIX_COL_PINS { B4, D7, D6, D4, B5, C7, C6, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 14 \ No newline at end of file diff --git a/keyboards/stella/info.json b/keyboards/stella/info.json new file mode 100644 index 0000000000..d655563647 --- /dev/null +++ b/keyboards/stella/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Stella", + "url": "", + "maintainer": "VGS", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5}, {"label":"Backspace2", "x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"JP Ro", "x":12.25, "y":4.5}, {"label":"Shift", "x":13.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, + "LAYOUT_tkl_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, + "LAYOUT_tkl_iso": { + "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"\u00ac", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"\"", "x":2, "y":1.5}, {"label":"\u00a3", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"@", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/stella/keymaps/default/config.h b/keyboards/stella/keymaps/default/config.h new file mode 100644 index 0000000000..348d7c5513 --- /dev/null +++ b/keyboards/stella/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/stella/keymaps/default/keymap.c b/keyboards/stella/keymaps/default/keymap.c new file mode 100644 index 0000000000..6c869a7f50 --- /dev/null +++ b/keyboards/stella/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _QWERTY, + _LOWER +}; + +#define LOWER MO(_LOWER) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_tkl_iso( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS , + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + 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_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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_APP, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_LOWER] = LAYOUT_tkl_iso( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + diff --git a/keyboards/stella/keymaps/default/readme.md b/keyboards/stella/keymaps/default/readme.md new file mode 100644 index 0000000000..3ab96ef60c --- /dev/null +++ b/keyboards/stella/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for stella \ No newline at end of file diff --git a/keyboards/stella/readme.md b/keyboards/stella/readme.md new file mode 100644 index 0000000000..c716225af5 --- /dev/null +++ b/keyboards/stella/readme.md @@ -0,0 +1,15 @@ +# stella + +![stella](https://i.imgur.com/jaiG578.jpg) + +A cusom keyboard design for VGS community + +Keyboard Maintainer: [HnahKB](https://github.com/vuhopkep) +Hardware Supported: Stella Keyboard +Hardware Availability: [VGS](https://www.facebook.com/groups/vietnamgamingsetup/permalink/2403066473102277) + +Make example for this keyboard (after setting up your build environment): + + make stella: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). diff --git a/keyboards/stella/rules.mk b/keyboards/stella/rules.mk new file mode 100644 index 0000000000..b6b8f88417 --- /dev/null +++ b/keyboards/stella/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# Supported layouts +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/stella/stella.c b/keyboards/stella/stella.c new file mode 100644 index 0000000000..4b545042b4 --- /dev/null +++ b/keyboards/stella/stella.c @@ -0,0 +1,45 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include "stella.h" + + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +}; + +void led_init_ports(void) { + setPinOutput(B3); + setPinOutput(B7); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Turn Caps Lock LED on + writePinLow(B3); + } else { + // Turn Caps Lock LED off + writePinHigh(B3); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + // Turn Scroll Lock LED on + writePinLow(B7); + } else { + // Turn Scroll Lock LED off + writePinHigh(B7); + } + led_set_user(usb_led); +} diff --git a/keyboards/stella/stella.h b/keyboards/stella/stella.h new file mode 100644 index 0000000000..f18e74432f --- /dev/null +++ b/keyboards/stella/stella.h @@ -0,0 +1,72 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k74, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k85, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) { \ + { k00, k01, k02, k03, k04, KC_NO, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49}, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79 }, \ + { k80, k81, k82, k83, k84, k85, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { k90, k91, k92, k93, k94, k95, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_tkl_ansi( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k84, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, KC_NO, k84, \ + k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) + +#define LAYOUT_tkl_iso( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, KC_NO, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) + diff --git a/keyboards/subatomic/info.json b/keyboards/subatomic/info.json new file mode 100644 index 0000000000..7c09d96002 --- /dev/null +++ b/keyboards/subatomic/info.json @@ -0,0 +1,233 @@ +{ + "keyboard_name": "Subatomic", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x14": { + "key_count": 70, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k10", "x":0, "y":1}, + {"label":"k11", "x":1, "y":1}, + {"label":"k12", "x":2, "y":1}, + {"label":"k13", "x":3, "y":1}, + {"label":"k14", "x":4, "y":1}, + {"label":"k15", "x":5, "y":1}, + {"label":"k16", "x":6, "y":1}, + {"label":"k17", "x":7, "y":1}, + {"label":"k18", "x":8, "y":1}, + {"label":"k19", "x":9, "y":1}, + {"label":"k1a", "x":10, "y":1}, + {"label":"k1b", "x":11, "y":1}, + {"label":"k1c", "x":12, "y":1}, + {"label":"k1d", "x":13, "y":1}, + {"label":"k20", "x":0, "y":2}, + {"label":"k21", "x":1, "y":2}, + {"label":"k22", "x":2, "y":2}, + {"label":"k23", "x":3, "y":2}, + {"label":"k24", "x":4, "y":2}, + {"label":"k25", "x":5, "y":2}, + {"label":"k26", "x":6, "y":2}, + {"label":"k27", "x":7, "y":2}, + {"label":"k28", "x":8, "y":2}, + {"label":"k29", "x":9, "y":2}, + {"label":"k2a", "x":10, "y":2}, + {"label":"k2b", "x":11, "y":2}, + {"label":"k2c", "x":12, "y":2}, + {"label":"k2d", "x":13, "y":2}, + {"label":"k30", "x":0, "y":3}, + {"label":"k31", "x":1, "y":3}, + {"label":"k32", "x":2, "y":3}, + {"label":"k33", "x":3, "y":3}, + {"label":"k34", "x":4, "y":3}, + {"label":"k35", "x":5, "y":3}, + {"label":"k36", "x":6, "y":3}, + {"label":"k37", "x":7, "y":3}, + {"label":"k38", "x":8, "y":3}, + {"label":"k39", "x":9, "y":3}, + {"label":"k3a", "x":10, "y":3}, + {"label":"k3b", "x":11, "y":3}, + {"label":"k3c", "x":12, "y":3}, + {"label":"k3d", "x":13, "y":3}, + {"label":"k40", "x":0, "y":4}, + {"label":"k41", "x":1, "y":4}, + {"label":"k42", "x":2, "y":4}, + {"label":"k43", "x":3, "y":4}, + {"label":"k44", "x":4, "y":4}, + {"label":"k45", "x":5, "y":4}, + {"label":"k46", "x":6, "y":4}, + {"label":"k47", "x":7, "y":4}, + {"label":"k48", "x":8, "y":4}, + {"label":"k49", "x":9, "y":4}, + {"label":"k4a", "x":10, "y":4}, + {"label":"k4b", "x":11, "y":4}, + {"label":"k4c", "x":12, "y":4}, + {"label":"k4d", "x":13, "y":4} + ] + }, + + "LAYOUT_ortho_5x14_1x2uC": { + "key_count": 69, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k10", "x":0, "y":1}, + {"label":"k11", "x":1, "y":1}, + {"label":"k12", "x":2, "y":1}, + {"label":"k13", "x":3, "y":1}, + {"label":"k14", "x":4, "y":1}, + {"label":"k15", "x":5, "y":1}, + {"label":"k16", "x":6, "y":1}, + {"label":"k17", "x":7, "y":1}, + {"label":"k18", "x":8, "y":1}, + {"label":"k19", "x":9, "y":1}, + {"label":"k1a", "x":10, "y":1}, + {"label":"k1b", "x":11, "y":1}, + {"label":"k1c", "x":12, "y":1}, + {"label":"k1d", "x":13, "y":1}, + {"label":"k20", "x":0, "y":2}, + {"label":"k21", "x":1, "y":2}, + {"label":"k22", "x":2, "y":2}, + {"label":"k23", "x":3, "y":2}, + {"label":"k24", "x":4, "y":2}, + {"label":"k25", "x":5, "y":2}, + {"label":"k26", "x":6, "y":2}, + {"label":"k27", "x":7, "y":2}, + {"label":"k28", "x":8, "y":2}, + {"label":"k29", "x":9, "y":2}, + {"label":"k2a", "x":10, "y":2}, + {"label":"k2b", "x":11, "y":2}, + {"label":"k2c", "x":12, "y":2}, + {"label":"k2d", "x":13, "y":2}, + {"label":"k30", "x":0, "y":3}, + {"label":"k31", "x":1, "y":3}, + {"label":"k32", "x":2, "y":3}, + {"label":"k33", "x":3, "y":3}, + {"label":"k34", "x":4, "y":3}, + {"label":"k35", "x":5, "y":3}, + {"label":"k36", "x":6, "y":3}, + {"label":"k37", "x":7, "y":3}, + {"label":"k38", "x":8, "y":3}, + {"label":"k39", "x":9, "y":3}, + {"label":"k3a", "x":10, "y":3}, + {"label":"k3b", "x":11, "y":3}, + {"label":"k3c", "x":12, "y":3}, + {"label":"k3d", "x":13, "y":3}, + {"label":"k40", "x":0, "y":4}, + {"label":"k41", "x":1, "y":4}, + {"label":"k42", "x":2, "y":4}, + {"label":"k43", "x":3, "y":4}, + {"label":"k44", "x":4, "y":4}, + {"label":"k45", "x":5, "y":4}, + {"label":"k46", "x":6, "y":4, "w":2}, + {"label":"k48", "x":8, "y":4}, + {"label":"k49", "x":9, "y":4}, + {"label":"k4a", "x":10, "y":4}, + {"label":"k4b", "x":11, "y":4}, + {"label":"k4c", "x":12, "y":4}, + {"label":"k4d", "x":13, "y":4} + ] + }, + + "LAYOUT_ortho_5x14_2x2u": { + "key_count": 68, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k10", "x":0, "y":1}, + {"label":"k11", "x":1, "y":1}, + {"label":"k12", "x":2, "y":1}, + {"label":"k13", "x":3, "y":1}, + {"label":"k14", "x":4, "y":1}, + {"label":"k15", "x":5, "y":1}, + {"label":"k16", "x":6, "y":1}, + {"label":"k17", "x":7, "y":1}, + {"label":"k18", "x":8, "y":1}, + {"label":"k19", "x":9, "y":1}, + {"label":"k1a", "x":10, "y":1}, + {"label":"k1b", "x":11, "y":1}, + {"label":"k1c", "x":12, "y":1}, + {"label":"k1d", "x":13, "y":1}, + {"label":"k20", "x":0, "y":2}, + {"label":"k21", "x":1, "y":2}, + {"label":"k22", "x":2, "y":2}, + {"label":"k23", "x":3, "y":2}, + {"label":"k24", "x":4, "y":2}, + {"label":"k25", "x":5, "y":2}, + {"label":"k26", "x":6, "y":2}, + {"label":"k27", "x":7, "y":2}, + {"label":"k28", "x":8, "y":2}, + {"label":"k29", "x":9, "y":2}, + {"label":"k2a", "x":10, "y":2}, + {"label":"k2b", "x":11, "y":2}, + {"label":"k2c", "x":12, "y":2}, + {"label":"k2d", "x":13, "y":2}, + {"label":"k30", "x":0, "y":3}, + {"label":"k31", "x":1, "y":3}, + {"label":"k32", "x":2, "y":3}, + {"label":"k33", "x":3, "y":3}, + {"label":"k34", "x":4, "y":3}, + {"label":"k35", "x":5, "y":3}, + {"label":"k36", "x":6, "y":3}, + {"label":"k37", "x":7, "y":3}, + {"label":"k38", "x":8, "y":3}, + {"label":"k39", "x":9, "y":3}, + {"label":"k3a", "x":10, "y":3}, + {"label":"k3b", "x":11, "y":3}, + {"label":"k3c", "x":12, "y":3}, + {"label":"k3d", "x":13, "y":3}, + {"label":"k40", "x":0, "y":4}, + {"label":"k41", "x":1, "y":4}, + {"label":"k42", "x":2, "y":4}, + {"label":"k43", "x":3, "y":4}, + {"label":"k44", "x":4, "y":4}, + {"label":"k45", "x":5, "y":4, "w":2}, + {"label":"k47", "x":7, "y":4, "w":2}, + {"label":"k49", "x":9, "y":4}, + {"label":"k4a", "x":10, "y":4}, + {"label":"k4b", "x":11, "y":4}, + {"label":"k4c", "x":12, "y":4}, + {"label":"k4d", "x":13, "y":4} + ] + } + } +} diff --git a/keyboards/subatomic/keymaps/default/keymap.c b/keyboards/subatomic/keymaps/default/keymap.c index 8def46961a..e0fc52b70e 100644 --- a/keyboards/subatomic/keymaps/default/keymap.c +++ b/keyboards/subatomic/keymaps/default/keymap.c @@ -4,12 +4,14 @@ // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 +enum layer_names { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, +}; enum subatomic_keycodes { QWERTY = SAFE_RANGE, @@ -22,132 +24,131 @@ enum subatomic_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-------------------------------------------------------------------------------------------------. - * | Ins | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | = | Esc | A | S | D | F | G | H | J | K | L | ; | " |Enter | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Pg Up| Shift| Z | X | C | V | B | N | M | , | . | / | Home | End | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Pg Dn| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up | Right| \ | - * `-------------------------------------------------------------------------------------------------' - */ -[_QWERTY] = { - {KC_TRNS, 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_TRNS}, - {KC_TRNS, 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_TRNS}, - {KC_TRNS, 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_TRNS}, - {KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_TRNS}, - {KC_TRNS, BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS} -}, + /* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Ins | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | = | Esc | A | S | D | F | G | H | J | K | L | ; | " |Enter | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Pg Up| Shift| Z | X | C | V | B | N | M | , | . | / | Home | End | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Pg Dn| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up | Right| \ | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_5x14_1x2uC( + KC_TRNS, 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_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_TRNS, + KC_TRNS, BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS + ), -/* Colemak - * ,-------------------------------------------------------------------------------------------------. - * | Ins | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | - | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | = | Esc | A | R | S | T | D | H | N | E | I | O | " |Enter | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Pg Up| Shift| Z | X | C | V | B | K | M | , | . | / | Home | End | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Pg Dn| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up | Right| \ | - * `-------------------------------------------------------------------------------------------------' - */ -[_COLEMAK] = { - {KC_TRNS, 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_TRNS}, - {KC_TRNS, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, KC_TRNS}, - {KC_TRNS, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_TRNS}, - {KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_TRNS}, - {KC_TRNS, BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS} -}, + /* Colemak + * ,-------------------------------------------------------------------------------------------------. + * | Ins | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | - | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | = | Esc | A | R | S | T | D | H | N | E | I | O | " |Enter | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Pg Up| Shift| Z | X | C | V | B | K | M | , | . | / | Home | End | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Pg Dn| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up | Right| \ | + * `-------------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT_ortho_5x14_1x2uC( + KC_TRNS, 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_TRNS, + KC_TRNS, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, KC_TRNS, + KC_TRNS, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_TRNS, + KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_TRNS, + KC_TRNS, BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS + ), -/* Dvorak - * ,-------------------------------------------------------------------------------------------------. - * | Ins | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | [ | Tab | " | , | . | P | Y | F | G | C | R | L | / | = | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | ] | Esc | A | O | E | U | I | D | H | T | N | S | - |Enter | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Pg Up| Shift| ; | Q | J | K | X | B | M | W | V | Z | Home | End | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Pg Dn| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up | Right| \ | - * `-------------------------------------------------------------------------------------------------' - */ -[_DVORAK] = { - {KC_TRNS, 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_TRNS}, - {KC_TRNS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, KC_TRNS}, - {KC_TRNS, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_TRNS}, - {KC_TRNS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, KC_TRNS}, - {KC_TRNS, BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS} -}, + /* Dvorak + * ,-------------------------------------------------------------------------------------------------. + * | Ins | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | [ | Tab | " | , | . | P | Y | F | G | C | R | L | / | = | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | ] | Esc | A | O | E | U | I | D | H | T | N | S | - |Enter | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Pg Up| Shift| ; | Q | J | K | X | B | M | W | V | Z | Home | End | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Pg Dn| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up | Right| \ | + * `-------------------------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT_ortho_5x14_1x2uC( + KC_TRNS, 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_TRNS, + KC_TRNS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, KC_TRNS, + KC_TRNS, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_TRNS, + KC_TRNS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, KC_TRNS, + KC_TRNS, BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS + ), -/* Lower - * ,-------------------------------------------------------------------------------------------------. - * | | ~ | F1 | F3 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | _ | Tab | ! | @ | # | $ | % | ^ | & | * | ( | ) | { | } | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | + | Esc | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Next | Vol- | Vol+ | Play | | - * `-------------------------------------------------------------------------------------------------' - */ -[_LOWER] = { - {KC_TRNS, 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_TRNS}, - {KC_TRNS, 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_TRNS}, - {KC_TRNS, 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_TRNS}, - {KC_TRNS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,KC_TRNS}, - {KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS} -}, + /* Lower + * ,-------------------------------------------------------------------------------------------------. + * | | ~ | F1 | F3 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | _ | Tab | ! | @ | # | $ | % | ^ | & | * | ( | ) | { | } | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | + | Esc | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_5x14_1x2uC( + KC_TRNS, 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_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,KC_TRNS, + KC_TRNS, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS + ), -/* Raise - * ,-------------------------------------------------------------------------------------------------. - * | | ~ | F1 | F3 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | _ | Tab | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | { | } | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | + | Esc | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Next | Vol- | Vol+ | | Play | - * `-------------------------------------------------------------------------------------------------' - */ -[_RAISE] = { - {KC_TRNS, 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_TRNS}, - {KC_TRNS, 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_TRNS}, - {KC_TRNS, 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_TRNS}, - {KC_TRNS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_TRNS}, - {KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS} -}, - -/* Adjust (Lower + Raise) - * ,-------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Reset| | | | | | | | | | | | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------------------------' - */ -[_ADJUST] = { - {KC_TRNS, 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, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_TRNS}, - {KC_TRNS, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, KC_TRNS}, - {KC_TRNS, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, KC_TRNS}, - {KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS} -} + /* Raise + * ,-------------------------------------------------------------------------------------------------. + * | | ~ | F1 | F3 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | _ | Tab | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | { | } | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | + | Esc | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_5x14_1x2uC( + KC_TRNS, 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_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_TRNS, + KC_TRNS, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS + ), + /* Adjust (Lower + Raise) + * ,-------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Reset| | | | | | | | | | | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_5x14_1x2uC( + KC_TRNS, 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, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_TRNS, + KC_TRNS, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, KC_TRNS, + KC_TRNS, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, KC_TRNS, + KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS + ) }; diff --git a/keyboards/subatomic/readme.md b/keyboards/subatomic/readme.md new file mode 100644 index 0000000000..ca065b29a9 --- /dev/null +++ b/keyboards/subatomic/readme.md @@ -0,0 +1,15 @@ +# Subatomic + +![Subatomic](https://i.imgur.com/EWrY7Bel.png) + +A compact 70% (15x4) ortholinear keyboard kit made and sold by OLKB. [More info on qmk.fm](http://qmk.fm/subatomic/) + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Subatomic PCB +Hardware Availability: TBD + +Make example for this keyboard (after setting up your build environment): + + make subatomic: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). diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk index b4e2f488dd..4d1c4c1c55 100644 --- a/keyboards/subatomic/rules.mk +++ b/keyboards/subatomic/rules.mk @@ -1,51 +1,15 @@ - - # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=8192 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in @@ -66,4 +30,4 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/subatomic/subatomic.h b/keyboards/subatomic/subatomic.h index b23cb8eb19..5fbc599f83 100644 --- a/keyboards/subatomic/subatomic.h +++ b/keyboards/subatomic/subatomic.h @@ -1,6 +1,89 @@ -#ifndef SUBATOMIC_H -#define SUBATOMIC_H +#pragma once #include "quantum.h" -#endif \ No newline at end of file +#define XXX KC_NO + + +/* Subatomic Grid layout + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ • │ │ │ • │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│ │ │▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│ + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_ortho_5x14( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ + ) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d } \ +} + + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ • │ │ │ • │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│ │▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│ + * └───┴───┴───┴───┴───┴───┴───────┴───┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_ortho_5x14_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k43, k44, k45, k46, k48, k49, k4a, k4b, k4c, k4d \ + ) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ + { k40, k41, k42, k43, k44, k45, k46, XXX, k48, k49, k4a, k4b, k4c, k4d } \ +} + + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ • │ │ │ • │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│ │ │ │ │ │ │ │ │ │ │▓▓▓│▓▓▓│ + * ├───┼───┼───┼───┼───┼───┴───┼───┴───┼───┼───┼───┼───┼───┤ + * │▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│ │ │▓▓▓│▓▓▓│▓▓▓│▓▓▓│▓▓▓│ + * └───┴───┴───┴───┴───┴───────┴───────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_ortho_5x14_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k43, k44, k45, k47, k49, k4a, k4b, k4c, k4d \ + ) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ + { k40, k41, k42, k43, k44, k45, XXX, k47, XXX, k49, k4a, k4b, k4c, k4d } \ +} diff --git a/keyboards/suihankey/alpha/alpha.c b/keyboards/suihankey/alpha/alpha.c new file mode 100644 index 0000000000..3d2d1de779 --- /dev/null +++ b/keyboards/suihankey/alpha/alpha.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "alpha.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/suihankey/alpha/alpha.h b/keyboards/suihankey/alpha/alpha.h new file mode 100644 index 0000000000..02bba47104 --- /dev/null +++ b/keyboards/suihankey/alpha/alpha.h @@ -0,0 +1,39 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, \ + L10, L11, L12, L13, L14, \ + L20, L21, L22, L23, L24, \ + L30, L31, L32 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32 }, \ +} diff --git a/keyboards/suihankey/alpha/config.h b/keyboards/suihankey/alpha/config.h new file mode 100644 index 0000000000..f7f4aee118 --- /dev/null +++ b/keyboards/suihankey/alpha/config.h @@ -0,0 +1,248 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT Suihankey +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define UNUSED_PINS +// #define USE_I2C +// #undef USE_SERIAL + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +// #define RGBLED_SPLIT {18,18} diff --git a/keyboards/suihankey/alpha/keymaps/default/config.h b/keyboards/suihankey/alpha/keymaps/default/config.h new file mode 100644 index 0000000000..bf1149ebc6 --- /dev/null +++ b/keyboards/suihankey/alpha/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/suihankey/alpha/keymaps/default/keymap.c b/keyboards/suihankey/alpha/keymaps/default/keymap.c new file mode 100644 index 0000000000..e7c7da4b8b --- /dev/null +++ b/keyboards/suihankey/alpha/keymaps/default/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE, + COMMAND, + NUMBER, + FUNCTION +}; + +#define KC_CMD_SP LT(COMMAND,KC_SPC) +#define KC_CMD_ET LT(COMMAND,KC_ENTER) +#define KC_NUM_ALT LT(NUMBER,KC_LALT) +#define KC_NUM_BS LT(NUMBER,KC_BSPC) +#define KC_SET_CTRL LT(FUNCTION,KC_LCTRL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_A, KC_S, KC_D, KC_F, KC_G, + KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP + ), + [COMMAND] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_A, KC_S, KC_D, KC_F, KC_G, + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), + KC_NO, KC_NO, KC_NO + ), + [NUMBER] = LAYOUT( /* Base */ + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO + ), + [FUNCTION] = LAYOUT( /* Base */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_RMOD, + KC_NO, KC_NO, KC_NO + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMAND\n"), false); + break; + case NUMBER: + oled_write_P(PSTR("NUMBER\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("FUNCTION\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 + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} +#endif diff --git a/keyboards/suihankey/keymaps/default/readme.md b/keyboards/suihankey/alpha/keymaps/default/readme.md similarity index 100% rename from keyboards/suihankey/keymaps/default/readme.md rename to keyboards/suihankey/alpha/keymaps/default/readme.md diff --git a/keyboards/suihankey/alpha/readme.md b/keyboards/suihankey/alpha/readme.md new file mode 100644 index 0000000000..fcba60ff1d --- /dev/null +++ b/keyboards/suihankey/alpha/readme.md @@ -0,0 +1,18 @@ +# suihankey_alpha + +![suihankey_alpha](https://i.gyazo.com/07b9e882fd0c0ad00c8c98d93e94e383.jpg) + +Compact with only 18 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankey_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make suihankey/alpha: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). diff --git a/keyboards/suihankey/alpha/rules.mk b/keyboards/suihankey/alpha/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/suihankey/alpha/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/suihankey/info.json b/keyboards/suihankey/info.json index 4580f05401..3756e3d5fe 100644 --- a/keyboards/suihankey/info.json +++ b/keyboards/suihankey/info.json @@ -2,11 +2,11 @@ "keyboard_name": "suihankey", "url": "https://kakunpc.booth.pm/", "maintainer": "kakunpc", - "width": 12, - "height": 4, + "width": 6.4, + "height": 4.85, "layouts": { "LAYOUT": { - "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0}, {"label":"5", "x":4, "y":0}, {"label":"19", "x":7, "y":0}, {"label":"20", "x":8, "y":0}, {"label":"21", "x":9, "y":0}, {"label":"22", "x":10, "y":0}, {"label":"23", "x":11, "y":0}, {"label":"6", "x":0, "y":1}, {"label":"7", "x":1, "y":1}, {"label":"8", "x":2, "y":1}, {"label":"9", "x":3, "y":1}, {"label":"10", "x":4, "y":1}, {"label":"24", "x":7, "y":1}, {"label":"25", "x":8, "y":1}, {"label":"26", "x":9, "y":1}, {"label":"27", "x":10, "y":1}, {"label":"28", "x":11, "y":1}, {"label":"11", "x":0, "y":2}, {"label":"12", "x":1, "y":2}, {"label":"13", "x":2, "y":2}, {"label":"14", "x":3, "y":2}, {"label":"15", "x":4, "y":2}, {"label":"29", "x":7, "y":2}, {"label":"30", "x":8, "y":2}, {"label":"31", "x":9, "y":2}, {"label":"32", "x":10, "y":2}, {"label":"33", "x":11, "y":2}, {"label":"16", "x":2, "y":3}, {"label":"17", "x":3, "y":3}, {"label":"18", "x":4, "y":3}, {"label":"34", "x":7, "y":3}, {"label":"35", "x":8, "y":3}, {"label":"36", "x":9, "y":3}] + "layout": [{"label":"1", "x":0, "y":0.375}, {"label":"2", "x":1, "y":0.125}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0.125}, {"label":"5", "x":4, "y":0.25}, {"label":"6", "x":0, "y":1.375}, {"label":"7", "x":1, "y":1.125}, {"label":"8", "x":2, "y":1}, {"label":"9", "x":3, "y":1.125}, {"label":"10", "x":4, "y":1.25}, {"label":"11", "x":0, "y":2.375}, {"label":"12", "x":1, "y":2.125}, {"label":"13", "x":2, "y":2}, {"label":"14", "x":3, "y":2.125}, {"label":"15", "x":4, "y":2.25}, {"label":"16", "x":3.4, "y":3.25}, {"label":"17", "x":4.4, "y":3.55}, {"label":"18", "x":5.4, "y":3.85}] } } } diff --git a/keyboards/suihankey/keymaps/default/keymap.c b/keyboards/suihankey/keymaps/default/keymap.c deleted file mode 100644 index a1d182a9d8..0000000000 --- a/keyboards/suihankey/keymaps/default/keymap.c +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright 2019 kakunpc - * - * 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 . - */ -#include QMK_KEYBOARD_H - -enum layers{ - BASE = 0, - COMMAND, - NUMBER, - SETTING -}; - -#define KC_CMD_SP LT(COMMAND,KC_SPC) -#define KC_CMD_ET LT(COMMAND,KC_ENTER) -#define KC_NUM_ALT LT(NUMBER,KC_LALT) -#define KC_NUM_BS LT(NUMBER,KC_BSPC) -#define KC_SET_CTRL LT(SETTING,KC_LCTRL) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = LAYOUT( /* Base */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, - KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP, KC_CMD_ET, KC_BSPC, KC_LSFT - ), - [COMMAND] = LAYOUT( /* Base */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, - LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - ), - [NUMBER] = LAYOUT( /* Base */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_P7, KC_P8, KC_P9, KC_NO, KC_NO, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, - KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_P0, KC_PDOT, KC_NO - ), - [SETTING] = LAYOUT( /* Base */ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - ), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} - -#ifdef OLED_DRIVER_ENABLE -void oled_task_user(void) { - oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { - case BASE: - oled_write_P(PSTR("Defaultn"), false); - break; - case COMMAND: - oled_write_P(PSTR("COMMANDn"), false); - break; - case NUMBER: - oled_write_P(PSTR("NUMBERn"), false); - break; - case SETTING: - oled_write_P(PSTR("SETTINGn"), 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 - oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); -} -#endif diff --git a/keyboards/suihankey/rev1/config.h b/keyboards/suihankey/rev1/config.h new file mode 100644 index 0000000000..4e14551257 --- /dev/null +++ b/keyboards/suihankey/rev1/config.h @@ -0,0 +1,248 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT Suihankey +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define UNUSED_PINS +//#define USE_I2C +//#undef USE_SERIAL + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +// #define RGBLED_SPLIT {18,18} diff --git a/keyboards/suihankey/rev1/keymaps/default/config.h b/keyboards/suihankey/rev1/keymaps/default/config.h new file mode 100644 index 0000000000..bf1149ebc6 --- /dev/null +++ b/keyboards/suihankey/rev1/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/suihankey/rev1/keymaps/default/keymap.c b/keyboards/suihankey/rev1/keymaps/default/keymap.c new file mode 100644 index 0000000000..e7c7da4b8b --- /dev/null +++ b/keyboards/suihankey/rev1/keymaps/default/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE, + COMMAND, + NUMBER, + FUNCTION +}; + +#define KC_CMD_SP LT(COMMAND,KC_SPC) +#define KC_CMD_ET LT(COMMAND,KC_ENTER) +#define KC_NUM_ALT LT(NUMBER,KC_LALT) +#define KC_NUM_BS LT(NUMBER,KC_BSPC) +#define KC_SET_CTRL LT(FUNCTION,KC_LCTRL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_A, KC_S, KC_D, KC_F, KC_G, + KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP + ), + [COMMAND] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_A, KC_S, KC_D, KC_F, KC_G, + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), + KC_NO, KC_NO, KC_NO + ), + [NUMBER] = LAYOUT( /* Base */ + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO + ), + [FUNCTION] = LAYOUT( /* Base */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_RMOD, + KC_NO, KC_NO, KC_NO + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMAND\n"), false); + break; + case NUMBER: + oled_write_P(PSTR("NUMBER\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("FUNCTION\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 + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} +#endif diff --git a/keyboards/suihankey/rev1/keymaps/default/readme.md b/keyboards/suihankey/rev1/keymaps/default/readme.md new file mode 100644 index 0000000000..95eac805a0 --- /dev/null +++ b/keyboards/suihankey/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for suihankey \ No newline at end of file diff --git a/keyboards/suihankey/rev1/readme.md b/keyboards/suihankey/rev1/readme.md new file mode 100644 index 0000000000..1c80a8af63 --- /dev/null +++ b/keyboards/suihankey/rev1/readme.md @@ -0,0 +1,18 @@ +# suihankey_rev1 + +![suihankey_rev1](https://i.gyazo.com/07b9e882fd0c0ad00c8c98d93e94e383.jpg) + +Compact with only 18 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankey_rev1, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make suihankey/rev1: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). diff --git a/keyboards/suihankey/rev1/rev1.c b/keyboards/suihankey/rev1/rev1.c new file mode 100644 index 0000000000..f97e6caed4 --- /dev/null +++ b/keyboards/suihankey/rev1/rev1.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "rev1.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/suihankey/rev1/rev1.h b/keyboards/suihankey/rev1/rev1.h new file mode 100644 index 0000000000..cbc877abd5 --- /dev/null +++ b/keyboards/suihankey/rev1/rev1.h @@ -0,0 +1,40 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, \ + L10, L11, L12, L13, L14, \ + L20, L21, L22, L23, L24, \ + L30, L31, L32 \ +) \ +{ \ + { L00, L10, L20, L30 }, \ + { L01, L11, L21, L31 }, \ + { L02, L12, L22, L32 }, \ + { L03, L13, L23, KC_NO }, \ + { L04, L14, L24, KC_NO }, \ +} diff --git a/keyboards/suihankey/rev1/rules.mk b/keyboards/suihankey/rev1/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/suihankey/rev1/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/suihankey/rules.mk b/keyboards/suihankey/rules.mk index 19e792378e..d4c2e54b13 100644 --- a/keyboards/suihankey/rules.mk +++ b/keyboards/suihankey/rules.mk @@ -1,67 +1,20 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -78,5 +31,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -OLED_DRIVER_ENABLE = no -SPLIT_KEYBOARD = yes +OLED_DRIVER_ENABLE = yes +SPLIT_KEYBOARD = no + +DEFAULT_FOLDER = suihankey/rev1 diff --git a/keyboards/suihankey/split/alpha/alpha.c b/keyboards/suihankey/split/alpha/alpha.c new file mode 100644 index 0000000000..3d2d1de779 --- /dev/null +++ b/keyboards/suihankey/split/alpha/alpha.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "alpha.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/suihankey/split/alpha/alpha.h b/keyboards/suihankey/split/alpha/alpha.h new file mode 100644 index 0000000000..f14639806e --- /dev/null +++ b/keyboards/suihankey/split/alpha/alpha.h @@ -0,0 +1,44 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L31, L32, R32, R31, R30 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { R30, R31, R32 }, \ +} + diff --git a/keyboards/suihankey/config.h b/keyboards/suihankey/split/alpha/config.h similarity index 100% rename from keyboards/suihankey/config.h rename to keyboards/suihankey/split/alpha/config.h diff --git a/keyboards/suihankey/split/alpha/readme.md b/keyboards/suihankey/split/alpha/readme.md new file mode 100644 index 0000000000..2ea1503eb3 --- /dev/null +++ b/keyboards/suihankey/split/alpha/readme.md @@ -0,0 +1,18 @@ +# suihankey_alpha + +![suihankey_alpha](https://i.gyazo.com/f798c5967f2ac457dd520ab8ff83b6ac.jpg) + +Compact with only 36 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankey_alphaboard_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make suihankey/alpha: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). diff --git a/keyboards/suihankey/split/alpha/rules.mk b/keyboards/suihankey/split/alpha/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/suihankey/split/alpha/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/suihankey/split/info.json b/keyboards/suihankey/split/info.json new file mode 100644 index 0000000000..c3825ac3ac --- /dev/null +++ b/keyboards/suihankey/split/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "suihankey_split", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0}, {"label":"5", "x":4, "y":0}, {"label":"19", "x":7, "y":0}, {"label":"20", "x":8, "y":0}, {"label":"21", "x":9, "y":0}, {"label":"22", "x":10, "y":0}, {"label":"23", "x":11, "y":0}, {"label":"6", "x":0, "y":1}, {"label":"7", "x":1, "y":1}, {"label":"8", "x":2, "y":1}, {"label":"9", "x":3, "y":1}, {"label":"10", "x":4, "y":1}, {"label":"24", "x":7, "y":1}, {"label":"25", "x":8, "y":1}, {"label":"26", "x":9, "y":1}, {"label":"27", "x":10, "y":1}, {"label":"28", "x":11, "y":1}, {"label":"11", "x":0, "y":2}, {"label":"12", "x":1, "y":2}, {"label":"13", "x":2, "y":2}, {"label":"14", "x":3, "y":2}, {"label":"15", "x":4, "y":2}, {"label":"29", "x":7, "y":2}, {"label":"30", "x":8, "y":2}, {"label":"31", "x":9, "y":2}, {"label":"32", "x":10, "y":2}, {"label":"33", "x":11, "y":2}, {"label":"16", "x":2, "y":3}, {"label":"17", "x":3, "y":3}, {"label":"18", "x":4, "y":3}, {"label":"34", "x":7, "y":3}, {"label":"35", "x":8, "y":3}, {"label":"36", "x":9, "y":3}] + } + } +} diff --git a/keyboards/suihankey/split/keymaps/default/config.h b/keyboards/suihankey/split/keymaps/default/config.h new file mode 100644 index 0000000000..bf1149ebc6 --- /dev/null +++ b/keyboards/suihankey/split/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/suihankey/split/keymaps/default/keymap.c b/keyboards/suihankey/split/keymaps/default/keymap.c new file mode 100644 index 0000000000..9b8448ac27 --- /dev/null +++ b/keyboards/suihankey/split/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE, + COMMAND, + NUMBER, + SETTING +}; + +#define KC_CMD_SP LT(COMMAND,KC_SPC) +#define KC_CMD_ET LT(COMMAND,KC_ENTER) +#define KC_NUM_ALT LT(NUMBER,KC_LALT) +#define KC_NUM_BS LT(NUMBER,KC_BSPC) +#define KC_SET_CTRL LT(SETTING,KC_LCTRL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, + KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP, KC_CMD_ET, KC_BSPC, KC_LSFT + ), + [COMMAND] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [NUMBER] = LAYOUT( /* Base */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_P7, KC_P8, KC_P9, KC_NO, KC_NO, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, + KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_P0, KC_PDOT, KC_NO + ), + [SETTING] = LAYOUT( /* Base */ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/suihankey/split/keymaps/default/readme.md b/keyboards/suihankey/split/keymaps/default/readme.md new file mode 100644 index 0000000000..43ede89526 --- /dev/null +++ b/keyboards/suihankey/split/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default split keymap for suihankey diff --git a/keyboards/suihankey/split/readme.md b/keyboards/suihankey/split/readme.md new file mode 100644 index 0000000000..34d30580d1 --- /dev/null +++ b/keyboards/suihankey/split/readme.md @@ -0,0 +1,18 @@ +# suihankey split + +![suihankey](https://i.gyazo.com/f798c5967f2ac457dd520ab8ff83b6ac.jpg) + +Compact with only 36 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankeyboard_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make suihankey/split: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). diff --git a/keyboards/suihankey/split/rev1/config.h b/keyboards/suihankey/split/rev1/config.h new file mode 100644 index 0000000000..04ed0ba50d --- /dev/null +++ b/keyboards/suihankey/split/rev1/config.h @@ -0,0 +1,248 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT Suihankey +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define UNUSED_PINS +#define USE_I2C +#undef USE_SERIAL + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +// #define RGBLED_SPLIT {18,18} diff --git a/keyboards/suihankey/split/rev1/readme.md b/keyboards/suihankey/split/rev1/readme.md new file mode 100644 index 0000000000..f7c4bce166 --- /dev/null +++ b/keyboards/suihankey/split/rev1/readme.md @@ -0,0 +1,18 @@ +# suihankey_rev1 + +![suihankey_rev1](https://i.gyazo.com/f798c5967f2ac457dd520ab8ff83b6ac.jpg) + +Compact with only 36 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankey_rev1board_rev1, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make suihankey/rev1: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). diff --git a/keyboards/suihankey/split/rev1/rev1.c b/keyboards/suihankey/split/rev1/rev1.c new file mode 100644 index 0000000000..f97e6caed4 --- /dev/null +++ b/keyboards/suihankey/split/rev1/rev1.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "rev1.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/suihankey/split/rev1/rev1.h b/keyboards/suihankey/split/rev1/rev1.h new file mode 100644 index 0000000000..bf5468234d --- /dev/null +++ b/keyboards/suihankey/split/rev1/rev1.h @@ -0,0 +1,45 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L31, L32, R32, R31, R30 \ +) \ +{ \ + { L00, L10, L20, L30 }, \ + { L01, L11, L21, L31 }, \ + { L02, L12, L22, L32 }, \ + { L03, L13, L23, KC_NO }, \ + { L04, L14, L24, KC_NO }, \ + { R00, R10, R20, R30 }, \ + { R01, R11, R21, R31 }, \ + { R02, R12, R22, R32 }, \ + { R03, R13, R23, KC_NO }, \ + { R04, R14, R24, KC_NO }, \ +} diff --git a/keyboards/suihankey/split/rev1/rules.mk b/keyboards/suihankey/split/rev1/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/suihankey/split/rev1/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/suihankey/split/rules.mk b/keyboards/suihankey/split/rules.mk new file mode 100644 index 0000000000..b5d2dc8e81 --- /dev/null +++ b/keyboards/suihankey/split/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = no +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = suihankey/split/rev1 diff --git a/keyboards/suihankey/suihankey.c b/keyboards/suihankey/suihankey.c deleted file mode 100644 index 621e21a7b9..0000000000 --- a/keyboards/suihankey/suihankey.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2019 kakunpc - * - * 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 . - */ -#include "suihankey.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -/* - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -*/ diff --git a/keyboards/suihankey/suihankey.h b/keyboards/suihankey/suihankey.h deleted file mode 100644 index 170dbe5cff..0000000000 --- a/keyboards/suihankey/suihankey.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2019 kakunpc - * - * 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 . - */ -#pragma once - -#include "quantum.h" - -/* This a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the Leys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT( \ - L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ - L30, L31, L32, R32, R31, R30 \ -) \ -{ \ - { L00, L01, L02, L03, L04 }, \ - { L10, L11, L12, L13, L14 }, \ - { L20, L21, L22, L23, L24 }, \ - { L30, L31, L32 }, \ - { R00, R01, R02, R03, R04 }, \ - { R10, R11, R12, R13, R14 }, \ - { R20, R21, R22, R23, R24 }, \ - { R30, R31, R32 }, \ -} diff --git a/keyboards/sx60/matrix.c b/keyboards/sx60/matrix.c index e8e9d6574e..58647d13b0 100644 --- a/keyboards/sx60/matrix.c +++ b/keyboards/sx60/matrix.c @@ -113,13 +113,6 @@ uint8_t matrix_cols(void) { } void matrix_init(void) { - - /* To use PORTF disable JTAG with writing JTD bit twice within four cycles. */ - #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__)) - MCUCR |= _BV(JTD); - MCUCR |= _BV(JTD); - #endif - mcp23018_status = true; /* initialize row and col */ diff --git a/keyboards/sx60/rules.mk b/keyboards/sx60/rules.mk index 0381293ceb..4c711dc880 100755 --- a/keyboards/sx60/rules.mk +++ b/keyboards/sx60/rules.mk @@ -1,49 +1,15 @@ -# # project specific files -SRC = twimaster.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -59,3 +25,7 @@ BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no RGBLIGHT_ENABLE ?= no CUSTOM_MATRIX ?= yes + +# project specific files +SRC = twimaster.c \ + matrix.c diff --git a/keyboards/ta65/rules.mk b/keyboards/ta65/rules.mk deleted file mode 100644 index 47207cd46d..0000000000 --- a/keyboards/ta65/rules.mk +++ /dev/null @@ -1,65 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -BOOTLOADER = qmk-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID - -LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/tada68/keymaps/devinceble/keymap.c b/keyboards/tada68/keymaps/devinceble/keymap.c new file mode 100755 index 0000000000..0fddd0ada3 --- /dev/null +++ b/keyboards/tada68/keymaps/devinceble/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2019 Devinceble AKA Vimwarrior + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS,KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC,KC_DEL, \ + 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_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,MO(1),KC_PGDN, \ + MO(2), KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTRL, KC_LEFT,KC_DOWN,KC_UP,KC_RGHT), + + [1] = LAYOUT_ansi( + _______, 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_DEL, KC_INS , \ + _______,KC_BTN1, KC_MS_U,KC_BTN2,_______, _______,_______,_______,_______,_______,_______,KC_UP,_______, _______,KC_HOME, \ + KC_CAPS,KC_MS_L,KC_MS_D,KC_MS_R,_______,_______,_______,_______,_______,_______,KC_LEFT,KC_RGHT, _______,KC_END, \ + _______,_______,_______,_______, _______,_______, _______,_______,_______,_______,KC_DOWN,_______, _______, _______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______ + ), + + [2] = LAYOUT_ansi( + _______, 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_DEL, KC_INS , \ + _______,_______, _______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \ + _______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______ + ), +}; diff --git a/keyboards/tada68/keymaps/devinceble/readme.md b/keyboards/tada68/keymaps/devinceble/readme.md new file mode 100755 index 0000000000..a11be12075 --- /dev/null +++ b/keyboards/tada68/keymaps/devinceble/readme.md @@ -0,0 +1,6 @@ +# Devinceble AKA Vimwarrior TADA68 Keymap + +Build BIN File: + + make tada68:devinceble + diff --git a/keyboards/tada68/keymaps/devinceble/rules.mk b/keyboards/tada68/keymaps/devinceble/rules.mk new file mode 100644 index 0000000000..b1b4e02699 --- /dev/null +++ b/keyboards/tada68/keymaps/devinceble/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = yes + + diff --git a/keyboards/tada68/keymaps/emdarcher/config.h b/keyboards/tada68/keymaps/emdarcher/config.h new file mode 100644 index 0000000000..b193cf18de --- /dev/null +++ b/keyboards/tada68/keymaps/emdarcher/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define BACKLIGHT_BREATHING +#define GRAVE_ESC_ALT_OVERRIDE + diff --git a/keyboards/tada68/keymaps/emdarcher/keymap.c b/keyboards/tada68/keymaps/emdarcher/keymap.c new file mode 100755 index 0000000000..642b4d8faa --- /dev/null +++ b/keyboards/tada68/keymaps/emdarcher/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 +#define _CL 2 +#define _ML 3 + +#define KC_X0 LT(_CL, KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Alt |Win | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = LAYOUT_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS,KC_DEL, + KC_X0, 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_PGDN, + KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, KC_RALT,MO(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer for FN key + */ +[_FL] = LAYOUT_ansi( + 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_DEL, KC_INS , + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, _______,KC_HOME, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MFFD, _______, KC_END, + _______, _______,BL_BRTG,BL_DEC, BL_TOGG,BL_INC, KC_MPLY,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______), + + /* Keymap _CL: Function Layer for Caps Lock key + * uses VIM like control with hjkl for arrow keys + */ + +[_CL] = LAYOUT_ansi( + 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_DEL, KC_INS , + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, _______,KC_HOME, + _______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______, _______, KC_END, + _______, _______,_______,_______,_______,_______,KC_MPLY,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______), + + /* Keymap _ML: The Mouse control layer, activated by using both _FL and _CL layers + * Activates mouse control. Keeps lower layer's control + */ +[_ML] = LAYOUT_ansi( + KC_ESC ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_WH_R, KC_WH_L,KC_WH_U, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_WH_D, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_BTN1, KC_MS_U, KC_BTN2, + _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D, KC_MS_R), + +}; + + +//layer state control +uint32_t layer_state_set_user(uint32_t state){ + //switch to _ML if both _FL and _CL are activated + return update_tri_layer_state(state, _FL, _CL, _ML); +} diff --git a/keyboards/tada68/keymaps/emdarcher/readme.md b/keyboards/tada68/keymaps/emdarcher/readme.md new file mode 100755 index 0000000000..04b5a77e18 --- /dev/null +++ b/keyboards/tada68/keymaps/emdarcher/readme.md @@ -0,0 +1,15 @@ +# emdarcher's TADA68 layout + +A layout that adds a few extra features on the function layers. Designed for use in a MAC or Unix environment, and has some VIM inspiration. + +- Added Caps Lock for an extra FN layer with VIM like control on hjlk keys. +- Added Breathing Backlight Toggle. +- Made the ESC key use GESC for functionality for Grave and Tilde with shift or GUI modifiers. +- Added Print Screen, Scroll Lock, and Pause keys on P,[,] keys to add Mac screen brightness control. + * On Mac, Scroll Lock is Brightness Down and Pause is Brightness Up, so with this FN+[ = brighness down, FN+] = brightness up +- Has Mac Fast-forward and Rewind keys mapped for changing media tracks. FN+; = Rewind, FN+' = Fast-forward +- Moved LGUI to the default MAC Command key position. +- Has a mouse control layer that is activated by pressing both FN and CAPS LOCK +- FN+X toggles the backlight breathing mode + + diff --git a/keyboards/tada68/keymaps/emdarcher/rules.mk b/keyboards/tada68/keymaps/emdarcher/rules.mk new file mode 100644 index 0000000000..d44788422b --- /dev/null +++ b/keyboards/tada68/keymaps/emdarcher/rules.mk @@ -0,0 +1,7 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +CONSOLE_ENABLE = no # Console for debug(+400) + diff --git a/keyboards/tada68/keymaps/jarred/keymap.c b/keyboards/tada68/keymaps/jarred/keymap.c new file mode 100644 index 0000000000..0c19b96d93 --- /dev/null +++ b/keyboards/tada68/keymaps/jarred/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2019 Jarred Steenvoorden + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _QW 0 +#define _NV 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT_ansi( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_GRV , + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + MO(_NV), 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_PGUP, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(_NV), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_NV] = LAYOUT_ansi( + _______, 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_DEL , KC_INS , + _______, _______, _______, _______, KC_DEL , KC_BSPC, _______, KC_HOME, KC_UP , KC_END , KC_INS , _______, _______, _______, KC_HOME, + _______, _______, _______, KC_LSFT, KC_LCTL, KC_ENT , _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL , KC_DEL , _______, KC_END , + _______ , _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, _______, BL_INC , _______, + _______, _______, _______, _______ , _______, _______, _______, BL_TOGG, BL_DEC , _______ + ), + +}; diff --git a/keyboards/tada68/keymaps/jarred/readme.md b/keyboards/tada68/keymaps/jarred/readme.md new file mode 100644 index 0000000000..56dc34555c --- /dev/null +++ b/keyboards/tada68/keymaps/jarred/readme.md @@ -0,0 +1,9 @@ +# Jarred's Tada68 Layout + +Check out [user space readme](../../../../users/jarred/readme.md) for more info + +# Flash + +``` +make tada68:jarred:flashbin +``` diff --git a/keyboards/tada68/keymaps/jarred/rules.mk b/keyboards/tada68/keymaps/jarred/rules.mk new file mode 100644 index 0000000000..193d92d1d0 --- /dev/null +++ b/keyboards/tada68/keymaps/jarred/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/mekberg/config.h b/keyboards/tada68/keymaps/mekberg/config.h new file mode 100644 index 0000000000..d29180a5af --- /dev/null +++ b/keyboards/tada68/keymaps/mekberg/config.h @@ -0,0 +1,5 @@ +#pragma once + +// Define some configuration for modtap behavior +// #define TAPPING_TERM 150 +#define PERMISSIVE_HOLD diff --git a/keyboards/tada68/keymaps/mekberg/keymap.c b/keyboards/tada68/keymaps/mekberg/keymap.c new file mode 100755 index 0000000000..1acbf2c48a --- /dev/null +++ b/keyboards/tada68/keymaps/mekberg/keymap.c @@ -0,0 +1,100 @@ +#include QMK_KEYBOARD_H + +// Fillers to make layering more clear +// The default names have been swapped to make the keymap more readable. +#define XXXXXX KC_TRNS +#define ______ KC_NO + +// ISO keycodes with Swedish layout names +#define SE_PLUS KC_MINS // + +#define SE_TCK KC_EQL // Fronttick (´) +#define SE_DASH KC_SLSH // - +#define SE_UML KC_RBRC // Umlaut (¨) +#define SE_QUT KC_NUHS // Singlequote (') +#define SE_AUML KC_QUOT // Ä +#define SE_ARNG KC_LBRC // Å +#define SE_OUML KC_SCLN // Ö +#define SE_LT KC_NUBS // < + +// My common shortcuts +#define MY_PREV KC_MRWD // Media: Previous +#define MY_NEXT KC_MFFD // Media: Next +#define MY_PLAY KC_MPLY // Media: Play/Pause +#define MY_LOCK C(A(KC_L)) // Mac: Lock + + +/* +TADA68 ISO physical layout +1u == 8chars +,----------------------------------------------------------------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | 2u | | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| 1,5u | | | | | | | | | | | | | 1,5u | | +|--------------------------------------------------------------------------------------------------------------------------| |--------| +| 1,75u | | | | | | | | | | | | | 1,25u | | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| 1,25u | | | | | | | | | | | | 1,75u | | | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| 1,25u | 1,25u | 1,25u | | | | | | | | +`----------------------------------------------------------------------------------------------------------------------------------------------' +*/ + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( +// ,----------------------------------------------------------------------------------------------------------------------------------------------. +// | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | Backspace | Home | + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, SE_TCK, KC_BSPC, KC_HOME, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | Tab | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | | End | + LT(2,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, SE_UML, KC_END, +// |--------------------------------------------------------------------------------------------------------------------------| |--------| +// | LCtrl | A | S | D | F | G | H | J | K | L | Ö | Ä | ' | Enter | PgUp | + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OUML, SE_AUML, SE_QUT, KC_ENT, KC_PGUP, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | LShift | <> | Z | X | C | V | B | N | M | , | . | - | RShift | Up | PgDn | + KC_LSFT, SE_LT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_DASH, KC_RSFT, KC_UP, KC_PGDN, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | LCtrl | LAlt | Command | Space |Command | RAlt | Fn | Left | Down | Right | + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_LGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT +// `----------------------------------------------------------------------------------------------------------------------------------------------' + ), + + [1] = LAYOUT_iso( +// ,----------------------------------------------------------------------------------------------------------------------------------------------. +// | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | Ins | + 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_DEL, KC_INS, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | Up | | | | | | | | | | | | Mute | + ______, ______, KC_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC__MUTE, +// |--------------------------------------------------------------------------------------------------------------------------| Lock |--------| +// | Caps Lock | Left | Down | Right | BLight | | | | | | | | | Screen | VolUp | + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, BL_BRTG, ______, ______, ______, ______, ______, ______, ______, ______, MY_LOCK, KC_VOLU, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | | | Bl- |BLtoggle | Bl+ | | | | | | | Stop | VolDn | + ______, ______, ______, ______, BL_DEC, BL_TOGG, BL_INC, ______, ______, ______, ______, ______, ______, KC_MSTP, KC_VOLD, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | | Sleep | | | | Prev | Play | Fwd | + ______, ______, ______, KC_SLEP, ______, ______, XXXXXX, MY_PREV, MY_PLAY, MY_NEXT +// `----------------------------------------------------------------------------------------------------------------------------------------------' + ), + + [2] = LAYOUT_iso( +// ,----------------------------------------------------------------------------------------------------------------------------------------------. +// | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | | + KC_ESC, 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_DEL, ______, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | Up | | | | | | | | | | | | Mute | + XXXXXX, ______, KC_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC__MUTE, +// |--------------------------------------------------------------------------------------------------------------------------| |--------| +// | | Left | Down | Right | | | Left | Down | Up | Right | | | | | VolUp | + ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ______, ______, ______, ______, KC_VOLU, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | | | | | | | | | | | | Stop | VolDn | + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MSTP, KC_VOLD, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | | | | | | Prev | Play | Fwd | + ______, ______, ______, ______, ______, ______, ______, MY_PREV, MY_PLAY, MY_NEXT +// `----------------------------------------------------------------------------------------------------------------------------------------------' + ) +}; diff --git a/keyboards/tada68/keymaps/mekberg/readme.md b/keyboards/tada68/keymaps/mekberg/readme.md new file mode 100644 index 0000000000..be578e9572 --- /dev/null +++ b/keyboards/tada68/keymaps/mekberg/readme.md @@ -0,0 +1,58 @@ +# Mekberg's TADA68 layout + +More or less a standard Swedish ISO layout, with Mac-centric key positions. All keys not assigned on non-default layers are set to KC_NO +as I don't want them to pass through when activating a layer. + +# Layers + +### Base Layer + +``` +,----------------------------------------------------------------------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | Backspace | Home | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | | End | +|--------------------------------------------------------------------------------------------------------------------------| |--------| +| LCtrl | A | S | D | F | G | H | J | K | L | Ö | Ä | ' | Enter | PgUp | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| LShift | <> | Z | X | C | V | B | N | M | , | . | - | RShift | Up | PgDn | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| LCtrl | LAlt | Command | Space |Command | RAlt | Fn | Left | Down | Right | +`----------------------------------------------------------------------------------------------------------------------------------------------' +``` + +### Fn Layer (layer 1) + +``` +,----------------------------------------------------------------------------------------------------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | Ins | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | Up | | | | | | | | | | | | Mute | +|--------------------------------------------------------------------------------------------------------------------------| |--------| +| Caps Lock | Left | Down | Right | BLight | | | | | | | | | | VolUp | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | | | Bl- |BLtoggle | Bl+ | | | | | | | Stop | VolDn | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | | | | | | Prev | Play | Fwd | +`----------------------------------------------------------------------------------------------------------------------------------------------' +``` + +Mainly used for media keys and F-keys, as well as a nav cluster on WASD. Also has backlight keys, that are rarely used. + +### Modtap Tab Layer (layer 2) + +``` +,----------------------------------------------------------------------------------------------------------------------------------------------. +| Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | Up | | | | | | | | | | | | Mute | +|--------------------------------------------------------------------------------------------------------------------------| |--------| +| | Left | Down | Right | | | Left | Down | Up | Right | | | | | VolUp | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | | | | | | | | | | | | Stop | VolDn | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | | | | | | Prev | Play | Fwd | +`----------------------------------------------------------------------------------------------------------------------------------------------' +``` + +Tab acts as Tab when tapped, and as Layer 2 when held. Used for HJKL nav keys and Delete. diff --git a/keyboards/tada68/keymaps/mekberg/rules.mk b/keyboards/tada68/keymaps/mekberg/rules.mk new file mode 100644 index 0000000000..dbaa9045e7 --- /dev/null +++ b/keyboards/tada68/keymaps/mekberg/rules.mk @@ -0,0 +1,5 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/onelivesleft/config.h b/keyboards/tada68/keymaps/onelivesleft/config.h new file mode 100644 index 0000000000..bada95bea5 --- /dev/null +++ b/keyboards/tada68/keymaps/onelivesleft/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 diff --git a/keyboards/tada68/keymaps/onelivesleft/keymap.c b/keyboards/tada68/keymaps/onelivesleft/keymap.c new file mode 100644 index 0000000000..f99bff3137 --- /dev/null +++ b/keyboards/tada68/keymaps/onelivesleft/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Del | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |CAPS| + * |------------------------------------------------------- -----| + * |FN | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|Home| + * |----------------------------------------------------------------| + * |Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|End| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BL] = LAYOUT_iso( + 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_CAPS, \ + MO(_FL), 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_HOME, \ + 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, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap _FL1: Function Layer 1 + * ,----------------------------------------------------------------. + * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Delete| Ins| + * |----------------------------------------------------------------| + * | | | ↑ | | | | | | | | Prnt | | | |Break| + * |------------------------------------------------------- -----| + * | | ← | ↓ | → | | | | | | | | ` | | |PgUp| + * |----------------------------------------------------------------| + * | | | | | L+|LED| L-| | Mut| V-|V+| | MsBtn|Up|PgDn| + * |----------------------------------------------------------------| + * | | | | | | |MsBn| Lt| Dn| Rt | + * `----------------------------------------------------------------' + */ + [_FL] = LAYOUT_iso( + _______, 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_DEL, KC_INS, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, KC_BRK, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, KC_GRV, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BTN2, KC_MS_U, KC_PGDN, \ + _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R + ), +}; diff --git a/keyboards/tada68/keymaps/onelivesleft/readme.md b/keyboards/tada68/keymaps/onelivesleft/readme.md new file mode 100644 index 0000000000..49f1013d28 --- /dev/null +++ b/keyboards/tada68/keymaps/onelivesleft/readme.md @@ -0,0 +1,38 @@ +# onelivesleft TADA68 layout for ISO UK + +This is a layout designed with programming in mind. It's a modification of the `iso-uk` layout, and has been tested on a TADA68 purchased from kbdfans in May 2019. The physical key layout includes the "double height" iso Enter key and the "short" Left Shift along side the iso Backslash key. [See this keyboard-layout-editor.com Gist](http://www.keyboard-layout-editor.com/#/gists/acf0f32f7ea0d0ed35c901663ca47919) + +## Layout features: + +### Navigation column, from top-right down + +Bare: +* Delete +* Capslock +* Home +* End + +With FN: +* Insert +* Break +* Page Up +* Page Down + +### Mouse +* Fn + cursors to move +* Fn + Right Ctrl for left click +* Fn + Right Shift for right click + +### Misc +* Capslock key used as a second Fn key (for easy one-handed alt+F4 etc.) +* Fn + ': ` +* Fn + P: Printscreen + + +## Installation + +Please see the [tada68 readme](../../readme.md) using the following command + +``` +make tada68:onelivesleft:flashbin +``` diff --git a/keyboards/tada68/keymaps/default/rules.mk b/keyboards/tada68/keymaps/onelivesleft/rules.mk similarity index 100% rename from keyboards/tada68/keymaps/default/rules.mk rename to keyboards/tada68/keymaps/onelivesleft/rules.mk diff --git a/keyboards/tada68/keymaps/peippo/config.h b/keyboards/tada68/keymaps/peippo/config.h new file mode 100644 index 0000000000..6f70f09bee --- /dev/null +++ b/keyboards/tada68/keymaps/peippo/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/tada68/keymaps/peippo/keymap.c b/keyboards/tada68/keymaps/peippo/keymap.c new file mode 100644 index 0000000000..236d7cecca --- /dev/null +++ b/keyboards/tada68/keymaps/peippo/keymap.c @@ -0,0 +1,52 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Default layer + * ,----------------------------------------------------------------------------------------------------------------------------. + * | GrvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | Backspace | MacOS | + * |----------------------------------------------------------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | Enter | Del | + * |-----------------------------------------------------------------------------------------------------------, |-------| + * | Mod Layer | A | S | D | F | G | H | J | K | L | Ö | Ä | ' | | PgUp | + * |----------------------------------------------------------------------------------------------------------------------------| + * | Shift | < | Z | X | C | V | B | N | M | , | . | - | Shift | Up | PgDn | + * |----------------------------------------------------------------------------------------------------------------------------| + * | Control | Option | Command | Space | Cmnd | Opt | ModLr | Left | Down | Right | + * `----------------------------------------------------------------------------------------------------------------------------' + */ + + [_BL] = LAYOUT_iso( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, AG_NORM, + 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_DEL, + MO(_FL), 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_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Modifier layer + * ,----------------------------------------------------------------------------------------------------------------------------. + * | Esc | | | | | | | | [ | ] | | | | Delete |Windows| + * |----------------------------------------------------------------------------------------------------------------------------| + * | | | | | | | | PgUp | Up | PgDn | | | | | | + * |-----------------------------------------------------------------------------------------------------------, |-------| + * | | |Scrnsht|Desktop| | | | Left | Down | Right | | | | | VolUp | + * |----------------------------------------------------------------------------------------------------------------------------| + * | Shift | | | | | BL- |BL Togg| BL+ | | | | | Shift | Play | VolDn | + * |----------------------------------------------------------------------------------------------------------------------------| + * | | | | | | | | Prev | Mute | Next | + * `----------------------------------------------------------------------------------------------------------------------------' + */ + + [_FL] = LAYOUT_iso( + KC_ESC, _______, _______, _______, _______, _______, _______, _______, RALT(KC_8), RALT(KC_9), _______, _______, _______, KC_DEL, AG_SWAP, + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______, + _______, _______, SGUI(KC_5), KC_F11, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_VOLU, + KC_LSFT, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, KC_RSFT, KC_MPLY, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC__MUTE, KC_MFFD + ), + +}; diff --git a/keyboards/tada68/keymaps/peippo/readme.md b/keyboards/tada68/keymaps/peippo/readme.md new file mode 100644 index 0000000000..c3cf8b3c62 --- /dev/null +++ b/keyboards/tada68/keymaps/peippo/readme.md @@ -0,0 +1,24 @@ +# TADA68 ISO keymap by peippo + +Nordic ISO layout with faster access to cursor movement keys and brackets. + +## Keymap notes + +- A few MacOS specific shortcuts, but also has a key dedicated for swapping Alt and GUI buttons for Windows use. +- Default layer has a Grave Escape which outputs Escape when pressed normally, and `§` when Shift or Command are held. I like to setup Command+Esc to moving focus to next window (MacOS preferences, Keyboard / Shortcuts / Keyboard). +- `Caps Lock` or `FN` can be held to access the modifier layer. + +## Modifier layer + +- Additional cursor movement keys on `J/K/L/I`, and Page Up/Page Down on `U/O`. +- Easier access to [] & {} (w/ Shift) on `8/9` (MacOS). +- Show desktop on `D` (MacOS). +- Screen capture tool on `S` (MacOS). +- Media shortcuts on Arrow keys & Page Up/Page Down. +- MacOS/Windows key for swapping Alt and GUI on both sides. +- Backlighting adjustment (Toggle on `B`, increase/decrease on `V/B`). + +### Build + +To build the firmware, run `make tada68:peippo:flashbin`. +Detailed instructions at https://github.com/qmk/qmk_firmware/tree/master/keyboards/tada68 diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk index 2af733b6b3..ec3991c318 100755 --- a/keyboards/tada68/rules.mk +++ b/keyboards/tada68/rules.mk @@ -1,63 +1,26 @@ - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # actually lufa-ms # Mass storage bootloader on the tada68 uses bin files -FIRMWARE_FORMAT=bin +FIRMWARE_FORMAT = bin # Build Options # comment out to disable the options. # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/tanuki/keymaps/default/keymap.c b/keyboards/tanuki/keymaps/default/keymap.c index 34ca6a639c..7c3e11f27d 100644 --- a/keyboards/tanuki/keymaps/default/keymap.c +++ b/keyboards/tanuki/keymaps/default/keymap.c @@ -1,140 +1,120 @@ #include QMK_KEYBOARD_H -//Layer definitions +// custom type to store stuff in EEPROM +typedef union { + uint32_t raw; + struct { + bool layer_rgb :1; + }; +} user_config_t; + +user_config_t user_config; + +// Layer definitions #define _BL 0 #define _DL 1 #define _UL 2 #define _GL 3 #define _BK 4 - -//other variables -int mCalled = 0; -bool blockToggle = false; -bool lRGB = true; +// Custom keycode to toggle normal RGB or per-layer RGB +enum custom_keycodes { + CUSTRGB = SAFE_RANGE, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TG(_GL), \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_SLSH, KC_ENT, \ - KC_LCTL, KC_LALT, KC_COMMA, LT(_DL,KC_SPC), LT(_UL,KC_SPC), KC_DOT, KC_LGUI), + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TG(_GL), \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LALT, KC_COMMA, LT(_DL,KC_SPC), LT(_UL,KC_SPC), KC_DOT, KC_LGUI), [_DL] = LAYOUT( - 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,\ - KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,\ + KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_UL] = LAYOUT( - KC_GRV, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE, KC_BSLS, KC_PLUS, KC_UNDS, KC_MINS, KC_EQL, KC_DEL,\ - KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, \ - KC_TRNS, KC_FN0, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, \ - KC_TRNS, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, RGB_SAI, RGB_VAI), + KC_GRV, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE, KC_BSLS, KC_PLUS, KC_UNDS, KC_MINS, KC_EQL, KC_DEL,\ + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, \ + KC_TRNS, CUSTRGB, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, RGB_SAI, RGB_VAI), [_GL] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS), - -[_BK] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_FN1, KC_NO, KC_NO), - + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS) + }; - -//KC_MPLY, KC_VOLU, KC_VOLD, KC_TRNS, KC_TRNS, KC_MNXT, KC_MPRV -//function to toggle the interactive rgb variable -bool toggleLayerRGB(void){ - if(lRGB == true){ - return false; - } - else{ - return true; - } +void keyboard_post_init_user(void) { + user_config.raw = eeconfig_read_user(); + if(user_config.layer_rgb) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(1); + rgblight_sethsv_noeeprom(0,10,255); + } } -void matrix_init_user(void){ - rgblight_enable(); - rgblight_mode(1); - rgblight_sethsv(0,10,255); +uint32_t layer_state_set_user(uint32_t state) { + // This code switches underglow color by active layer, if the user has enabled the feature + if(user_config.layer_rgb) { + switch (biton32(state)) { + case _BL: + rgblight_sethsv_noeeprom(0,10,255); + rgblight_mode_noeeprom(1); + break; + case _DL: + rgblight_sethsv_noeeprom(130,200,255); + rgblight_mode_noeeprom(1); + break; + case _UL: + rgblight_sethsv_noeeprom(170,200,255); + rgblight_mode_noeeprom(1); + break; + case _GL: + rgblight_sethsv_noeeprom(0,180,255); + rgblight_mode_noeeprom(1); + break; + } + } + return state; } -//check for layer and if there was a keypress change underglow lighting -void matrix_scan_kb(void){ - if(lRGB == true) - { - - - - //base layer - if(layer_state == 0x00000000 && mCalled == 1 ){ - rgblight_sethsv(0,10,255); - mCalled = 0; - } - - //down layer - else if(layer_state == 0x00000002 && mCalled == 1){ - rgblight_sethsv(160,255,255); - mCalled = 0; - } - - - //up layer with rgb access blocked - else if(layer_state == 0x00000004 && mCalled == 1 && lRGB == true){ - //blockToggle = true; - layer_state = 0x00000014; - rgblight_sethsv(180,255,255); - mCalled = 0; - } - - //arrow cluster layer - else if(layer_state == 0x00000008 && mCalled == 1){ - rgblight_sethsv(0,180,255); - mCalled = 0; - } - - //if on blocked layer and the spacebar has been released reset to baselayer and set colours to white - else if(layer_state == 0x00000014 && blockToggle == true ) - { - blockToggle = false; - layer_state = 0x00000000; - rgblight_sethsv(0,10,255); - } - - } -} - -//set mCalled to 1 when a button is pressed to make sure the leds aren't continuesly updated. bool process_record_user (uint16_t keycode, keyrecord_t *record) { - mCalled = 1; - - //uncommenting the line below causes the lights to flicker when typing on the keyboard. - //rgblight_sethsv(0,255,0); - - if(keycode == KC_FN0 && record->event.pressed){ - //set the toggle and make sure to set the colour back to white - lRGB = toggleLayerRGB(); - rgblight_enable(); - rgblight_mode(1); - rgblight_sethsv(0,255,255); - layer_state =0x00000000; - - return false; - } - - //check if spacebar is released when on a different layer - if(keycode == KC_FN1){ - if(record ->event.pressed){ - }else{ - blockToggle = true; - } - } - - return true; + switch (keycode) { + case CUSTRGB: // if the user toggled per-layer RGB, update the config and refresh the RGB color + if(record->event.pressed) { + user_config.layer_rgb ^= 1; + eeconfig_update_user(user_config.raw); + if (user_config.layer_rgb) { + layer_state_set(layer_state); + } + } + return false; + break; + case RGB_MOD: + case RGB_SAD: + case RGB_SAI: + case RGB_HUI: + case RGB_VAD: + case RGB_VAI: + if(user_config.layer_rgb && record->event.pressed) { + return false; // if layer RGB is on, ignore attempts to change RGB settings + } + break; + } + return true; +} + +void eeconfig_init_user(void) { // in case EEPROM is reset, set up our custom config + user_config.raw = 0; + user_config.layer_rgb = true; // enable per-layer RGB by default + eeconfig_update_user(user_config.raw); + rgblight_enable(); + rgblight_sethsv(0,10,255); + rgblight_mode(1); } diff --git a/keyboards/tanuki/keymaps/tucznak/config.h b/keyboards/tanuki/keymaps/tucznak/config.h new file mode 100644 index 0000000000..3a140193d8 --- /dev/null +++ b/keyboards/tanuki/keymaps/tucznak/config.h @@ -0,0 +1,27 @@ +#pragma once + +#undef MANUFACTURER +#undef PRODUCT +#undef DESCRIPTION + +#define MANUFACTURER Potato Inc. +#define PRODUCT Trash Panda +#define DESCRIPTION Qt3.14 smolkeeb + +/* for bootloader */ +#define QMK_ESC_OUTPUT B2 +#define QMK_ESC_INPUT D0 +#define QMK_LED B0 + +/* turn off RGB when computer sleeps */ +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SLEEP +#endif + +/* send tap key if no layer key was used even after tap delay */ +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 250 +#define RETRO_TAPPING +#define TAPPING_TOGGLE 2 diff --git a/keyboards/tanuki/keymaps/tucznak/keymap.c b/keyboards/tanuki/keymaps/tucznak/keymap.c new file mode 100644 index 0000000000..301f0f8419 --- /dev/null +++ b/keyboards/tanuki/keymaps/tucznak/keymap.c @@ -0,0 +1,116 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _DN, + _UP, + _NAV, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base layer (0) + * ,------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | Tab | A | S | D | F | G | H | J | K | L | ů | Nav | + * `------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----' + * | Shift | Z | X | C | V | B | N | M | , | . |Enter | + * `-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------' + * | Ctrl | GUI |LAlt | Space | SpaceUp |AltGr| Down | + * `--------------------------------------------------------' + */ + + [_BASE] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TT(_NAV), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(_UP,KC_SPC), KC_RALT, MO(_DN) + ), + + /* Down layer (1) + * function keys and numbers + * ,------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * `------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----' + * | |NumLk| | | + | - | * | / | , | . | | + * `-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------' + * | Fn | | | C+A+D | C+A+I | | | + * `--------------------------------------------------------' + */ + + [_DN] = LAYOUT( + 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_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, _______, + _______, KC_NLCK, _______, _______, KC_PPLS, KC_PMNS, KC_PAST, KC_PSLS, KC_COMM, KC_DOT, _______, + MO(_FN), _______, _______, LCA(KC_DEL), LCA(KC_INS), _______, _______ + ), + + /* Up layer (2) + * national and special characters + * ,------------------------------------------------------------------------. + * | +1 | ě2 | š3 | č4 | ř5 | ž6 | ý7 | á8 | í9 | é0 | ´ | ˇ | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | ;° | | | | | | ( | ) | § | ! | / | ú | | + * `------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----' + * | | | | \ | % | = | ¨ | ' | - | _ | | + * `-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------' + * | | | | | | | | + * `--------------------------------------------------------' + */ + + [_UP] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, LSFT(KC_EQL), + KC_GRV, _______, _______, _______, LSFT(KC_NUBS), LSFT(KC_RBRC), KC_RBRC, KC_QUOT, LSFT(KC_QUOT), LSFT(KC_LBRC), KC_LBRC, _______, + _______, _______, _______, KC_NUBS, LSFT(KC_MINS), KC_MINS, KC_BSLS, LSFT(KC_BSLS), KC_SLSH, LSFT(KC_SLSH), _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + /* Navigation layer (3) + * arrows, nav cluster + * ,------------------------------------------------------------------------. + * | | | | | |Home |PgUp | | | Up | Ins | Del | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | | | | | | End |PgDn | |Left |Down |Right| | + * `------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----' + * | |Caps |PrtSc|ScrLk|Pause| | | | | | | + * `-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------' + * | | | | | | | Menu | + * `--------------------------------------------------------' + */ + + [_NAV] = LAYOUT( + _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, _______, KC_UP, KC_INS, KC_DEL, + _______, _______, _______, _______, _______, KC_END, KC_PGDN, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_APP + ), + + /* Function layer (4) + * keyboard and system control + * ,------------------------------------------------------------------------. + * |Reset| | | | | | |Play |Prev |Next |Stop | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * |Sleep | VLK |Mod+ |Hue+ |Sat+ |Val+ | | |Vol- |Vol+ |Mute | | + * `------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----' + * | | TOG |Mod- |Hue- |Sat- |Val- | | | | | | + * `-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------' + * | | | | | | | | + * `--------------------------------------------------------' + */ + + [_FN] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, _______, + KC_SLEP, VLK_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + _______, RGB_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/tanuki/keymaps/tucznak/readme.md b/keyboards/tanuki/keymaps/tucznak/readme.md new file mode 100644 index 0000000000..b38490c9c5 --- /dev/null +++ b/keyboards/tanuki/keymaps/tucznak/readme.md @@ -0,0 +1,8 @@ +# TuCZnak's modified layout + +This layout is optimized for Czech national QWERTZ keymap. +It includes separated layers for: + - F-keys and numbers + - national and special characters + - navigation cluster + - keyboard config and media control diff --git a/keyboards/tanuki/keymaps/tucznak/rules.mk b/keyboards/tanuki/keymaps/tucznak/rules.mk new file mode 100644 index 0000000000..5c5263eae7 --- /dev/null +++ b/keyboards/tanuki/keymaps/tucznak/rules.mk @@ -0,0 +1,19 @@ +# screw Caterina +BOOTLOADER = qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE =yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +TAP_DANCE_ENABLE = no diff --git a/keyboards/tanuki/rules.mk b/keyboards/tanuki/rules.mk index fd3c058304..516c3db5e6 100644 --- a/keyboards/tanuki/rules.mk +++ b/keyboards/tanuki/rules.mk @@ -1,52 +1,15 @@ - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -BOOTLOADER=caterina +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -64,4 +27,3 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID TAP_DANCE_ENABLE = no - diff --git a/keyboards/telophase/rules.mk b/keyboards/telophase/rules.mk index cfaf58e3d0..2c8df3295d 100644 --- a/keyboards/telophase/rules.mk +++ b/keyboards/telophase/rules.mk @@ -1,57 +1,16 @@ - -OPT_DEFS += -DMITOSIS_PROMICRO -MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -73,3 +32,10 @@ USB = /dev/ttyACM0 # upload: build # $(MITOSIS_UPLOAD_COMMAND) + +OPT_DEFS += -DMITOSIS_PROMICRO +MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c diff --git a/keyboards/telophase/telophase.h b/keyboards/telophase/telophase.h index aae4fc3d48..a7102498ce 100644 --- a/keyboards/telophase/telophase.h +++ b/keyboards/telophase/telophase.h @@ -2,9 +2,6 @@ #define TELOPHASE_H #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include #define red_led_off PORTF |= (1<<5) #define red_led_on PORTF &= ~(1<<5) diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h index 7fe0c2d646..024d3be0e4 100755 --- a/keyboards/tetris/config.h +++ b/keyboards/tetris/config.h @@ -40,7 +40,6 @@ #define NO_MUSIC_MODE #endif -#define NUMBER_OF_ENCODERS 2 #define ENCODERS_PAD_A { D1,F1 } #define ENCODERS_PAD_B { D0,F0 } diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk index c3e641c8f2..15fcf5cf6d 100755 --- a/keyboards/tetris/rules.mk +++ b/keyboards/tetris/rules.mk @@ -1,47 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -BOOTLOADER =qmk-dfu - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/tg4x/config.h b/keyboards/tg4x/config.h new file mode 100644 index 0000000000..ae66b8c9f4 --- /dev/null +++ b/keyboards/tg4x/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0021 +#define MANUFACTURER MythosMann +#define PRODUCT TG4x +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + // 0 1 2 3 4 5 6 7 +#define MATRIX_ROW_PINS { B5, B4, E6, D7, C6, D4, D0, D1 } +#define MATRIX_COL_PINS { D3, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tg4x/info.json b/keyboards/tg4x/info.json new file mode 100644 index 0000000000..13b23c1c31 --- /dev/null +++ b/keyboards/tg4x/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TG4x", + "url": "", + "maintainer": "qmk", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3, "w":1.25}, {"x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":2.25}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3, "w":1.25}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}] + } + } +} \ No newline at end of file diff --git a/keyboards/tg4x/keymaps/default/config.h b/keyboards/tg4x/keymaps/default/config.h new file mode 100644 index 0000000000..26c6d6ade1 --- /dev/null +++ b/keyboards/tg4x/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/tg4x/keymaps/default/keymap.c b/keyboards/tg4x/keymaps/default/keymap.c new file mode 100644 index 0000000000..b1b35a24bb --- /dev/null +++ b/keyboards/tg4x/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_DEL, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_RCTL + ), +}; + + + diff --git a/keyboards/tg4x/keymaps/default/readme.md b/keyboards/tg4x/keymaps/default/readme.md new file mode 100644 index 0000000000..83a96bee22 --- /dev/null +++ b/keyboards/tg4x/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for tg4x diff --git a/keyboards/tg4x/readme.md b/keyboards/tg4x/readme.md new file mode 100644 index 0000000000..b1ce799512 --- /dev/null +++ b/keyboards/tg4x/readme.md @@ -0,0 +1,17 @@ +# TG4x v2.1 + +40% sandwich keyboard driven by a pro micro. + +For more info please refer to [MythosMann's Github](www.github.com/MythosMann/tg4x). + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: TG4x v2.1 PCB +* Hardware Availability: [Geekhack](https://geekhack.org/index.php?topic=99163.0) + +If soldering in a RGB underglow strip, please use pin D2, the pin labeled RXI on the pro micro. + +Make example for this keyboard (after setting up your build environment): + + make tg4x: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). diff --git a/keyboards/tg4x/rules.mk b/keyboards/tg4x/rules.mk new file mode 100644 index 0000000000..41988177d3 --- /dev/null +++ b/keyboards/tg4x/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file diff --git a/keyboards/tg4x/tg4x.c b/keyboards/tg4x/tg4x.c new file mode 100644 index 0000000000..9452d4d956 --- /dev/null +++ b/keyboards/tg4x/tg4x.c @@ -0,0 +1,51 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "tg4x.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/tg4x/tg4x.h b/keyboards/tg4x/tg4x.h new file mode 100644 index 0000000000..80dc40238f --- /dev/null +++ b/keyboards/tg4x/tg4x.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k16, k50, k51, k52, k53, k54, \ + k20, k21, k22, k23, k24, k25, k26, k60, k61, k62, k63, k64, \ + k30, k31, k32, k34, k35, k71, k72, k73, k74 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06 }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, k32, ___, k34, k35, ___ }, \ + { k40, k41, k42, k43, k44, k45, ___ }, \ + { k50, k51, k52, k53, k54, ___, ___ }, \ + { k60, k61, k62, k63, k64, ___, ___ }, \ + { ___, k71, k72, k73, k74, ___, ___ } \ +} diff --git a/keyboards/tgr/alice/alice.c b/keyboards/tgr/alice/alice.c new file mode 100644 index 0000000000..39aed2cf56 --- /dev/null +++ b/keyboards/tgr/alice/alice.c @@ -0,0 +1,18 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#include "alice.h" diff --git a/keyboards/alice/alice.h b/keyboards/tgr/alice/alice.h similarity index 100% rename from keyboards/alice/alice.h rename to keyboards/tgr/alice/alice.h diff --git a/keyboards/tgr/alice/config.h b/keyboards/tgr/alice/config.h new file mode 100644 index 0000000000..4c36896b70 --- /dev/null +++ b/keyboards/tgr/alice/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422E +#define DEVICE_VER 0x0200 +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER TGR +#define PRODUCT TGR Alice + +/* matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW + +#define RGBLED_NUM 18 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 diff --git a/keyboards/alice/info.json b/keyboards/tgr/alice/info.json similarity index 100% rename from keyboards/alice/info.json rename to keyboards/tgr/alice/info.json diff --git a/keyboards/alice/keymaps/default/keymap.c b/keyboards/tgr/alice/keymaps/default/keymap.c similarity index 100% rename from keyboards/alice/keymaps/default/keymap.c rename to keyboards/tgr/alice/keymaps/default/keymap.c diff --git a/keyboards/alice/keymaps/mrkeebs/keymap.c b/keyboards/tgr/alice/keymaps/mrkeebs/keymap.c similarity index 100% rename from keyboards/alice/keymaps/mrkeebs/keymap.c rename to keyboards/tgr/alice/keymaps/mrkeebs/keymap.c diff --git a/keyboards/tgr/alice/readme.md b/keyboards/tgr/alice/readme.md new file mode 100644 index 0000000000..f5db63814b --- /dev/null +++ b/keyboards/tgr/alice/readme.md @@ -0,0 +1,48 @@ +# Alice + +![TGR Alice](https://i.imgur.com/cJohEqS.jpg) + +An ergonomic 60% keyboard. + +Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) +Hardware Supported: TGR Alice +Hardware Availability: Group buy finished + +Make example for this keyboard (after setting up your build environment): + + make tgr/alice:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as `Esc` while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). diff --git a/keyboards/tgr/alice/rules.mk b/keyboards/tgr/alice/rules.mk new file mode 100644 index 0000000000..530e8ea329 --- /dev/null +++ b/keyboards/tgr/alice/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = full +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c + +OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/tgr/alice/usbconfig.h b/keyboards/tgr/alice/usbconfig.h new file mode 100644 index 0000000000..d2955d0621 --- /dev/null +++ b/keyboards/tgr/alice/usbconfig.h @@ -0,0 +1,386 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'T', 'G', 'R' +#define USB_CFG_VENDOR_NAME_LEN 3 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'T', 'G', 'R', ' ', 'A', 'l', 'i', 'c', 'e' +#define USB_CFG_DEVICE_NAME_LEN 9 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/tgr/jane/config.h b/keyboards/tgr/jane/config.h new file mode 100644 index 0000000000..dd119d3b04 --- /dev/null +++ b/keyboards/tgr/jane/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 +#define MANUFACTURER TGR +#define PRODUCT Jane + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_LEVELS 1 diff --git a/keyboards/tgr/jane/info.json b/keyboards/tgr/jane/info.json new file mode 100644 index 0000000000..6fab4db1ed --- /dev/null +++ b/keyboards/tgr/jane/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "TGR Jane v2", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5}, {"x":14, "y":1.5}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":13.75, "y":3.5, "w":1.25}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5}, {"x":2.25, "y":5.5}, {"x":3.25, "y":5.5, "w":1.25}, {"x":4.5, "y":5.5, "w":1.25}, {"x":5.75, "y":5.5, "w":1.25}, {"x":7, "y":5.5, "w":1.25}, {"x":8.25, "y":5.5, "w":1.25}, {"x":9.5, "y":5.5, "w":1.25}, {"x":10.75, "y":5.5}, {"x":11.75, "y":5.5}, {"x":12.75, "y":5.5}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_iso": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/tgr/jane/jane.c b/keyboards/tgr/jane/jane.c new file mode 100644 index 0000000000..4ab0b30073 --- /dev/null +++ b/keyboards/tgr/jane/jane.c @@ -0,0 +1,47 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "jane.h" + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/tgr/jane/jane.h b/keyboards/tgr/jane/jane.h new file mode 100644 index 0000000000..2008d49d9a --- /dev/null +++ b/keyboards/tgr/jane/jane.h @@ -0,0 +1,77 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \ + k50, k51, k52, k53, k54, k55, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k3E, 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, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, k51, k52, k53, k54, k55, KC_NO, k57, k58, k59, k5A, k5B, k5C, k5D, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} + + +#define LAYOUT_tkl_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \ + k50, k51, k52, k55, k58, k59, k5A, k5D, k5E, k3E, 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, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \ + { k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, k5D, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} + +#define LAYOUT_tkl_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \ + k50, k51, k52, k55, k58, k59, k5A, k5D, k5E, k3E, 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, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, k5D, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} diff --git a/keyboards/unikorn/keymaps/default/config.h b/keyboards/tgr/jane/keymaps/default/config.h similarity index 100% rename from keyboards/unikorn/keymaps/default/config.h rename to keyboards/tgr/jane/keymaps/default/config.h diff --git a/keyboards/tgr/jane/keymaps/default/keymap.c b/keyboards/tgr/jane/keymaps/default/keymap.c new file mode 100644 index 0000000000..e7579457e6 --- /dev/null +++ b/keyboards/tgr/jane/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi(\ + KC_ESC, 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_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP, \ + 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_DEL ,KC_END ,KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT) \ +}; diff --git a/keyboards/tgr/jane/keymaps/default/readme.md b/keyboards/tgr/jane/keymaps/default/readme.md new file mode 100644 index 0000000000..983182da24 --- /dev/null +++ b/keyboards/tgr/jane/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Jane \ No newline at end of file diff --git a/keyboards/tgr/jane/readme.md b/keyboards/tgr/jane/readme.md new file mode 100644 index 0000000000..10986cde33 --- /dev/null +++ b/keyboards/tgr/jane/readme.md @@ -0,0 +1,47 @@ +# Jane v2 + +TKL Custom Keyboard. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: TGR Jane (Pontoporia) PCB v1.1, v1.2 +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=97552.1200) + + +Make example for this keyboard (after setting up your build environment): + + make tgr/jane:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as `Esc` while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). diff --git a/keyboards/tgr/jane/rules.mk b/keyboards/tgr/jane/rules.mk new file mode 100644 index 0000000000..c6a26d4a40 --- /dev/null +++ b/keyboards/tgr/jane/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no +WS2812_DRIVER = i2c + +OPT_DEFS = -DDEBUG_LEVEL=0 + +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/tgr/jane/usbconfig.h b/keyboards/tgr/jane/usbconfig.h new file mode 100644 index 0000000000..e65d210ace --- /dev/null +++ b/keyboards/tgr/jane/usbconfig.h @@ -0,0 +1,383 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/the_ruler/config.h b/keyboards/the_ruler/config.h index ecae3a4f21..0ec3f69d1b 100644 --- a/keyboards/the_ruler/config.h +++ b/keyboards/the_ruler/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -26,7 +25,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER Maple Computing #define PRODUCT The PCB Ruler -#define DESCRIPTION A custom keyboard PCB ruler, can also function as a macro pad +#define DESCRIPTION "A custom keyboard PCB ruler, can also function as a macro pad" /* key matrix size */ #define MATRIX_ROWS 1 @@ -155,5 +154,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - -#endif diff --git a/keyboards/the_ruler/keymaps/default/keymap.c b/keyboards/the_ruler/keymaps/default/keymap.c index 8b0f44b5ed..e6740b0584 100644 --- a/keyboards/the_ruler/keymaps/default/keymap.c +++ b/keyboards/the_ruler/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/the_ruler/keymaps/default/rules.mk b/keyboards/the_ruler/keymaps/default/rules.mk deleted file mode 100644 index 2791cc1054..0000000000 --- a/keyboards/the_ruler/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/the_ruler/readme.md b/keyboards/the_ruler/readme.md index 63a6ffeee3..13ea61c9a7 100644 --- a/keyboards/the_ruler/readme.md +++ b/keyboards/the_ruler/readme.md @@ -1,14 +1,13 @@ -The Ruler PCB -======= +# The Ruler PCB -A custom keyboard PCB ruler, that can also function as a macro pad +A custom keyboard PCB ruler, that can also function as a macro pad. Keyboard Maintainer: Maple Computing Hardware Supported: PCB Ruler V1 by That-Canadian and Bishop Keyboards -Hardware Availability: https://www.maple-computing.com/products/pcb-ruler-v1-1 +Hardware Availability: [Bishop Keyboards](https://bishopkeyboards.com/product/pcb-ruler-gloss-black-silver/) Make example for this keyboard (after setting up your build environment): make the_ruler:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +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). diff --git a/keyboards/the_ruler/rules.mk b/keyboards/the_ruler/rules.mk index 6362176fea..bfcc092615 100644 --- a/keyboards/the_ruler/rules.mk +++ b/keyboards/the_ruler/rules.mk @@ -1,60 +1,23 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -65,4 +28,4 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/the_ruler/the_ruler.h b/keyboards/the_ruler/the_ruler.h index 45a327b0dc..171d21a072 100644 --- a/keyboards/the_ruler/the_ruler.h +++ b/keyboards/the_ruler/the_ruler.h @@ -1,5 +1,4 @@ -#ifndef THERULER_H -#define THERULER_H +#pragma once #include "quantum.h" @@ -7,5 +6,3 @@ K00, K01, K02, K03, K04, K05 ) { \ { K00, K01, K02, K03, K04, K05 } \ } - -#endif diff --git a/keyboards/thedogkeyboard/config.h b/keyboards/thedogkeyboard/config.h new file mode 100644 index 0000000000..1a67a3f172 --- /dev/null +++ b/keyboards/thedogkeyboard/config.h @@ -0,0 +1,246 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT thedogkeyboard +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 20 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 } +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 111 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 50 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/thedogkeyboard/info.json b/keyboards/thedogkeyboard/info.json new file mode 100644 index 0000000000..517aae221b --- /dev/null +++ b/keyboards/thedogkeyboard/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TheDogKeyboard", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"7", "x":2, "y":0}, {"label":"13", "x":3, "y":0}, {"label":"19", "x":4, "y":0}, {"label":"24", "x":5, "y":0}, {"label":"29", "x":6.5, "y":0}, {"label":"35", "x":7.5, "y":0}, {"label":"40", "x":8.5, "y":0}, {"label":"45", "x":9.5, "y":0}, {"label":"50", "x":11, "y":0}, {"label":"56", "x":12, "y":0}, {"label":"62", "x":13, "y":0}, {"label":"66", "x":14, "y":0}, {"label":"70", "x":15.25, "y":0}, {"label":"76", "x":16.25, "y":0}, {"label":"82", "x":17.25, "y":0}, {"label":"2", "x":0, "y":1.5}, {"label":"8", "x":1, "y":1.5}, {"label":"14", "x":2, "y":1.5}, {"label":"20", "x":3, "y":1.5}, {"label":"25", "x":4, "y":1.5}, {"label":"30", "x":5, "y":1.5}, {"label":"36", "x":6, "y":1.5}, {"label":"41", "x":7, "y":1.5}, {"label":"46", "x":8, "y":1.5}, {"label":"51", "x":9, "y":1.5}, {"label":"57", "x":10, "y":1.5}, {"label":"63", "x":11, "y":1.5}, {"label":"67", "x":12, "y":1.5}, {"label":"71", "x":13, "y":1.5, "w":2}, {"label":"77", "x":15.25, "y":1.5}, {"label":"84", "x":16.25, "y":1.5}, {"label":"83", "x":17.25, "y":1.5}, {"label":"88", "x":18.5, "y":1.5}, {"label":"93", "x":19.5, "y":1.5}, {"label":"97", "x":20.5, "y":1.5}, {"label":"102", "x":21.5, "y":1.5}, {"label":"3", "x":0, "y":2.5, "w":1.5}, {"label":"9", "x":1.5, "y":2.5}, {"label":"15", "x":2.5, "y":2.5}, {"label":"21", "x":3.5, "y":2.5}, {"label":"26", "x":4.5, "y":2.5}, {"label":"31", "x":5.5, "y":2.5}, {"label":"37", "x":6.5, "y":2.5}, {"label":"42", "x":7.5, "y":2.5}, {"label":"47", "x":8.5, "y":2.5}, {"label":"52", "x":9.5, "y":2.5}, {"label":"58", "x":10.5, "y":2.5}, {"label":"64", "x":11.5, "y":2.5}, {"label":"68", "x":12.5, "y":2.5}, {"label":"72", "x":13.5, "y":2.5, "w":1.5}, {"label":"78", "x":15.25, "y":2.5}, {"label":"86", "x":16.25, "y":2.5}, {"label":"85", "x":17.25, "y":2.5}, {"label":"89", "x":18.5, "y":2.5}, {"label":"94", "x":19.5, "y":2.5}, {"label":"98", "x":20.5, "y":2.5}, {"label":"103", "x":21.5, "y":2.5}, {"label":"4", "x":0, "y":3.5, "w":1.75}, {"label":"10", "x":1.75, "y":3.5}, {"label":"16", "x":2.75, "y":3.5}, {"label":"22", "x":3.75, "y":3.5}, {"label":"27", "x":4.75, "y":3.5}, {"label":"32", "x":5.75, "y":3.5}, {"label":"38", "x":6.75, "y":3.5}, {"label":"43", "x":7.75, "y":3.5}, {"label":"48", "x":8.75, "y":3.5}, {"label":"53", "x":9.75, "y":3.5}, {"label":"59", "x":10.75, "y":3.5}, {"label":"65", "x":11.75, "y":3.5}, {"label":"73", "x":12.75, "y":3.5, "w":2.25}, {"label":"90", "x":18.5, "y":3.5}, {"label":"95", "x":19.5, "y":3.5}, {"label":"99", "x":20.5, "y":3.5}, {"label":"110", "x":21.5, "y":3.5}, {"label":"5", "x":0, "y":4.5, "w":2.25}, {"label":"11", "x":2.25, "y":4.5}, {"label":"17", "x":3.25, "y":4.5}, {"label":"23", "x":4.25, "y":4.5}, {"label":"28", "x":5.25, "y":4.5}, {"label":"33", "x":6.25, "y":4.5}, {"label":"39", "x":7.25, "y":4.5}, {"label":"44", "x":8.25, "y":4.5}, {"label":"49", "x":9.25, "y":4.5}, {"label":"54", "x":10.25, "y":4.5}, {"label":"60", "x":11.25, "y":4.5}, {"label":"74", "x":12.25, "y":4.5, "w":2.75}, {"label":"87", "x":16.25, "y":4.5}, {"label":"91", "x":18.5, "y":4.5}, {"label":"96", "x":19.5, "y":4.5}, {"label":"100", "x":20.5, "y":4.5}, {"label":"104", "x":21.5, "y":4.5}, {"label":"6", "x":0, "y":5.5, "w":1.25}, {"label":"12", "x":1.25, "y":5.5, "w":1.25}, {"label":"18", "x":2.5, "y":5.5, "w":1.25}, {"label":"105", "x":3.75, "y":5.5, "w":1.25}, {"label":"106", "x":5, "y":5.5, "w":1.25}, {"label":"34", "x":6.25, "y":5.5, "w":1.25}, {"label":"107", "x":7.5, "y":5.5, "w":1.25}, {"label":"108", "x":8.75, "y":5.5, "w":1.25}, {"label":"55", "x":10, "y":5.5, "w":1.25}, {"label":"61", "x":11.25, "y":5.5, "w":1.25}, {"label":"69", "x":12.5, "y":5.5, "w":1.25}, {"label":"75", "x":13.75, "y":5.5, "w":1.25}, {"label":"79", "x":15.25, "y":5.5}, {"label":"80", "x":16.25, "y":5.5}, {"label":"81", "x":17.25, "y":5.5}, {"label":"92", "x":18.5, "y":5.5}, {"label":"109", "x":19.5, "y":5.5}, {"label":"101", "x":20.5, "y":5.5}, {"label":"111", "x":21.5, "y":5.5}] + } + } +} diff --git a/keyboards/thedogkeyboard/keymaps/default/keymap.c b/keyboards/thedogkeyboard/keymaps/default/keymap.c new file mode 100644 index 0000000000..7632f81b93 --- /dev/null +++ b/keyboards/thedogkeyboard/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_ESC, 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_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + KC_GRV,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCAP, 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_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,KC_NO,KC_NO,KC_SPC,KC_NO,KC_NO,KC_RALT,KC_RGUI,KC_SPC,KC_RCTL, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO + ) +}; diff --git a/keyboards/thedogkeyboard/keymaps/default/readme.md b/keyboards/thedogkeyboard/keymaps/default/readme.md new file mode 100644 index 0000000000..045729a7a5 --- /dev/null +++ b/keyboards/thedogkeyboard/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for thedogkeyboard diff --git a/keyboards/thedogkeyboard/keymaps/kakunpc/keymap.c b/keyboards/thedogkeyboard/keymaps/kakunpc/keymap.c new file mode 100644 index 0000000000..cc3ba84d87 --- /dev/null +++ b/keyboards/thedogkeyboard/keymaps/kakunpc/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers +{ + BASE = 0, + COMMAND +}; + +#define KC_COMMAND LT(COMMAND, KC_F13) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_all( /* BASE */ + KC_ESC, 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_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + KC_GRV,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT ,KC_ENT, KC_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,KC_COMMAND,KC_SPC,KC_SPC,KC_SPC,KC_F14,KC_RALT,KC_NO,KC_NO,KC_COMMAND, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO ), + [COMMAND] = LAYOUT_all( /* COMMAND */ + KC_ESC, 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_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + KC_GRV,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCAP, 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_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,_______,KC_SPC,KC_SPC,KC_SPC,KC_F14,KC_RALT,KC_NO,KC_NO,_______, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO ), +}; diff --git a/keyboards/thedogkeyboard/keymaps/kakunpc/readme.md b/keyboards/thedogkeyboard/keymaps/kakunpc/readme.md new file mode 100644 index 0000000000..66eab07b94 --- /dev/null +++ b/keyboards/thedogkeyboard/keymaps/kakunpc/readme.md @@ -0,0 +1 @@ +# The kakunpc keymap for thedogkeyboard diff --git a/keyboards/thedogkeyboard/matrix.c b/keyboards/thedogkeyboard/matrix.c new file mode 100644 index 0000000000..e06fc15dc4 --- /dev/null +++ b/keyboards/thedogkeyboard/matrix.c @@ -0,0 +1,287 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<. + */ +#include "thedogkeyboard.h" diff --git a/keyboards/thedogkeyboard/thedogkeyboard.h b/keyboards/thedogkeyboard/thedogkeyboard.h new file mode 100644 index 0000000000..3f4b72c2be --- /dev/null +++ b/keyboards/thedogkeyboard/thedogkeyboard.h @@ -0,0 +1,59 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k01, k07,k13,k19,k24, k29,k35,k40,k45, k50,k56,k62,k66, k70,k76,k82,\ + \ + k02,k08,k14,k20,k25,k30,k36,k41,k46,k51,k57,k63,k67, k71, k77,k84,k83, k88,k93,k97,k102, \ + k03, k09,k15,k21,k26,k31,k37,k42,k47,k52,k58,k64,k68, k72, k78,k86,k85, k89,k94,k98,k103, \ + k04, k10,k16,k22,k27,k32,k38,k43,k48,k53,k59,k65, k73, k90,k95,k99,k110, \ + k05, k11,k17,k23,k28,k33,k39,k44,k49,k54,k60, k74, k87, k91,k96,k100,k104, \ + k06, k12, k18, k105, k106, k34, k107, k108, k55, k61, k69, k75, k79,k80,k81, k92,k109,k101,k111 \ + \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06 }, \ + { k07, k08, k09, k10, k11, k12 }, \ + { k13, k14, k15, k16, k17, k18 }, \ + { k19, k20, k21, k22, k23, k105 }, \ + { k24, k25, k26, k27, k28, k106 }, \ + { k29, k30, k31, k32, k33, k34 }, \ + { k35, k36, k37, k38, k39, k107 }, \ + { k40, k41, k42, k43, k44, k108 }, \ + { k45, k46, k47, k48, k49, KC_NO }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k56, k57, k58, k59, k60, k61 }, \ + { k62, k63, k64, k65, KC_NO, KC_NO }, \ + { k66, k67, k68, k69, KC_NO, KC_NO }, \ + { k70, k71, k72, k73, k74, k75 }, \ + { k76, k77, k78, k79, k80, k81 }, \ + { k82, k83, k84, k85, k86, k87 }, \ + { k88, k89, k90, k91, k92, KC_NO }, \ + { k93, k94, k95, k96, k109, KC_NO }, \ + { k97, k98, k99, k100, k101, KC_NO }, \ + { k102, k103, k104, k110, k111, KC_NO } \ +} diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk deleted file mode 100644 index 9da4bf91a5..0000000000 --- a/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2017 Balz Guenat -# -# 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 . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = no # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -# AUDIO_ENABLE = no # Audio output on port C6 -# UNICODE_ENABLE = no # Unicode -# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/thevankeyboards/bananasplit/rules.mk b/keyboards/thevankeyboards/bananasplit/rules.mk index 81570c493a..19f0e81f51 100644 --- a/keyboards/thevankeyboards/bananasplit/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -59,7 +23,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA BACKLIGHT_ENABLE = yes - # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax diff --git a/keyboards/thevankeyboards/caravan/caravan.c b/keyboards/thevankeyboards/caravan/caravan.c new file mode 100644 index 0000000000..c4fa14f0c1 --- /dev/null +++ b/keyboards/thevankeyboards/caravan/caravan.c @@ -0,0 +1 @@ +#include "caravan.h" diff --git a/keyboards/thevankeyboards/caravan/caravan.h b/keyboards/thevankeyboards/caravan/caravan.h new file mode 100644 index 0000000000..43bd846ab6 --- /dev/null +++ b/keyboards/thevankeyboards/caravan/caravan.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K37, K38, K39, K3B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, KC_NO, KC_NO, KC_NO, K37, K38, K39, KC_NO, K3B } \ +} diff --git a/keyboards/thevankeyboards/caravan/config.h b/keyboards/thevankeyboards/caravan/config.h new file mode 100644 index 0000000000..690666e16e --- /dev/null +++ b/keyboards/thevankeyboards/caravan/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEAE +#define PRODUCT_ID 0x8844 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheVan Keyboards +#define PRODUCT Caravan +#define DESCRIPTION QMK keyboard firmware for Caravan + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define MATRIX_COL_PINS { F1, F4, F5, B4, B5, B6, B7, D2, D3, D5, D4, D6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/thevankeyboards/caravan/info.json b/keyboards/thevankeyboards/caravan/info.json new file mode 100644 index 0000000000..51b016d807 --- /dev/null +++ b/keyboards/thevankeyboards/caravan/info.json @@ -0,0 +1,57 @@ +{ + "keyboard_name": "TheVanKeyboards Caravan", + "url": "", + "maintainer": "qmk", + "width": 13.75, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":7, "y":0}, + {"label":"K07", "x":8, "y":0}, + {"label":"K08", "x":9, "y":0}, + {"label":"K09", "x":10, "y":0}, + {"label":"K0A", "x":11, "y":0}, + {"label":"K0B", "x":12, "y":0, "w":1.75}, + {"label":"K10", "x":0, "y":1, "w":1.25}, + {"label":"K11", "x":1.25, "y":1}, + {"label":"K12", "x":2.25, "y":1}, + {"label":"K13", "x":3.25, "y":1}, + {"label":"K14", "x":4.25, "y":1}, + {"label":"K15", "x":5.25, "y":1}, + {"label":"K16", "x":7.25, "y":1}, + {"label":"K17", "x":8.25, "y":1}, + {"label":"K18", "x":9.25, "y":1}, + {"label":"K19", "x":10.25, "y":1}, + {"label":"K1A", "x":11.25, "y":1}, + {"label":"K1B", "x":12.25, "y":1, "w":1.5}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K21", "x":1.75, "y":2}, + {"label":"K22", "x":2.75, "y":2}, + {"label":"K23", "x":3.75, "y":2}, + {"label":"K24", "x":4.75, "y":2}, + {"label":"K25", "x":5.75, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K27", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K2A", "x":11.75, "y":2}, + {"label":"K2B", "x":12.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.25}, + {"label":"K31", "x":1.25, "y":3, "w":1.5}, + {"label":"K32", "x":2.75, "y":3, "w":1.25}, + {"label":"K33", "x":4, "y":3, "w":2.25}, + {"label":"K37", "x":7.25, "y":3, "w":2}, + {"label":"K38", "x":9.25, "y":3, "w":1.25}, + {"label":"K39", "x":10.5, "y":3, "w":1.5}, + {"label":"K3B", "x":12, "y":3, "w":1.75} + ] + } + } +} diff --git a/keyboards/thevankeyboards/caravan/keymaps/default/config.h b/keyboards/thevankeyboards/caravan/keymaps/default/config.h new file mode 100644 index 0000000000..6f70f09bee --- /dev/null +++ b/keyboards/thevankeyboards/caravan/keymaps/default/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/thevankeyboards/caravan/keymaps/default/keymap.c b/keyboards/thevankeyboards/caravan/keymaps/default/keymap.c new file mode 100644 index 0000000000..6ca59067d9 --- /dev/null +++ b/keyboards/thevankeyboards/caravan/keymaps/default/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Qwerty */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, KC_RCTL + ) +}; diff --git a/keyboards/thevankeyboards/caravan/keymaps/default/readme.md b/keyboards/thevankeyboards/caravan/keymaps/default/readme.md new file mode 100644 index 0000000000..2e3e33c9aa --- /dev/null +++ b/keyboards/thevankeyboards/caravan/keymaps/default/readme.md @@ -0,0 +1 @@ +# Default Caravan Layout diff --git a/keyboards/thevankeyboards/caravan/readme.md b/keyboards/thevankeyboards/caravan/readme.md new file mode 100644 index 0000000000..ef98a51ced --- /dev/null +++ b/keyboards/thevankeyboards/caravan/readme.md @@ -0,0 +1,15 @@ +# Caravan + +![Caravan](https://i.imgur.com/psOWk3I.jpg) + +A compact split 44% keyboard. + +Keyboard Maintainer: QMK Community +Hardware Supported: Caravan PCB +Hardware Availability: N/A + +Make example for this keyboard (after setting up your build environment): + + make thevankeyboards/caravan: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). diff --git a/keyboards/thevankeyboards/caravan/rules.mk b/keyboards/thevankeyboards/caravan/rules.mk new file mode 100644 index 0000000000..f21c31f6fd --- /dev/null +++ b/keyboards/thevankeyboards/caravan/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/thevankeyboards/minivan/config.h b/keyboards/thevankeyboards/minivan/config.h index 22fb377629..7bc8192ed3 100644 --- a/keyboards/thevankeyboards/minivan/config.h +++ b/keyboards/thevankeyboards/minivan/config.h @@ -66,91 +66,9 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +/* RGB Setup */ +#define RGB_DI_PIN D0 +#define RGBLED_NUM 3 +#define RGBLIGHT_SLEEP #endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/danbee/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/danbee/keymap.c new file mode 100644 index 0000000000..b675b09b4f --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/danbee/keymap.c @@ -0,0 +1,62 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _L1, + _L2, +}; + +#define CTL_TAB LCTL_T(KC_TAB) +#define L2_QUOT LT(_L2, KC_QUOT) +#define SFT_GRV LSFT_T(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐ + │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Bcksp│ + ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬─────┤ + │Ctrl│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ Fn 2│ + ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shf│ + ├────┬─┴───┼───┴┬──┴───┴─┬─┴───┴─┬─┴──┬┴───┴┬──┴───┤ + │Fn │ Alt│ Cmd│ Return │ Space │Cmd │Hyper│ Ctrl│ + └────┴─────┴────┴────────┴───────┴────┴─────┴──────┘*/ + [_QW] = LAYOUT( /* Qwerty */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, L2_QUOT, + SFT_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_L1), KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, KC_HYPR, KC_RCTL + ), + /* 1: fn */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐ + │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ Del│ + ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬─────┤ + │ │ │ │ │ │ │ ◀ │ ▼ │ ▲ │ ▶ │ │ │ + ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + │ │ │ │ │ │ │ │ │ [ │ ] │ \ │ │ + ├────┬─┴───┼───┴┬──┴───┴─┬─┴───┴─┬─┴──┬┴───┴┬──┴───┤ + │ │ │ │ │ │ │ │ │ + └────┴─────┴────┴────────┴───────┴────┴─────┴──────┘*/ + [_L1] = LAYOUT( /* LAYER 1 */ + 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* 2: fn 2 */ + /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐ + │ § │Br-│Br+│ │ │ │ │ │ │ - │ = │ Eject│ + ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬─────┤ + │ │ │ │ │ │ │Hom│PgD│PgU│End│Ins│ │ + ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + │ │ │ │ │ │Prv│Nxt│Mut│Vo-│Vo+│ │ │ + ├────┬─┴───┼───┴┬──┴───┴─┬─┴───┴─┬─┴──┬┴───┴┬──┴───┤ + │ │ │ │ │ Pause │ │ │ │ + └────┴─────┴────┴────────┴───────┴────┴─────┴──────┘*/ + [_L2] = LAYOUT( /* LAYER 2 */ + KC_NUBS, KC_BRID, KC_BRIU, _______, RESET, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_EJCT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, + _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, _______, _______, KC_MPLY, _______, _______, _______ + ), +}; diff --git a/keyboards/thevankeyboards/minivan/keymaps/danbee/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/danbee/rules.mk new file mode 100644 index 0000000000..b1434f75c8 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/danbee/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = no +KEYBOARD_LOCK_ENABLE = yes diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c index bc6c213f05..fec08cea3e 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -14,16 +13,17 @@ extern keymap_config_t keymap_config; #define _L2 4 #define _L3 5 -// Macro name shortcuts -#define QWERTY M(_QW) -#define DVORAK M(_DV) -#define COLEMAK M(_CM) - // Curly braces have their own keys. These are defined to make them not mess up // the grid in layer 2. #define L_CURBR LSFT(KC_LBRC) #define R_CURBR LSFT(KC_RBRC) +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT( /* Qwerty */ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, @@ -68,24 +68,25 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case _DV: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case DVORAK: if (record->event.pressed) { persistent_default_layer_set(1UL<<_DV); } - break; - case _QW: + return false; + case QWERTY: if (record->event.pressed) { persistent_default_layer_set(1UL<<_QW); } - break; - case _CM: + return false; + case COLEMAK: if (record->event.pressed) { persistent_default_layer_set(1UL<<_CM); } - break; + return false; + default: + return true; } - return MACRO_NONE; + return true; }; diff --git a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/config.h b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/config.h index 5f5872becc..426b76b3b1 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/config.h @@ -1,7 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define PERMISSIVE_HOLD -#endif +#define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c index 4c045ac0a5..f9bb64e05f 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c @@ -11,13 +11,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_arrow_command( /* LAYER 2 */ 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_TRNS, KC_MINS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_QUOT, KC_TRNS, + KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_QUOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_PGUP, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), [2] = LAYOUT_arrow_command( /* LAYER 1 */ 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_TRNS, KC_UNDS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_DQUO, KC_TRNS, + KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_DQUO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PGUP, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), @@ -30,7 +30,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [4] = LAYOUT_arrow_command( /* Gaming Layer*/ KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(5, KC_SLSH), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [5] = LAYOUT_arrow_command( /* RESET Layer*/ + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + // Set up RGB effects on _only_ the third LED (index 2) + rgblight_set_effect_range(2, 1); + // Set LED effects to breathing mode in a tealish blue color + rgblight_sethsv_noeeprom(185, 255, 255); + rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2); + + // Init the first two LEDs to a static color + setrgb(0, 0, 0, (LED_TYPE *)&led[0]); + setrgb(0, 0, 0, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif //RGBLIGHT_ENABLE +} + +uint32_t layer_state_set_user(uint32_t state){ + #ifdef RGBLIGHT_ENABLE + uint8_t led0r = 0; uint8_t led0g = 0; uint8_t led0b = 0; + uint8_t led1r = 0; uint8_t led1g = 0; uint8_t led1b = 0; + + if (layer_state_cmp(state, 1)) { + led0r = 255; + } + if (layer_state_cmp(state, 2)) { + led0g = 255; + } + + if (layer_state_cmp(state, 4)) { + led1b = 255; + } + if (layer_state_cmp(state, 5)) { + led1r = 255; + } + + setrgb(led0r, led0g, led0b, (LED_TYPE *)&led[0]); + setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif //RGBLIGHT_ENABLE + return state; +} diff --git a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/rules.mk index d7ca73ac58..4a27701076 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/rules.mk @@ -13,5 +13,5 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/config.h b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/config.h new file mode 100644 index 0000000000..271f48d001 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/keymap.c new file mode 100644 index 0000000000..fec08cea3e --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _QW 0 +#define _DV 1 +#define _CM 2 +#define _L1 3 +#define _L2 4 +#define _L3 5 + +// Curly braces have their own keys. These are defined to make them not mess up +// the grid in layer 2. +#define L_CURBR LSFT(KC_LBRC) +#define R_CURBR LSFT(KC_RBRC) + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* Qwerty */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_DV] = LAYOUT( /* Dvorak */ + KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1), + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_CM] = LAYOUT( /* Colemak */ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_L1] = LAYOUT( /* LAYER 1 */ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______, + _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT, + _______, KC_LGUI, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT( /* LAYER 2 */ + _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, L_CURBR, R_CURBR, KC_4, KC_5, KC_6, KC_VOLU, KC_ENT, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT( /* LAYER 3 */ + _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______ + ) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DV); + } + return false; + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QW); + } + return false; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_CM); + } + return false; + default: + return true; + } + return true; +}; diff --git a/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/readme.md b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/readme.md new file mode 100644 index 0000000000..3584c8b23f --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/readme.md @@ -0,0 +1 @@ +# mikethetiger's keymap for tv44 \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/rules.mk similarity index 100% rename from keyboards/thevankeyboards/minivan/keymaps/default/rules.mk rename to keyboards/thevankeyboards/minivan/keymaps/mikethetiger/rules.mk diff --git a/keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c new file mode 100644 index 0000000000..a465da3bdf --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * |GESC| Q | W | F | P | G | J | L | U | Y | ; | BSPC | + * | TAB | A | R | S | T | D | H | N | E | I | O | ' | + * |SHIFT | Z | X | C | V | B | K | M | , | UP | . | / | + * |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY| + */ + + [_BASE] = LAYOUT_arrow_wrapper( + __________________MINIVAN1_________________, + __________________MINIVAN2_________________, + __________________MINIVAN3_________________, + __________________MINIVAN4_________________ + ), + + /* + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | DEL | + * | | | | | | | | _ | + | { | } | PIPE| + * |SHIFT | | | | | | | |PGDN| UP | ? | / | + * |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY| + */ + + [_LOWER] = LAYOUT_arrow_wrapper( + _________________LOWER_1___________________, + _________________LOWER_2___________________, + __________________MININUM3_________________, + __________________MININUM4_________________ + ), + + /* + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | + * | INS | | | | | | | - | = | [ | ] | \ | + * | | | | | | | | | | | / | | + * |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY| + */ + + [_RAISE] = LAYOUT_arrow_wrapper( + ___________________RAISE1__________________, + ___________________RAISE2__________________, + ___________________RVAN_3__________________, + ___________________RVAN_4__________________ + ), + + /* + * |REST|EERS| | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | ENTR | SPACE | | | | | + */ + + [_ADJUST] = LAYOUT_arrow_wrapper( + ___________________ADJST1__________________, + ___________________ADJST2__________________, + ___________________ADJVAN3_________________, + ___________________ADJVAN4_________________ + ), + + /* + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| | + * | | | | | | | | | |F11 | F12| | + * | | | | | | | | | | | | | + * | | | | | | FKEY | | | | + */ + + [_FKEY] = LAYOUT_arrow_wrapper( + ___________________FKEY1___________________, + ___________________FKEY2___________________, + ___________________FVAN_3__________________, + ___________________FVAN_4__________________ + ), + }; diff --git a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c index 0c97954494..6f7167cbbe 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c @@ -112,10 +112,10 @@ XXXXXXX,_______,_______, _______,_______, KC_END, KC_LEFT, * `--------------------------------------------------------------------------' */ [_WINDOW_SHORTCUT] = LAYOUT_arrow( -KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX,S(KC_CAPS) ,XXXXXXX ,KC_PGUP,KC_UP ,KC_PGDN ,KC_PSCR,KC_DELT, +KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX,S(KC_CAPS) ,XXXXXXX ,KC_PGUP,KC_UP ,KC_PGDN ,KC_PSCR,KC_DEL, _______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT),XXXXXXX,LALT(KC_CAPS) ,KC_CAPS ,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX, _______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX,LCTL(KC_CAPS) ,KC_SLCK ,KC_HOME,XXXXXXX,KC_END ,XXXXXXX,KC_RCTL, -_______,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)), LCTL(LALT(KC_DELT)),LGUI(LCTL(KC_F4)), MOUSE ,XXXXXXX ,XXXXXXX,BACKLIT +_______,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)), LCTL(LALT(KC_DEL)) ,LGUI(LCTL(KC_F4)), MOUSE ,XXXXXXX ,XXXXXXX,BACKLIT ), /* Mac Shortcut * ,--------------------------------------------------------------------------. @@ -129,7 +129,7 @@ _______,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)), LCTL(LAL * `--------------------------------------------------------------------------' */ [_MAC_SHORTCUT] = LAYOUT_arrow( -KC_ESC ,LGUI(KC_UP) ,LGUI(KC_DOWN) ,XXXXXXX ,XXXXXXX,XXXXXXX ,XXXXXXX ,KC_PGUP,KC_UP ,KC_PGDN ,KC_PSCR,KC_DELT, +KC_ESC ,LGUI(KC_UP) ,LGUI(KC_DOWN) ,XXXXXXX ,XXXXXXX,XXXXXXX ,XXXXXXX ,KC_PGUP,KC_UP ,KC_PGDN ,KC_PSCR,KC_DEL, _______,LALT(LSFT(KC_LEFT)) ,LALT(LSFT(KC_RIGHT)) ,XXXXXXX,LGUI(LCTL(KC_F)),XXXXXXX ,KC_CAPS ,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX, _______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX,XXXXXXX ,XXXXXXX ,KC_HOME,XXXXXXX,KC_END ,XXXXXXX,KC_RCTL, _______,_______,_______, _______,_______, MOUSE ,XXXXXXX ,XXXXXXX,BACKLIT diff --git a/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c index 059b7eb46e..f5649573d8 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c @@ -1,24 +1,8 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -enum planck_layers { - _QWERTY, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _ADJUST -}; - -enum planck_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - LOWER, - RAISE, - ADJUST -}; +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; // Aliases for some other things I want to try out #define RAI_ESC LT(_RAISE, KC_ESC) @@ -26,6 +10,7 @@ enum planck_keycodes { #define LOW_MIN LT(_LOWER, KC_MINS) // Same as above, but for Dvorak layer #define GUIBSPC GUI_T(KC_BSPC) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT( /* 0: Dvorak */ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, @@ -69,52 +54,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_END, _______, _______, _______, _______, KC_PGUP, KC_PGDN ) }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } - return true; -} + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/minivan.c b/keyboards/thevankeyboards/minivan/minivan.c index b260195cec..19996f9208 100644 --- a/keyboards/thevankeyboards/minivan/minivan.c +++ b/keyboards/thevankeyboards/minivan/minivan.c @@ -1,28 +1 @@ #include "minivan.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} diff --git a/keyboards/thevankeyboards/minivan/rules.mk b/keyboards/thevankeyboards/minivan/rules.mk index 786c9dc3e7..3a2b8ae584 100644 --- a/keyboards/thevankeyboards/minivan/rules.mk +++ b/keyboards/thevankeyboards/minivan/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -56,7 +17,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c index 7aa7bcafb2..9c045d7451 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -9,8 +8,9 @@ extern keymap_config_t keymap_config; #define _NP 0 -// Macro name shortcuts -#define NUMPAD M(_NP) +enum custom_keycodes { + NUMPAD = SAFE_RANGE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NP] = LAYOUT_numpad_4x4( /* Numpad */ @@ -26,14 +26,15 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case _NP: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case NUMPAD: if (record->event.pressed) { persistent_default_layer_set(1UL<<_NP); } - break; + return false; + default: + return true; } - return MACRO_NONE; + return true; }; diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk deleted file mode 100644 index 7a331cd530..0000000000 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/thevankeyboards/roadkit/rules.mk b/keyboards/thevankeyboards/roadkit/rules.mk index d15a5541bb..79cbec757f 100644 --- a/keyboards/thevankeyboards/roadkit/rules.mk +++ b/keyboards/thevankeyboards/roadkit/rules.mk @@ -1,54 +1,15 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -56,7 +17,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc1800/rules.mk index 35da90d076..21e3697dc6 100644 --- a/keyboards/tkc1800/rules.mk +++ b/keyboards/tkc1800/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=8192 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/tmo50/keymaps/ottodokto/config.h b/keyboards/tmo50/keymaps/ottodokto/config.h new file mode 100644 index 0000000000..7dcbc74ef7 --- /dev/null +++ b/keyboards/tmo50/keymaps/ottodokto/config.h @@ -0,0 +1,10 @@ +/*---RGB settings-------------------------------------------- */ +#undef RGBLIGHT_HUE_STEP +#undef RGBLIGHT_SAT_STEP +#undef RGBLIGHT_VAL_STEP +#undef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL + +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 200 \ No newline at end of file diff --git a/keyboards/tmo50/keymaps/ottodokto/keymap.c b/keyboards/tmo50/keymaps/ottodokto/keymap.c new file mode 100644 index 0000000000..688395c9d9 --- /dev/null +++ b/keyboards/tmo50/keymaps/ottodokto/keymap.c @@ -0,0 +1,47 @@ +#include QMK_KEYBOARD_H + + +/*---default defines-------------------------------------------- */ +#define LT1_SPC LT(1, KC_SPC) +#define LT2_SPC LT(2, KC_SPC) + + +#define RGB_STA RGB_M_P // rgb static +#define RGB_BRE RGB_M_B // rgb breathe +#define RGB_RAI RGB_M_R // rgb rainbow +#define RGB_SWI RGB_M_SW // rgb swirl +#define RGB_SNA RGB_M_SN // rgb snake9 +#define RGB_KNI RGB_M_K // rgb knight +#define RGB_GRA RGB_M_G // rgb gradient + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer + [0] = LAYOUT_all( + KC_VOLU, 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_BSPC, + KC_VOLD, MT(MOD_LCTL, 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_ENT, + KC_MUTE, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_RSFT, + KC_MPLY, KC_LGUI, KC_LALT, LT2_SPC, LT1_SPC, KC_RALT, MO(3) + ), + // Numerals layer + [1] = LAYOUT_all( + KC_BRIU, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, + KC_BRID, KC_CAPS, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, _______, _______, + RGB_RMOD, _______, _______, _______, _______, _______, _______ + ), + // FN & Navigation layer + [2] = LAYOUT_all( + KC_PGUP, _______, KC_END, KC_UP, KC_HOME, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, + KC_PGDN, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, + KC_PSCR, _______, _______, _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + KC_RGUI, _______, _______, _______, _______, _______, _______ + ), + // RGB Control Layer + [3] = LAYOUT_all( + RGB_SPI, RGB_TOG, RGB_HUD, RGB_VAI, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + RGB_SPD, _______, RGB_SAD, RGB_VAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_STA, RGB_BRE, RGB_RAI, RGB_SWI, RGB_SNA, RGB_KNI, RGB_GRA, VLK_TOG, _______, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/tmo50/keymaps/ottodokto/rules.mk b/keyboards/tmo50/keymaps/ottodokto/rules.mk new file mode 100644 index 0000000000..43d2ebb17a --- /dev/null +++ b/keyboards/tmo50/keymaps/ottodokto/rules.mk @@ -0,0 +1 @@ +VELOCIKEY_ENABLE = yes # Enable velocikey. diff --git a/keyboards/tmo50/keymaps/xerpocalypse/keymap.c b/keyboards/tmo50/keymaps/xerpocalypse/keymap.c new file mode 100644 index 0000000000..ca93f9aa88 --- /dev/null +++ b/keyboards/tmo50/keymaps/xerpocalypse/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2019 funderburker + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define LT1_SPC LT(1, KC_SPC) +#define LT2_SPC LT(2, KC_BSPC) +#define TSKMNGR C(S(KC_ESC)) +#define ALT_TAB A(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_TRNS, 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_BSPC, + KC_TRNS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_TRNS, KC_LGUI, KC_LALT, LT1_SPC, LT2_SPC, KC_RALT, KC_RCTL + ), + + // Fn1 layer + [1] = LAYOUT_all( + KC_GRV, 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, + C(KC_C), KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_TRNS, + C(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + C(KC_X), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 layer + [2] = LAYOUT_all( + ALT_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + TSKMNGR, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn3 layer + [3] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/tmo50/rules.mk b/keyboards/tmo50/rules.mk index b773031d54..84abd20e6e 100644 --- a/keyboards/tmo50/rules.mk +++ b/keyboards/tmo50/rules.mk @@ -1,44 +1,14 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/toad/rules.mk b/keyboards/toad/rules.mk index ee87c6e8d4..df45fa5df0 100644 --- a/keyboards/toad/rules.mk +++ b/keyboards/toad/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/tokyo60/rules.mk b/keyboards/tokyo60/rules.mk index 45f0013c16..644e6a5412 100644 --- a/keyboards/tokyo60/rules.mk +++ b/keyboards/tokyo60/rules.mk @@ -1,58 +1,14 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/touchpad/rules.mk b/keyboards/touchpad/rules.mk index e4fa2ac133..21642c3d28 100644 --- a/keyboards/touchpad/rules.mk +++ b/keyboards/touchpad/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -SRC = matrix.c i2c_master.c - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -65,3 +32,5 @@ CUSTOM_MATRIX = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SRC += matrix.c i2c_master.c diff --git a/keyboards/treadstone32/keymaps/default/keymap.c b/keyboards/treadstone32/keymaps/default/keymap.c index a7b908c9de..b49e55f27c 100644 --- a/keyboards/treadstone32/keymaps/default/keymap.c +++ b/keyboards/treadstone32/keymaps/default/keymap.c @@ -1,7 +1,6 @@ #include QMK_KEYBOARD_H #include "keymap_jp.h" -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/treadstone32/keymaps/default/rules.mk b/keyboards/treadstone32/keymaps/default/rules.mk index 8c4541fa19..5ca4c52586 100644 --- a/keyboards/treadstone32/keymaps/default/rules.mk +++ b/keyboards/treadstone32/keymaps/default/rules.mk @@ -1,10 +1,7 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -TAP_DANCE_ENABLE = no - # If your custom treadstone32 pcb, you can rewrite to yes. RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations @@ -20,6 +17,3 @@ endif ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) OPT_DEFS += -DIOS_DEVICE_ENABLE endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/treadstone32/rules.mk b/keyboards/treadstone32/rules.mk index 1d37dfc69f..dbc46b403c 100644 --- a/keyboards/treadstone32/rules.mk +++ b/keyboards/treadstone32/rules.mk @@ -1,50 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change yes to no to disable # @@ -61,4 +27,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. LEADER_ENABLE = no - diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c index 406f112921..6143307528 100644 --- a/keyboards/treadstone48/keymaps/default/keymap.c +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -2,7 +2,6 @@ #include "keymap_jp.h" #include "../common/oled_helper.h" -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk index c53226431d..38ef4cc9fe 100644 --- a/keyboards/treadstone48/keymaps/default/rules.mk +++ b/keyboards/treadstone48/keymaps/default/rules.mk @@ -1,21 +1,3 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SWAP_HANDS_ENABLE = no # Enable one-hand typing TAP_DANCE_ENABLE = yes # If your custom treadstone48 pcb, you can rewrite to yes. diff --git a/keyboards/treadstone48/pro_micro.h b/keyboards/treadstone48/pro_micro.h deleted file mode 100644 index f9e7ed75d9..0000000000 --- a/keyboards/treadstone48/pro_micro.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ - -#ifndef Pins_Arduino_h -#define Pins_Arduino_h - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* Pins_Arduino_h */ diff --git a/keyboards/treadstone48/rev1/rev1.h b/keyboards/treadstone48/rev1/rev1.h index c6145398dd..16ab2d716e 100644 --- a/keyboards/treadstone48/rev1/rev1.h +++ b/keyboards/treadstone48/rev1/rev1.h @@ -3,7 +3,6 @@ #include "../treadstone48.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk index 6ddbdaf80e..fd3c6df570 100644 --- a/keyboards/treadstone48/rules.mk +++ b/keyboards/treadstone48/rules.mk @@ -1,52 +1,16 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -71,3 +35,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes DEFAULT_FOLDER = treadstone48/rev1 + +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c diff --git a/keyboards/treadstone48/serial.c b/keyboards/treadstone48/serial.c index 6006ebf1bd..674c42d593 100644 --- a/keyboards/treadstone48/serial.c +++ b/keyboards/treadstone48/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/treasure/type9/rules.mk b/keyboards/treasure/type9/rules.mk index 599974d25a..370c683a54 100644 --- a/keyboards/treasure/type9/rules.mk +++ b/keyboards/treasure/type9/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ua62/config.h b/keyboards/ua62/config.h new file mode 100644 index 0000000000..a6590d3685 --- /dev/null +++ b/keyboards/ua62/config.h @@ -0,0 +1,250 @@ +/* +Copyright 2019 NaCly + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xBEEF +#define PRODUCT_ID 0xFFFF +#define DEVICE_VER 0x0001 +#define MANUFACTURER NaCly +#define PRODUCT UA62 +#define DESCRIPTION A Keyboard Used for Input. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define TAPPING_TERM 200 +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ua62/info.json b/keyboards/ua62/info.json new file mode 100644 index 0000000000..f50ec854ff --- /dev/null +++ b/keyboards/ua62/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ua62", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5.7, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.6}, {"x":2, "y":0.35}, {"x":3, "y":0}, {"x":4, "y":0.35}, {"x":5, "y":0.7}, {"x":9, "y":0.7}, {"x":10, "y":0.35}, {"x":11, "y":0}, {"x":12, "y":0.35}, {"x":13, "y":0.6}, {"x":14, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.6}, {"x":2, "y":1.35}, {"x":3, "y":1}, {"x":4, "y":1.35}, {"x":5, "y":1.7}, {"x":9, "y":1.7}, {"x":10, "y":1.35}, {"x":11, "y":1}, {"x":12, "y":1.35}, {"x":13, "y":1.6}, {"x":14, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.6}, {"x":2, "y":2.35}, {"x":3, "y":2}, {"x":4, "y":2.35}, {"x":5, "y":2.7}, {"x":9, "y":2.7}, {"x":10, "y":2.35}, {"x":11, "y":2}, {"x":12, "y":2.35}, {"x":13, "y":2.6}, {"x":14, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.6}, {"x":2, "y":3.35}, {"x":3, "y":3}, {"x":4, "y":3.35}, {"x":5, "y":3.7}, {"x":9, "y":3.7}, {"x":10, "y":3.35}, {"x":11, "y":3}, {"x":12, "y":3.35}, {"x":13, "y":3.6}, {"x":14, "y":3.6}, {"x":0, "y":4.6}, {"x":1, "y":4.6}, {"x":2, "y":4.35}, {"x":3, "y":4}, {"x":4, "y":4.35}, {"x":5, "y":4.7}, {"x":6, "y":3.95, "h":1.5}, {"x":8, "y":3.95, "h":1.5}, {"x":9, "y":4.7}, {"x":10, "y":4.35}, {"x":11, "y":4}, {"x":12, "y":4.35}, {"x":13, "y":4.6}, {"x":14, "y":4.6}] + } + } + } diff --git a/keyboards/ua62/keymaps/default/keymap.c b/keyboards/ua62/keymaps/default/keymap.c new file mode 100644 index 0000000000..5488fdfdc1 --- /dev/null +++ b/keyboards/ua62/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 NaCly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTRL, KC_A, KC_S, KC_D, LT(1, KC_F), KC_G, KC_H, LT(2, 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_RSFT, + KC_LCTRL, KC_LGUI, KC_LALT, KC_GRV, KC_EQL, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LBRC, KC_RBRC, KC_HOME, KC_END, KC_ESC + ), + //Holding F + [1] = LAYOUT( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTRL, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, + KC_LCTRL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + //Holding J + [2] = LAYOUT( + KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTRL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + diff --git a/keyboards/ua62/readme.md b/keyboards/ua62/readme.md new file mode 100644 index 0000000000..62523e2146 --- /dev/null +++ b/keyboards/ua62/readme.md @@ -0,0 +1,14 @@ +# UA62 + +* A Universal pcb for the atreus62 +* atreus62 by profet23 +* Original atreus by Phil Hagelberg +* Keyboard Maintainer: [NaCly](https://github.com/na-cly) +* Hardware Supported: UA62 PCB +* Hardware Availability: https://github.com/na-cly/UA62 (Order PCBS) + +Make example for this keyboard (after setting up your build environment): + + make ua62: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). diff --git a/keyboards/ua62/rules.mk b/keyboards/ua62/rules.mk new file mode 100644 index 0000000000..eaca3310b0 --- /dev/null +++ b/keyboards/ua62/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ua62/ua62.c b/keyboards/ua62/ua62.c new file mode 100644 index 0000000000..cac45f3fbf --- /dev/null +++ b/keyboards/ua62/ua62.c @@ -0,0 +1,17 @@ +/* Copyright 2019 NaCly + * + * 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 . + */ +#include "ua62.h" + diff --git a/keyboards/ua62/ua62.h b/keyboards/ua62/ua62.h new file mode 100644 index 0000000000..4509bbff3d --- /dev/null +++ b/keyboards/ua62/ua62.h @@ -0,0 +1,41 @@ +/* Copyright 2019 NaCly + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k47, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, k46, k48, k49, k4a, k4b, k4c, k4d }, \ +} diff --git a/keyboards/uk78/rules.mk b/keyboards/uk78/rules.mk index 5c2691823f..ddd799c08e 100644 --- a/keyboards/uk78/rules.mk +++ b/keyboards/uk78/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=8192 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= yes \ No newline at end of file +RGBLIGHT_ENABLE ?= yes diff --git a/keyboards/unikorn/config.h b/keyboards/unikorn/config.h index 161956b88e..1c4f3431a0 100644 --- a/keyboards/unikorn/config.h +++ b/keyboards/unikorn/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 #define MANUFACTURER Singa and TGR #define PRODUCT Unikorn 60 @@ -35,7 +36,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #ifdef RGBLIGHT_ENABLE #define RGBLED_NUM 17 diff --git a/keyboards/unikorn/info.json b/keyboards/unikorn/info.json index 9c82e25b47..71088d2047 100644 --- a/keyboards/unikorn/info.json +++ b/keyboards/unikorn/info.json @@ -11,6 +11,10 @@ "LAYOUT_60_ansi": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_tsangan_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] } } } \ No newline at end of file diff --git a/keyboards/unikorn/keymaps/default/keymap.c b/keyboards/unikorn/keymaps/default/keymap.c index d19d83c8ab..3e73036253 100644 --- a/keyboards/unikorn/keymaps/default/keymap.c +++ b/keyboards/unikorn/keymaps/default/keymap.c @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi( - KC_GRV, KC_Q, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, diff --git a/keyboards/unikorn/keymaps/default/readme.md b/keyboards/unikorn/keymaps/default/readme.md deleted file mode 100644 index 1f19a96b46..0000000000 --- a/keyboards/unikorn/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for singa \ No newline at end of file diff --git a/keyboards/unikorn/keymaps/tsangan/keymap.c b/keyboards/unikorn/keymaps/tsangan/keymap.c new file mode 100644 index 0000000000..4c86d4f02e --- /dev/null +++ b/keyboards/unikorn/keymaps/tsangan/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_tsangan_hhkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_60_tsangan_hhkb( + KC_TRNS, 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_DEL, KC_DEL, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/unikorn/readme.md b/keyboards/unikorn/readme.md index 953d5be792..1f8b16d649 100644 --- a/keyboards/unikorn/readme.md +++ b/keyboards/unikorn/readme.md @@ -18,7 +18,6 @@ To enable RGB lighting support, install the necessary components and set RGBLIGH ``` RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes ``` @@ -26,7 +25,11 @@ Flashing ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. -**Reset Key:** Short the two holes labeled `FW_JP` beside the Tab key. At this time there is no reset key to press. +**Reset Key:** Short the two holes labeled `FW_JP` underneath the PCB, beside the Tab key while plugging in the keyboard. + +Do not confuse this with the LED holes of the switch in the `Tab` position. `FW_JP` is not reachable from the top as the plate blocks access to it. + +It is recommended to program a `RESET` key in your keymap. Windows: 1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). diff --git a/keyboards/unikorn/rules.mk b/keyboards/unikorn/rules.mk index 7d6fa14e1e..e57c21c856 100644 --- a/keyboards/unikorn/rules.mk +++ b/keyboards/unikorn/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,11 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = no +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC = i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/unikorn/unikorn.c b/keyboards/unikorn/unikorn.c index 1bd47ef9e1..70bc5a988f 100644 --- a/keyboards/unikorn/unikorn.c +++ b/keyboards/unikorn/unikorn.c @@ -14,49 +14,7 @@ * along with this program. If not, see . */ -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "unikorn.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -73,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/unikorn/unikorn.h b/keyboards/unikorn/unikorn.h index 6824492e04..2666bf066e 100644 --- a/keyboards/unikorn/unikorn.h +++ b/keyboards/unikorn/unikorn.h @@ -50,3 +50,17 @@ { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, k48, k49, KC_NO, k4B, KC_NO, k4D, KC_NO }, \ } +#define LAYOUT_60_tsangan_hhkb( \ + 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, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k45, k48, k49, k4A \ +){ \ + { 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, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} + diff --git a/keyboards/unikorn/usbconfig.h b/keyboards/unikorn/usbconfig.h index 41ce167a87..3dcd1ccde7 100644 --- a/keyboards/unikorn/usbconfig.h +++ b/keyboards/unikorn/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 's', 'i', 'n', 'g', 'a', 't', 'g', 'r' diff --git a/keyboards/ut472/keymaps/annihilator6000/UT472_Annihilator6000_Configurator_file.json b/keyboards/ut472/keymaps/annihilator6000/UT472_Annihilator6000_Configurator_file.json new file mode 100755 index 0000000000..45569d5588 --- /dev/null +++ b/keyboards/ut472/keymaps/annihilator6000/UT472_Annihilator6000_Configurator_file.json @@ -0,0 +1 @@ +{"keyboard":"ut472","keymap":"ut472_layout_switching","layout":"LAYOUT","layers":[["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSPC","LT(3,KC_TAB)","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_SFTENT","KC_LCTL","KC_LALT","KC_LGUI","KC_APP","MO(2)","KC_SPC","MO(1)","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT"],["KC_ESC","KC_Q","KC_D","KC_R","KC_W","KC_B","KC_J","KC_F","KC_U","KC_P","KC_SCLN","KC_BSPC","LT(3,KC_TAB)","KC_A","KC_S","KC_H","KC_T","KC_G","KC_Y","KC_N","KC_E","KC_O","KC_I","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_M","KC_C","KC_V","KC_K","KC_L","KC_COMM","KC_DOT","KC_SLSH","KC_SFTENT","KC_LCTL","KC_LALT","KC_LGUI","KC_APP","MO(2)","KC_SPC","MO(1)","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT"],["KC_ESC","KC_Q","KC_W","KC_F","KC_P","KC_G","KC_J","KC_L","KC_U","KC_Y","KC_SCLN","KC_BSPC","LT(3,KC_TAB)","KC_A","KC_R","KC_S","KC_T","KC_D","KC_H","KC_N","KC_E","KC_I","KC_O","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_K","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_SFTENT","KC_LCTL","KC_LALT","KC_LGUI","KC_APP","MO(2)","KC_SPC","MO(1)","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT"],["KC_ESC","KC_Q","KC_W","KC_F","KC_P","KC_B","KC_J","KC_L","KC_U","KC_Y","KC_SCLN","KC_BSPC","LT(3,KC_TAB)","KC_A","KC_R","KC_S","KC_T","KC_G","KC_K","KC_N","KC_E","KC_I","KC_O","KC_QUOT","KC_LSFT","KC_X","KC_C","KC_D","KC_V","KC_Z","KC_M","KC_H","KC_COMM","KC_DOT","KC_SLSH","KC_SFTENT","KC_LCTL","KC_LALT","KC_LGUI","KC_APP","MO(2)","KC_SPC","MO(1)","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT"],["KC_ESC","KC_QUOT","KC_COMM","KC_DOT","KC_P","KC_Y","KC_F","KC_G","KC_C","KC_R","KC_L","KC_BSPC","LT(3,KC_TAB)","KC_A","KC_O","KC_E","KC_U","KC_I","KC_D","KC_H","KC_T","KC_N","KC_S","KC_SLSH","KC_LSFT","KC_SCLN","KC_Q","KC_J","KC_K","KC_X","KC_B","KC_M","KC_W","KC_V","KC_Z","KC_SFTENT","KC_LCTL","KC_LALT","KC_LGUI","KC_APP","MO(2)","KC_SPC","MO(1)","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT"],["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_NO","RGB_TOG","RGB_MOD","RGB_VAI","RGB_VAD","KC_NO","KC_NO","KC_MINS","KC_EQL","KC_LBRC","KC_RBRC","KC_BSLS","KC_NO","KC_F11","KC_F12","KC_F13","KC_F14","KC_F15","KC_F16","KC_F17","KC_F18","KC_F19","KC_F20","KC_NO","KC_NO","KC_NO","KC_NO","KC_CAPS","KC_NO","KC_NO","KC_TRNS","KC_HOME","KC_PGDN","KC_PGUP","KC_END"],["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_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_UNDS","KC_PLUS","KC_LCBR","KC_RCBR","KC_PIPE","KC_NO","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_NO","KC_NO","KC_NO","KC_NO","KC_CAPS","KC_TRNS","KC_NO","KC_NO","KC_HOME","KC_PGDN","KC_PGUP","KC_END"],["KC_ESC","KC_CALC","KC_WHOM","KC_MAIL","KC_MYCM","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_PSCR","KC_NO","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_WH_L","KC_WH_D","KC_WH_U","KC_WH_R"],["RESET","KC_NO","KC_NO","RGB_TOG","RGB_MOD","RGB_HUI","RGB_HUD","RGB_SAI","RGB_SAD","RGB_VAI","RGB_VAD","KC_DEL","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","ANY(Qwerty)","ANY(Workman)","ANY(Colemak)","ANY(Colemak Mod-DH)","ANY(Dvorak)","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","DEBUG","KC_NO","KC_NO","KC_NO","KC_TRNS","KC_NO","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_NO"]],"author":"Annihilator6000","notes":"Layer 0 = Qwerty\nLayer 1 = Workman\nLayer 2 = Colemak\nLayer 3 = Colemak Mod-DH\nLayer 4 = Dvorak\nLayer 5 = Function Layer 1 (MO 1)\nLayer 6 = Function Layer 2 (MO 2)\nLayer 7 = Function Layer 3 (LT 3: Hold Tab)\nLayer 8 = Planck-style Adjust Layer (Hold MO 1 and MO 2 at the same time)"} \ No newline at end of file diff --git a/keyboards/ut472/keymaps/annihilator6000/config.h b/keyboards/ut472/keymaps/annihilator6000/config.h new file mode 100644 index 0000000000..023c753c27 --- /dev/null +++ b/keyboards/ut472/keymaps/annihilator6000/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/ut472/keymaps/annihilator6000/keymap.c b/keyboards/ut472/keymaps/annihilator6000/keymap.c new file mode 100644 index 0000000000..c4453279d2 --- /dev/null +++ b/keyboards/ut472/keymaps/annihilator6000/keymap.c @@ -0,0 +1,256 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define LT3_TAB LT(3, KC_TAB) + +enum ut472_layers { + _QWERTY, + _WORKMAN, + _COLEMAK, + _COLEMAK_MOD_DH, + _DVORAK, + _LOWER, + _RAISE, + _TAB, + _ADJUST +}; + +enum ut472_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, + COLEMAK, + COLEMAK_MOD_DH, + DVORAK +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer - QWERTY + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | + * |-------------------------------------------------------------------------+ + * |Tab/L3| A | S | D | F | G | H | J | K | L | ; | ' | + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Sh/En| + * |-------------------------------------------------------------------------+ + * | Ctrl| Alt | Gui | App | L2 | Space | L1 | Left| Down| Up |Right| + * `-------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_TAB, 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_SFTENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* Workman + * ,-------------------------------------------------------------------------. + * | Esc | Q | D | R | W | B | J | F | U | P | ; |Bspace | + * |-------------------------------------------------------------------------+ + * |Tab/L3| A | S | H | T | G | Y | N | E | O | I | ' | + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | M | C | V | K | L | , | . | / |Sh/En| + * |-------------------------------------------------------------------------+ + * | Ctrl| Alt | Gui | App | L2 | Space | L1 | Left| Down| Up |Right| + * `-------------------------------------------------------------------------' + */ +[_WORKMAN] = LAYOUT( + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + LT3_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* Colemak + * ,---------------------------------------------------------------------------. + * | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---------| + * |Tab/L3| A | R | S | T | D | H | N | E | I | O | " | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--------| + * | Shift | Z | X | C | V | B | K | M | , | . | / | Sh/En | + * |-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------| + * | Ctrl| Alt | GUI | App | L2 | Space | L1 | Left | Down | Up |Right | + * `---------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + LT3_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* Colemak Mod-DH + * https://colemakmods.github.io/mod-dh/keyboards.html + * ,---------------------------------------------------------------------------. + * | Esc | Q | W | F | P | B | J | L | U | Y | ; | Bksp | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---------| + * |Tab/L3| A | R | S | T | G | K | N | E | I | O | ' | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--------| + * | Shift | X | C | D | V | Z | M | H | , | . | / | Sh/En | + * |-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------| + * | Ctrl| Alt | GUI | App | L2 | Space | L1 | Left | Down | Up |Right | + * `---------------------------------------------------------------------------' + */ +[_COLEMAK_MOD_DH] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + LT3_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_X, KC_C, KC_D, KC_V, KC_Z, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* Dvorak + * ,--------------------------------------------------------------------------. + * | Esc | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--------| + * |Tab/L3| A | O | E | U | I | D | H | T | N | S | / | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------| + * | Shift | ; | Q | J | K | X | B | M | W | V | Z |Sh/En | + * |-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | Ctrl| Alt | GUI | App | L2 | Space | L1 | Left | Down | Up |Right | + * `--------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT( + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + LT3_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* FN Layer 1 - LOWER + * ,-------------------------------------------------------------------------. + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | - | = | [ | ] | \ | + * |-------------------------------------------------------------------------+ + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 - RAISE + * ,-------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | _ | + | { | } | | | + * |-------------------------------------------------------------------------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 3 - Hold Tab + * ,-------------------------------------------------------------------------. + * | Esc | Calc|Webhm| Mail| Comp| | | | | |PrtSc| | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | |MousL|MousD|MousU|MousR| + * `-------------------------------------------------------------------------' + */ +[_TAB] = LAYOUT( + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R +), + + /* Adjust (L1 + L2) + * v-----------------------RGB CONTROL---------------------v + * ,-------------------------------------------------------------------------- + * |Reset| | | RGB |RGBMO|HUE+ |HUE- |SAT+ |SAT- |BRT+ |BRT- | Del | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------| + * | | | | | | |Qwert|Wrkmn|ModDH|Colmk|Dvork| | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | | | | | | | | | | | | | + * |-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | Dbg | | | | | | | | | | | + * `-------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + RESET, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, + _______, _______, _______, _______, _______, _______, QWERTY, WORKMAN, COLEMAK, COLEMAK_MOD_DH, DVORAK, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +/* QWERTY = H + WORKMAN = J + COLEMAK = K + -MOD-DH = L + DVORAK = ; */ +}; + + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case COLEMAK_MOD_DH: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK_MOD_DH); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + } + return true; +} diff --git a/keyboards/ut472/keymaps/annihilator6000/readme.md b/keyboards/ut472/keymaps/annihilator6000/readme.md new file mode 100644 index 0000000000..59469b7b55 --- /dev/null +++ b/keyboards/ut472/keymaps/annihilator6000/readme.md @@ -0,0 +1,15 @@ +# UT47.2 Planck-style layout switching + +Has layouts for Qwerty, Workman, Colemak, Colemak-Mod-DH, and Dvorak. Qwerty is the default layout. Layouts are switched Planck-style using momentary layer keys 1 and 2 (MO(1) and MO(2)) at the same time and pressing one of the H, J, K, L, or ; keys (this is while on the Qwerty layout - adjust if on another layout). See Layer 8 below for layout keys. + +You can load the UT472_Annihilator6000_Configurator_file.json file in the [QMK Configurator](https://config.qmk.fm/#/ut472/LAYOUT) if you want to check out the configuration there or easily modify it. + +Make example for this keyboard (after setting up your build environment): + + make ut472:Annihilator6000 + +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). + +![UT47.2 layout image](https://i.imgur.com/lICX4uz.png) + +[KLE](http://www.keyboard-layout-editor.com/##@@_y:0%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Back%20Space&_x:0.25&a:4&f:4&w:4&h:4&d:true%3B&=%3Cb%3EGNAP!%3C%2F%2Fb%3E%3Cp%3E%3Cp%3EMinimum%20stagger%3Cp%3E47%20key%20layout%3B&@_a:7&f:3&w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&_w:1.25%3B&=%27%3B&@_w:1.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=Return%3B&@=Ctrl&=Alt&=Super&=Menu&_w:1.25%3B&=%2F&dArr%2F%3B&_w:2%3B&=&_w:1.25%3B&=%2F&uArr%2F%3B&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B%3B&=undefined) diff --git a/keyboards/ut472/keymaps/tucznak/config.h b/keyboards/ut472/keymaps/tucznak/config.h new file mode 100644 index 0000000000..06524822e8 --- /dev/null +++ b/keyboards/ut472/keymaps/tucznak/config.h @@ -0,0 +1,18 @@ +#pragma once + +#undef MANUFACTURER +#undef PRODUCT +#undef DESCRIPTION + +#define MANUFACTURER Potato Inc. +#define PRODUCT Qt3.14 +#define DESCRIPTION Smolkeeb + +/* turn off RGB when computer sleeps */ +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SLEEP +#endif + +/* send tap key if no layer key was used even after tap delay */ +#define TAPPING_TERM 50 +#define RETRO_TAPPING diff --git a/keyboards/ut472/keymaps/tucznak/keymap.c b/keyboards/ut472/keymaps/tucznak/keymap.c new file mode 100644 index 0000000000..7fbbd0e76e --- /dev/null +++ b/keyboards/ut472/keymaps/tucznak/keymap.c @@ -0,0 +1,111 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _LEFT, + _RIGHT, + _NUM, + _FN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | + * |-------------------------------------------------------------------------+ + * | Tab | A | S | D | F | G | H | J | K | L | ; |Enter | + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | Up | FN | + * |-------------------------------------------------------------------------+ + * | Ctrl| Win | LAlt| NUM | LEFT | Space | RIGHT| RAlt| Left| Down|Right| + * `-------------------------------------------------------------------------' + */ + + [_BASE] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, MO(_NUM),MO(_LEFT), KC_SPC, MO(_RIGHT), KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Left function layer (1) + * F keys and navigation + * ,-------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | Ins | + * |-------------------------------------------------------------------------+ + * | | Caps| |PrtSc|ScrLk|Pause| | | | | PgUp| Del | + * |-------------------------------------------------------------------------+ + * | | | | | | | | Menu| Home| PgDn| End | + * `-------------------------------------------------------------------------' + */ + + [_LEFT] = LAYOUT( + 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_INS, + _______, KC_CAPS, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, KC_PGUP, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, KC_APP, KC_HOME, KC_PGDN, KC_END + ), + + /* Right function layer (2) + * National and special characters + * ,-------------------------------------------------------------------------. + * | +1 | ě2 | š3 | č4 | ř5 | ž6 | ý7 | á8 | í9 | é0 | ´ | ˇ | + * |-------------------------------------------------------------------------+ + * | ;° | | | | | | | ( | ) | § | ! | ú | / | + * |-------------------------------------------------------------------------+ + * | | \ | | | | | % | = | ¨ | ' | - | _ | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | + * `-------------------------------------------------------------------------' + */ + + [_RIGHT] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, LSFT(KC_EQL), + KC_GRV, LSFT(KC_NUBS), _______, _______, _______, _______, LSFT(KC_RBRC), KC_RBRC, KC_QUOT, LSFT(KC_QUOT), KC_LBRC, LSFT(KC_LBRC), + _______, KC_NUBS, _______, _______, _______, _______, LSFT(KC_MINS), KC_MINS, KC_BSLS, LSFT(KC_BSLS), KC_SLSH, LSFT(KC_SLSH), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Numpad layer (3) + * ,-------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |-------------------------------------------------------------------------+ + * | | | | | | | | 4 | 5 | 6 | / | | + * |-------------------------------------------------------------------------+ + * | |NumLk| | | | | | 1 | 2 | 3 | * | | + * |-------------------------------------------------------------------------+ + * | | | | | | | 0 | . | + | - | | + * `-------------------------------------------------------------------------' + */ + + [_NUM] = LAYOUT( + _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PSLS, _______, + _______, KC_NLCK, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PAST, _______, + _______, _______, _______, _______, _______, _______, KC_KP_0, KC_DOT, KC_PPLS, KC_PMNS, _______ + ), + + /* Function layer (4) + * Backlighting, keyboard controls, music etc. + * ,-------------------------------------------------------------------------. + * |Reset| | | | | | | | | | | Vol+ | + * |-------------------------------------------------------------------------+ + * | | VLK | Mod+| Hue+| Sat+| Val+| | | | | | Vol- | + * |-------------------------------------------------------------------------+ + * | | TOG | Mod-| Hue-| Sat-| Val-| | | | | Stop| Mute| + * |-------------------------------------------------------------------------+ + * |Sleep| | | | | C+A+D | C+A+I | | Prev|Pause| Next| + * `-------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, VLK_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, KC_VOLD, + _______, RGB_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, KC_MSTP, KC_MUTE, + KC_SLEP, _______, _______, _______, _______, LCA(KC_DEL), LCA(KC_INS), _______, KC_MPRV, KC_MPLY, KC_MNXT + ) +}; diff --git a/keyboards/ut472/keymaps/tucznak/readme.md b/keyboards/ut472/keymaps/tucznak/readme.md new file mode 100644 index 0000000000..95180bc392 --- /dev/null +++ b/keyboards/ut472/keymaps/tucznak/readme.md @@ -0,0 +1,5 @@ +# TuCZnak's modified layout + +This layout is optimized for Czech national QWERTZ keymap. +It includes separated layers for numbers, national characters, +special characters and configuration. diff --git a/keyboards/ut472/keymaps/tucznak/rules.mk b/keyboards/ut472/keymaps/tucznak/rules.mk new file mode 100644 index 0000000000..112b769841 --- /dev/null +++ b/keyboards/ut472/keymaps/tucznak/rules.mk @@ -0,0 +1,18 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = yes diff --git a/keyboards/ut472/rules.mk b/keyboards/ut472/rules.mk index c7b2efedca..1dd477652b 100644 --- a/keyboards/ut472/rules.mk +++ b/keyboards/ut472/rules.mk @@ -1,53 +1,16 @@ # MCU name MCU = atmega32u2 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - - # Build Options # change yes to no to disable # @@ -67,3 +30,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = no # Enable tap dance feature diff --git a/keyboards/ut472/ut472.h b/keyboards/ut472/ut472.h index 1068dd7041..391392896a 100644 --- a/keyboards/ut472/ut472.h +++ b/keyboards/ut472/ut472.h @@ -31,4 +31,3 @@ { K30, K31, K32, K33, K34, K35, K35, K37, K38, K39, K3a, K3b } \ } - diff --git a/keyboards/uzu42/config.h b/keyboards/uzu42/config.h new file mode 100644 index 0000000000..45f497d782 --- /dev/null +++ b/keyboards/uzu42/config.h @@ -0,0 +1,29 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/uzu42/keymaps/default/config.h b/keyboards/uzu42/keymaps/default/config.h new file mode 100644 index 0000000000..bc7897f501 --- /dev/null +++ b/keyboards/uzu42/keymaps/default/config.h @@ -0,0 +1,47 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 54 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +// Use the lily version to get the uzu42 logo instead of the qmk logo +#define OLED_FONT_H "keymaps/default/glcdfont_uzu42.c" diff --git a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c new file mode 100644 index 0000000000..f5524ec737 --- /dev/null +++ b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { +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, +0x00, 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, 0xC0, 0xE0, 0x70, +0x38, 0x18, 0x18, 0x0C, 0x0C, 0x0C, +0x0E, 0x06, 0x06, 0x06, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC0, 0xC0, 0xC0, 0x00, 0x00, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, +0x00, 0x00, 0xC0, 0xC0, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, +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, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x03, 0x07, 0x2E, +0x6C, 0xD8, 0xD8, 0xF8, 0xB0, 0xB0, +0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, +0xB0, 0xB0, 0xF8, 0xD8, 0xD8, 0x6C, +0x2E, 0x07, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00, +0x01, 0x01, 0x81, 0xC1, 0xE1, 0x79, +0x3D, 0x0F, 0x07, 0x03, 0x01, 0x00, +0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +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, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x06, 0x17, 0x3D, +0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, +0x3D, 0x17, 0x06, 0x02, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x03, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x07, 0x03, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x07, 0x07, 0x07, 0x07, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x00, 0x00, 0x00, 0x01, 0x03, 0x07, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x03, 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, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +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 // FONT5X7_H diff --git a/keyboards/uzu42/keymaps/default/keymap.c b/keyboards/uzu42/keymaps/default/keymap.c new file mode 100644 index 0000000000..393f7c3eae --- /dev/null +++ b/keyboards/uzu42/keymaps/default/keymap.c @@ -0,0 +1,291 @@ +#include QMK_KEYBOARD_H +#include "uzu42.h" +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + + +#ifdef RGBLIGHT_ENABLE +#include +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +#define KC_CTES CTL_T(KC_ESC) +#define KC_SFSP SFT_T(KC_SPC) +#define KC_ALBS ALT_T(KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,---------------------------------------. ,---------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_LSFT, KC_SPC,KC_LALT,KC_LGUI, LOWER,KC_CTES, KC_SFSP, RAISE,KC_ALBS,KC_RCTL,KC_LGUI,XXXXXXX \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ), + + [_LOWER] = LAYOUT( \ + //,---------------------------------------. ,---------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_TAB,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_LEFT,KC_DOWN, KC_UP,KC_RGHT, KC_ENT,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_LCTL, KC_SPC,KC_LSFT,KC_LALT, KC_DEL, KC_BSPC,KC_HOME, KC_END,XXXXXXX,XXXXXXX,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ), + + [_RAISE] = LAYOUT( \ + //,---------------------------------------. ,---------------------------------------. + KC_EXLM, KC_AT,KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_TAB,KC_UNDS,KC_PLUS,KC_PIPE,KC_TILD, KC_COLN,KC_DQUO, KC_GT,KC_LCBR,KC_RCBR,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_LCTL,KC_MINS, KC_EQL,KC_BSLS, KC_GRV, KC_SCLN,KC_QUOT, KC_LT,KC_LBRC,KC_RBRC,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ), + + [_ADJUST] = LAYOUT( \ + //,---------------------------------------. ,---------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_F11, KC_F12, RESET,KC_PSCR, KC_INS, RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,XXXXXXX,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,RGBRST,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ) +}; + +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} + +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE + +#define L_BASE 0 +#define L_LOWER (1 << 1) +#define L_RAISE (1 << 2) +#define L_ADJUST (1 << 3) +#define L_ADJUST_TRI (L_ADJUST | L_RAISE | L_LOWER) + +char layer_state_str[24]; + +const char *read_layer_state(void) { + switch (layer_state) + { + case L_BASE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); + break; + case L_RAISE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); + break; + case L_LOWER: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); + break; + case L_ADJUST: + case L_ADJUST_TRI: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); + break; + default: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); + } + + return layer_state_str; +} + +const char *read_logo(void) { + static char logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + return logo; +} + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', + ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { + return keylog_str; +} + +const char *read_keylogs(void) { + return keylogs_str; +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); + } else { + oled_write(read_logo(), false); + } +} +#endif // OLED_DRIVER_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +#ifdef RGBLIGHT_ENABLE + +char rbf_info_str[24]; +const char *read_rgb_info(void) { + + snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", + rgblight_config.enable ? "on" : "- ", rgblight_config.mode, + rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + return rbf_info_str; +} +#endif diff --git a/keyboards/uzu42/readme.md b/keyboards/uzu42/readme.md new file mode 100644 index 0000000000..9e287931b9 --- /dev/null +++ b/keyboards/uzu42/readme.md @@ -0,0 +1,15 @@ +# uzu42 + +[![uzu42](https://i.imgur.com/CQTfebZ.jpg)](https://imgur.com/gallery/aKOKBgq) + +A split keyboard with 4x5 vertically staggered keys and 1 thumb keys. + +Keyboard Maintainer: [nrtkbb](https://github.com/nrtkbb/) [@nrtkbb](https://twitter.com/nrtkbb) +Hardware Supported: uzu42 PCB, Pro Micro +Hardware Availability: https://nrtkbb.booth.pm/ + +Make example for this keyboard (after setting up your build environment): + + make uzu42: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). diff --git a/keyboards/uzu42/rev1/config.h b/keyboards/uzu42/rev1/config.h new file mode 100644 index 0000000000..8f86d22bf1 --- /dev/null +++ b/keyboards/uzu42/rev1/config.h @@ -0,0 +1,77 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER nrtkbb +#define PRODUCT uzu42 +#define DESCRIPTION A split keyboard with 4x5 vertically staggered keys and 1 thumb keys + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM 54 // Number of LEDs +# define RGBLED_SPLIT { 27, 27 } +#endif + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/uzu42/rev1/rev1.c b/keyboards/uzu42/rev1/rev1.c new file mode 100644 index 0000000000..0bfac6bd93 --- /dev/null +++ b/keyboards/uzu42/rev1/rev1.c @@ -0,0 +1,2 @@ +#include "uzu42.h" + diff --git a/keyboards/uzu42/rev1/rev1.h b/keyboards/uzu42/rev1/rev1.h new file mode 100644 index 0000000000..7b9c7d5991 --- /dev/null +++ b/keyboards/uzu42/rev1/rev1.h @@ -0,0 +1,36 @@ +#pragma once + +#include "../uzu42.h" + +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } + diff --git a/keyboards/uzu42/rev1/rules.mk b/keyboards/uzu42/rev1/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/uzu42/rev1/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/uzu42/rev1/serial_config.h b/keyboards/uzu42/rev1/serial_config.h new file mode 100644 index 0000000000..4fab8e8ddf --- /dev/null +++ b/keyboards/uzu42/rev1/serial_config.h @@ -0,0 +1,4 @@ +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/uzu42/rev1/serial_config_simpleapi.h b/keyboards/uzu42/rev1/serial_config_simpleapi.h new file mode 100644 index 0000000000..0e1dd9e4ac --- /dev/null +++ b/keyboards/uzu42/rev1/serial_config_simpleapi.h @@ -0,0 +1,5 @@ +#pragma once + +#undef SERIAL_USE_MULTI_TRANSACTION +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/uzu42/rules.mk b/keyboards/uzu42/rules.mk new file mode 100644 index 0000000000..aea23f3cd0 --- /dev/null +++ b/keyboards/uzu42/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +OLED_DRIVER_ENABLE = no # OLED display +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = uzu42/rev1 diff --git a/keyboards/uzu42/uzu42.c b/keyboards/uzu42/uzu42.c new file mode 100644 index 0000000000..0eb8c5f3aa --- /dev/null +++ b/keyboards/uzu42/uzu42.c @@ -0,0 +1,5 @@ +#include "uzu42.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} diff --git a/keyboards/uzu42/uzu42.h b/keyboards/uzu42/uzu42.h new file mode 100644 index 0000000000..dd944e3750 --- /dev/null +++ b/keyboards/uzu42/uzu42.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef KEYBOARD_uzu42_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index 51ca6def94..d1a788a858 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -53,14 +53,14 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 #define BACKLIGHT_ON_STATE 0 -#define RGBLIGHT_CUSTOM_DRIVER -#define RGBLIGHT_ANIMATIONS +//#define RGB_DI_PIN 0 #define RGBLED_NUM 1 +#define RGBLIGHT_ANIMATIONS +#define RGB_STEP 16 + #define RGB_RED_PIN PF6 #define RGB_GREEN_PIN PF5 #define RGB_BLUE_PIN PF4 -#define RGB_DI_PIN 0 -#define RGB_STEP 16 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/v60_type_r/info.json b/keyboards/v60_type_r/info.json index 3bb4ff0a07..fe5be6055f 100644 --- a/keyboards/v60_type_r/info.json +++ b/keyboards/v60_type_r/info.json @@ -11,6 +11,9 @@ "LAYOUT_60_ansi": { "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - } + }, + "LAYOUT_60_iso": { + "layout": [{"label":"esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"backspace", "x":13, "y":0, "w":2}, {"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":"caps", "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":1, "w":1.25, "h":2}, {"label":"lshift", "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":"rshift", "x":12.25, "y":3, "w":2.75}, {"label":"lctrl", "x":0, "y":4, "w":1.25}, {"label":"lwin", "x":1.25, "y":4, "w":1.25}, {"label":"lalt", "x":2.5, "y":4, "w":1.25}, {"label":"space", "x":3.75, "y":4, "w":6.25}, {"label":"fn0", "x":10, "y":4, "w":1.25}, {"label":"rwin", "x":11.25, "y":4, "w":1.25}, {"label":"menu", "x":12.5, "y":4, "w":1.25}, {"label":"rctrl", "x":13.75, "y":4, "w":1.25}] + } } } diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c index 831def0789..352400815e 100644 --- a/keyboards/v60_type_r/keymaps/default/keymap.c +++ b/keyboards/v60_type_r/keymaps/default/keymap.c @@ -63,22 +63,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void led_set_user(uint8_t usb_led) { } diff --git a/keyboards/v60_type_r/keymaps/default/rules.mk b/keyboards/v60_type_r/keymaps/default/rules.mk deleted file mode 100644 index b6c9a25805..0000000000 --- a/keyboards/v60_type_r/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no diff --git a/keyboards/v60_type_r/keymaps/iso/config.h b/keyboards/v60_type_r/keymaps/iso/config.h new file mode 100644 index 0000000000..6a1994d6ff --- /dev/null +++ b/keyboards/v60_type_r/keymaps/iso/config.h @@ -0,0 +1,18 @@ +/* Copyright 2019 Lukewh + * + * 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 . + */ +#pragma once + +// place overrides here diff --git a/keyboards/v60_type_r/keymaps/iso/keymap.c b/keyboards/v60_type_r/keymaps/iso/keymap.c new file mode 100644 index 0000000000..74aee86ed5 --- /dev/null +++ b/keyboards/v60_type_r/keymaps/iso/keymap.c @@ -0,0 +1,54 @@ +/* This is the default ISO layout provided by the KBP V60 Type R +* as depicted on the stock keycaps. +*/ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap 0: Default Layer (Qwerty) + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bs | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Entr| + * |-------------------------------------------------------| | + * |Caps | A| S| D| F| G| H| J| K| L| ;| '| #| | + * |-----------------------------------------------------------| + * |LShif| || Z| X| C| V| B| N| M| ,| .| /| RShift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Fn0 |Gui |App|Ctrl| + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_iso( \ + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOTE, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_APP, KC_RCTL \ + ), + + /* Keymap 0: Default Layer (Qwerty) + * ,-----------------------------------------------------------. + * | ¬| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| -| =| Bs | + * |-----------------------------------------------------------| + * | | | up| | | | | |prt|scr|pus| up| | | + * |-------------------------------------------------------| | + * | |lft|dwn|rig| | | | |hom|pgu|lft|rig| | | + * |-----------------------------------------------------------| + * | | | | | | |vld|vlu|mut|end|pgd|dwn| | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [1] = LAYOUT_60_iso( \ + 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_DEL, \ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/v60_type_r/keymaps/iso/readme.md b/keyboards/v60_type_r/keymaps/iso/readme.md new file mode 100644 index 0000000000..2d5e1a13d2 --- /dev/null +++ b/keyboards/v60_type_r/keymaps/iso/readme.md @@ -0,0 +1,5 @@ +![KBP V60 Type R ISO Image](https://i.imgur.com/28xetL9.png) + +# Default ISO Layout + +This is the default layout that comes flashed on the KBP V60 Type R ISO version. diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 54a20a7815..37acd03d1a 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -1,72 +1,37 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable the RGB Underglow +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable the RGB Underglow +RGBLIGHT_CUSTOM_DRIVER = yes MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -LAYOUTS = 60_ansi +LINK_TIME_OPTIMIZATION_ENABLE = yes + +LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/v60_type_r/v60_type_r.c b/keyboards/v60_type_r/v60_type_r.c index 41eb75807d..871d9915d3 100644 --- a/keyboards/v60_type_r/v60_type_r.c +++ b/keyboards/v60_type_r/v60_type_r.c @@ -18,13 +18,7 @@ #include "quantum.h" // if we've got an RGB underglow! -#ifdef V60_POLESTAR - -#include "rgblight.h" - -#include - -#include "action_layer.h" +#ifdef RGBLIGHT_ENABLE #define SOFTPWM_LED_TIMER_TOP F_CPU/(256*64) @@ -106,35 +100,35 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void rgb_timer_init(void) { - /* Timer1 setup */ + /* Timer3 setup */ /* CTC mode */ - TCCR1B |= (1<> 8) & 0xff; - OCR1AL = SOFTPWM_LED_TIMER_TOP & 0xff; + OCR3AH = (SOFTPWM_LED_TIMER_TOP >> 8) & 0xFF; + OCR3AL = SOFTPWM_LED_TIMER_TOP & 0xFF; SREG = sreg; - // Enable the compare match interrupt on timer 1 - TIMSK1 |= (1<", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Menu", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] }, - "LAYOUT_67_ansi": { + "LAYOUT_65_ansi_blocker": { "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"~", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] } } diff --git a/keyboards/vinta/rules.mk b/keyboards/vinta/rules.mk index 3ddb8d5bc0..90485c4356 100644 --- a/keyboards/vinta/rules.mk +++ b/keyboards/vinta/rules.mk @@ -46,3 +46,5 @@ CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 65_ansi_blocker \ No newline at end of file diff --git a/keyboards/vinta/vinta.h b/keyboards/vinta/vinta.h index 991c981c97..03a815c065 100644 --- a/keyboards/vinta/vinta.h +++ b/keyboards/vinta/vinta.h @@ -37,7 +37,7 @@ { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, XXX, K4D, K4E, K4F } \ } -#define LAYOUT_67_ansi( \ +#define LAYOUT_65_ansi_blocker( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index 18fb7c16d7..1548ba995d 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -9,113 +9,21 @@ enum keyboard_layers { LAYER_MOUSE, LAYER_ADJUST, }; -enum keyboard_macros { - MACRO_QWERTY = 0, - MACRO_UPPER, - MACRO_LOWER, - MACRO_FUNCTION, - MACRO_MOUSE, - MACRO_TIMBRE_1, - MACRO_TIMBRE_2, - MACRO_TIMBRE_3, - MACRO_TIMBRE_4, - MACRO_TEMPO_U, - MACRO_TEMPO_D, - MACRO_TONE_DEFAULT, - MACRO_MUSIC_TOGGLE, - MACRO_AUDIO_TOGGLE, - MACRO_INC_VOICE, - MACRO_DEC_VOICE, - MACRO_BACKLIGHT, - MACRO_BREATH_TOGGLE, - MACRO_BREATH_SPEED_INC, - MACRO_BREATH_SPEED_DEC, - MACRO_BREATH_DEFAULT, - MACRO_MOUSE_MOVE_UL, - MACRO_MOUSE_MOVE_UR, - MACRO_MOUSE_MOVE_DL, - MACRO_MOUSE_MOVE_DR, - MACRO_HELP, - MACRO_HELP_1, - MACRO_HELP_2, - MACRO_HELP_3, - MACRO_HELP_4, - MACRO_HELP_5, - MACRO_HELP_6, - MACRO_HELP_7, - MACRO_HELP_8, - MACRO_HELP_9, - MACRO_HELP_0, - MACRO_GENERAL_1, - MACRO_GENERAL_2, - MACRO_GENERAL_3, - MACRO_GENERAL_4, - MACRO_GENERAL_5, - MACRO_CURSOR_UL, - MACRO_CURSOR_UR, - MACRO_CURSOR_DL, - MACRO_CURSOR_DR, - MACRO_MUTE_APP, - MACRO_COPY_CUT, + +enum custom_keycodes { + M_CP_CT = SAFE_RANGE, + M_UPPER, + M_LOWER, + M_MOUSE, + TIMBR_1, + TIMBR_2, + TIMBR_3, + TIMBR_4, + TMPO_UP, + TMPO_DN, + TMPO_DF }; -#define M_QWRTY M(MACRO_QWERTY) -#define M_UPPER M(MACRO_UPPER) -#define M_LOWER M(MACRO_LOWER) -#define M_FUNCT M(MACRO_FUNCTION) -#define M_MOUSE M(MACRO_MOUSE) - -#define TIMBR_1 M(MACRO_TIMBRE_1) -#define TIMBR_2 M(MACRO_TIMBRE_2) -#define TIMBR_3 M(MACRO_TIMBRE_3) -#define TIMBR_4 M(MACRO_TIMBRE_4) -#define TMPO_UP M(MACRO_TEMPO_U) -#define TMPO_DN M(MACRO_TEMPO_D) -#define TMPO_DF M(MACRO_TONE_DEFAULT) - -#define VC_UP M(MACRO_INC_VOICE) -#define VC_DOWN M(MACRO_DEC_VOICE) - -#define M_BACKL M(MACRO_BACKLIGHT) -#define M_BRTOG M(MACRO_BREATH_TOGGLE) -#define M_BSPDU M(MACRO_BREATH_SPEED_INC) -#define M_BSPDD M(MACRO_BREATH_SPEED_DEC) -#define M_BDFLT M(MACRO_BREATH_DEFAULT) - -#define M_MS_UL M(MACRO_MOUSE_MOVE_UL) -#define M_MS_UR M(MACRO_MOUSE_MOVE_UR) -#define M_MS_DL M(MACRO_MOUSE_MOVE_DL) -#define M_MS_DR M(MACRO_MOUSE_MOVE_DR) - -#define M_HELP M(MACRO_HELP) -#define M_HELP1 M(MACRO_HELP_1) -#define M_HELP2 M(MACRO_HELP_2) -#define M_HELP3 M(MACRO_HELP_3) -#define M_HELP4 M(MACRO_HELP_4) -#define M_HELP5 M(MACRO_HELP_5) -#define M_HELP6 M(MACRO_HELP_6) -#define M_HELP7 M(MACRO_HELP_7) -#define M_HELP8 M(MACRO_HELP_8) -#define M_HELP9 M(MACRO_HELP_9) -#define M_HELP0 M(MACRO_HELP_0) - -#define M_M1 M(MACRO_GENERAL_1) -#define M_M2 M(MACRO_GENERAL_2) -#define M_M3 M(MACRO_GENERAL_3) -#define M_M4 M(MACRO_GENERAL_4) -#define M_M5 M(MACRO_GENERAL_5) - -#define M_UL M(MACRO_CURSOR_UL) -#define M_UR M(MACRO_CURSOR_UR) -#define M_DL M(MACRO_CURSOR_DL) -#define M_DR M(MACRO_CURSOR_DR) - -#define M_MUTEA M(MACRO_MUTE_APP) - -#define M_CP_CT M(MACRO_COPY_CUT) - -#define M_COPY MACROTAP(MACRO_COPY_CUT) - #define SC_UNDO LCTL(KC_Z) #define SC_REDO LCTL(KC_Y) #define SC_CUT LCTL(KC_X) @@ -151,28 +59,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = | VOL DN | MUTE | VOL UP | BACKLT | | F1 | F2 | F3 | F4 | XXXXXX | F5 | F6 | F7 | F8 | XXXXXX | F9 | F10 | F11 | F12 | | PRINT | SCR LK | PAUSE | FN | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | NUM LK | KP / | KP * | KP - | | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = | BACKSP | | INS | HOME | PG UP | M1 | + | NUM LK | KP / | KP * | KP - | | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = | BACKSP | | INS | HOME | PG UP | XXXXXX | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | KP 7 | KP 8 | KP 9 | KP + | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | - | \ | | DEL | END | PG DN | M2 | + | KP 7 | KP 8 | KP 9 | KP + | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | - | \ | | DEL | END | PG DN | XXXXXX | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | KP 4 | KP 5 | KP 6 | KP + | | CAP LK | BACKSP | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | o | CP/CT | UNDO | PASTE | M3 | + | KP 4 | KP 5 | KP 6 | KP + | | CAP LK | BACKSP | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | o | CP/CT | UNDO | PASTE | XXXXXX | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | KP 1 | KP 2 | KP 3 | KP Ent | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | RSHIFT | | XXXXXX | UP | XXXXXX | M4 | + | KP 1 | KP 2 | KP 3 | KP Ent | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | RSHIFT | | XXXXXX | UP | XXXXXX | XXXXXX | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | KP 0 | KP , | KP . | KP Ent | | LCTRL | XXXXXX | LWIN | XXXXXX | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | XXXXXX | RCTRL | | LEFT | DOWN | RIGHT | M5 | + | KP 0 | KP , | KP . | KP Ent | | LCTRL | XXXXXX | LWIN | XXXXXX | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | XXXXXX | RCTRL | | LEFT | DOWN | RIGHT | XXXXXX | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_QWERTY, \ - KC_VOLD, KC_MUTE, KC_VOLU, M_BACKL, KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUS, M_HELP , \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , KC_BSPC, KC_INS , KC_HOME, KC_PGUP, M_M1 , \ - KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TAB , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, KC_BSLS, KC_DEL , KC_END , KC_PGDN, M_M2 , \ - KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_CAPS, KC_BSPC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , M_CP_CT, SC_UNDO, SC_PSTE, M_M3 , \ - KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, XXXXXXX, KC_UP , XXXXXXX, M_M4 , \ - KC_KP_0, KC_PCMM, KC_PDOT, KC_PENT, KC_LCTL, XXXXXXX, KC_LGUI, XXXXXXX, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , XXXXXXX, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, M_M5 \ + KC_VOLD, KC_MUTE, KC_VOLU, BL_STEP, KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX , \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , KC_BSPC, KC_INS , KC_HOME, KC_PGUP, XXXXXXX , \ + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TAB , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, KC_BSLS, KC_DEL , KC_END , KC_PGDN, XXXXXXX , \ + KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_CAPS, KC_BSPC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , M_CP_CT, SC_UNDO, SC_PSTE, XXXXXXX , \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, XXXXXXX, KC_UP , XXXXXXX, XXXXXXX , \ + KC_KP_0, KC_PCMM, KC_PDOT, KC_PENT, KC_LCTL, XXXXXXX, KC_LGUI, XXXXXXX, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , XXXXXXX, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX \ ), /* LAYER = LAYER_LOWER .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | MUTE A | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | ______ | ______ | ______ | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | @@ -187,7 +95,7 @@ KEYMAP(LAYER_QWERTY, \ '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_LOWER, \ - _______, M_MUTEA, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, _______, _______, _______, \ @@ -196,7 +104,7 @@ KEYMAP(LAYER_LOWER, \ ), /* LAYER = LAYER_UPPER .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | MUTE A | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | ______ | ______ | ______ | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | @@ -211,7 +119,7 @@ KEYMAP(LAYER_LOWER, \ '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_UPPER, \ - _______, M_MUTEA, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, _______, _______, _______, \ @@ -244,7 +152,7 @@ KEYMAP(LAYER_MOUSE, \ ), /* LAYER = LAYER_ADJUST .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | VOICE- | AUDIO | VOICE+ | MUSIC | | HELP 1 | HELP 2 | HELP 3 | HELP 4 | XXXXXX | HELP 5 | HELP 6 | HELP 7 | HELP 8 | XXXXXX | HELP 9 | HELP 0 | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + | VOICE- | AUDIO | VOICE+ | MUSIC | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | @@ -259,7 +167,7 @@ KEYMAP(LAYER_MOUSE, \ '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_ADJUST, \ - MUV_DE , AU_TOG , MUV_IN , MU_TOG , M_HELP1, M_HELP2, M_HELP3, M_HELP4, XXXXXXX, M_HELP5, M_HELP6, M_HELP7, M_HELP8, XXXXXXX, M_HELP9, M_HELP0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + MUV_DE , AU_TOG , MUV_IN , MU_TOG , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -296,233 +204,85 @@ void persistent_default_layer_set(uint16_t default_layer) default_layer_set(default_layer); } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - - // MACRODOWN only works in this function - switch(id) - { - - case MACRO_COPY_CUT: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case M_CP_CT: if (record->event.pressed) { register_code(KC_LCTL); if (record->tap.count == 1) { register_code(KC_C); unregister_code(KC_C); - } - else if (record->tap.count == 2) { + } else if (record->tap.count == 2) { register_code(KC_X); unregister_code(KC_X); } unregister_code(KC_LCTL); } - break; + return false; - - // case MACRO_HELP_1: - // if (record->event.pressed) - // { - // uprint("H1"); - // } - // break; - - // case MACRO_HELP_2: - // if (record->event.pressed) - // { - // uprint("H2"); - // } - // break; - - // case MACRO_HELP_3: - // if (record->event.pressed) - // { - // uprint("H3"); - // } - // break; - - // case MACRO_HELP_4: - // if (record->event.pressed) - // { - // uprint("H4"); - // } - // break; - - // case MACRO_HELP_5: - // if (record->event.pressed) - // { - // uprint("H5"); - // } - // break; - - // case MACRO_HELP_6: - // if (record->event.pressed) - // { - // uprint("H6"); - // } - // break; - - // case MACRO_HELP_7: - // if (record->event.pressed) - // { - // uprint("H7"); - // } - // break; - - // case MACRO_HELP_8: - // if (record->event.pressed) - // { - // uprint("H8"); - // } - // break; - - // case MACRO_HELP_9: - // if (record->event.pressed) - // { - // uprint("H9"); - // } - // break; - - case MACRO_BREATH_TOGGLE: - if (record->event.pressed) - { - breathing_toggle(); - } - break; - - case MACRO_BREATH_SPEED_INC: - if (record->event.pressed) - { - breathing_period_inc(); - } - break; - - case MACRO_BREATH_SPEED_DEC: - if (record->event.pressed) - { - breathing_period_dec(); - } - break; - - case MACRO_BREATH_DEFAULT: - if (record->event.pressed) - { - breathing_period_default(); - } - break; - - case MACRO_QWERTY: - if (record->event.pressed) - { - persistent_default_layer_set(1UL<event.pressed) - { + case M_UPPER: + if (record->event.pressed) { layer_on(LAYER_UPPER); breathing_period_set(2); breathing_pulse(); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - else - { + } else { layer_off(LAYER_UPPER); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); } - break; + return false; - case MACRO_LOWER: - if (record->event.pressed) - { + case M_LOWER: + if (record->event.pressed) { layer_on(LAYER_LOWER); breathing_period_set(2); breathing_pulse(); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - else - { + } else { layer_off(LAYER_LOWER); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); } - break; - - case MACRO_FUNCTION: - if (record->event.pressed) - { - breathing_period_set(3); - breathing_enable(); - layer_on(LAYER_FUNCTION); - } - else - { - breathing_period_set(1); - breathing_self_disable(); - layer_off(LAYER_FUNCTION); - } - break; + return false; #ifdef MOUSEKEY_ENABLE - - case MACRO_MOUSE: - if (record->event.pressed) - { + case M_MOUSE: + if (record->event.pressed) { layer_invert(LAYER_MOUSE); } - break; - + return false; #endif /* MOUSEKEY_ENABLE */ #ifdef AUDIO_ENABLE - - case MACRO_TIMBRE_1: + case TIMBR_1: if (record->event.pressed) set_timbre(TIMBRE_12); - break; - - case MACRO_TIMBRE_2: + return false; + case TIMBR_2: if (record->event.pressed) set_timbre(TIMBRE_25); - break; - - case MACRO_TIMBRE_3: + return false; + case TIMBR_3: if (record->event.pressed) set_timbre(TIMBRE_50); - break; - - case MACRO_TIMBRE_4: + return false; + case TIMBR_4: if (record->event.pressed) set_timbre(TIMBRE_75); - break; - - case MACRO_TEMPO_U: + return false; + case TMPO_UP: if (record->event.pressed) increase_tempo(10); - break; - - case MACRO_TEMPO_D: + return false; + case TMPO_DN: if (record->event.pressed) decrease_tempo(10); - break; - - case MACRO_TONE_DEFAULT: - if (record->event.pressed) - { + return false; + case TMPO_DF: + if (record->event.pressed) { set_timbre(TIMBRE_DEFAULT); set_tempo(TEMPO_DEFAULT); } - break; - + return false; #endif /* AUDIO_ENABLE */ -#ifdef BACKLIGHT_ENABLE - case MACRO_BACKLIGHT: - if (record->event.pressed) - { - backlight_step(); - } - break; -#endif /* BACKLIGHT_ENABLE */ - default: - break; - -} -return MACRO_NONE; + return true; + } + return true; }; #ifdef AUDIO_ENABLE diff --git a/keyboards/vision_division/keymaps/default/rules.mk b/keyboards/vision_division/keymaps/default/rules.mk index 69a3b2cd29..ef72559a0c 100644 --- a/keyboards/vision_division/keymaps/default/rules.mk +++ b/keyboards/vision_division/keymaps/default/rules.mk @@ -1,18 +1 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +AUDIO_ENABLE = yes diff --git a/keyboards/vision_division/rules.mk b/keyboards/vision_division/rules.mk index 5b739d4fd0..960210046d 100644 --- a/keyboards/vision_division/rules.mk +++ b/keyboards/vision_division/rules.mk @@ -1,55 +1,15 @@ - - # MCU name MCU = at90usb1286 -# MCU = at90usb1287 -# MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=1024 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable @@ -67,4 +27,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by d MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 \ No newline at end of file +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/vitamins_included/config.h b/keyboards/vitamins_included/config.h index bcaf777c77..019ca94919 100644 --- a/keyboards/vitamins_included/config.h +++ b/keyboards/vitamins_included/config.h @@ -17,11 +17,25 @@ along with this program. If not, see . */ #pragma once +//#define USE_I2C + +/* Common USB Device descriptor parameters */ +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0xBEE5 +#define MANUFACTURER Duckle29 +#define PRODUCT Vitamins included #include "config_common.h" -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - - - +#ifndef NO_ACTION_MACRO + #define NO_ACTION_MACRO +#endif +#ifndef NO_ACTION_FUNCTION + #define NO_ACTION_FUNCTION +#endif +#ifndef NO_DEBUG + #define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) + #define NO_PRINT +#endif // !NO_PRINT diff --git a/keyboards/vitamins_included/i2c.c b/keyboards/vitamins_included/i2c.c deleted file mode 100644 index 49ada21433..0000000000 --- a/keyboards/vitamins_included/i2c.c +++ /dev/null @@ -1,163 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< -#include "split_util.h" - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/vitamins_included/info.json b/keyboards/vitamins_included/info.json new file mode 100644 index 0000000000..598688a210 --- /dev/null +++ b/keyboards/vitamins_included/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Vitamins Included", + "url": "", + "maintainer": "Duckle29", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "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":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}] + } + } +} diff --git a/keyboards/vitamins_included/keymaps/default/config.h b/keyboards/vitamins_included/keymaps/default/config.h index aba9fa7d40..95dd8ec464 100644 --- a/keyboards/vitamins_included/keymaps/default/config.h +++ b/keyboards/vitamins_included/keymaps/default/config.h @@ -20,16 +20,19 @@ along with this program. If not, see . #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL +/* Use I2C or Serial. Default is Serial */ // #define USE_I2C /* Select hand configuration */ +// Defaults: +// Rev1: EE_HANDS +// Rev2: SPLIT_HAND_PIN B4 +// You can override the defaults (rev1 doesn't support SPLIT_HAND_PIN) +//#define EE_HANDS //#define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS +//#define MASTER_RIGHT + #ifdef AUDIO_ENABLE #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c index 7824905720..52780d6468 100644 --- a/keyboards/vitamins_included/keymaps/default/keymap.c +++ b/keyboards/vitamins_included/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -116,17 +115,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | + * | | RESET| | | | | | | | | RESET| Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | |RGB_MOD| + * | | | | | | | | | | |RGBMOD| * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \ diff --git a/keyboards/vitamins_included/keymaps/numpad/config.h b/keyboards/vitamins_included/keymaps/numpad/config.h index aba9fa7d40..95dd8ec464 100644 --- a/keyboards/vitamins_included/keymaps/numpad/config.h +++ b/keyboards/vitamins_included/keymaps/numpad/config.h @@ -20,16 +20,19 @@ along with this program. If not, see . #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL +/* Use I2C or Serial. Default is Serial */ // #define USE_I2C /* Select hand configuration */ +// Defaults: +// Rev1: EE_HANDS +// Rev2: SPLIT_HAND_PIN B4 +// You can override the defaults (rev1 doesn't support SPLIT_HAND_PIN) +//#define EE_HANDS //#define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS +//#define MASTER_RIGHT + #ifdef AUDIO_ENABLE #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ diff --git a/keyboards/vitamins_included/keymaps/numpad/keymap.c b/keyboards/vitamins_included/keymaps/numpad/keymap.c index 1767851feb..973d4e936b 100644 --- a/keyboards/vitamins_included/keymaps/numpad/keymap.c +++ b/keyboards/vitamins_included/keymaps/numpad/keymap.c @@ -7,7 +7,7 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. #define _NUMPAD 0 -#define _ADJUST 3 +#define _ADJUST 1 enum custom_keycodes { NUMPAD = SAFE_RANGE, @@ -18,31 +18,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Numpad * ,-----------------------------------------------------------------------------------. - * | 0 | 1 | 4 | 7 | nlck | esc | 0 | 1 | 4 | 7 | nlck | esc | + * | 0 | 1 | 4 | 7 | nlck | <-- | 0 | 1 | 4 | 7 | nlck | <-- | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | , | 2 | 5 | 8 | / | adj | , | 2 | 5 | 8 | / | adj | + * | adj | 2 | 5 | 8 | / | \/ | , | 2 | 5 | 8 | / | \/ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | . | 3 | 6 | 9 | * | adj | . | 3 | 6 | 9 | * | adj | + * | . | 3 | 6 | 9 | * | /\ | . | 3 | 6 | 9 | * | /\ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Enter| adj | - | + |bckspc| adj | Enter| adj | - | + |bckspc| adj | + * | Enter| tab | - | + |bckspc| --> | Enter| tab | - | + |bckspc| --> | * `-----------------------------------------------------------------------------------' */ [_NUMPAD] = LAYOUT_ortho_4x12( \ - KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, \ - KC_KP_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, ADJUST, KC_KP_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, ADJUST, \ - KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, ADJUST, KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, ADJUST , \ - KC_KP_ENTER, ADJUST, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, ADJUST, KC_KP_ENTER, ADJUST, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, ADJUST \ + KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_LEFT, KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_LEFT,\ + ADJUST, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, KC_DOWN, ADJUST, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, KC_DOWN,\ + KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, KC_UP, KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, KC_UP, \ + KC_KP_ENTER, KC_TAB, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, KC_RIGHT, KC_KP_ENTER, KC_TAB, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, KC_RIGHT\ ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | + * | | | | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | RESET RESET | | | | |RGB_MOD| + * | | | | | | RESET RESET | | | | |RGBMOD| * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ diff --git a/keyboards/vitamins_included/matrix.c b/keyboards/vitamins_included/matrix.c deleted file mode 100644 index 1f5071c693..0000000000 --- a/keyboards/vitamins_included/matrix.c +++ /dev/null @@ -1,509 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" -#include "timer.h" -#include - -#if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE) - #include "rgblight.h" -#endif - - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#if (DEBOUNCE > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif - - -__attribute__ ((weak)) -void matrix_init_quantum(void) { - matrix_init_kb(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} - -bool has_usb(void) { - return UDADDR & _BV(ADDEN); // This will return true of a USB connection has been established -} - -void matrix_init(void) -{ -#ifdef DISABLE_JTAG - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1< 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# else - read_cols_on_row(matrix+offset, current_row); -# endif - - } - -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix+offset, current_col); -# endif - - } -#endif - -# if (DEBOUNCE > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - #if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) - rgblight_task(); - #endif - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selecton to stabilize - select_row(current_row); - wait_us(30); - - // For each col... - for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - - // Select the col pin to read (active low) - uint8_t pin = col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - - // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); - } - - // Unselect row - unselect_row(current_row); - - return (last_row_value != current_matrix[current_row]); -} - -static void select_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -static void init_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - // Select col and wait for col selecton to stabilize - select_col(current_col); - wait_us(30); - - // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) - { - - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[row_index]; - - // Check row pin state - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) - { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); - } - else - { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -static void select_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#endif diff --git a/keyboards/vitamins_included/readme.md b/keyboards/vitamins_included/readme.md index 84bab9007c..5702fe3430 100644 --- a/keyboards/vitamins_included/readme.md +++ b/keyboards/vitamins_included/readme.md @@ -1,126 +1,44 @@ -Let's Split Vitamins Included -====== +# Let's Split Vitamins Included + ![Let's Split Vitamins included, assmebled in 3D printed case](https://i.imgur.com/btl0vNQ.jpg) -This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ +This readme and most of the code are from the lets split readme +## Quick links -**Hardware files for the Let's Split vitamins included are stored [here](http://github.com/duckle29/let-s-Split-v2/tree/onboardMCU)** +[REV1](./rev1/readme.md) +[REV2](./rev2/readme.md) -## First Time Setup +## Hardware -Clone the `qmk_firmware` repo and navigate to its top level directory. [Once your build environment is setup](https://docs.qmk.fm/getting_started_build_tools.html), you'll be able to generate the default .hex using the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) in the docs +Hardware files for the Let's Split vitamins included are stored [here](https://git.io/vita-inc) -If everything worked correctly you will see a file: - -```bash -lets_split_vitamins_rev1_YOUR_KEYMAP_NAME.hex -``` - -If you want, you can flash the hex file to the keyboard right after compilation, by adding `:avrdude` to the end of the make command like so: - -```bash -make lets_split_vitamins/rev1:default:avrdude -``` - -This will both compile the hex, and flash the connected half. - -For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. - - -Features --------- - -For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). +## Features Some features supported by the firmware: -* Either half can connect to the computer via USB, or both halves can be used - independently. -* You only need 3 wires to connect the two halves. One for VCC, one for GND and one - for serial communication. +* Either half can connect to the computer via USB, or both halves can be used independently. * Optional support for I2C connection between the two halves if for some - reason you require a faster connection between the two halves. Note this - requires an extra wire between halves and pull-up resistors on the data lines. - This is supported on the vitamins included. - The extra data line can also be used for ws2812 type LEDs. - If neither I2C nor RGB underglow is used, a TRS cable can be used instead of the 4wire TRRS cables. + reason you require a faster connection between the two halves. Note that this requires 4 conductors between halves, and as such requires a TRRS cable. + +## Required Hardware -Required Hardware ------------------ |Amount| Description | |--|--| | 1 | PCB kit from novelkeys | | 48 | MX compatible switches | | 48 | 1U keycaps -| 2 | Half cases. A 3D model for the left half is available [here](https://cad.onshape.com/documents/c6e5ae250d1e24fe46c9ef6c/w/d69f7049c0921df3d2b241f9/e/ecc2b176ab52a6d77bc55051). Mirror that to get a right-half case. Plate cases will be designed in the future. -| 1 | USB-mini-B cable of your choice | +| 1 | Mini-usb-B cable or USB-C cable for rev2. Keep in mind rev2.0 doesn't work with USB-C <> USB-C cables| | 1 | TRS / TRRS cable -Optional Hardware ------------------ +## Optional Hardware -A speaker can be hooked-up to the footprint on the PCBs. It is already enabled in the default firmware from github. - -A strip of WS2812 LEDs can be hooked up too, a guide will be written on how to do that once I get mine in the mail. -The PCB and connectors can safely handle 1A of current, but the USB standard is only rated at 500mA. Keep that in mind when picking the amount of LEDs. +A speaker can be hooked-up to the footprint on the PCBs. It is already enabled in the default firmware. +WS2812 LEDs can be added to the board. Check the different revision readme for specifics. ## Using I2C On the left half PCB, there's two pads labled ***I2C Pullup*** if you want to use I2C, you need to bridge those two solder jumpers with a soldering iron. You can change your configuration between serial and i2c by modifying your `config.h` file. - -Notes on Software Configuration -------------------------------- - -Configuring the firmware is similar to any other QMK project. One thing -to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between -the two halves, so because the let's split vitamins included has 4 rows in each half, it's -`MATRIX_ROWS=8`. - -Also, the current implementation assumes a maximum of 8 columns, but it would -not be very difficult to adapt it to support more if required. - - -## Entering bootloader -If the keyboard isn't new, and has been flashed before, you need to enter bootloader. -To enter bootloader, either use the assigned keys on the keymap, or if none have been put in the keymap, quickly short the reset to gnd twice. (Bottom pins of programming header, see image) ![Reset pins](https://i.imgur.com/LCXlv9W.png) - -If using the default keymap, there's a reset key-combination on each half: -***Lower (SW23) and left-shift (SW13)*** on the left half, or -***Raise(SW44) and Enter(SW42)*** on the right half -It is recommended to add such reset keys to any custom keymaps. It shouldn't be necesarry to have one on each half, but the default layout has that. - -The board exits bootloader mode after 8 seconds, if you haven't started flashing. - -## EEPROM - -If this is the first time you're flashing the boards, you have to flash EEPROM - -0. If your keyboard is plugged in, unplug it -1. Open a terminal, and navigate to the qmk_firmware folder -2. Run `ls /dev | grep tty` Note down which ports you see -2. Plug the keyboard in, if it's new, it should enter bootloader, if it's not new, see **Entering bootloader** on how to enter bootloader mode -4. Right after entering bootloader, run `ls /dev | grep tty` again. There should be a new tty, this is the bootloader TTY, note it down. If nothing shows see **Entering bootloader** on how to enter bootloader mode -6. For the left hand side, run `avrdude -c avr109 -p m32u4 -P /dev/ttyS1 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep":a` -Replace ***/dev/ttyS1*** with the port you noted down earlier. If you're on windows using msys2, replace ***/dev/ttyS1*** with COM2, note that the number is one higher than the tty number. -Do the same For the right hand, but change the file to ***eeprom-righthand.eep*** - -Your EEPROM should be flashed :) - -In the future, you shouldn't need to flash EEPROM (it will in fact wear the eeprom memory, so don't) - -## Flashing -If you haven't flashed EEPROM before, do that first. - -To flash keymaps onto the keyboard, use: -```bash -make lets_split_vitamins/rev1:[KEYMAP]:avrdude -``` -from the qmk_firmware folder. Default being the default keymap. - -You can plug either half into USB and it will work. you can also remove the TRS/TRRS cable, and plug both halves in. (which is why the default layout has reset on both halves) - -Enjoy your keyboard! :D diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h index f4e5666fef..c4881db01b 100644 --- a/keyboards/vitamins_included/rev1/config.h +++ b/keyboards/vitamins_included/rev1/config.h @@ -16,17 +16,17 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xBEE5 -#define PRODUCT_ID 0xF33D +#define SPLIT_USB_DETECT + +#define EE_HANDS +#define SOFT_SERIAL_PIN D0 + +/* USB Device descriptor parameters */ #define DEVICE_VER 0x0001 -#define MANUFACTURER Duckle29 -#define PRODUCT Lets Split sockets vitamins included #define DESCRIPTION A split keyboard for the cheapish makers /* key matrix size */ @@ -80,5 +80,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/vitamins_included/rev1/readme.md b/keyboards/vitamins_included/rev1/readme.md new file mode 100644 index 0000000000..038f14f5d0 --- /dev/null +++ b/keyboards/vitamins_included/rev1/readme.md @@ -0,0 +1,81 @@ +# Rev1 + +This readme describes the specifics of using the rev1 design + +## First Time Setup + +Clone the `qmk_firmware` repo and navigate to its top level directory. [Once your build environment is setup](https://docs.qmk.fm/getting_started_build_tools.html), you'll be able to generate the default .hex using the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) in the docs + +If everything worked correctly you will see a file: + +```bash +lets_split_vitamins_rev1_YOUR_KEYMAP_NAME.hex +``` + +If you want, you can flash the hex file to the keyboard right after compilation, by adding `:avrdude` to the end of the make command like so: + +```bash +make lets_split_vitamins/rev1:default:avrdude +``` + +This will both compile the hex, and flash the connected half. + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. + +## Entering bootloader + +If the keyboard isn't new, and has been flashed before, you need to enter bootloader. +To enter bootloader, either use the assigned keys on the keymap, or if none have been put in the keymap, quickly short the reset to gnd twice. (Bottom pins of programming header, see image) ![Reset pins](https://i.imgur.com/LCXlv9W.png) + +If using the default keymap, there's a reset key-combination on each half: +***Lower (SW23) and left-shift (SW13)*** on the left half, or +***Raise(SW44) and Enter(SW42)*** on the right half +It is recommended to add such reset keys to any custom keymaps. It shouldn't be necesarry to have one on each half, but the default layout has that. + +The board exits bootloader mode after 8 seconds, if you haven't started flashing. + +## EEPROM + +If this is the first time you're flashing the boards, you have to flash EEPROM + +0. If your keyboard is plugged in, unplug it +1. Open a terminal, and navigate to the qmk_firmware folder +1. Run `ls /dev | grep tty` Note down which ports you see +1. Plug the keyboard in, if it's new, it should enter bootloader, if it's not new, see **Entering bootloader** on how to enter bootloader mode +1. Right after entering bootloader, run `ls /dev | grep tty` again. There should be a new tty, this is the bootloader TTY, note it down. If nothing shows see **Entering bootloader** on how to enter bootloader mode +1. For the left hand side, run `avrdude -c avr109 -p m32u4 -P /dev/ttyS1 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep":a` +Replace ***/dev/ttyS1*** with the port you noted down earlier. If you're on windows using msys2, replace ***/dev/ttyS1*** with COM2, note that the number is one higher than the tty number. +Do the same For the right hand, but change the file to ***eeprom-righthand.eep*** + +Your EEPROM should be flashed :) + +In the future, you shouldn't need to flash EEPROM (it will in fact wear the eeprom memory, so don't) + +## Flashing + +If you haven't flashed EEPROM before, do that first. + +To flash keymaps onto the keyboard, use: + +```bash +make lets_split_vitamins/rev1:[KEYMAP]:avrdude +``` + +from the qmk_firmware folder. Default being the default keymap. + +## Cases + +The keyboard is supplied with some simple plate cases, alternatively a 3D model for the left half is available [here](https://cad.onshape.com/documents/c6e5ae250d1e24fe46c9ef6c/w/d69f7049c0921df3d2b241f9/e/ecc2b176ab52a6d77bc55051). + +Alternatively the flat case for the Rev2 works for the rev1 kit as well, however one of the supports collide with a diode. If printed in thermo-plastics this can be heated and pressed to form a recess for the diode. + +## WS2812 RGB + +If you wish to add RGB LED strips to your board, then the boards have breakouts for these. +You can either have each halfcontrol it's own strip of LEDs, or, if you're using a TRRS cable, you can have one half control the LEDs in both halves. + +To add RGB LEDs to the board, solder the + and - of the >WS2812 headers to the LED strips. Then if you want each half to control it's own set of LEDs seperately, solder the D pad to Din on the strips. + +If you instead want to syncronize the halves over a TRRS cable, solder the D pad to Din in the side you want to control the strips, either will work so flip a coin, and then solder the Dout pad to the WS2812> pad on the board. On the other half, solder the WS2812> pad to Din. + +![pad legend](https://i.imgur.com/g6ane0Q.jpg) diff --git a/keyboards/vitamins_included/rev1/rev1.h b/keyboards/vitamins_included/rev1/rev1.h index 743c341c3c..53ae64a6ea 100644 --- a/keyboards/vitamins_included/rev1/rev1.h +++ b/keyboards/vitamins_included/rev1/rev1.h @@ -1,40 +1,3 @@ -#ifndef REV1_H -#define REV1_H -#define DISABLE_JTAG // The keyboard uses PF4, PF5 and PF7, which are used by JTAG. -#define EE_HANDS // This isn't optional for the vitamins included +#pragma once #include QMK_KEYBOARD_H - -//void promicro_bootloader_jmp(bool program); -#include "quantum.h" - - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - -//void promicro_bootloader_jmp(bool program); - -#define KEYMAP( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 } \ - } - -#define LAYOUT_ortho_4x12 KEYMAP -#endif diff --git a/keyboards/vitamins_included/rev1/rules.mk b/keyboards/vitamins_included/rev1/rules.mk index 0542810ee6..8b96b5ca43 100644 --- a/keyboards/vitamins_included/rev1/rules.mk +++ b/keyboards/vitamins_included/rev1/rules.mk @@ -1,5 +1,11 @@ -BACKLIGHT_ENABLE = no -AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = yes -DEBUG_ENABLE = no -CONSOLE_ENABLE = no +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +SPLIT_KEYBOARD = yes diff --git a/keyboards/vitamins_included/rev2/config.h b/keyboards/vitamins_included/rev2/config.h new file mode 100644 index 0000000000..0aa0e7063f --- /dev/null +++ b/keyboards/vitamins_included/rev2/config.h @@ -0,0 +1,87 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2019 Mikkel Jeppesen + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define SPLIT_HAND_PIN B4 +#define SOFT_SERIAL_PIN D0 + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0002 +#define DESCRIPTION A toolless split keyboard for the cheapish makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { F5, F6, C7, F7 } +#define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6} + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN F0 + +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_ANIMATIONS + +/* Audio settings */ +#ifdef AUDIO_ENABLE + #define C6_AUDIO // Define this to enable the buzzer +#endif + +#define QMK_ESC_OUTPUT F1 // usually COL +#define QMK_ESC_INPUT F5 // usually ROW +#define QMK_LED D5 +#define QMK_SPEAKER C6 + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/vitamins_included/rev2/readme.md b/keyboards/vitamins_included/rev2/readme.md new file mode 100644 index 0000000000..3e202b64e0 --- /dev/null +++ b/keyboards/vitamins_included/rev2/readme.md @@ -0,0 +1,10 @@ +# Rev2 + +Revision 2 is documented [on qmk.fm](https://qmk.fm/keyboards/vitamins_included/) + +Key differences between rev1 and rev2: + +* rev2 uses qmk-dfu bootloader +* rev2 uses a USB-C connector +* rev2 6 WS2812 LEDs factory mounted to each half +* rev2 has more mounting holes. 1 additional M3, and 4 additional M2.5 holes diff --git a/keyboards/vitamins_included/rev2/rev2.c b/keyboards/vitamins_included/rev2/rev2.c new file mode 100644 index 0000000000..7bdeebb03c --- /dev/null +++ b/keyboards/vitamins_included/rev2/rev2.c @@ -0,0 +1,31 @@ +#include "rev2.h" + + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +bool is_keyboard_left(void) { + #if defined(MASTER_LEFT) + return is_keyboard_master(); + #elif defined(MASTER_RIGHT) + return !is_keyboard_master(); + #elif defined(SPLIT_HAND_PIN) + // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand + setPinInputHigh(SPLIT_HAND_PIN); + bool x = !readPin(SPLIT_HAND_PIN); + setPinInput(SPLIT_HAND_PIN); + return x; + #elif defined(EE_HANDS) + return eeprom_read_byte(EECONFIG_HANDEDNESS); + #endif + + return is_keyboard_master(); +} + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/vitamins_included/rev2/rev2.h b/keyboards/vitamins_included/rev2/rev2.h new file mode 100644 index 0000000000..7e12888dda --- /dev/null +++ b/keyboards/vitamins_included/rev2/rev2.h @@ -0,0 +1,2 @@ +#pragma once +#include QMK_KEYBOARD_H diff --git a/keyboards/vitamins_included/rev2/rules.mk b/keyboards/vitamins_included/rev2/rules.mk new file mode 100644 index 0000000000..bacfbea396 --- /dev/null +++ b/keyboards/vitamins_included/rev2/rules.mk @@ -0,0 +1,11 @@ +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +SPLIT_KEYBOARD = yes diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk index 34f423f59d..d81b4a9146 100644 --- a/keyboards/vitamins_included/rules.mk +++ b/keyboards/vitamins_included/rules.mk @@ -1,76 +1,28 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c \ - ssd1306.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +AUDIO_ENABLE = yes # Audio output on port C6 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +DEBUG_ENABLE = no # Enable more debug info +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +MIDI_ENABLE = no # MIDI controls +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +UNICODE_ENABLE = no # Unicode # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -CUSTOM_MATRIX = yes +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = ortho_4x12 -DEFAULT_FOLDER = vitamins_included/rev1 +DEFAULT_FOLDER = vitamins_included/rev2 -EXTRAFLAGS += -flto +LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/vitamins_included/serial.c b/keyboards/vitamins_included/serial.c deleted file mode 100644 index 4d37eeb8d3..0000000000 --- a/keyboards/vitamins_included/serial.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } - contacted_by_master = true; -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/vitamins_included/serial.h b/keyboards/vitamins_included/serial.h deleted file mode 100644 index ade7620b7f..0000000000 --- a/keyboards/vitamins_included/serial.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include -#include "split_util.h" - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/vitamins_included/split_util.c b/keyboards/vitamins_included/split_util.c deleted file mode 100644 index b86ad137bf..0000000000 --- a/keyboards/vitamins_included/split_util.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" -#include "debug.h" - -volatile bool isLeftHand = true; -volatile bool contacted_by_master = false; - -// this code runs before the usb and keyboard is initialized -void matrix_setup(void) { - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); -} diff --git a/keyboards/vitamins_included/split_util.h b/keyboards/vitamins_included/split_util.h deleted file mode 100644 index 5acf386e4f..0000000000 --- a/keyboards/vitamins_included/split_util.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H - -#include -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; -extern volatile bool contacted_by_master; - -bool has_usb(void); - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - - -#endif diff --git a/keyboards/vitamins_included/vitamins_included.h b/keyboards/vitamins_included/vitamins_included.h index b5fbd52940..4cdfe03edd 100644 --- a/keyboards/vitamins_included/vitamins_included.h +++ b/keyboards/vitamins_included/vitamins_included.h @@ -1,13 +1,40 @@ -#ifndef VITAMINS_INCLUDED_H -#define VITAMINS_INCLUDED_H +#pragma once #include "quantum.h" -#include "rev1.h" +#ifdef KEYBOARD_vitamins_included_rev1 + #include "rev1.h" +#else + #include "rev2.h" +#endif +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } // Used to create a keymap using only KC_ prefixed keys -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ @@ -20,6 +47,6 @@ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ ) -#define KC_LAYOUT_ortho_4x12 KC_KEYMAP - -#endif +#define KC_LAYOUT_ortho_4x12 LAYOUT_kc +#define LAYOUT_ortho_4x12 LAYOUT +#define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/vn66/config.h b/keyboards/vn66/config.h new file mode 100644 index 0000000000..d7281747e3 --- /dev/null +++ b/keyboards/vn66/config.h @@ -0,0 +1,87 @@ +/* +Copyright 2019 HnahKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER HnahKB +#define PRODUCT VN66 +#define DESCRIPTION A compact keyboard for VNMK + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { B1, B2, B3, D2, F7 } +#define MATRIX_COL_PINS \ + { F6, F5, F4, F1, F0, C6, C7, B5, B4, D7, D6, D4, D5, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN E2 + #ifdef RGB_DI_PIN + #define RGBLED_NUM 20 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS + #endif +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 3 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +#define GRAVE_ESC_CTRL_OVERRIDE + +#define ENCODERS_PAD_A {B0} +#define ENCODERS_PAD_B {B7} +#define ENCODER_RESOLUTION 2 \ No newline at end of file diff --git a/keyboards/vn66/info.json b/keyboards/vn66/info.json new file mode 100644 index 0000000000..9756905f99 --- /dev/null +++ b/keyboards/vn66/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "vn66", + "url": "fb.com/groups/VietNamMechKey/", + "maintainer": "qmk", + "width": 19.25, + "height": 5.25, + "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.25, "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}, {"x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"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}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"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":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}] + }, + "LAYOUT_ansi": { + "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}, {"x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "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}, {"x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"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}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}] + }, + "LAYOUT_iso": { + "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}, {"x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "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":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"x":0, "y":3, "w":1.25}, {"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":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/vn66/keymaps/default/config.h b/keyboards/vn66/keymaps/default/config.h new file mode 100644 index 0000000000..348d7c5513 --- /dev/null +++ b/keyboards/vn66/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/vn66/keymaps/default/keymap.c b/keyboards/vn66/keymaps/default/keymap.c new file mode 100644 index 0000000000..df2d895125 --- /dev/null +++ b/keyboards/vn66/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _QWERTY, + _LOWER +}; + +#define LOWER MO(_LOWER) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( /* Base */ + GRAVE_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_INS, + 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_DEL, + 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_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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_LOWER] = LAYOUT_all( /* Base */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise == 0) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_VOLD); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_VOLU); + #endif + } + } \ No newline at end of file diff --git a/keyboards/vn66/keymaps/default/readme.md b/keyboards/vn66/keymaps/default/readme.md new file mode 100644 index 0000000000..5c8f558c02 --- /dev/null +++ b/keyboards/vn66/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for vn66 \ No newline at end of file diff --git a/keyboards/vn66/readme.md b/keyboards/vn66/readme.md new file mode 100644 index 0000000000..0ab5b75043 --- /dev/null +++ b/keyboards/vn66/readme.md @@ -0,0 +1,15 @@ +# vn66 + +![vn66](https://i.imgur.com/Eo28suI.jpg) + +A compact 60% keyboard for VNMK + +Keyboard Maintainer: VNMK Community +Hardware Supported: VN66 PCB rev.2 +Hardware Availability: [https://geekhack.org/index.php?topic=101754.0] + +Make example for this keyboard (after setting up your build environment): + + make vn66: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). diff --git a/keyboards/vn66/rules.mk b/keyboards/vn66/rules.mk new file mode 100644 index 0000000000..37005c1276 --- /dev/null +++ b/keyboards/vn66/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +ENCODER_ENABLE = yes diff --git a/keyboards/vn66/vn66.c b/keyboards/vn66/vn66.c new file mode 100644 index 0000000000..122047468c --- /dev/null +++ b/keyboards/vn66/vn66.c @@ -0,0 +1,36 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include "vn66.h" + +void matrix_init_kb(void) { + led_init_ports(); + matrix_init_user(); +}; + +void led_init_ports(void) { + setPinOutput(E6); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Turn Caps Lock LED on + writePinLow(E6); + } else { + // Turn Caps Lock LED off + writePinHigh(E6); + } + led_set_user(usb_led); +} diff --git a/keyboards/vn66/vn66.h b/keyboards/vn66/vn66.h new file mode 100644 index 0000000000..8e4c176414 --- /dev/null +++ b/keyboards/vn66/vn66.h @@ -0,0 +1,70 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, k4c,\ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ + { k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d }, \ +} + +#define LAYOUT_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4c,\ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO, k4c,\ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, \ + k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ +) + +#define LAYOUT_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4c,\ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b,\ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO, k4c,\ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k4b,\ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ +) + diff --git a/keyboards/waldo/config.h b/keyboards/waldo/config.h index c913ae7712..c3272bf1da 100644 --- a/keyboards/waldo/config.h +++ b/keyboards/waldo/config.h @@ -36,16 +36,12 @@ along with this program. If not, see . #define UNUSED_PINS #define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 @@ -73,5 +69,12 @@ along with this program. If not, see . //#define NO_ACTION_FUNCTION // RGB LED -#define RGB_DI_PIN B0 // The pin the LED strip is connected to -#define RGBLED_NUM 10 // Number of LEDs in your strip +#define RGB_DI_PIN B0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP +#endif \ No newline at end of file diff --git a/keyboards/waldo/keymaps/default/keymap.c b/keyboards/waldo/keymaps/default/keymap.c index 2fcb3a1afb..f8041a3f85 100644 --- a/keyboards/waldo/keymaps/default/keymap.c +++ b/keyboards/waldo/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum waldo_layers { _BASE, diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/rules.mk b/keyboards/waldo/keymaps/default_split_shft_bck/rules.mk deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk index 40ac48474e..c174a9eb96 100644 --- a/keyboards/waldo/rules.mk +++ b/keyboards/waldo/rules.mk @@ -1,48 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/wasdat/keymaps/default/keymap.c b/keyboards/wasdat/keymaps/default/keymap.c deleted file mode 100644 index 967947ada4..0000000000 --- a/keyboards/wasdat/keymaps/default/keymap.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2019 Maarten Dekkers - * - * 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 . - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ - * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp| |Ins|Hom|PgU| |Num| / | * | - | - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │ |Del|End|PgD| │ 7 │ 8 │ 9 │   │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │ - * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │               │ 4 │ 5 │ 6 │   │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐     ├───┼───┼───┼───┤ - * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ - * │Ctrl│GUI │Alt │                        │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ - */ - LAYOUT_fullsize_ansi( - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, - - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, - 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_P4, KC_P5, KC_P6, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT - ) -}; diff --git a/keyboards/wasdat/keymaps/default_iso/keymap.c b/keyboards/wasdat/keymaps/default_iso/keymap.c deleted file mode 100644 index 00a45d746a..0000000000 --- a/keyboards/wasdat/keymaps/default_iso/keymap.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2019 Maarten Dekkers - * - * 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 . - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ - * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp| |Ins|Hom|PgU| |Num| / | * | - | - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │ |Del|End|PgD| │ 7 │ 8 │ 9 │   │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │ - * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │               │ 4 │ 5 │ 6 │   │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐     ├───┼───┼───┼───┤ - * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ - * │Ctrl│GUI │Alt │                        │AlGr│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ - */ - LAYOUT_fullsize_iso( - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, - - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, - 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, - 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, KC_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT - ) -}; diff --git a/keyboards/wasdat/keymaps/konstantin/keymap.c b/keyboards/wasdat/keymaps/konstantin/keymap.c deleted file mode 100644 index 4fb24a5e37..0000000000 --- a/keyboards/wasdat/keymaps/konstantin/keymap.c +++ /dev/null @@ -1,79 +0,0 @@ -#include QMK_KEYBOARD_H -#include "konstantin.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base layer - * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ - * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12││PSc│SLk│Pau│ - * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace ││Ins│Hom│PgU│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ ││Del│End│PgD│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent │└───┴───┴───┘ - * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ \ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ - * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RShift │ │ ↑ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ - * │LCtl│LGui│LAlt│ Space │RAlt│RGui│FnLk│RCtl││ ← │ ↓ │ → │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ - */ - [L_BASE] = LAYOUT_tkl_iso( - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - 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_DEL, KC_END, KC_PGDN, - FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, FN_FNLK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* Function layer - * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │Num│ │ - * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ - * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Clear ││ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ - * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│ ││ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │└───┴───┴───┘ - * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ - * │ │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│Mut│ │ │PgU│ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ - * │ │DtPR│DtNA│ MW↓ │ │ │ │ ││Hom│PgD│End│ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ - */ - [L_FN] = LAYOUT_tkl_iso( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, CLEAR, _______, _______, _______, - KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, _______, - _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, - _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END - ), - - /* Numpad layer - * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │Num│ │ - * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ - * │ │ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │ ││ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ - * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ ││ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐PEnt│└───┴───┴───┘ - * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ - * │ │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ - * │ │ │ │ │ │ │ │ ││ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ - */ - [L_NUMPAD] = LAYOUT_tkl_iso( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, - _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; diff --git a/keyboards/wasdat/keymaps/konstantin/rules.mk b/keyboards/wasdat/keymaps/konstantin/rules.mk deleted file mode 100644 index 4bb1ee6588..0000000000 --- a/keyboards/wasdat/keymaps/konstantin/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODEMAP_ENABLE = yes diff --git a/keyboards/wasdat/rules.mk b/keyboards/wasdat/rules.mk deleted file mode 100644 index c9deae5c57..0000000000 --- a/keyboards/wasdat/rules.mk +++ /dev/null @@ -1,84 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = qmk-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - -CUSTOM_MATRIX = yes -SRC += matrix.c -LAYOUTS = fullsize_ansi fullsize_iso tkl_ansi tkl_iso diff --git a/keyboards/wasdat/wasdat.c b/keyboards/wasdat/wasdat.c deleted file mode 100644 index 11338634d4..0000000000 --- a/keyboards/wasdat/wasdat.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright 2019 Maarten Dekkers - * - * 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 . - */ -#include "wasdat.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); - led_init_ports(); -} - -void led_init_ports(void) { - setPinOutput(B0); - setPinOutput(B1); - setPinOutput(B2); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B0); - } else { - writePinHigh(B0); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(B1); - } else { - writePinHigh(B1); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h index d88101fdc8..4a5b65c583 100644 --- a/keyboards/westfoxtrot/aanzee/config.h +++ b/keyboards/westfoxtrot/aanzee/config.h @@ -127,16 +127,16 @@ along with this program. If not, see . // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 675 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 349 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk index efd8bd14de..bcc5dc530a 100644 --- a/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. diff --git a/keyboards/westfoxtrot/aanzee/rules.mk b/keyboards/westfoxtrot/aanzee/rules.mk index cdea2a2657..5032b0d296 100644 --- a/keyboards/westfoxtrot/aanzee/rules.mk +++ b/keyboards/westfoxtrot/aanzee/rules.mk @@ -1,50 +1,14 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/westfoxtrot/cyclops/keymaps/peippo/config.h b/keyboards/westfoxtrot/cyclops/keymaps/peippo/config.h new file mode 100644 index 0000000000..6278fae658 --- /dev/null +++ b/keyboards/westfoxtrot/cyclops/keymaps/peippo/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 'mechmerlin' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/cyclops/keymaps/peippo/keymap.c b/keyboards/westfoxtrot/cyclops/keymaps/peippo/keymap.c new file mode 100644 index 0000000000..902645d177 --- /dev/null +++ b/keyboards/westfoxtrot/cyclops/keymaps/peippo/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2018 westfoxtrot + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Default layer + * ,--------------------------------------------------------------------------------------------------------------------. ,-------. + * | GrvEsc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | Backspace | | PgUp | + * |--------------------------------------------------------------------------------------------------------------------+ +-------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | Enter | | PgDn | + * |-----------------------------------------------------------------------------------------------------------, | `-------` + * | Mod Layer | A | S | D | F | G | H | J | K | L | Ö | Ä | ' | | + * |-----------------------------------------------------------------------------------------------------------------------, + * | Shift | < | Z | X | C | V | B | N | M | , | . | - | Shift | Up | + * |-----------------------------------------------------------------------------------------------------------------------+-------, + * | Control | Option | Command | Space | Command | Option | Left | Down | Right | + * `-------------------------------------------------------------------------------------------------------------------------------' + */ + + [0] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + 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_PGDN, + MO(1), 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_NO, KC_UP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + + + /* Modifier layer + * ,--------------------------------------------------------------------------------------------------------------------. ,-------. + * | Esc | | | | | | | | [ | ] | | | | Delete | | VolUp | + * |--------------------------------------------------------------------------------------------------------------------+ +-------+ + * | | | | | | | | PgUp | Up | PgDn | | | | | | VolDn | + * |-----------------------------------------------------------------------------------------------------------, | `-------` + * | | |Scrnsht|Desktop| | | | Left | Down | Right | | | Reset | | + * |-----------------------------------------------------------------------------------------------------------------------, + * | Shift | | | | | | | | | | | | Shift | Play | + * |-----------------------------------------------------------------------------------------------------------------------+-------, + * | | | | | | | Prev | Mute | Next | + * `-------------------------------------------------------------------------------------------------------------------------------' + */ + + [1] = LAYOUT( + KC_ESC, _______, _______, _______, _______, _______, _______, _______, RALT(KC_8), RALT(KC_9), _______, _______, _______, KC_DEL, KC__VOLUP, + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, KC__VOLDOWN, + _______, _______, SGUI(KC_5), KC_F11, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, RESET , _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, KC_MRWD, KC__MUTE, KC_MFFD), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/westfoxtrot/cyclops/keymaps/peippo/readme.md b/keyboards/westfoxtrot/cyclops/keymaps/peippo/readme.md new file mode 100644 index 0000000000..a587d74c2a --- /dev/null +++ b/keyboards/westfoxtrot/cyclops/keymaps/peippo/readme.md @@ -0,0 +1,20 @@ +# Cyclops keymap by peippo + +Nordic layout with faster access to cursor movement keys and brackets. + +## Keymap notes + +- Default layer has a Grave Escape which outputs Escape when pressed normally, and `§` when Shift or Command are held. I like to setup Command+Esc to moving focus to next window (MacOS preferences, Keyboard / Shortcuts / Keyboard). +- `Caps Lock` can be held to access the modifier layer. + +## Modifier layer + +- Additional cursor movement keys on `J/K/L/I`, and Page Up/Page Down on `U/O`. +- Easier access to [] & {} (w/ Shift) on `8/9`. +- Show desktop on `D`. +- Screen capture tool on `S`. +- Media shortcuts on Arrow keys & Page Up/Page Down. + +### Build + +To build the firmware, run `make westfoxtrot/cyclops:peippo`. diff --git a/keyboards/westfoxtrot/cyclops/rules.mk b/keyboards/westfoxtrot/cyclops/rules.mk index 10ea513910..04b2bc82f6 100644 --- a/keyboards/westfoxtrot/cyclops/rules.mk +++ b/keyboards/westfoxtrot/cyclops/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -77,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/westfoxtrot/cypher/rules.mk b/keyboards/westfoxtrot/cypher/rules.mk index ab03dc9f9d..4703282ff2 100644 --- a/keyboards/westfoxtrot/cypher/rules.mk +++ b/keyboards/westfoxtrot/cypher/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/whitefox/info.json b/keyboards/whitefox/info.json index e77e3ad2c3..5efe2910fc 100644 --- a/keyboards/whitefox/info.json +++ b/keyboards/whitefox/info.json @@ -10,6 +10,10 @@ "LAYOUT_truefox": { "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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}, {"x":14, "y":3}, {"x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_aria": { + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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}, {"x":14, "y":3}, {"x":15, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } diff --git a/keyboards/whitefox/keymaps/kim-kim/keymap.c b/keyboards/whitefox/keymaps/kim-kim/keymap.c index 1e6149899f..a254067582 100644 --- a/keyboards/whitefox/keymaps/kim-kim/keymap.c +++ b/keyboards/whitefox/keymaps/kim-kim/keymap.c @@ -41,7 +41,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSPC, KC_DEL, \ KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\ KC_LSFT,XXXXXXX,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\ - KC_LALT,KC_FN0,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT, XXXXXXX, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_LALT,MO(1), KC_LGUI, KC_SPC, KC_RGUI,KC_RALT, XXXXXXX, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = LAYOUT( \ _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,_______,\ @@ -57,8 +57,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define ACTION_LEDS_GAME 2 const uint16_t fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_LAYER_MOMENTARY(2), [2] = ACTION_FUNCTION(ACTION_LEDS_ALL), [3] = ACTION_FUNCTION(ACTION_LEDS_GAME), diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index 3874bcd18d..4c587dd272 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSfRCt│ ↑ │PgD│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │LCtl│LGui│LAlt│ Space │RAlG│FnLk│ │ ← │ ↓ │ → │ + * │LCtl│LGui│LAlt│ Space │RAlG│FnFL│ │ ← │ ↓ │ → │ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT ), - /* Function layer + /* Fn layer * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│SLk│Pau│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index 625ef346c8..bced6e8a70 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,11 +1,11 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODEMAP_ENABLE = yes - -BACKLIGHT_ENABLE = no -VISUALIZER_ENABLE = no +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +SPACE_CADET_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes +VISUALIZER_ENABLE = no diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c index 76fb72f8e3..f6987fe1aa 100644 --- a/keyboards/whitefox/keymaps/matt3o/keymap.c +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -33,9 +33,9 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( \ 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_BSLS,KC_GRV, KC_MUTE,\ 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_BSPC, KC_DEL, \ - KC_FN0, 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_PGUP,\ + MO(1), 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_PGUP,\ 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, KC_PGDN,\ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN1, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(2), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = LAYOUT( \ KC_TRNS,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,\ @@ -58,8 +58,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define ACTION_LEDS_GAME 2 const uint16_t fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_LAYER_MOMENTARY(2), [2] = ACTION_FUNCTION(ACTION_LEDS_ALL), [3] = ACTION_FUNCTION(ACTION_LEDS_GAME), diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index d9aa911c54..59332d1d5a 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -57,6 +57,8 @@ OPT_DEFS = DFU_ARGS = -d 1c11:b007 DFU_SUFFIX_ARGS = -p b007 -v 1c11 +BOOTLOADER = dfu + # Build Options # comment out to disable the options. # diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h index 2724aad5a2..7791dac67c 100644 --- a/keyboards/whitefox/whitefox.h +++ b/keyboards/whitefox/whitefox.h @@ -102,4 +102,36 @@ along with this program. If not, see . { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ } +/* ARIA WhiteFox + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| + * |---------------------------------------------------------------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Ctrl| |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + +#define LAYOUT_aria( \ + K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K51, K61, \ + K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ + K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K84, K05, \ + K15, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ + K76, K86, K07, K17, K27, K37, K57, K67, K77 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, KC_NO, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ +} + #endif diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h new file mode 100644 index 0000000000..f3e21aa15f --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/config.h @@ -0,0 +1,142 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x5241 // "RW" +#define PRODUCT_ID 0x4B59 // "KY" +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS KOYU +#define DESCRIPTION RAMA WORKS KOYU + + + +// key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// KOYU PCB pin-out +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +// COL2ROW or ROW2COL +#define DIODE_DIRECTION COL2ROW + +// Set 0 if debouncing isn't needed +#define DEBOUNCE 5 + +// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +#define LOCKING_SUPPORT_ENABLE +// Locking resynchronize hack +#define LOCKING_RESYNC_ENABLE + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +// disable debug print +//#define NO_DEBUG + +// disable print +//#define NO_PRINT + +// disable action features +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for KOYU specifics +#define RGB_BACKLIGHT_KOYU + +// enable/disable LEDs based on layout +// they aren't really used if RGB_BACKLIGHT_M60_A defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111100000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+31) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 +// Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/rama_works_koyu/info.json b/keyboards/wilba_tech/rama_works_koyu/info.json new file mode 100644 index 0000000000..430bc6fed8 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "RAMA WORKS KOYU", + "url": "http://rama.works", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Num Lock", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Insert", "x":15, "y":1}, {"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":"Home", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"/", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Ctrl", "x":11, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/rama/koyu/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_koyu/keymaps/default/keymap.c similarity index 100% rename from keyboards/rama/koyu/keymaps/default/keymap.c rename to keyboards/wilba_tech/rama_works_koyu/keymaps/default/keymap.c diff --git a/keyboards/rama/koyu/koyu.c b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.c similarity index 100% rename from keyboards/rama/koyu/koyu.c rename to keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.c diff --git a/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h new file mode 100644 index 0000000000..f51bc5c613 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h @@ -0,0 +1,42 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" +#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" +#include "keyboards/wilba_tech/via_keycodes.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K407, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413, K414 } \ +} diff --git a/keyboards/wilba_tech/rama_works_koyu/readme.md b/keyboards/wilba_tech/rama_works_koyu/readme.md new file mode 100644 index 0000000000..11fa3bacf6 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/readme.md @@ -0,0 +1,23 @@ +# RAMA WORKS KOYU + +![RAMA WORKS KOYU](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/5b8bd6e6b8a045c95eac2003/1535891375794/RW-KOYU-A-RENDER-04-TOP.1335.jpg?format=1500w) + +The 'wait' for something isn't the most conscious desire, but that anticipation creates nostalgia. + +At Rama Works, you've embraced this. From updates of the blog, to direct communication with the community, being part of a Rama Works product doesn't just start when you receive it. If you've ever received a Rama Works product, you know that no detail is overlooked. + +Let us take you on a journey that will capture that sensory experience, and explore the gravitational interaction between aesthetic and design. The Rama Works 'X' element personifies the understanding that taking something away doesn't necessarily make it less. + +This is the sound of Rama Works. Never too busy-a feeling of delightful modern weightlessness. A rich sonic experience. Sparse and ethereal, this music boldly inhabits a nondescript, borderless space. Warm, synthetic textures, bespoke musical sound design. percussive elements percolating and accentuating movement on the screen and in the stereo field. a sonic palette full of clicks, taps and resonances evoking a sense of calm comfort and familiarity. + +[More info at RAMA WORKS](https://rama.works/koyu/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA WORKS KOYU PCB +Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_koyu: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). \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk new file mode 100644 index 0000000000..cf6a8a96a0 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk @@ -0,0 +1,48 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h new file mode 100644 index 0000000000..f72ecae85c --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/config.h @@ -0,0 +1,204 @@ +/* +Copyright 2018 Wilba + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5241 // "RW" +#define PRODUCT_ID 0x00AB // 10-B +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS M10-B +#define DESCRIPTION RAMA WORKS M10-B + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { E6 } +#define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN C6 +//#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*10*2)) = (37+80) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 117 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 907 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +#endif diff --git a/keyboards/wilba_tech/rama_works_m10_b/info.json b/keyboards/wilba_tech/rama_works_m10_b/info.json new file mode 100644 index 0000000000..22b6506d6e --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "RAMA WORKS M10-B", + "url": "http://rama.works", + "maintainer": "Wilba", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 1, "y": 3, "w": 2.0 } + ] + } + } +} diff --git a/keyboards/rama/m10_b/keymaps/default/config.h b/keyboards/wilba_tech/rama_works_m10_b/keymaps/default/config.h similarity index 100% rename from keyboards/rama/m10_b/keymaps/default/config.h rename to keyboards/wilba_tech/rama_works_m10_b/keymaps/default/config.h diff --git a/keyboards/rama/m10_b/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_m10_b/keymaps/default/keymap.c similarity index 100% rename from keyboards/rama/m10_b/keymaps/default/keymap.c rename to keyboards/wilba_tech/rama_works_m10_b/keymaps/default/keymap.c diff --git a/keyboards/rama/m10_b/keymaps/default/readme.md b/keyboards/wilba_tech/rama_works_m10_b/keymaps/default/readme.md similarity index 100% rename from keyboards/rama/m10_b/keymaps/default/readme.md rename to keyboards/wilba_tech/rama_works_m10_b/keymaps/default/readme.md diff --git a/keyboards/rama/m10_b/keymaps/knops/config.h b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h similarity index 100% rename from keyboards/rama/m10_b/keymaps/knops/config.h rename to keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h diff --git a/keyboards/rama/m10_b/keymaps/knops/keymap.c b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c similarity index 100% rename from keyboards/rama/m10_b/keymaps/knops/keymap.c rename to keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c diff --git a/keyboards/rama/m10_b/keymaps/knops/readme.md b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/readme.md similarity index 100% rename from keyboards/rama/m10_b/keymaps/knops/readme.md rename to keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/readme.md diff --git a/keyboards/rama/m10_b/m10_b.c b/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.c similarity index 100% rename from keyboards/rama/m10_b/m10_b.c rename to keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.c diff --git a/keyboards/rama/m10_b/m10_b.h b/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h similarity index 100% rename from keyboards/rama/m10_b/m10_b.h rename to keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h diff --git a/keyboards/wilba_tech/rama_works_m10_b/readme.md b/keyboards/wilba_tech/rama_works_m10_b/readme.md new file mode 100644 index 0000000000..6b4130aeb4 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/readme.md @@ -0,0 +1,15 @@ +# RAMA WORKS M10-B + +![RAMA WORKS M10-B](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/5b4997390e2e72d65f7a8e83/5b499748352f534ffb40392b/1531549522790/RAMA-M10-B-04.572.jpg?format=1500w) + +Mechanical Mini Pad. [More info at Massdrop](https://www.massdrop.com/buy/rama-m10-a) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA WORKS M10-B PCB +Hardware Availability: [Massdrop](https://www.massdrop.com/buy/rama-m10-a) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_m10_b:default + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk new file mode 100644 index 0000000000..07372d0ac2 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h new file mode 100644 index 0000000000..1ee76750c1 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/config.h @@ -0,0 +1,139 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x5241 // "RW" +#define PRODUCT_ID 0x060A // 60-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS M60-A +#define DESCRIPTION RAMA WORKS M60-A + +// key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +// M60-A PCB default pin-out +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } +#define UNUSED_PINS + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +// COL2ROW or ROW2COL +#define DIODE_DIRECTION COL2ROW + +// Set 0 if debouncing isn't needed +#define DEBOUNCE 5 + +// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +#define LOCKING_SUPPORT_ENABLE +// Locking resynchronize hack +#define LOCKING_RESYNC_ENABLE + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +// disable debug print +//#define NO_DEBUG + +// disable print +//#define NO_PRINT + +// disable action features +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for M60-A specifics +#define RGB_BACKLIGHT_M60_A + +// enable/disable LEDs based on layout +// they aren't really used if RGB_BACKLIGHT_M60_A defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+31) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 +// Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/rama_works_m60_a/info.json b/keyboards/wilba_tech/rama_works_m60_a/info.json new file mode 100644 index 0000000000..e2061b73f6 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "RAMA WORKS M60-A", + "url": "http://rama.works", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_hhkb": { + "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":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":2.25}, {"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}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/rama/m60_a/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_m60_a/keymaps/default/keymap.c similarity index 100% rename from keyboards/rama/m60_a/keymaps/default/keymap.c rename to keyboards/wilba_tech/rama_works_m60_a/keymaps/default/keymap.c diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/keymap.c b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/keymap.c new file mode 100644 index 0000000000..fc81220e41 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/keymap.c @@ -0,0 +1,82 @@ +#include QMK_KEYBOARD_H + + +#define QWER 0 +#define GAMING 1 +#define HHKB 2 +#define UTIL 3 +#define LIGHTING 4 +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) +#define TG_GAME TG(GAMING) + +enum custom_keycodes { + FN_HHKB = SAFE_RANGE, + FN_UTIL +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch(keycode) { + case FN_HHKB: + if (record->event.pressed) { + layer_on(2); + update_tri_layer(2, 3, 4); + } else { + layer_off(2); + update_tri_layer(2, 3, 4); + } + return false; + break; + case FN_UTIL: + if (record->event.pressed) { + layer_on(3); + update_tri_layer(2, 3, 4); + } else { + layer_off(3); + update_tri_layer(2, 3, 4); + } + return false; + break; + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[QWER] = LAYOUT_60_hhkb( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + HPR_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_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_HHKB, + KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, FN_UTIL), + +[GAMING] = LAYOUT_60_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_SPC, _______, _______), + +[HHKB] = LAYOUT_60_hhkb( + 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_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______), + +[UTIL] = LAYOUT_60_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______), + +[LIGHTING] = LAYOUT_60_hhkb( + RESET, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, _______, _______, _______, _______, BR_DEC, BR_INC, _______, _______, + TG_GAME, _______, _______, S1_DEC, S1_INC, S2_DEC, S2_INC, _______, _______, _______, _______, ES_DEC, ES_INC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/readme.md b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/readme.md new file mode 100644 index 0000000000..dc03b1491e --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/readme.md @@ -0,0 +1,15 @@ +# Michael Guterl's M60-A Layout + +Check out my [userspace](/users/mguterl) for the custom keycodes that are used +in keymap.c. + +This is a pretty standard HHKB layout. I add a couple of layers to add +some conveniences and add vimkeys for navigation. + +If you flash a layout without RESET then you can unplug the keyboard, hold +spacebar and escape, and then plug the keyboard back. This sequence of +actions will allow you to flash the keyboard. + +```sh +make wilba_tech/rama_works_m60a:mguterl:flash +``` diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/rules.mk new file mode 100644 index 0000000000..800d917f28 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/rules.mk @@ -0,0 +1 @@ +DYNAMIC_KEYMAP_ENABLE = no diff --git a/keyboards/rama/m60_a/keymaps/proto/config.h b/keyboards/wilba_tech/rama_works_m60_a/keymaps/proto/config.h similarity index 100% rename from keyboards/rama/m60_a/keymaps/proto/config.h rename to keyboards/wilba_tech/rama_works_m60_a/keymaps/proto/config.h diff --git a/keyboards/rama/m60_a/keymaps/proto/keymap.c b/keyboards/wilba_tech/rama_works_m60_a/keymaps/proto/keymap.c similarity index 100% rename from keyboards/rama/m60_a/keymaps/proto/keymap.c rename to keyboards/wilba_tech/rama_works_m60_a/keymaps/proto/keymap.c diff --git a/keyboards/rama/m60_a/m60_a.c b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.c similarity index 100% rename from keyboards/rama/m60_a/m60_a.c rename to keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.c diff --git a/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h new file mode 100644 index 0000000000..01e096fee6 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h @@ -0,0 +1,37 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" +#include "keyboards/wilba_tech/via_keycodes.h" + +#define XXX KC_NO + +#define LAYOUT_60_hhkb( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + 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, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K41, K42, K47, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { XXX, K41, K42, XXX, XXX, XXX, XXX, K47, XXX, XXX, XXX, K4B, K4C, XXX } \ +} + diff --git a/keyboards/wilba_tech/rama_works_m60_a/readme.md b/keyboards/wilba_tech/rama_works_m60_a/readme.md new file mode 100644 index 0000000000..1a9d9945bd --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/readme.md @@ -0,0 +1,15 @@ +# RAMA WORKS M60-A + +![RAMA WORKS M60-A](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/5aafa6a20e2e7254480b21bf/1535873164793/RAMA-M60-A-03.688.jpg?format=1500w) + +The M60-A represents the benchmark and equilibrium between function and design for us at Rama Works. The gently exaggerated design of the frame is not understated, but rather provocative. Inspiration and evolution from previous models are evident in the beautifully articulated design and the well defined aesthetic, the fingerprint of our 'Industrial Modern' designs. The M60-A offers a unique contender in the traditional 60% form factor. [More info at RAMA WORKS](https://rama.works/m60-a/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA WORKS M60-A PCB +Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_m60_a:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk new file mode 100644 index 0000000000..1dec6c074f --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk @@ -0,0 +1,50 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes + +LAYOUTS = 60_hhkb + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m6_a/config.h b/keyboards/wilba_tech/rama_works_m6_a/config.h new file mode 100644 index 0000000000..07396450d6 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/config.h @@ -0,0 +1,129 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5241 // "RW" +#define PRODUCT_ID 0x006A // 6-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS M6-A +#define DESCRIPTION RAMA WORKS M6-A + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { E6 } +#define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +#define RGB_BACKLIGHT_ENABLED 0 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// NOTE: M6-A doesn't use RGB backlight, but we keep this +// consistent with M6-B which does. + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+43) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 80 +// Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/rama_works_m6_a/info.json b/keyboards/wilba_tech/rama_works_m6_a/info.json new file mode 100644 index 0000000000..cbc8cffe4b --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "RAMA WORKS M6-A", + "url": "http://rama.works", + "maintainer": "Wilba", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 } + ] + } + } +} diff --git a/keyboards/rama/m6_a/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/default/keymap.c similarity index 100% rename from keyboards/rama/m6_a/keymaps/default/keymap.c rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/default/keymap.c diff --git a/keyboards/rama/m6_a/keymaps/default/readme.md b/keyboards/wilba_tech/rama_works_m6_a/keymaps/default/readme.md similarity index 100% rename from keyboards/rama/m6_a/keymaps/default/readme.md rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/default/readme.md diff --git a/keyboards/rama/m6_a/keymaps/knops/config.h b/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/config.h similarity index 100% rename from keyboards/rama/m6_a/keymaps/knops/config.h rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/config.h diff --git a/keyboards/rama/m6_a/keymaps/knops/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c similarity index 100% rename from keyboards/rama/m6_a/keymaps/knops/keymap.c rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c diff --git a/keyboards/rama/m6_a/keymaps/knops/readme.md b/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/readme.md similarity index 100% rename from keyboards/rama/m6_a/keymaps/knops/readme.md rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/readme.md diff --git a/keyboards/rama/m6_a/keymaps/krusli/README.md b/keyboards/wilba_tech/rama_works_m6_a/keymaps/krusli/README.md similarity index 100% rename from keyboards/rama/m6_a/keymaps/krusli/README.md rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/krusli/README.md diff --git a/keyboards/rama/m6_a/keymaps/krusli/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/krusli/keymap.c similarity index 100% rename from keyboards/rama/m6_a/keymaps/krusli/keymap.c rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/krusli/keymap.c diff --git a/keyboards/rama/m6_a/keymaps/naut/config.h b/keyboards/wilba_tech/rama_works_m6_a/keymaps/naut/config.h similarity index 100% rename from keyboards/rama/m6_a/keymaps/naut/config.h rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/naut/config.h diff --git a/keyboards/rama/m6_a/keymaps/naut/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/naut/keymap.c similarity index 100% rename from keyboards/rama/m6_a/keymaps/naut/keymap.c rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/naut/keymap.c diff --git a/keyboards/rama/m6_a/keymaps/naut/readme.md b/keyboards/wilba_tech/rama_works_m6_a/keymaps/naut/readme.md similarity index 100% rename from keyboards/rama/m6_a/keymaps/naut/readme.md rename to keyboards/wilba_tech/rama_works_m6_a/keymaps/naut/readme.md diff --git a/keyboards/wilba_tech/rama_works_m6_a/keymaps/rys/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/rys/keymap.c new file mode 100644 index 0000000000..f7e35a9efc --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/rys/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +enum layers +{ + _LAYER0, + _LAYER1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( + KC_NO, KC_UP, TO(_LAYER1), + KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_LAYER1] = LAYOUT( + KC_NUBS, KC_NUHS, TO(_LAYER0), + LCAG(KC_Z), LCAG(KC_X), LCAG(KC_C) + ) +}; diff --git a/keyboards/rama/m6_a/m6_a.c b/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.c similarity index 100% rename from keyboards/rama/m6_a/m6_a.c rename to keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.c diff --git a/keyboards/rama/m6_a/m6_a.h b/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h similarity index 100% rename from keyboards/rama/m6_a/m6_a.h rename to keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h diff --git a/keyboards/wilba_tech/rama_works_m6_a/readme.md b/keyboards/wilba_tech/rama_works_m6_a/readme.md new file mode 100644 index 0000000000..974224b455 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/readme.md @@ -0,0 +1,15 @@ +# RAMA WORKS M6-A + +![RAMA WORKS M6-A](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/59fc7b1053450adf5bf9a852/1515932239307/RAMA-RAMA-M6-DSA-XO-CAPS.73-3_1.jpg?format=1500w) + +A 6-key companion keyboard. [More info at RAMA WORKS](https://rama.works/m6a) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA WORKS M6-A PCB +Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_m6_a:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk new file mode 100644 index 0000000000..5feee31120 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk @@ -0,0 +1,43 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = no + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h new file mode 100644 index 0000000000..535c64b80f --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/config.h @@ -0,0 +1,172 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5241 // "RW" +#define PRODUCT_ID 0x006B // 6-B +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS M6-B +#define DESCRIPTION RAMA WORKS M6-B + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { E6 } +#define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for M6-B specifics +#define RGB_BACKLIGHT_M6_B + +// enable/disable LEDs based on layout +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+43) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 80 +// Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/rama_works_m6_b/info.json b/keyboards/wilba_tech/rama_works_m6_b/info.json new file mode 100644 index 0000000000..66c3612678 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "RAMA WORKS M6-B", + "url": "http://rama.works", + "maintainer": "Wilba", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 } + ] + } + } +} diff --git a/keyboards/rama/m6_b/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_m6_b/keymaps/default/keymap.c similarity index 100% rename from keyboards/rama/m6_b/keymaps/default/keymap.c rename to keyboards/wilba_tech/rama_works_m6_b/keymaps/default/keymap.c diff --git a/keyboards/rama/m6_b/m6_b.c b/keyboards/wilba_tech/rama_works_m6_b/rama_works_m6_b.c similarity index 100% rename from keyboards/rama/m6_b/m6_b.c rename to keyboards/wilba_tech/rama_works_m6_b/rama_works_m6_b.c diff --git a/keyboards/rama/m6_b/m6_b.h b/keyboards/wilba_tech/rama_works_m6_b/rama_works_m6_b.h similarity index 100% rename from keyboards/rama/m6_b/m6_b.h rename to keyboards/wilba_tech/rama_works_m6_b/rama_works_m6_b.h diff --git a/keyboards/wilba_tech/rama_works_m6_b/readme.md b/keyboards/wilba_tech/rama_works_m6_b/readme.md new file mode 100644 index 0000000000..747aa74dd5 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/readme.md @@ -0,0 +1,15 @@ +# RAMA WORKS M6-B + +![RAMA WORKS M6-B](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/59fc7b1053450adf5bf9a852/1515932239307/RAMA-RAMA-M6-DSA-XO-CAPS.73-3_1.jpg?format=1500w) + +A 6-key companion keyboard. [More info at RAMA WORKS](https://rama.works/m6a) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA WORKS M6-B PCB +Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_m6_b:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk new file mode 100644 index 0000000000..4c14af06c4 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk @@ -0,0 +1,47 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3218.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h new file mode 100644 index 0000000000..d0bf0ed1e3 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h @@ -0,0 +1,256 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5241 // "RW" +#define PRODUCT_ID 0x080A // 80-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS U80-A +#define DESCRIPTION RAMA WORKS U80-A + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +// IS31FL3731 driver +#define DRIVER_COUNT 3 +#define DRIVER_LED_TOTAL 108 + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for U80-A specifics +#define RGB_BACKLIGHT_U80_A + +// enable/disable LEDs based on layout +// they aren't really used if RGB_BACKLIGHT_M60_A defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b1110000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b1100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b1111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b1111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b1111100000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x07 +#define EEPROM_VERSION_ADDR 36 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+31) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 +// Dynamic macro starts after dynamic keymaps (68+(4*6*17*2)) = (68+816) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 884 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 140 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/rama_works_u80_a/info.json b/keyboards/wilba_tech/rama_works_u80_a/info.json new file mode 100644 index 0000000000..7febde5c5b --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "RAMA WORKS U80-A", + "url": "http://rama.works", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5}, {"x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/wilba_tech/rama_works_u80_a/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_u80_a/keymaps/default/keymap.c new file mode 100644 index 0000000000..548843427c --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + diff --git a/keyboards/rama/u80_a/u80_a.c b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.c similarity index 100% rename from keyboards/rama/u80_a/u80_a.c rename to keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.c diff --git a/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h new file mode 100644 index 0000000000..c057db4ccd --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h @@ -0,0 +1,45 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" +#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" +#include "keyboards/wilba_tech/via_keycodes.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 3,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 18 columns, +// so the numbering goes 00 to 16. Deal with it. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K502, K507, K511, K512, K513, K514, K515, K516 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, ____, ____ }, \ + { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, ____, K415, ____ }, \ + { K500, K501, K502, ____, ____, ____, ____, K507, ____, ____, ____, K511, K512, K513, K514, K515, K516 } \ +} + diff --git a/keyboards/wilba_tech/rama_works_u80_a/readme.md b/keyboards/wilba_tech/rama_works_u80_a/readme.md new file mode 100644 index 0000000000..ff87889e45 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/readme.md @@ -0,0 +1,15 @@ +# RAMA WORKS U80-A + +![RAMA WORKS U80-A](https://something.com/something.jpg) + +A TKL keyboard. [More info at RAMA WORKS](https://rama.works/#/tkl-a/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA WORKS U80-A PCB +Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_u80_a:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk new file mode 100644 index 0000000000..0f02cd04f3 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk @@ -0,0 +1,42 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/via_api.h b/keyboards/wilba_tech/via_api.h new file mode 100644 index 0000000000..f04bb1b46a --- /dev/null +++ b/keyboards/wilba_tech/via_api.h @@ -0,0 +1,49 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#define PROTOCOL_VERSION 0x0008 + +enum via_command_id +{ + id_get_protocol_version = 0x01, // always 0x01 + id_get_keyboard_value, + id_set_keyboard_value, + id_dynamic_keymap_get_keycode, + id_dynamic_keymap_set_keycode, + id_dynamic_keymap_reset, + id_backlight_config_set_value, + id_backlight_config_get_value, + id_backlight_config_save, + id_eeprom_reset, + id_bootloader_jump, + id_dynamic_keymap_macro_get_count, + id_dynamic_keymap_macro_get_buffer_size, + id_dynamic_keymap_macro_get_buffer, + id_dynamic_keymap_macro_set_buffer, + id_dynamic_keymap_macro_reset, + id_dynamic_keymap_get_layer_count, + id_dynamic_keymap_get_buffer, + id_dynamic_keymap_set_buffer, + id_unhandled = 0xFF, +}; + +enum via_keyboard_value_id +{ + id_uptime = 0x01, + id_firmware_version +}; + diff --git a/keyboards/wilba_tech/via_keycodes.h b/keyboards/wilba_tech/via_keycodes.h new file mode 100644 index 0000000000..bed48d64b0 --- /dev/null +++ b/keyboards/wilba_tech/via_keycodes.h @@ -0,0 +1,77 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +// Can't use SAFE_RANGE here, it might change if someone adds +// new values to enum quantum_keycodes. +// Need to keep checking 0x5F10 is still in the safe range. +// TODO: merge this into quantum_keycodes +// Backlight keycodes are in range 0x5F00-0x5F0F +enum via_keycodes { + FN_MO13 = 0x5F10, + FN_MO23, + MACRO00, + MACRO01, + MACRO02, + MACRO03, + MACRO04, + MACRO05, + MACRO06, + MACRO07, + MACRO08, + MACRO09, + MACRO10, + MACRO11, + MACRO12, + MACRO13, + MACRO14, + MACRO15, +}; + +enum user_keycodes { + USER00 = 0x5F80, + USER01, + USER02, + USER03, + USER04, + USER05, + USER06, + USER07, + USER08, + USER09, + USER10, + USER11, + USER12, + USER13, + USER14, + USER15, +}; + +// VIA specific "action functions", introduced with Zeal60 +// These are only valid IDs in action_function() +// Use FN_TT13, FN_TT23, etc. in keymaps +enum via_action_functions { + TRIPLE_TAP_1_3 = 0x31, + TRIPLE_TAP_2_3 = 0x32 +}; + +// Bitwise OR the above with 0x0F00 to use in F(x) macro +// This reserves the top 256 of the 4096 range of F(x) keycodes, +// leaving the rest for use in fn_actions[] or actions in EEPROM. +#define FN_TT13 F((0x0F00|TRIPLE_TAP_1_3)) +#define FN_TT23 F((0x0F00|TRIPLE_TAP_2_3)) + +#define TG_NKRO MAGIC_TOGGLE_NKRO diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 3a2adb3c4b..6e1e0e81cc 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -179,24 +179,45 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// enable the RGB indicator for WT75-A +#define MONO_BACKLIGHT_WT75_A + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC 0x4520 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*5*14*2)) = (35+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 595 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 429 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*5*14*2)) = (44+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 604 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 420 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk index 76a07d7a44..4880a57bec 100644 --- a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index e41f2186b3..111c94ee80 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -1,53 +1,16 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -66,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt60_d/config.h b/keyboards/wilba_tech/wt60_d/config.h new file mode 100644 index 0000000000..066465d424 --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/config.h @@ -0,0 +1,200 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x060D // 60-D +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT60-D +#define DESCRIPTION wilba.tech WT60-D + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { E6, F0, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, D3, D2, B7, B0, B3, C7, C6, B6, B5, B4, D7, D6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*5*14*2)) = (37+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 597 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 427 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt60_d/info.json b/keyboards/wilba_tech/wt60_d/info.json new file mode 100644 index 0000000000..adb19a15b7 --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "wilba.tech WT60-D", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"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":"|", "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":2.25}, {"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}, {"x":14, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_d/keymaps/default/keymap.c b/keyboards/wilba_tech/wt60_d/keymaps/default/keymap.c new file mode 100644 index 0000000000..94977c160a --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-D +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default 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_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +// Fn1 Layer +[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_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer +[3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt60_d/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_d/keymaps/via/keymap.c new file mode 100644 index 0000000000..94977c160a --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-D +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default 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_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +// Fn1 Layer +[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_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer +[3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk new file mode 100644 index 0000000000..4880a57bec --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_d/readme.md b/keyboards/wilba_tech/wt60_d/readme.md new file mode 100644 index 0000000000..354adff390 --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/readme.md @@ -0,0 +1,17 @@ +# wilba.tech WT60-D + +![wilba.tech WT60-D](https://cdn.shopify.com/s/files/1/1347/2157/products/Untitled-5_1800x1800.png?v=1563699242) + +WT60-D is a keyboard PCB supporting 60% layout. [More info at wilba.tech](https://wilba.tech/) + +First produced as WT60-D MEKANISK for Mekanisk. + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: wilba.tech WT60-D +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt60_d: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). \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk new file mode 100644 index 0000000000..07372d0ac2 --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt60_d/wt60_d.c b/keyboards/wilba_tech/wt60_d/wt60_d.c new file mode 100644 index 0000000000..ccff6d62c9 --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/wt60_d.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt60_d/wt60_d.h b/keyboards/wilba_tech/wt60_d/wt60_d.h new file mode 100644 index 0000000000..402fc57a11 --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/wt60_d.h @@ -0,0 +1,35 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K003, K002, K001, K004, K005, K006, K007, K008, K009, K012, K011, K010, K013, K213, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, K403, ____, ____, ____, ____, ____, ____, K410, K411, K412, K413 } \ +} diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index cb0df1460d..9d67c317b2 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -179,24 +179,42 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC 0x4520 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk index 76a07d7a44..4880a57bec 100644 --- a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index e41f2186b3..111c94ee80 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -1,53 +1,16 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -66,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index 086168987b..8b2437fc92 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -179,24 +179,42 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC 0x4520 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk index 76a07d7a44..4880a57bec 100644 --- a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index e41f2186b3..111c94ee80 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk @@ -1,53 +1,16 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -66,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt69_a/config.h b/keyboards/wilba_tech/wt69_a/config.h index 0ed40b27e0..57546cb491 100644 --- a/keyboards/wilba_tech/wt69_a/config.h +++ b/keyboards/wilba_tech/wt69_a/config.h @@ -188,16 +188,16 @@ // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*5*17*2)) = (35+680) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 715 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 309 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*5*17*2)) = (37+680) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 717 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 307 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk index f072c67198..4880a57bec 100644 --- a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk @@ -1,68 +1,2 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index f1c632289c..7d1c2aa1b1 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk @@ -1,50 +1,16 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -63,3 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index d1ae331566..f63bbf69c7 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -179,24 +179,45 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// enable the RGB indicator for WT75-A +#define MONO_BACKLIGHT_WT75_A + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC 0x4520 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*6*15*2)) = (35+720) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 755 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 269 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*6*15*2)) = (44+720) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 764 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 260 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_a/info.json b/keyboards/wilba_tech/wt75_a/info.json index d9c54a63a6..b52d96852a 100644 --- a/keyboards/wilba_tech/wt75_a/info.json +++ b/keyboards/wilba_tech/wt75_a/info.json @@ -6,7 +6,7 @@ "width": 16, "height": 6, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":5.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10, "y":0}, {"label":"F10", "x":11, "y":0}, {"label":"F11", "x":12, "y":0}, {"label":"F12", "x":13, "y":0}, {"label":"Del", "x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Bksp", "x":13, "y":1.25}, {"label":"Bksp", "x":14, "y":1.25}, {"label":"Home", "x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"PgUp", "x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"PgDn", "x":15, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14, "y":4.25}, {"label":"End", "x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"label":"6.25U", "x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"\u2190", "x":13, "y":5.25}, {"label":"\u2193", "x":14, "y":5.25}, {"label":"\u2192", "x":15, "y":5.25}] } } diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk index 76a07d7a44..4880a57bec 100644 --- a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index e41f2186b3..111c94ee80 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -1,53 +1,16 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -66,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index c9b37755f1..b173b02417 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -179,24 +179,45 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// enable the RGB indicator for WT75-A +#define MONO_BACKLIGHT_WT75_A + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC 0x4520 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 803 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 221 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_b/info.json b/keyboards/wilba_tech/wt75_b/info.json index 92947cf87f..e35518aa02 100644 --- a/keyboards/wilba_tech/wt75_b/info.json +++ b/keyboards/wilba_tech/wt75_b/info.json @@ -6,7 +6,7 @@ "width": 16, "height": 6, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":0, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5, "w":1.25}, {"x":11.25, "y":5, "w":1.25}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}] } } diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk index 76a07d7a44..4880a57bec 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index e41f2186b3..111c94ee80 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk @@ -1,53 +1,16 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -66,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h new file mode 100644 index 0000000000..7105998774 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/config.h @@ -0,0 +1,223 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x075C // 75-C +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT75-C +#define DESCRIPTION wilba.tech WT75-C + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, B7, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// enable the RGB indicator for WT75-A +#define MONO_BACKLIGHT_WT75_A + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x4520 +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_c/info.json b/keyboards/wilba_tech/wt75_c/info.json new file mode 100644 index 0000000000..bf63b2d00f --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT75-A", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 16.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"0", "x":0, "y":0}, {"label":"1", "x":1.25, "y":0}, {"label":"2", "x":2.25, "y":0}, {"label":"3", "x":3.25, "y":0}, {"label":"4", "x":4.25, "y":0}, {"label":"5", "x":5.5, "y":0}, {"label":"6", "x":6.5, "y":0}, {"label":"7", "x":7.5, "y":0}, {"label":"8", "x":8.5, "y":0}, {"label":"9", "x":9.75, "y":0}, {"label":"10", "x":10.75, "y":0}, {"label":"11", "x":11.75, "y":0}, {"label":"12", "x":12.75, "y":0}, {"label":"13", "x":14, "y":0}, {"label":"14", "x":0, "y":1.25}, {"label":"15", "x":1, "y":1.25}, {"label":"16", "x":2, "y":1.25}, {"label":"17", "x":3, "y":1.25}, {"label":"18", "x":4, "y":1.25}, {"label":"19", "x":5, "y":1.25}, {"label":"20", "x":6, "y":1.25}, {"label":"21", "x":7, "y":1.25}, {"label":"22", "x":8, "y":1.25}, {"label":"23", "x":9, "y":1.25}, {"label":"24", "x":10, "y":1.25}, {"label":"25", "x":11, "y":1.25}, {"label":"26", "x":12, "y":1.25}, {"label":"27", "x":13, "y":1.25}, {"label":"28", "x":14, "y":1.25}, {"label":"29", "x":15.25, "y":1.25}, {"label":"30", "x":0, "y":2.25, "w":1.5}, {"label":"31", "x":1.5, "y":2.25}, {"label":"32", "x":2.5, "y":2.25}, {"label":"33", "x":3.5, "y":2.25}, {"label":"34", "x":4.5, "y":2.25}, {"label":"35", "x":5.5, "y":2.25}, {"label":"36", "x":6.5, "y":2.25}, {"label":"37", "x":7.5, "y":2.25}, {"label":"38", "x":8.5, "y":2.25}, {"label":"39", "x":9.5, "y":2.25}, {"label":"40", "x":10.5, "y":2.25}, {"label":"41", "x":11.5, "y":2.25}, {"label":"42", "x":12.5, "y":2.25}, {"label":"43", "x":13.5, "y":2.25, "w":1.5}, {"label":"44", "x":15.25, "y":2.25}, {"label":"45", "x":0, "y":3.25, "w":1.75}, {"label":"46", "x":1.75, "y":3.25}, {"label":"47", "x":2.75, "y":3.25}, {"label":"48", "x":3.75, "y":3.25}, {"label":"49", "x":4.75, "y":3.25}, {"label":"50", "x":5.75, "y":3.25}, {"label":"51", "x":6.75, "y":3.25}, {"label":"52", "x":7.75, "y":3.25}, {"label":"53", "x":8.75, "y":3.25}, {"label":"54", "x":9.75, "y":3.25}, {"label":"55", "x":10.75, "y":3.25}, {"label":"56", "x":11.75, "y":3.25}, {"label":"57", "x":12.75, "y":3.25, "w":2.25}, {"label":"58", "x":15.25, "y":3.25}, {"label":"59", "x":0, "y":4.25, "w":2.25}, {"label":"60", "x":2.25, "y":4.25}, {"label":"61", "x":3.25, "y":4.25}, {"label":"62", "x":4.25, "y":4.25}, {"label":"63", "x":5.25, "y":4.25}, {"label":"64", "x":6.25, "y":4.25}, {"label":"65", "x":7.25, "y":4.25}, {"label":"66", "x":8.25, "y":4.25}, {"label":"67", "x":9.25, "y":4.25}, {"label":"68", "x":10.25, "y":4.25}, {"label":"69", "x":11.25, "y":4.25}, {"label":"70", "x":12.25, "y":4.25, "w":1.75}, {"label":"71", "x":14.25, "y":4.5}, {"label":"72", "x":0, "y":5.25, "w":1.5}, {"label":"73", "x":1.5, "y":5.25}, {"label":"74", "x":2.5, "y":5.25, "w":1.5}, {"label":"75", "x":4, "y":5.25, "w":6}, {"label":"76", "x":10, "y":5.25, "w":1.5}, {"label":"77", "x":11.5, "y":5.25, "w":1.5}, {"label":"78", "x":13.25, "y":5.5}, {"label":"79", "x":14.25, "y":5.5}, {"label":"80", "x":15.25, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c b/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c new file mode 100644 index 0000000000..0eedd4cb10 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_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_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c b/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c new file mode 100644 index 0000000000..0eedd4cb10 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_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_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk new file mode 100644 index 0000000000..4880a57bec --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_c/readme.md b/keyboards/wilba_tech/wt75_c/readme.md new file mode 100644 index 0000000000..7bcef19003 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/readme.md @@ -0,0 +1,13 @@ +# wilba.tech WT75-C + +WT75-C is a keyboard PCB supporting 75% layout with offset arrow keys. [More info at wilba.tech](https://wilba.tech/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: wilba.tech WT75-C +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt75_c: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). \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk new file mode 100644 index 0000000000..111c94ee80 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_c/wt75_c.c b/keyboards/wilba_tech/wt75_c/wt75_c.c new file mode 100644 index 0000000000..ccff6d62c9 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/wt75_c.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt75_c/wt75_c.h b/keyboards/wilba_tech/wt75_c/wt75_c.h new file mode 100644 index 0000000000..4c74bb117c --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/wt75_c.h @@ -0,0 +1,46 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. +// +// 0,15 exists on PCB but is blocked by the 7V blocker so until someone +// designs a case that uses it, we can just forget it exists. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ + K500, K501, K502, K506, K510, K511, K512, K513, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014, ____ }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, K315 }, \ + { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, ____, ____ }, \ + { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, ____, K515 } \ +} + diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 7d974193c2..15dac9047f 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -179,24 +179,42 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC 0x4520 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*6*17*2)) = (35+816) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 851 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 173 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*6*17*2)) = (44+816) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 860 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 164 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk index 76a07d7a44..4880a57bec 100644 --- a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index e41f2186b3..111c94ee80 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -1,53 +1,16 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -66,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt8_a/config.h b/keyboards/wilba_tech/wt8_a/config.h index 6604b7ce82..08556650da 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h @@ -100,16 +100,16 @@ // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM #define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION_ADDR 36 // Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*1*8*2)) = (35+64) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 99 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 925 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 +// Dynamic macro starts after dynamic keymaps (37+(4*1*8*2)) = (37+64) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 101 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 923 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index f1c632289c..7d1c2aa1b1 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -1,50 +1,16 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -63,3 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index f8056839a7..32fc6f9e44 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c @@ -15,11 +15,16 @@ */ #include "quantum.h" -#ifdef WT_MONO_BACKLIGHT + +// Check that no backlight functions are called +#if RGB_BACKLIGHT_ENABLED +#include "keyboards/wilba_tech/wt_rgb_backlight.h" +#endif // RGB_BACKLIGHT_ENABLED +#if MONO_BACKLIGHT_ENABLED #include "keyboards/wilba_tech/wt_mono_backlight.h" -#endif -#include "keyboards/zeal60/zeal60_api.h" // Temporary hack -#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack +#endif // MONO_BACKLIGHT_ENABLED +#include "keyboards/wilba_tech/via_api.h" // Temporary hack +#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack #include "raw_hid.h" #include "dynamic_keymap.h" @@ -145,6 +150,23 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) break; } #endif // DYNAMIC_KEYMAP_ENABLE +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + case id_backlight_config_set_value: + { + backlight_config_set_value(command_data); + break; + } + case id_backlight_config_get_value: + { + backlight_config_get_value(command_data); + break; + } + case id_backlight_config_save: + { + backlight_config_save(); + break; + } +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED case id_eeprom_reset: { eeprom_reset(); @@ -180,29 +202,33 @@ void main_init(void) // If the EEPROM has the magic, the data is good. // OK to load from EEPROM. if (eeprom_is_valid()) { - //backlight_config_load(); +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + backlight_config_load(); +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } else { +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED // If the EEPROM has not been saved before, or is out of date, // save the default values to the EEPROM. Default values - // come from construction of the zeal_backlight_config instance. - //backlight_config_save(); + // come from construction of the backlight_config instance. + backlight_config_save(); +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED #ifdef DYNAMIC_KEYMAP_ENABLE // This resets the keymaps in EEPROM to what is in flash. dynamic_keymap_reset(); // This resets the macros in EEPROM to nothing. dynamic_keymap_macro_reset(); -#endif +#endif // DYNAMIC_KEYMAP_ENABLE // Save the magic number last, in case saving was interrupted eeprom_set_valid(true); } - -#ifdef WT_MONO_BACKLIGHT + +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED // Initialize LED drivers for backlight. backlight_init_drivers(); backlight_timer_init(); backlight_timer_enable(); -#endif +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } void bootmagic_lite(void) @@ -234,15 +260,19 @@ void matrix_init_kb(void) void matrix_scan_kb(void) { -#ifdef WT_MONO_BACKLIGHT +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED // This only updates the LED driver buffers if something has changed. backlight_update_pwm_buffers(); -#endif +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + process_record_backlight(keycode, record); +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + switch(keycode) { case FN_MO13: if (record->event.pressed) { @@ -280,3 +310,74 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) return process_record_user(keycode, record); } + +// This overrides the one in quantum/keymap_common.c +uint16_t keymap_function_id_to_action( uint16_t function_id ) +{ + // Zeal60 specific "action functions" are 0xF00 to 0xFFF + // i.e. F(0xF00) to F(0xFFF) are mapped to + // enum zeal60_action_functions by masking last 8 bits. + if ( function_id >= 0x0F00 && function_id <= 0x0FFF ) + { + uint8_t id = function_id & 0xFF; + switch ( id ) { + case TRIPLE_TAP_1_3: + case TRIPLE_TAP_2_3: + { + return ACTION_FUNCTION_TAP(id); + break; + } + default: + break; + } + } + + return pgm_read_word(&fn_actions[function_id]); +} + + +// Zeal60 specific "action functions" +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch (id) + { + case TRIPLE_TAP_1_3: + case TRIPLE_TAP_2_3: + if (record->event.pressed) { + layer_on( id == TRIPLE_TAP_1_3 ? 1 : 2 ); + if (record->tap.count && !record->tap.interrupted) { + if (record->tap.count >= 3) { + layer_invert(3); + } + } else { + record->tap.count = 0; + } + } else { + layer_off( id == TRIPLE_TAP_1_3 ? 1 : 2 ); + } + break; + } +} + +void led_set_kb(uint8_t usb_led) +{ +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + backlight_set_indicator_state(usb_led); +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + led_set_user(usb_led); +} + +void suspend_power_down_kb(void) +{ +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + backlight_set_suspend_state(true); +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED +} + +void suspend_wakeup_init_kb(void) +{ +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + backlight_set_suspend_state(false); +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED +} + diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index bf485bce1f..69d82e582a 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -14,20 +14,43 @@ * along with this program. If not, see . */ +#include "quantum.h" #include "wt_mono_backlight.h" +#include "wt_rgb_backlight_api.h" // reuse these for now +#include "wt_rgb_backlight_keycodes.h" // reuse these for now + #include "drivers/avr/i2c_master.h" #include "drivers/issi/is31fl3736.h" - #include +#include "progmem.h" +#include "quantum/color.h" + #define ISSI_ADDR_DEFAULT 0x50 +#define BACKLIGHT_EFFECT_MAX 3 + +#ifndef MONO_BACKLIGHT_COLOR_1 +#define MONO_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#endif + +backlight_config g_config = { + .disable_when_usb_suspended = MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, + .disable_after_timeout = MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT, + .brightness = MONO_BACKLIGHT_BRIGHTNESS, + .effect = MONO_BACKLIGHT_EFFECT, + .effect_speed = MONO_BACKLIGHT_EFFECT_SPEED, + .color_1 = MONO_BACKLIGHT_COLOR_1, +}; + bool g_suspend_state = false; +uint8_t g_indicator_state = 0; // Global tick at 20 Hz uint32_t g_tick = 0; -uint8_t g_config_effect_speed = 0; -uint8_t g_config_brightness = 255; + +// Ticks since any key was last hit. +uint32_t g_any_key_hit = 0; void backlight_init_drivers(void) { @@ -41,6 +64,10 @@ void backlight_init_drivers(void) IS31FL3736_update_led_control_registers( ISSI_ADDR_DEFAULT, 0x00 ); } +void backlight_set_key_hit(uint8_t row, uint8_t column) +{ + g_any_key_hit = 0; +} // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz @@ -82,13 +109,63 @@ void backlight_set_suspend_state(bool state) g_suspend_state = state; } +void backlight_set_indicator_state(uint8_t state) +{ + g_indicator_state = state; +} + +void backlight_set_brightness_all( uint8_t value ) +{ + IS31FL3736_mono_set_brightness_all( value ); +} + +void backlight_effect_all_off(void) +{ + IS31FL3736_mono_set_brightness_all( 0 ); +} + +void backlight_effect_all_on(void) +{ + IS31FL3736_mono_set_brightness_all( g_config.brightness ); +} + +void backlight_effect_raindrops(bool initialize) +{ + // Change one LED every tick + uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % 96 : 255; + + for ( int i=0; i<96; i++ ) + { + // If initialize, all get set to random brightness + // If not, all but one will stay the same as before. + if ( initialize || i == led_to_change ) + { + IS31FL3736_mono_set_brightness(i, rand() & 0xFF ); + } + } +} + void backlight_effect_cycle_all(void) { - uint8_t offset = ( g_tick << g_config_effect_speed ) & 0xFF; + uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF; backlight_set_brightness_all( offset ); } +// This runs after another backlight effect and replaces +// colors already set +void backlight_effect_indicators(void) +{ +#if defined(MONO_BACKLIGHT_WT75_A) + HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + // G8, H8, I8 -> (6*8+7) (7*8+7), (8*8+7) + IS31FL3736_mono_set_brightness(55, rgb.r); + IS31FL3736_mono_set_brightness(63, rgb.g); + IS31FL3736_mono_set_brightness(71, rgb.b); +#endif // MONO_BACKLIGHT_WT75_A +} + ISR(TIMER3_COMPA_vect) { // delay 1 second before driving LEDs or doing anything else @@ -100,8 +177,154 @@ ISR(TIMER3_COMPA_vect) g_tick++; - //backlight_effect_cycle_all(); - backlight_set_brightness_all( 255 ); + if ( g_any_key_hit < 0xFFFFFFFF ) + { + g_any_key_hit++; + } + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = ((g_suspend_state && g_config.disable_when_usb_suspended) || + (g_config.disable_after_timeout > 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : g_config.effect; + + // Keep track of the effect used last time, + // detect change in effect, so each effect can + // have an optional initialization. + static uint8_t effect_last = 255; + bool initialize = effect != effect_last; + effect_last = effect; + + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch ( effect ) + { + case 0: + backlight_effect_all_off(); + break; + case 1: + backlight_effect_all_on();; + break; + case 2: + backlight_effect_raindrops(initialize); + break; + default: + backlight_effect_all_off(); + break; + } + + if ( ! suspend_backlight ) + { + backlight_effect_indicators(); + } +} + +// Some helpers for setting/getting HSV +void _set_color( HS *color, uint8_t *data ) +{ + color->h = data[0]; + color->s = data[1]; +} + +void _get_color( HS *color, uint8_t *data ) +{ + data[0] = color->h; + data[1] = color->s; +} + +void backlight_config_set_value( uint8_t *data ) +{ + bool reinitialize = false; + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { + case id_disable_when_usb_suspended: + { + g_config.disable_when_usb_suspended = (bool)*value_data; + break; + } + case id_disable_after_timeout: + { + g_config.disable_after_timeout = *value_data; + break; + } + case id_brightness: + { + g_config.brightness = *value_data; + break; + } + case id_effect: + { + g_config.effect = *value_data; + break; + } + case id_effect_speed: + { + g_config.effect_speed = *value_data; + break; + } + case id_color_1: + { + _set_color( &(g_config.color_1), value_data ); + break; + } + } + + if ( reinitialize ) + { + backlight_init_drivers(); + } +} + +void backlight_config_get_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { + case id_disable_when_usb_suspended: + { + *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); + break; + } + case id_disable_after_timeout: + { + *value_data = g_config.disable_after_timeout; + break; + } + case id_brightness: + { + *value_data = g_config.brightness; + break; + } + case id_effect: + { + *value_data = g_config.effect; + break; + } + case id_effect_speed: + { + *value_data = g_config.effect_speed; + break; + } + case id_color_1: + { + _get_color( &(g_config.color_1), value_data ); + break; + } + } +} + +void backlight_config_load(void) +{ + eeprom_read_block( &g_config, ((void*)MONO_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); +} + +void backlight_config_save(void) +{ + eeprom_update_block( &g_config, ((void*)MONO_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); } void backlight_update_pwm_buffers(void) @@ -109,8 +332,110 @@ void backlight_update_pwm_buffers(void) IS31FL3736_update_pwm_buffers(ISSI_ADDR_DEFAULT,0x00); } -void backlight_set_brightness_all( uint8_t value ) +bool process_record_backlight(uint16_t keycode, keyrecord_t *record) { - IS31FL3736_mono_set_brightness_all( value ); + // Record keypresses for backlight effects + if ( record->event.pressed ) + { + backlight_set_key_hit( record->event.key.row, record->event.key.col ); + } + + switch(keycode) + { + case BR_INC: + if (record->event.pressed) + { + backlight_brightness_increase(); + } + return false; + break; + case BR_DEC: + if (record->event.pressed) + { + backlight_brightness_decrease(); + } + return false; + break; + case EF_INC: + if (record->event.pressed) + { + backlight_effect_increase(); + } + return false; + break; + case EF_DEC: + if (record->event.pressed) + { + backlight_effect_decrease(); + } + return false; + break; + case ES_INC: + if (record->event.pressed) + { + backlight_effect_speed_increase(); + } + return false; + break; + case ES_DEC: + if (record->event.pressed) + { + backlight_effect_speed_decrease(); + } + return false; + break; + } + + return true; } +// Deals with the messy details of incrementing an integer +uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) +{ + int16_t new_value = value; + new_value += step; + return MIN( MAX( new_value, min ), max ); +} + +uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) +{ + int16_t new_value = value; + new_value -= step; + return MIN( MAX( new_value, min ), max ); +} + +void backlight_effect_increase(void) +{ + g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); +} + +void backlight_effect_decrease(void) +{ + g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); +} + +void backlight_effect_speed_increase(void) +{ + g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); +} + +void backlight_effect_speed_decrease(void) +{ + g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); +} + +void backlight_brightness_increase(void) +{ + g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_brightness_decrease(void) +{ + g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); +} diff --git a/keyboards/wilba_tech/wt_mono_backlight.h b/keyboards/wilba_tech/wt_mono_backlight.h index 70031bedc7..2f913d2cb6 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.h +++ b/keyboards/wilba_tech/wt_mono_backlight.h @@ -19,6 +19,36 @@ #include #include +#include "quantum/color.h" + +typedef struct PACKED +{ + uint8_t h; + uint8_t s; +} HS; + +typedef struct +{ + bool disable_when_usb_suspended:1; // | + bool __pad1:1; // | + bool __pad2:1; // | + bool __pad3:1; // | + bool __pad4:1; // | + bool __pad5:1; // | + bool __pad6:1; // | + bool __pad7:1; // 1 byte + uint8_t disable_after_timeout; // 1 byte + uint8_t brightness; // 1 byte + uint8_t effect; // 1 byte + uint8_t effect_speed; // 1 byte + HS color_1; // 2 bytes (Indicator Color for Xeno) +} backlight_config; // = 7 bytes + +void backlight_config_load(void); +void backlight_config_save(void); +void backlight_config_set_value( uint8_t *data ); +void backlight_config_get_value( uint8_t *data ); + void backlight_init_drivers(void); void backlight_timer_init(void); @@ -26,8 +56,24 @@ void backlight_timer_enable(void); void backlight_timer_disable(void); void backlight_set_suspend_state(bool state); +void backlight_set_indicator_state(uint8_t state); +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. void backlight_update_pwm_buffers(void); -void backlight_set_brightness_all( uint8_t value ); +// Handle backlight specific keycodes +bool process_record_backlight(uint16_t keycode, keyrecord_t *record); + +void backlight_set_key_hit(uint8_t row, uint8_t col); + +void backlight_effect_increase(void); +void backlight_effect_decrease(void); +void backlight_effect_speed_increase(void); +void backlight_effect_speed_decrease(void); + +void backlight_brightness_increase(void); +void backlight_brightness_decrease(void); diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c new file mode 100644 index 0000000000..ca8c3269f6 --- /dev/null +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -0,0 +1,2436 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ + +#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) || defined(RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_U80_A) +#else +#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU, RGB_BACKLIGHT_HS60, RGB_BACKLIGHT_NK65, RGB_BACKLIGHT_U80_A +#endif + +#ifndef MAX + #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif + +#ifndef MIN + #define MIN(a,b) ((a) < (b)? (a): (b)) +#endif + +#include "quantum.h" +#include "wt_rgb_backlight.h" +#include "wt_rgb_backlight_api.h" +#include "wt_rgb_backlight_keycodes.h" + +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) +#include +#include +#include +#include "drivers/avr/i2c_master.h" +#else +#include "ch.h" +#include "hal.h" +#include "drivers/arm/i2c_master.h" +#include "tmk_core/common/eeprom.h" +#endif +#include "progmem.h" +#include "quantum/color.h" + +#if defined(RGB_BACKLIGHT_M6_B) +#include "drivers/issi/is31fl3218.h" +#define BACKLIGHT_LED_COUNT 6 +#elif defined(RGB_BACKLIGHT_HS60) +#include "drivers/issi/is31fl3733.h" +#define BACKLIGHT_LED_COUNT 64 +#elif defined(RGB_BACKLIGHT_NK65) +#include "drivers/issi/is31fl3733.h" +#define BACKLIGHT_LED_COUNT 69 +#else +#include "drivers/issi/is31fl3731.h" +#if defined(RGB_BACKLIGHT_U80_A) +#define BACKLIGHT_LED_COUNT 108 +#else +#define BACKLIGHT_LED_COUNT 72 +#endif +#endif + +#define BACKLIGHT_EFFECT_MAX 10 + +backlight_config g_config = { + .use_split_backspace = RGB_BACKLIGHT_USE_SPLIT_BACKSPACE, + .use_split_left_shift = RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT, + .use_split_right_shift = RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT, + .use_7u_spacebar = RGB_BACKLIGHT_USE_7U_SPACEBAR, + .use_iso_enter = RGB_BACKLIGHT_USE_ISO_ENTER, + .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, + .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, + .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, + .brightness = RGB_BACKLIGHT_BRIGHTNESS, + .effect = RGB_BACKLIGHT_EFFECT, + .effect_speed = RGB_BACKLIGHT_EFFECT_SPEED, + .color_1 = RGB_BACKLIGHT_COLOR_1, + .color_2 = RGB_BACKLIGHT_COLOR_2, + .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR, + .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR, + .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR, + .layer_3_indicator = RGB_BACKLIGHT_LAYER_3_INDICATOR, + .alphas_mods = { + RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_2, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_3, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, +#if defined(RGB_BACKLIGHT_M6_B) + .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } +#endif +}; + +bool g_suspend_state = false; +uint8_t g_indicator_state = 0; + +// Global tick at 20 Hz +uint32_t g_tick = 0; + +// Ticks since this key was last hit. +uint8_t g_key_hit[BACKLIGHT_LED_COUNT]; + +// Ticks since any key was last hit. +uint32_t g_any_key_hit = 0; + +#if defined(RGB_BACKLIGHT_HS60) + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// ADDR_2 is not needed. it is here as a dummy +#define ISSI_ADDR_1 0x50 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, A_1, C_1}, //LA1 + {0, E_1, D_1, F_1}, //LA2 + {0, H_1, G_1, I_1}, //LA3 + {0, K_1, J_1, L_1}, //LA4 + {0, B_2, A_2, C_2}, //LA5 + {0, E_2, D_2, F_2}, //LA6 + {0, H_2, G_2, I_2}, //LA7 + {0, K_2, J_2, L_2}, //LA8 + {0, B_3, A_3, C_3}, //LA9 + {0, E_3, D_3, F_3}, //LA10 + {0, H_3, G_3, I_3}, //LA11 + {0, K_3, J_3, L_3}, //LA12 + {0, B_4, A_4, C_4}, //LA13 + {0, E_4, D_4, F_4}, //LA14 + {0, H_4, G_4, I_4}, //LA15 + {0, K_4, J_4, L_4}, //LA16 + {0, B_5, A_5, C_5}, //LA17 + {0, E_5, D_5, F_5}, //LA18 + {0, H_5, G_5, I_5}, //LA19 + {0, K_5, J_5, L_5}, //LA20 + {0, B_6, A_6, C_6}, //LA21 + {0, E_6, D_6, F_6}, //LA22 + {0, H_6, G_6, I_6}, //LA23 + {0, K_6, J_6, L_6}, //LA24 + {0, B_7, A_7, C_7}, //LA25 + {0, E_7, D_7, F_7}, //LA26 + {0, H_7, G_7, I_7}, //LA27 + {0, K_7, J_7, L_7}, //LA28 + {0, B_8, A_8, C_8}, //LA29 + {0, E_8, D_8, F_8}, //LA30 + {0, H_8, G_8, I_8}, //LA31 + {0, K_8, J_8, L_8}, //LA32 + {0, B_9, A_9, C_9}, //LA33 + {0, E_9, D_9, F_9}, //LA34 + {0, H_9, G_9, I_9}, //LA35 + {0, K_9, J_9, L_9}, //LA36 + {0, B_10, A_10, C_10}, //LA37 + {0, E_10, D_10, F_10}, //LA38 + {0, H_10, G_10, I_10}, //LA39 + {0, K_10, J_10, L_10}, //LA40 + {0, B_11, A_11, C_11}, //LA41 + {0, E_11, D_11, F_11}, //LA42 + {0, H_11, G_11, I_11}, //LA43 + {0, K_11, J_11, L_11}, //LA44 + {0, B_12, A_12, C_12}, //LA45 + {0, E_12, D_12, F_12}, //LA46 + {0, H_12, G_12, I_12}, //LA47 + {0, K_12, J_12, L_12}, //LA48 + {0, B_13, A_13, C_13}, //LA49 + {0, E_13, D_13, F_13}, //LA50 + {0, H_13, G_13, I_13}, //LA51 + {0, K_13, J_13, L_13}, //LA52 + {0, B_14, A_14, C_14}, //LA53 + {0, E_14, D_14, F_14}, //LA54 + {0, H_14, G_14, I_14}, //LA55 + {0, K_14, J_14, L_14}, //LA56 + {0, B_15, A_15, C_15}, //LA57 + {0, E_15, D_15, F_15}, //LA58 + {0, H_15, G_15, I_15}, //LA59 + {0, K_15, J_15, L_15}, //LA60 + {0, B_16, A_16, C_16}, //LA61 + {0, E_16, D_16, F_16}, //LA62 + {0, H_16, G_16, I_16}, //LA63 + {0, K_16, J_16, L_16}, //LA64 +}; + +#elif defined(RGB_BACKLIGHT_NK65) + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// ADDR_2 is not needed. it is here as a dummy +#define ISSI_ADDR_1 0x50 +#define ISSI_ADDR_2 0x52 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, A_1, C_1}, //LA1 + {0, E_1, D_1, F_1}, //LA2 + {0, H_1, G_1, I_1}, //LA3 + {0, K_1, J_1, L_1}, //LA4 + {0, B_2, A_2, C_2}, //LA5 + {0, E_2, D_2, F_2}, //LA6 + {0, H_2, G_2, I_2}, //LA7 + {0, K_2, J_2, L_2}, //LA8 + {0, B_3, A_3, C_3}, //LA9 + {0, E_3, D_3, F_3}, //LA10 + {0, H_3, G_3, I_3}, //LA11 + {0, K_3, J_3, L_3}, //LA12 + {0, B_4, A_4, C_4}, //LA13 + {0, E_4, D_4, F_4}, //LA14 + {0, H_4, G_4, I_4}, //LA15 + {0, K_4, J_4, L_4}, //LA16 + {0, B_5, A_5, C_5}, //LA17 + {0, E_5, D_5, F_5}, //LA18 + {0, H_5, G_5, I_5}, //LA19 + {0, K_5, J_5, L_5}, //LA20 + {0, B_6, A_6, C_6}, //LA21 + {0, E_6, D_6, F_6}, //LA22 + {0, H_6, G_6, I_6}, //LA23 + {0, K_6, J_6, L_6}, //LA24 + {0, B_7, A_7, C_7}, //LA25 + {0, E_7, D_7, F_7}, //LA26 + {0, H_7, G_7, I_7}, //LA27 + {0, K_7, J_7, L_7}, //LA28 + {0, B_8, A_8, C_8}, //LA29 + {0, E_8, D_8, F_8}, //LA30 + {0, H_8, G_8, I_8}, //LA31 + {0, K_8, J_8, L_8}, //LA32 + {0, B_9, A_9, C_9}, //LA33 + {0, E_9, D_9, F_9}, //LA34 + {0, H_9, G_9, I_9}, //LA35 + {0, K_9, J_9, L_9}, //LA36 + {0, B_10, A_10, C_10}, //LA37 + {0, E_10, D_10, F_10}, //LA38 + {0, H_10, G_10, I_10}, //LA39 + {0, K_10, J_10, L_10}, //LA40 + {0, B_11, A_11, C_11}, //LA41 + {0, E_11, D_11, F_11}, //LA42 + {0, H_11, G_11, I_11}, //LA43 + {0, K_11, J_11, L_11}, //LA44 + {0, B_12, A_12, C_12}, //LA45 + {0, E_12, D_12, F_12}, //LA46 + {0, H_12, G_12, I_12}, //LA47 + {0, K_12, J_12, L_12}, //LA48 + {0, B_13, A_13, C_13}, //LA49 + {0, E_13, D_13, F_13}, //LA50 + {0, H_13, G_13, I_13}, //LA51 + {0, K_13, J_13, L_13}, //LA52 + {0, B_14, A_14, C_14}, //LA53 + {0, E_14, D_14, F_14}, //LA54 + {0, H_14, G_14, I_14}, //LA55 + {0, K_14, J_14, L_14}, //LA56 + {0, B_15, A_15, C_15}, //LA57 + {0, E_15, D_15, F_15}, //LA58 + {0, H_15, G_15, I_15}, //LA59 + {0, K_15, J_15, L_15}, //LA60 + {0, B_16, A_16, C_16}, //LA61 + {0, E_16, D_16, F_16}, //LA62 + {0, H_16, G_16, I_16}, //LA63 + {0, K_16, J_16, L_16}, //LA64 + + {1, B_1, A_1, C_1}, //LB1 + {1, E_1, D_1, F_1}, //LB2 + {1, H_1, G_1, I_1}, //LB3 + {1, K_1, J_1, L_1}, //LB4 + {1, B_2, A_2, C_2}, //LB5 + {1, E_2, D_2, F_2}, //LB6 + {1, H_2, G_2, I_2}, //LB7 + {1, K_2, J_2, L_2}, //LB8 + {1, B_3, A_3, C_3}, //LB9 + {1, E_3, D_3, F_3}, //LB10 + {1, H_3, G_3, I_3}, //LB11 + {1, K_3, J_3, L_3}, //LB12 + {1, B_4, A_4, C_4}, //LB13 + {1, E_4, D_4, F_4}, //LB14 + {1, H_4, G_4, I_4}, //LB15 + {1, K_4, J_4, L_4}, //LB16 + {1, B_5, A_5, C_5}, //LB17 + {1, E_5, D_5, F_5}, //LB18 + {1, H_5, G_5, I_5}, //LB19 + {1, K_5, J_5, L_5}, //LB20 + {1, B_6, A_6, C_6}, //LB21 + {1, E_6, D_6, F_6}, //LB22 + {1, H_6, G_6, I_6}, //LB23 + {1, K_6, J_6, L_6}, //LB24 + {1, B_7, A_7, C_7}, //LB25 + {1, E_7, D_7, F_7}, //LB26 + {1, H_7, G_7, I_7}, //LB27 + {1, K_7, J_7, L_7}, //LB28 + {1, B_8, A_8, C_8}, //LB29 + {1, E_8, D_8, F_8}, //LB30 + {1, H_8, G_8, I_8}, //LB31 + {1, K_8, J_8, L_8}, //LB32 + {1, B_9, A_9, C_9}, //LB33 + {1, E_9, D_9, F_9}, //LB34 + {1, H_9, G_9, I_9}, //LB35 + {1, K_9, J_9, L_9}, //LB36 + {1, B_10, A_10, C_10}, //LB37 + {1, E_10, D_10, F_10}, //LB38 + {1, H_10, G_10, I_10}, //LB39 + {1, K_10, J_10, L_10}, //LB40 + {1, B_11, A_11, C_11}, //LB41 + {1, E_11, D_11, F_11}, //LB42 + {1, H_11, G_11, I_11}, //LB43 + {1, K_11, J_11, L_11}, //LB44 + {1, B_12, A_12, C_12}, //LB45 + {1, E_12, D_12, F_12}, //LB46 + {1, H_12, G_12, I_12}, //LB47 + {1, K_12, J_12, L_12}, //LB48 + {1, B_13, A_13, C_13}, //LB49 + {1, E_13, D_13, F_13}, //LB50 + {1, H_13, G_13, I_13}, //LB51 + {1, K_13, J_13, L_13}, //LB52 + {1, B_14, A_14, C_14}, //LB53 + {1, E_14, D_14, F_14}, //LB54 + {1, H_14, G_14, I_14}, //LB55 + {1, K_14, J_14, L_14}, //LB56 + {1, B_15, A_15, C_15}, //LB57 + {1, E_15, D_15, F_15}, //LB58 + {1, H_15, G_15, I_15}, //LB59 + {1, K_15, J_15, L_15}, //LB60 + {1, B_16, A_16, C_16}, //LB61 + {1, E_16, D_16, F_16}, //LB62 + {1, H_16, G_16, I_16}, //LB63 + {1, K_16, J_16, L_16}, //LB64 +}; + +#elif defined(RGB_BACKLIGHT_U80_A) + +// U80-A prototype uses 3 ISSI drivers +#define ISSI_ADDR_1 0x74 // 11101[00] <- GND +#define ISSI_ADDR_2 0x76 // 11101[10] <- SDA +#define ISSI_ADDR_3 0x75 // 11101[01] <- SCL + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_8, C2_8, C3_8}, // LA8 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C8_8, C7_8, C6_8}, // LA17 + + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_12, C2_12, C3_12}, // LB4 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + {0, C1_15, C2_15, C3_15}, // LB7 + {0, C1_16, C2_16, C3_16}, // LB8 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C9_15, C8_15, C6_14}, // LB15 + {0, C9_16, C7_15, C6_15}, // LB16 + {0, C8_16, C7_16, C6_16}, // LB17 + + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_6, C2_6, C3_6}, // LC6 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_7, C8_7, C6_6}, // LC15 + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C8_8, C7_8, C6_8}, // LC17 + + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C9_13, C8_13, C7_13}, // LD13 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C9_16, C7_15, C6_15}, // LD16 + {1, C8_16, C7_16, C6_16}, // LD17 + + {2, C2_1, C3_1, C4_1}, // LE0 + {2, C1_1, C3_2, C4_2}, // LE1 + {2, C1_2, C2_2, C4_3}, // LE2 + {2, C1_3, C2_3, C3_3}, // LE3 + {2, C1_4, C2_4, C3_4}, // LE4 + {2, C1_5, C2_5, C3_5}, // LE5 + {2, C1_6, C2_6, C3_6}, // LE6 + {2, C1_7, C2_7, C3_7}, // LE7 + {2, C1_8, C2_8, C3_8}, // LE8 + {2, C9_1, C8_1, C7_1}, // LE9 + {2, C9_2, C8_2, C7_2}, // LE10 + {2, C9_3, C8_3, C7_3}, // LE11 + {2, C9_4, C8_4, C7_4}, // LE12 + {2, C9_5, C8_5, C7_5}, // LE13 + {2, C9_6, C8_6, C7_6}, // LE14 + {2, C9_7, C8_7, C6_6}, // LE15 + {2, C9_8, C7_7, C6_7}, // LE16 + {2, C8_8, C7_8, C6_8}, // LE17 + + {2, C2_9, C3_9, C4_9}, // LF0 + {2, C1_9, C3_10, C4_10}, // LF1 + {2, C1_10, C2_10, C4_11}, // LF2 + {2, C1_11, C2_11, C3_11}, // LF3 + {2, C1_12, C2_12, C3_12}, // LF4 + {2, C1_13, C2_13, C3_13}, // LF5 + {2, C1_14, C2_14, C3_14}, // LF6 + {2, C1_15, C2_15, C3_15}, // LF7 + {2, C1_16, C2_16, C3_16}, // LF8 + {2, C9_9, C8_9, C7_9}, // LF9 + {2, C9_10, C8_10, C7_10}, // LF10 + {2, C9_11, C8_11, C7_11}, // LF11 + {2, C9_12, C8_12, C7_12}, // LF12 + {2, C9_13, C8_13, C7_13}, // LF13 + {2, C9_14, C8_14, C7_14}, // LF14 + {2, C9_15, C8_15, C6_14}, // LF15 + {2, C9_16, C7_15, C6_15}, // LF16 + {2, C8_16, C7_16, C6_16}, // LF17 +}; +#elif !defined(RGB_BACKLIGHT_M6_B) +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +#define ISSI_ADDR_1 0x74 +#define ISSI_ADDR_2 0x76 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_8, C2_8, C3_8}, // LA8 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C8_8, C7_8, C6_8}, // LA17 + + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_12, C2_12, C3_12}, // LB4 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + {0, C1_15, C2_15, C3_15}, // LB7 + {0, C1_16, C2_16, C3_16}, // LB8 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C9_15, C8_15, C6_14}, // LB15 + {0, C9_16, C7_15, C6_15}, // LB16 + {0, C8_16, C7_16, C6_16}, // LB17 + + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_6, C2_6, C3_6}, // LC6 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_7, C8_7, C6_6}, // LC15 + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C8_8, C7_8, C6_8}, // LC17 + + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C9_13, C8_13, C7_13}, // LD13 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C9_16, C7_15, C6_15}, // LD16 + {1, C8_16, C7_16, C6_16}, // LD17 +}; +#endif // !defined(RGB_BACKLIGHT_M6_B) + + +typedef struct Point { + uint8_t x; + uint8_t y; +} Point; + + +// index in range 0..71 (LA0..LA17, LB0..LB17, LC0..LC17, LD0..LD17) +// point values in range x=0..224 y=0..64 +// origin is center of top-left key (i.e Esc) +#if defined(RGB_BACKLIGHT_ZEAL65) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {240,0}, {240,16}, {240,32}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, + // LC0..LC17 + {96,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {255,255}, {48,60}, {28,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,44}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {144,60}, {164,64}, {188,64}, {208,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {37,255}, {35,255}, {32,255}, {19,255}, {0,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, + // LC0..LC17 + {184,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {255,255}, {167,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {145,233}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {201,228}, {206,255}, {213,255}, {218,255} +}; +#elif defined(RGB_BACKLIGHT_KOYU) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {240,0}, {240,16}, {240,32}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, + // LC0..LC17 + {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {32,255}, {19,255}, {0,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, + // LC0..LC17 + {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} +}; +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {255,255}, {255,255}, {255,255}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {102,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {60,64}, {43,64}, {23,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,48}, {2,48}, {3,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {210,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {144,64}, {161,64}, {181,64}, {201,64}, {221,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, + {58,255}, {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, + // LB0..LB17 + {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,255}, {255,255}, {255,255}, + {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {188,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {172,252}, {170,255}, {165,255}, + {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {150,244}, {147,255}, {161,255}, + // LD0..LD17 + {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, + {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} +}; +#elif defined(RGB_BACKLIGHT_U80_A) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // Thse are scaled by 14.5 per U + // LA0..LA17 + {109,36}, {94,36}, {80,36}, {65,36}, {51,36}, {36,36}, {22,36}, {4,36}, {5,51}, + {116,22}, {102,22}, {87,22}, {73,22}, {58,22}, {44,22}, {29,22}, {15,22}, {0,22}, + // LB0..LB17 + {131,22}, {145,22}, {160,22}, {174,22}, {196,22}, {0,0}, {0,0}, {0,0}, {0,0}, + {123,36}, {138,36}, {152,36}, {167,36}, {181,36}, {199,36}, {0,0}, {0,0}, {0,0}, + // LC0..LC17 + {102,80}, {91,65}, {76,65}, {62,65}, {47,65}, {33,65}, {58,76}, {40,80}, {22,80}, + {98,51}, {83,51}, {69,51}, {54,51}, {40,51}, {25,51}, {0,0}, {9,65}, {4,80}, + // LD0..LD17 + {112,51}, {127,51}, {141,51}, {156,51}, {170,51}, {194,51}, {163,65}, {190,65}, {0,0}, + {105,65}, {120,65}, {134,65}, {149,65}, {0,0}, {145,76}, {163,80}, {181,80}, {199,80}, + // LE0..LE17 + {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, + {73,0}, {94,0}, {109,0}, {123,0}, {138,0}, {58,0}, {44,0}, {29,0}, {0,0}, + // LF0..LF17 + {160,0}, {174,0}, {189,0}, {203,0}, {225,0}, {239,0}, {254,0}, {254,22}, {254,36}, + {239,22}, {239,36}, {225,22}, {225,36}, {0,0}, {239,65}, {225,80}, {239,80}, {254,80} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {59,129}, {69,129}, {80,138}, {88,154}, {95,175}, {100,200}, {104,227}, {107,255}, {128,226}, + {59,255}, {64,255}, {69,255}, {75,255}, {80,255}, {84,255}, {88,255}, {91,255}, {95,255}, + // LB0..LB17 + {53,255}, {48,255}, {44,255}, {40,255}, {35,255}, {255,255}, {255,255}, {255,255}, {255,255}, + {48,138}, {40,154}, {33,175}, {28,200}, {24,227}, {21,255}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {192,255}, {184,131}, {174,141}, {166,159}, {160,181}, {155,207}, {174,244}, {171,255}, {166,255}, + {128,9}, {128,43}, {128,77}, {128,111}, {128,145}, {128,179}, {255,255}, {150,252}, {162,255}, + // LD0..LD17 + {0,26}, {0,60}, {0,94}, {0,128}, {0,162}, {0,218}, {227,193}, {234,245}, {255,255}, + {195,128}, {205,135}, {214,149}, {221,169}, {255,255}, {210,244}, {213,255}, {218,255}, {222,255}, + // LE0..LE17 + {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, + {70,255}, {66,255}, {62,255}, {59,255}, {56,255}, {73,255}, {76,255}, {79,255}, {84,255}, + // LF0..LF17 + {52,255}, {49,255}, {47,255}, {44,255}, {41,255}, {38,255}, {37,255}, {25,255}, {14,255}, + {27,255}, {15,255}, {29,255}, {17,255}, {255,255}, {241,255}, {227,255}, {229,255}, {231,255} +}; +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_ANSI) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA47 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {214,32}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA47 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} +}; +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_HHKB) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {224,0}, {192,0}, {200,16}, {202,48}, {224,48}, {208,0}, {220,16}, {214,32}, {220,64}, {4,64}, {24,64}, {44,64}, {112,64}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {180,64}, {200,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {32,255}, + {39,255}, {23,238}, {233,242}, {237,255}, {35,255}, {19,255}, {255,233}, {223,255}, {161,255}, {165,255}, {170,255}, {192,255}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {214,255}, {219,255} +}; +#elif defined(RGB_BACKLIGHT_HS60) //HS60_ISO +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA50 + {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, + {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, + {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, + {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {222,24}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA50 + {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, + {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, + {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, + {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {10,255}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} +}; +#elif defined(RGB_BACKLIGHT_NK65) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {160,64}, {192,0}, {200,16}, {210,48}, {224,48}, {216,0}, {220,16}, {214,32}, {224,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + //LA62..LB5 + {176,64}, {192,64}, {208,64}, {240,0}, {240,16}, {240,48}, {240,64}, {240,32} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, + {208,255}, {39,255}, {23,238}, {235,255}, {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + //LA62..LB5 + {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255} +}; +#elif defined(RGB_BACKLIGHT_M6_B) +// M6-B is really simple: +// 0 3 5 +// 1 2 4 +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + {0,0}, {0,16}, {16,16}, {16,0}, {32,16}, {32,0} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} +}; +#endif + +// This may seem counter-intuitive, but it's quite flexible. +// For each LED, get it's position to decide what color to make it. +// This solves the issue of LEDs (and switches) not aligning to a grid, +// or having a large "bitmap" and sampling them. +void map_led_to_point( uint8_t index, Point *point ) +{ + // Slightly messy way to get Point structs out of progmem. + uint8_t *addr = (uint8_t*)&g_map_led_to_point[index]; + point->x = pgm_read_byte(addr); + point->y = pgm_read_byte(addr+1); + +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + return; +#endif + + switch (index) + { + case 18+4: // LB4A + if ( g_config.use_split_backspace ) + point->x -= 8; + break; +#if defined(RGB_BACKLIGHT_ZEAL60) + case 18+14: // LB14A + if ( g_config.use_iso_enter ) + point->y += 8; // extremely pedantic + break; + case 54+5: // LD5A + if ( !g_config.use_iso_enter ) + point->x -= 10; + break; + case 36+16: // LC16A + if ( !g_config.use_split_left_shift ) + point->x += 8; + break; +#endif +#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) + case 36+0: // LC0A + if ( g_config.use_7u_spacebar ) + point->x += 10; + break; + case 36+6: // LC6A + if ( g_config.use_7u_spacebar ) + point->x += 4; + break; + case 54+7: // LD7A + if ( !g_config.use_split_right_shift ) + point->x -= 8; + break; +#endif + } +} + +void map_led_to_point_polar( uint8_t index, Point *point ) +{ + // Slightly messy way to get Point structs out of progmem. + uint8_t *addr = (uint8_t*)&g_map_led_to_point_polar[index]; + point->x = pgm_read_byte(addr); + point->y = pgm_read_byte(addr+1); +} + +// +// Maps switch matrix coordinate (row,col) to LED index +// + + +#if defined(RGB_BACKLIGHT_ZEAL65) +// Note: Left spacebar stab is at 4,2 (LC7) +// Right spacebar stab is at 4,9 (D14) +// +// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B6 +// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B7 +// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B8 +// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 +// C17, C8, C7, ---, ---, ---, ---, C0, ---, D14, D15, D16, D17, B17, B16 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, + { 36+17, 36+8, 36+7, 255, 255, 255, 255, 36+0, 255, 54+14, 54+15, 54+16, 54+17, 18+17, 18+16 } +}; +#elif defined(RGB_BACKLIGHT_KOYU) +// Note: Left spacebar stab is at 4,4 (LC6) +// Right spacebar stab is at 4,10 (D14) +// +// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B6 +// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B7 +// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B8 +// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 +// C17, C8, C7, C6, ---, ---, ---, C0, ---, ---, D14, D15, D16, B17, B16 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } +}; +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) +// Note: Left spacebar stab is at 4,3 (LC6) +// Right spacebar stab is at 4,9 (LD13) or 4,10 (LD14) +// +// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, +// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, +// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, +// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, +// C17, C8, C7, C6, ---, ---, ---, C0, ---, D13, D14, D15, D16, D17, +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } +}; +#elif defined(RGB_BACKLIGHT_U80_A) +// Note: Left spacebar stab is at 5,3 (LC6) +// Right spacebar stab is at 5,10 (LD14) +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 72+17, 72+16, 72+15, 72+14, 72+9, 72+10, 72+11, 72+12, 72+13, 90+0, 90+1, 90+2, 90+3, 255, 90+4, 90+5, 90+6 }, + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 90+11, 90+9, 90+7 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 90+12, 90+10, 90+8 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 255, 255, 255, 255 }, + { 36+16, 255, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 255, 255, 90+14, 255 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 54+17, 90+15, 90+16, 90+17 } +}; +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_ANSI) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } +}; +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_HHKB) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, LA48, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, ---, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 48-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 63-1, 64-1, 56-1 } +}; +#elif defined(RGB_BACKLIGHT_HS60) //HS60_ISO +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, LA48, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } +}; +#elif defined(RGB_BACKLIGHT_NK65) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, LB5, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, LB3, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, LA48, LA62, LA63, LA64, LA56, LB4 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1, 1+64-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255, 2+64-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1, 5+64-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1, 3+64-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 48-1, 62-1, 63-1, 64-1, 56-1, 4+64-1 } +}; +#elif defined(RGB_BACKLIGHT_M6_B) +// M6-B is really simple: +// 0 3 5 +// 1 2 4 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0, 3, 5, 1, 2, 4 } +}; +#endif + +void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led ) +{ + *led = 255; + if ( row < MATRIX_ROWS && column < MATRIX_COLS ) + { + *led = pgm_read_byte(&g_map_row_column_to_led[row][column]); + } +} + +void backlight_update_pwm_buffers(void) +{ +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_update_pwm_buffers(); +#elif defined(RGB_BACKLIGHT_HS60) + IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); +#elif defined(RGB_BACKLIGHT_NK65) + IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); +#elif defined(RGB_BACKLIGHT_U80_A) + static uint8_t driver = 0; + switch ( driver ) + { + case 0: + IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, 0 ); + break; + case 1: + IS31FL3731_update_pwm_buffers( ISSI_ADDR_2, 1 ); + break; + case 2: + IS31FL3731_update_pwm_buffers( ISSI_ADDR_3, 2 ); + break; + } + if ( ++driver > 2 ) + { + driver = 0; + } +#else + IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3731_update_pwm_buffers( ISSI_ADDR_2, 1 ); + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3731_update_led_control_registers( ISSI_ADDR_2, 1 ); +#endif +} + +void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) +{ +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_set_color( index, red, green, blue ); +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + IS31FL3733_set_color( index, red, green, blue ); +#else + IS31FL3731_set_color( index, red, green, blue ); +#endif +} + +void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) +{ +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_set_color_all( red, green, blue ); +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + IS31FL3733_set_color_all( red, green, blue ); +#else + IS31FL3731_set_color_all( red, green, blue ); +#endif +} + +void backlight_set_key_hit(uint8_t row, uint8_t column) +{ + uint8_t led; + map_row_column_to_led(row,column,&led); + g_key_hit[led] = 0; + + g_any_key_hit = 0; +} + +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) +// This is (F_CPU/1024) / 20 Hz +// = 15625 Hz / 20 Hz +// = 781 +#define TIMER3_TOP 781 + +void backlight_timer_init(void) +{ + static uint8_t backlight_timer_is_init = 0; + if ( backlight_timer_is_init ) + { + return; + } + backlight_timer_is_init = 1; + + // Timer 3 setup + TCCR3B = _BV(WGM32) | // CTC mode OCR3A as TOP + _BV(CS32) | _BV(CS30); // prescale by /1024 + // Set TOP value + uint8_t sreg = SREG; + cli(); + + OCR3AH = (TIMER3_TOP >> 8) & 0xff; + OCR3AL = TIMER3_TOP & 0xff; + SREG = sreg; +} + +void backlight_timer_enable(void) +{ + TIMSK3 |= _BV(OCIE3A); +} + +void backlight_timer_disable(void) +{ + TIMSK3 &= ~_BV(OCIE3A); +} +#else //STM32, use GPT with TIM4. Enable in halconf.h +static void gpt_backlight_timer_task(GPTDriver *gptp); +// Timer setup at 200Khz, callback at 10k ticks = 20Hz +static GPTConfig gpt4cfg1 = { + .frequency = 200000U, + .callback = gpt_backlight_timer_task +}; + +void backlight_timer_init(void) +{ + gptStart(&GPTD4, &gpt4cfg1); +} + +void backlight_timer_enable(void) +{ + gptStartContinuous(&GPTD4, 10000); +} + +void backlight_timer_disable(void) +{ + gptStopTimer(&GPTD4); +} +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) + +void backlight_set_suspend_state(bool state) +{ + g_suspend_state = state; +} + +void backlight_set_indicator_state(uint8_t state) +{ + g_indicator_state = state; +} + +void backlight_effect_rgb_test(void) +{ + // Mask out bits 4 and 5 + // This 2-bit value will stay the same for 16 ticks. + switch ( (g_tick & 0x30) >> 4 ) + { + case 0: + { + backlight_set_color_all( 255, 0, 0 ); + break; + } + case 1: + { + backlight_set_color_all( 0, 255, 0 ); + break; + } + case 2: + { + backlight_set_color_all( 0, 0, 255 ); + break; + } + case 3: + { + backlight_set_color_all( 255, 255, 255 ); + break; + } + } +} + +#if defined(RGB_DEBUGGING_ONLY) +// This tests the LEDs +// Note that it will change the LED control registers +// in the LED drivers, and leave them in an invalid +// state for other backlight effects. +// ONLY USE THIS FOR TESTING LEDS! +void backlight_effect_single_LED_test(void) +{ + static uint8_t color = 0; // 0,1,2 for R,G,B + static uint8_t row = 0; + static uint8_t column = 0; + + static uint8_t tick = 0; + tick++; + + if ( tick > 2 ) + { + tick = 0; + column++; + } + if ( column > 14 ) + { + column = 0; + row++; + } + if ( row > 4 ) + { + row = 0; + color++; + } + if ( color > 2 ) + { + color = 0; + } + + uint8_t led; + map_row_column_to_led( row, column, &led ); + backlight_set_color_all( 255, 255, 255 ); + backlight_test_led( led, color==0, color==1, color==2 ); +} +#endif // defined(RGB_DEBUGGING_ONLY) + +// All LEDs off +void backlight_effect_all_off(void) +{ + backlight_set_color_all( 0, 0, 0 ); +} + +// Solid color +void backlight_effect_solid_color(void) +{ + HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + backlight_set_color_all( rgb.r, rgb.g, rgb.b ); +} + +// alphas = color1, mods = color2 +void backlight_effect_alphas_mods(void) +{ + RGB rgb1 = hsv_to_rgb( (HSV){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } ); + RGB rgb2 = hsv_to_rgb( (HSV){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } ); + bool is_alpha = false; + for ( int row = 0; row < MATRIX_ROWS; row++ ) + { + for ( int column = 0; column < MATRIX_COLS; column++ ) + { + uint8_t index; + map_row_column_to_led( row, column, &index ); + if ( index < BACKLIGHT_LED_COUNT ) + { +#if defined(RGB_BACKLIGHT_U80_A) + if ( row == 0 ) + { + is_alpha = ( column < 16 ) && (( 0b1110000111100001 & (1< 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + // Divide delta by 4, this gives the delta per row + deltaH /= 4; + + int16_t s1 = g_config.color_1.s; + int16_t s2 = g_config.color_2.s; + int16_t deltaS = ( s2 - s1 ) / 4; + + HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; + RGB rgb; + Point point; + for ( int i=0; i>4); + // Relies on hue being 8-bit and wrapping + hsv.h = g_config.color_1.h + ( deltaH * y ); + hsv.s = g_config.color_1.s + ( deltaS * y ); + rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); + } +} + +void backlight_effect_raindrops(bool initialize) +{ + int16_t h1 = g_config.color_1.h; + int16_t h2 = g_config.color_2.h; + int16_t deltaH = h2 - h1; + deltaH /= 4; + + // Take the shortest path between hues + if ( deltaH > 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + + int16_t s1 = g_config.color_1.s; + int16_t s2 = g_config.color_2.s; + int16_t deltaS = ( s2 - s1 ) / 4; + + HSV hsv; + RGB rgb; + + // Change one LED every tick + uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; + + for ( int i=0; i> 2; + hsv.h = g_config.color_1.h + offset2; + hsv.s = 127 + ( point.y >> 1 ); + rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); + } +} + +#if defined(RGB_BACKLIGHT_M6_B) +void backlight_effect_custom_colors(void) +{ + RGB rgb; + for ( uint8_t i = 0; i < 6; i++ ) + { + HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; + rgb = hsv_to_rgb( hsv ); + uint8_t led; + map_row_column_to_led( 0, i, &led ); + backlight_set_color( led, rgb.r, rgb.g, rgb.b ); + } +} +#endif + +void backlight_effect_indicators_set_colors( uint8_t index, HS color ) +{ + HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + if ( index == 254 ) + { + backlight_set_color_all( rgb.r, rgb.g, rgb.b ); + } + else + { + backlight_set_color( index, rgb.r, rgb.g, rgb.b ); + + // If the spacebar LED is the indicator, + // do the same for the spacebar stabilizers + if ( index == 36+0 ) // LC0 + { +#if defined(RGB_BACKLIGHT_ZEAL65) + backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 +#elif defined(RGB_BACKLIGHT_KOYU) + backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) + backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 + backlight_set_color( 54+13, rgb.r, rgb.g, rgb.b ); // LD13 + if ( g_config.use_7u_spacebar ) + { + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 + } +#endif + } + } +} + +// This runs after another backlight effect and replaces +// colors already set +void backlight_effect_indicators(void) +{ + if ( g_config.caps_lock_indicator.index != 255 && + ( g_indicator_state & (1< 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : g_config.effect; + + // Keep track of the effect used last time, + // detect change in effect, so each effect can + // have an optional initialization. + static uint8_t effect_last = 255; + bool initialize = effect != effect_last; + effect_last = effect; + + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch ( effect ) + { + case 0: + backlight_effect_all_off(); + break; + case 1: + backlight_effect_solid_color(); + break; + case 2: +#if defined(RGB_BACKLIGHT_M6_B) + backlight_effect_custom_colors(); +#else + backlight_effect_alphas_mods(); +#endif + break; + case 3: + backlight_effect_gradient_up_down(); + break; + case 4: + backlight_effect_raindrops( initialize ); + break; + case 5: + backlight_effect_cycle_all(); + break; + case 6: + backlight_effect_cycle_left_right(); + break; + case 7: + backlight_effect_cycle_up_down(); + break; + case 8: + backlight_effect_jellybean_raindrops( initialize ); + break; + case 9: + backlight_effect_cycle_radial1(); + break; + case 10: + backlight_effect_cycle_radial2(); + break; + default: + backlight_effect_all_off(); + break; + } + + if ( ! suspend_backlight ) + { +#if !defined(RGB_BACKLIGHT_M6_B) + backlight_effect_indicators(); +#endif + } +} + +void backlight_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) +{ + if ( row >= MATRIX_ROWS ) + { + // Special value, 255=none, 254=all + *index = row; + } + else + { + map_row_column_to_led( row, column, index ); + } +} + +void backlight_get_indicator_row_col( uint8_t index, uint8_t *row, uint8_t *column ) +{ + if ( index == 255 || index == 254 ) + { + // Special value, 255=none, 254=all + *row = index; + *column = 0; + return; + } + for ( uint8_t r = 0; r < MATRIX_ROWS; r++ ) + { + for ( uint8_t c = 0; c < MATRIX_COLS; c++ ) + { + uint8_t i = 255; + map_row_column_to_led( r, c, &i ); + if ( i == index ) + { + *row = r; + *column = c; + return; + } + } + } +} + +// Some helpers for setting/getting HSV +void _set_color( HS *color, uint8_t *data ) +{ + color->h = data[0]; + color->s = data[1]; +} + +void _get_color( HS *color, uint8_t *data ) +{ + data[0] = color->h; + data[1] = color->s; +} + +void backlight_config_set_value( uint8_t *data ) +{ + bool reinitialize = false; + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { +#if defined (RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) + case id_use_split_backspace: + { + g_config.use_split_backspace = (bool)*value_data; + reinitialize = true; + break; + } +#endif +#if defined (RGB_BACKLIGHT_ZEAL60) + case id_use_split_left_shift: + { + g_config.use_split_left_shift = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_split_right_shift: + { + g_config.use_split_right_shift = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_7u_spacebar: + { + g_config.use_7u_spacebar = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_iso_enter: + { + g_config.use_iso_enter = (bool)*value_data; + reinitialize = true; + break; + } + case id_disable_hhkb_blocker_leds: + { + g_config.disable_hhkb_blocker_leds = (bool)*value_data; + reinitialize = true; + break; + } +#endif + case id_disable_when_usb_suspended: + { + g_config.disable_when_usb_suspended = (bool)*value_data; + break; + } + case id_disable_after_timeout: + { + g_config.disable_after_timeout = *value_data; + break; + } + case id_brightness: + { + g_config.brightness = *value_data; + break; + } + case id_effect: + { + g_config.effect = *value_data; + break; + } + case id_effect_speed: + { + g_config.effect_speed = *value_data; + break; + } + case id_color_1: + { + _set_color( &(g_config.color_1), value_data ); + break; + } + case id_color_2: + { + _set_color( &(g_config.color_2), value_data ); + break; + } + case id_caps_lock_indicator_color: + { + _set_color( &(g_config.caps_lock_indicator.color), value_data ); + break; + } + case id_caps_lock_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.caps_lock_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_1_indicator_color: + { + _set_color( &(g_config.layer_1_indicator.color), value_data ); + break; + } + case id_layer_1_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_1_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_2_indicator_color: + { + _set_color( &(g_config.layer_2_indicator.color), value_data ); + break; + } + case id_layer_2_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_2_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_3_indicator_color: + { + _set_color( &(g_config.layer_3_indicator.color), value_data ); + break; + } + case id_layer_3_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_3_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_alphas_mods: + { + for ( int i=0; i<5; i++ ) + { + g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); + } + } +#if defined(RGB_BACKLIGHT_M6_B) + case id_custom_color: + { + uint8_t index = value_data[0]; + if ( index >= 0 && index <= 6 ) + { + _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); + } + } +#endif + } + + if ( reinitialize ) + { + backlight_init_drivers(); + } +} + +void backlight_config_get_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { + case id_use_split_backspace: + { + *value_data = ( g_config.use_split_backspace ? 1 : 0 ); + break; + } + case id_use_split_left_shift: + { + *value_data = ( g_config.use_split_left_shift ? 1 : 0 ); + break; + } + case id_use_split_right_shift: + { + *value_data = ( g_config.use_split_right_shift ? 1 : 0 ); + break; + } + case id_use_7u_spacebar: + { + *value_data = ( g_config.use_7u_spacebar ? 1 : 0 ); + break; + } + case id_use_iso_enter: + { + *value_data = ( g_config.use_iso_enter ? 1 : 0 ); + break; + } + case id_disable_when_usb_suspended: + { + *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); + break; + } + case id_disable_hhkb_blocker_leds: + { + *value_data = ( g_config.disable_hhkb_blocker_leds ? 1 : 0 ); + break; + } + case id_disable_after_timeout: + { + *value_data = g_config.disable_after_timeout; + break; + } + case id_brightness: + { + *value_data = g_config.brightness; + break; + } + case id_effect: + { + *value_data = g_config.effect; + break; + } + case id_effect_speed: + { + *value_data = g_config.effect_speed; + break; + } + case id_color_1: + { + _get_color( &(g_config.color_1), value_data ); + break; + } + case id_color_2: + { + _get_color( &(g_config.color_2), value_data ); + break; + } + case id_caps_lock_indicator_color: + { + _get_color( &(g_config.caps_lock_indicator.color), value_data ); + break; + } + case id_caps_lock_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.caps_lock_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_1_indicator_color: + { + _get_color( &(g_config.layer_1_indicator.color), value_data ); + break; + } + case id_layer_1_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_1_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_2_indicator_color: + { + _get_color( &(g_config.layer_2_indicator.color), value_data ); + break; + } + case id_layer_2_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_2_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_3_indicator_color: + { + _get_color( &(g_config.layer_3_indicator.color), value_data ); + break; + } + case id_layer_3_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_3_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_alphas_mods: + { + for ( int i=0; i<5; i++ ) + { + *(value_data+i*2) = g_config.alphas_mods[i] >> 8; + *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; + } + } +#if defined(RGB_BACKLIGHT_M6_B) + case id_custom_color: + { + uint8_t index = value_data[0]; + if ( index >= 0 && index <= 6 ) + { + _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); + } + } +#endif + } +} + +void backlight_config_set_alphas_mods( uint16_t *alphas_mods ) +{ + for ( int i=0; i<5; i++ ) + { + g_config.alphas_mods[i] = alphas_mods[i]; + } + + backlight_config_save(); +} + +void backlight_config_load(void) +{ + eeprom_read_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); +} + +void backlight_config_save(void) +{ + eeprom_update_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); +} + +void backlight_init_drivers(void) +{ + // Initialize I2C + i2c_init(); + +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_init(); +#elif defined(RGB_BACKLIGHT_HS60) + IS31FL3733_init( ISSI_ADDR_1, 0 ); + + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { +#if defined(HS60_ANSI) + bool enabled = !( ( index == 48-1 ) || //LA48 + ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 +#elif defined(HS60_HHKB) + bool enabled = !( ( index == 61-1 ) || //LA61 + ( index == 62-1 ) ); //LA62 +#else //HS60_ISO + bool enabled = !( ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 +#endif + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); +#elif defined(RGB_BACKLIGHT_NK65) + IS31FL3733_init( ISSI_ADDR_1, 0 ); + IS31FL3733_init( ISSI_ADDR_2, 0 ); + + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { + bool enabled = !( ( index == 61-1 ) || //LA61 + ( index > 6+64-1 ) ); //LB7-LB64 + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + IS31FL3733_set_led_control_register( 7+64-1, 0, 1, 0 ); //Enable LB7 green enable for indicators + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); +#else + IS31FL3731_init( ISSI_ADDR_1 ); + IS31FL3731_init( ISSI_ADDR_2 ); + +#if defined(RGB_BACKLIGHT_U80_A) + IS31FL3731_init( ISSI_ADDR_3 ); +#endif + + // Experimental feature, not in configuration yet +#if defined(RGB_BACKLIGHT_ZEAL60) + bool disable_spacebar_stab_leds = false; +#endif + + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { + // OR the possible "disabled" cases together, then NOT the result to get the enabled state + // LC6 LD13 not present on Zeal65 +#if defined(RGB_BACKLIGHT_ZEAL65) + bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 + ( index == 36+6 ) || // LC6 + ( index == 54+13 ) ); // LD13 +#elif defined(RGB_BACKLIGHT_KOYU) + bool enabled = !( ( index == 36+15 ) || // LC15 + ( index == 54+13 ) || // LD13 + ( index == 54+17 ) ); // LD17 +#elif defined(RGB_BACKLIGHT_M60_A) + bool enabled = !( + // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) || // LB17 + // HHKB blockers (LC17, LD17) and ISO extra keys (LC15,LD13) not present on M60-A + ( index == 36+17 ) || // LC17 + ( index == 54+17 ) || // LD17 + ( index == 36+15 ) || // LC15 + ( index == 54+13 ) ); // LD13 +#elif defined(RGB_BACKLIGHT_ZEAL60) + // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 + bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 + ( index == 36+15 && !g_config.use_split_left_shift ) || // LC15 + ( index == 54+8 && !g_config.use_split_right_shift ) || // LD8 + ( index == 54+13 && g_config.use_7u_spacebar ) || // LD13 + ( index == 36+17 && g_config.disable_hhkb_blocker_leds ) || // LC17 + ( index == 54+17 && g_config.disable_hhkb_blocker_leds ) || // LD17 + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) || // LB17 + ( index == 36+6 && disable_spacebar_stab_leds ) || // LC6 + ( index == 54+13 && disable_spacebar_stab_leds ) || // LD13 + ( index == 54+14 && disable_spacebar_stab_leds && g_config.use_7u_spacebar ) ); // LD14 +#elif defined(RGB_BACKLIGHT_U80_A) +// LB5, LB6, LB7, LB8, LB15, LB16, LB17, LC15, LD8, LD13, LE0-LE8, LF13 + bool enabled = !( + ( index == 18+5 ) || // LB5 + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+16 ) || // LB17 + ( index == 36+15 ) || // LC15 + ( index == 54+8 ) || // LD8 + ( index == 54+13 ) || // LD13 + ( index >= 72+0 && index <= 72+8 ) || // LE0-LE8 + ( index == 90+13 ) ); // LF13 +#endif + // This only caches it for later + IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3731_update_led_control_registers( ISSI_ADDR_2, 1 ); +#if defined(RGB_BACKLIGHT_U80_A) + IS31FL3731_update_led_control_registers( ISSI_ADDR_3, 2 ); +#endif +#endif // !defined(RGB_BACKLIGHT_M6_B) + + // TODO: put the 1 second startup delay here? + + // clear the key hits + for ( int led=0; ledevent.pressed ) + { + backlight_set_key_hit( record->event.key.row, record->event.key.col ); + } + + switch(keycode) + { + case BR_INC: + if (record->event.pressed) + { + backlight_brightness_increase(); + } + return false; + break; + case BR_DEC: + if (record->event.pressed) + { + backlight_brightness_decrease(); + } + return false; + break; + case EF_INC: + if (record->event.pressed) + { + backlight_effect_increase(); + } + return false; + break; + case EF_DEC: + if (record->event.pressed) + { + backlight_effect_decrease(); + } + return false; + break; + case ES_INC: + if (record->event.pressed) + { + backlight_effect_speed_increase(); + } + return false; + break; + case ES_DEC: + if (record->event.pressed) + { + backlight_effect_speed_decrease(); + } + return false; + break; + case H1_INC: + if (record->event.pressed) + { + backlight_color_1_hue_increase(); + } + return false; + break; + case H1_DEC: + if (record->event.pressed) + { + backlight_color_1_hue_decrease(); + } + return false; + break; + case S1_INC: + if (record->event.pressed) + { + backlight_color_1_sat_increase(); + } + return false; + break; + case S1_DEC: + if (record->event.pressed) + { + backlight_color_1_sat_decrease(); + break; + } + return false; + break; + case H2_INC: + if (record->event.pressed) + { + backlight_color_2_hue_increase(); + } + return false; + break; + case H2_DEC: + if (record->event.pressed) + { + backlight_color_2_hue_decrease(); + } + return false; + break; + case S2_INC: + if (record->event.pressed) + { + backlight_color_2_sat_increase(); + } + return false; + break; + case S2_DEC: + if (record->event.pressed) + { + backlight_color_2_sat_decrease(); + break; + } + return false; + break; + } + + return true; +} + +// Deals with the messy details of incrementing an integer +uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) +{ + int16_t new_value = value; + new_value += step; + return MIN( MAX( new_value, min ), max ); +} + +uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) +{ + int16_t new_value = value; + new_value -= step; + return MIN( MAX( new_value, min ), max ); +} + +void backlight_effect_increase(void) +{ + g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); +} + +void backlight_effect_decrease(void) +{ + g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); +} + +void backlight_effect_speed_increase(void) +{ + g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); +} + +void backlight_effect_speed_decrease(void) +{ + g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); +} + +void backlight_brightness_increase(void) +{ + g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_brightness_decrease(void) +{ + g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_1_hue_increase(void) +{ + g_config.color_1.h = increment( g_config.color_1.h, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_1_hue_decrease(void) +{ + g_config.color_1.h = decrement( g_config.color_1.h, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_1_sat_increase(void) +{ + g_config.color_1.s = increment( g_config.color_1.s, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_1_sat_decrease(void) +{ + g_config.color_1.s = decrement( g_config.color_1.s, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_2_hue_increase(void) +{ + g_config.color_2.h = increment( g_config.color_2.h, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_2_hue_decrease(void) +{ + g_config.color_2.h = decrement( g_config.color_2.h, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_2_sat_increase(void) +{ + g_config.color_2.s = increment( g_config.color_2.s, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_2_sat_decrease(void) +{ + g_config.color_2.s = decrement( g_config.color_2.s, 8, 0, 255 ); + backlight_config_save(); +} + +#if defined(RGB_DEBUGGING_ONLY) +void backlight_test_led( uint8_t index, bool red, bool green, bool blue ) +{ + for ( int i=0; i. + */ +#pragma once + +enum wt_rgb_backlight_config_value +{ + id_use_split_backspace = 0x01, + id_use_split_left_shift = 0x02, + id_use_split_right_shift = 0x03, + id_use_7u_spacebar = 0x04, + id_use_iso_enter = 0x05, + id_disable_hhkb_blocker_leds = 0x06, + id_disable_when_usb_suspended = 0x07, + id_disable_after_timeout = 0x08, + id_brightness = 0x09, + id_effect = 0x0A, + id_effect_speed = 0x0B, + id_color_1 = 0x0C, + id_color_2 = 0x0D, + id_caps_lock_indicator_color = 0x0E, + id_caps_lock_indicator_row_col = 0x0F, + id_layer_1_indicator_color = 0x10, + id_layer_1_indicator_row_col = 0x11, + id_layer_2_indicator_color = 0x12, + id_layer_2_indicator_row_col = 0x13, + id_layer_3_indicator_color = 0x14, + id_layer_3_indicator_row_col = 0x15, + id_alphas_mods = 0x16, + id_custom_color = 0x17 +}; diff --git a/keyboards/wilba_tech/wt_rgb_backlight_keycodes.h b/keyboards/wilba_tech/wt_rgb_backlight_keycodes.h new file mode 100644 index 0000000000..5a43649535 --- /dev/null +++ b/keyboards/wilba_tech/wt_rgb_backlight_keycodes.h @@ -0,0 +1,34 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +// This is hardcoded at 0x5F00 so it's well after keycode value SAFE_RANGE +enum wt_rgb_backlight_keycodes { + BR_INC = 0x5F00, // backlight brightness increase + BR_DEC, // backlight brightness decrease + EF_INC, // backlight effect increase + EF_DEC, // backlight effect decrease + ES_INC, + ES_DEC, + H1_INC, + H1_DEC, + S1_INC, + S1_DEC, + H2_INC, + H2_DEC, + S2_INC, + S2_DEC +}; diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h new file mode 100644 index 0000000000..6b9529a6f9 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/config.h @@ -0,0 +1,138 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x5A45 // ZealPC ("ZE") +#define PRODUCT_ID 0x0060 // Zeal60 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ZealPC +#define PRODUCT Zeal60 +#define DESCRIPTION Zeal60 + +// key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +// Zeal60 PCB default pin-out +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } +#define UNUSED_PINS + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +// COL2ROW or ROW2COL +#define DIODE_DIRECTION COL2ROW + +// Set 0 if debouncing isn't needed +#define DEBOUNCE 5 + +// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +#define LOCKING_SUPPORT_ENABLE +// Locking resynchronize hack +#define LOCKING_RESYNC_ENABLE + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +// disable debug print +//#define NO_DEBUG + +// disable print +//#define NO_PRINT + +// disable action features +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for Zeal60 specifics +#define RGB_BACKLIGHT_ZEAL60 + +// enable/disable LEDs based on layout +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0001000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+31) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 +// Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/zeal60/info.json b/keyboards/wilba_tech/zeal60/info.json new file mode 100644 index 0000000000..802f1f0cba --- /dev/null +++ b/keyboards/wilba_tech/zeal60/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "Zeal60", + "url": "https://zealpc.net", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_all": { + "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"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":"|", "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}, {"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}, {"x":14, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"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":"|", "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":2.25}, {"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}, {"x":14, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_hhkb": { + "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":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":2.25}, {"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}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/zeal60/keymaps/ansi_split_bs_rshift/config.h b/keyboards/wilba_tech/zeal60/keymaps/ansi_split_bs_rshift/config.h similarity index 100% rename from keyboards/zeal60/keymaps/ansi_split_bs_rshift/config.h rename to keyboards/wilba_tech/zeal60/keymaps/ansi_split_bs_rshift/config.h diff --git a/keyboards/zeal60/keymaps/ansi_split_bs_rshift/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/ansi_split_bs_rshift/keymap.c similarity index 100% rename from keyboards/zeal60/keymaps/ansi_split_bs_rshift/keymap.c rename to keyboards/wilba_tech/zeal60/keymaps/ansi_split_bs_rshift/keymap.c diff --git a/keyboards/zeal60/keymaps/crd/config.h b/keyboards/wilba_tech/zeal60/keymaps/crd/config.h similarity index 100% rename from keyboards/zeal60/keymaps/crd/config.h rename to keyboards/wilba_tech/zeal60/keymaps/crd/config.h diff --git a/keyboards/zeal60/keymaps/crd/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/crd/keymap.c similarity index 100% rename from keyboards/zeal60/keymaps/crd/keymap.c rename to keyboards/wilba_tech/zeal60/keymaps/crd/keymap.c diff --git a/keyboards/zeal60/keymaps/default/config.h b/keyboards/wilba_tech/zeal60/keymaps/default/config.h similarity index 100% rename from keyboards/zeal60/keymaps/default/config.h rename to keyboards/wilba_tech/zeal60/keymaps/default/config.h diff --git a/keyboards/zeal60/keymaps/default/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/default/keymap.c similarity index 100% rename from keyboards/zeal60/keymaps/default/keymap.c rename to keyboards/wilba_tech/zeal60/keymaps/default/keymap.c diff --git a/keyboards/zeal60/keymaps/hhkb/config.h b/keyboards/wilba_tech/zeal60/keymaps/hhkb/config.h similarity index 100% rename from keyboards/zeal60/keymaps/hhkb/config.h rename to keyboards/wilba_tech/zeal60/keymaps/hhkb/config.h diff --git a/keyboards/zeal60/keymaps/hhkb/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/hhkb/keymap.c similarity index 100% rename from keyboards/zeal60/keymaps/hhkb/keymap.c rename to keyboards/wilba_tech/zeal60/keymaps/hhkb/keymap.c diff --git a/keyboards/zeal60/keymaps/iso/config.h b/keyboards/wilba_tech/zeal60/keymaps/iso/config.h similarity index 100% rename from keyboards/zeal60/keymaps/iso/config.h rename to keyboards/wilba_tech/zeal60/keymaps/iso/config.h diff --git a/keyboards/zeal60/keymaps/iso/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/iso/keymap.c similarity index 100% rename from keyboards/zeal60/keymaps/iso/keymap.c rename to keyboards/wilba_tech/zeal60/keymaps/iso/keymap.c diff --git a/keyboards/zeal60/keymaps/ryanmaclean/config.h b/keyboards/wilba_tech/zeal60/keymaps/ryanmaclean/config.h similarity index 100% rename from keyboards/zeal60/keymaps/ryanmaclean/config.h rename to keyboards/wilba_tech/zeal60/keymaps/ryanmaclean/config.h diff --git a/keyboards/zeal60/keymaps/ryanmaclean/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/ryanmaclean/keymap.c similarity index 100% rename from keyboards/zeal60/keymaps/ryanmaclean/keymap.c rename to keyboards/wilba_tech/zeal60/keymaps/ryanmaclean/keymap.c diff --git a/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/config.h b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/config.h new file mode 100644 index 0000000000..68c4b9ed33 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/config.h @@ -0,0 +1,37 @@ +#pragma once + +/* enable/disable LEDs based on layout */ +#undef RGB_BACKLIGHT_USE_SPLIT_BACKSPACE +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 + +#undef RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 + +#undef RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 + +#undef RGB_BACKLIGHT_USE_7U_SPACEBAR +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 + +#undef RGB_BACKLIGHT_USE_ISO_ENTER +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 + +#undef RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +// +#undef RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 1 + +#undef RGB_BACKLIGHT_EFFECT +#define RGB_BACKLIGHT_EFFECT 5 + +#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR +#undef RGB_BACKLIGHT_LAYER_2_INDICATOR +#undef RGB_BACKLIGHT_LAYER_3_INDICATOR + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s= 255}, .index = 254} +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 150, .s = 255 }, .index = 60-1 } //blue +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 100, .s = 255 }, .index = 60-1 } //blue + diff --git a/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/keymap.c new file mode 100644 index 0000000000..ea36880e29 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/keymap.c @@ -0,0 +1,46 @@ +// ANSI split backspace/right shift layout for Zeal60 +#include QMK_KEYBOARD_H + +#define KC_CAFN LT(1,KC_CAPS) +#define KC_ENFN LT(3,KC_ENT) +#define KC_RSUP RSFT_T(KC_UP) +#define KC_RGLT RALT_T(KC_LEFT) +#define KC_RGDN RGUI_T(KC_DOWN) +#define KC_RCRT RCTL_T(KC_RIGHT) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_60_ansi_split_bs_rshift( + 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_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CAFN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENFN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP, FN_MO13, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_TRNS, KC_RGLT, KC_RGDN, KC_RCRT), + +// Fn1 Layer +[1] = LAYOUT_60_ansi_split_bs_rshift( + 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_INS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_INS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_60_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_60_ansi_split_bs_rshift( + RESET, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk new file mode 100644 index 0000000000..fcf3767e16 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = lite diff --git a/keyboards/zeal60/keymaps/tusing/Makefile b/keyboards/wilba_tech/zeal60/keymaps/tusing/Makefile similarity index 100% rename from keyboards/zeal60/keymaps/tusing/Makefile rename to keyboards/wilba_tech/zeal60/keymaps/tusing/Makefile diff --git a/keyboards/zeal60/keymaps/tusing/README.md b/keyboards/wilba_tech/zeal60/keymaps/tusing/README.md similarity index 100% rename from keyboards/zeal60/keymaps/tusing/README.md rename to keyboards/wilba_tech/zeal60/keymaps/tusing/README.md diff --git a/keyboards/zeal60/keymaps/tusing/config.h b/keyboards/wilba_tech/zeal60/keymaps/tusing/config.h similarity index 100% rename from keyboards/zeal60/keymaps/tusing/config.h rename to keyboards/wilba_tech/zeal60/keymaps/tusing/config.h diff --git a/keyboards/zeal60/keymaps/tusing/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/tusing/keymap.c similarity index 100% rename from keyboards/zeal60/keymaps/tusing/keymap.c rename to keyboards/wilba_tech/zeal60/keymaps/tusing/keymap.c diff --git a/keyboards/wilba_tech/zeal60/readme.md b/keyboards/wilba_tech/zeal60/readme.md new file mode 100644 index 0000000000..21d55af39b --- /dev/null +++ b/keyboards/wilba_tech/zeal60/readme.md @@ -0,0 +1,47 @@ +Zeal60 +==== + +![Zeal60](https://cdn.shopify.com/s/files/1/0490/7329/products/Zeal60.jpg) + +This is a 60% PCB with per-key RGB LEDs and supports ANSI, ISO, winkey/winkeyless bottom row, HHKB-layout (split right shift and backspace). + +Keyboard Maintainer: [Wilba](http://wilba.tech/) and on [github](https://github.com/Wilba6582) +Hardware Supported: Zeal60 PCB Rev 0-3 +Hardware Availability: https://zealpc.net/collections/group-buy-pre-orders/products/zeal60rgb + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/zeal60: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). + + +RGB Backlight Configuration +==== + +A keymap (in the keymaps directory) can optionally configure which RGB backlight LEDs are used, depending on the needs of the layout, by adding a config.h file in the keymap's directory. +The following #define symbols will enable/disable a feature using 1 or 0. + + RGB_BACKLIGHT_USE_SPLIT_BACKSPACE + +Split backspace is being used, enables the right LED of the split backspace (the top-right corner) + + RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT + +Split left shift is being used (i.e. ISO layout), enables the right LED of the split left shift (the ISO key) + + RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT + +Split right shift is being used (i.e. HHKB style layouts), enables the right LED of the split right shift (the Fn key) + + RGB_BACKLIGHT_USE_7U_SPACEBAR + +A 7U spacebar is being used, controls the LEDs under the right stabilizer (of 7U spacebar) and right Alt (if 6.25U spacebar). + + RGB_BACKLIGHT_USE_ISO_ENTER + +An ISO Enter is being used. Only used to tweak the location of the LED being used under ANSI Enter/backslash + + RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS + +Disables the LEDs under HHKB corner blockers, useful for transparent cases. diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk new file mode 100644 index 0000000000..11f3867de3 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/rules.mk @@ -0,0 +1,50 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes + +LAYOUTS = 60_ansi 60_iso 60_hhkb 60_ansi_split_bs_rshift + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/zeal60/zeal60.c b/keyboards/wilba_tech/zeal60/zeal60.c new file mode 100644 index 0000000000..b8c2e2f83f --- /dev/null +++ b/keyboards/wilba_tech/zeal60/zeal60.c @@ -0,0 +1,18 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#ifndef RGB_BACKLIGHT_ZEAL60 +#error RGB_BACKLIGHT_ZEAL60 not defined, you done goofed somehao, brah +#endif diff --git a/keyboards/zeal60/zeal60.h b/keyboards/wilba_tech/zeal60/zeal60.h similarity index 97% rename from keyboards/zeal60/zeal60.h rename to keyboards/wilba_tech/zeal60/zeal60.h index ef9de7989e..0d4f1b908b 100644 --- a/keyboards/zeal60/zeal60.h +++ b/keyboards/wilba_tech/zeal60/zeal60.h @@ -16,8 +16,8 @@ #pragma once #include "quantum.h" -#include "rgb_backlight_keycodes.h" -#include "zeal60_keycodes.h" +#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" +#include "keyboards/wilba_tech/via_keycodes.h" #define XXX KC_NO diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h new file mode 100644 index 0000000000..f452fbd475 --- /dev/null +++ b/keyboards/wilba_tech/zeal65/config.h @@ -0,0 +1,138 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x5A45 // ZealPC ("ZE") +#define PRODUCT_ID 0x0065 // Zeal65 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ZealPC +#define PRODUCT Zeal65 +#define DESCRIPTION Zeal65 + +// key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// Zeal60 PCB default pin-out +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +// COL2ROW or ROW2COL +#define DIODE_DIRECTION COL2ROW + +// Set 0 if debouncing isn't needed +#define DEBOUNCE 5 + +// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +#define LOCKING_SUPPORT_ENABLE +// Locking resynchronize hack +#define LOCKING_RESYNC_ENABLE + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +// disable debug print +//#define NO_DEBUG + +// disable print +//#define NO_PRINT + +// disable action features +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for Zeal65 specifics +#define RGB_BACKLIGHT_ZEAL65 + +// enable/disable LEDs based on layout +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 // Unused +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 // Unused +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 // Used only for stab LED matching spacebar LED +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 // Unused +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0101000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111110000000011 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+31) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 +// Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/zeal65/info.json b/keyboards/wilba_tech/zeal65/info.json new file mode 100644 index 0000000000..d83895ed95 --- /dev/null +++ b/keyboards/wilba_tech/zeal65/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Zeal65", + "url": "https://zealpc.net", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_split_bs": { + "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":"Del", "x":14, "y":0}, {"label":"Home", "x":15, "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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Control", "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":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Win", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Fn2", "x":10, "y":4, "w":1.5}, {"label":"Fn1", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_65_normie": { + "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Control", "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":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Win", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Fn2", "x":10, "y":4, "w":1.5}, {"label":"Fn1", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/zeal65/keymaps/default/config.h b/keyboards/wilba_tech/zeal65/keymaps/default/config.h similarity index 100% rename from keyboards/zeal65/keymaps/default/config.h rename to keyboards/wilba_tech/zeal65/keymaps/default/config.h diff --git a/keyboards/zeal65/keymaps/default/keymap.c b/keyboards/wilba_tech/zeal65/keymaps/default/keymap.c similarity index 100% rename from keyboards/zeal65/keymaps/default/keymap.c rename to keyboards/wilba_tech/zeal65/keymaps/default/keymap.c diff --git a/keyboards/zeal65/keymaps/split_bs/config.h b/keyboards/wilba_tech/zeal65/keymaps/split_bs/config.h similarity index 100% rename from keyboards/zeal65/keymaps/split_bs/config.h rename to keyboards/wilba_tech/zeal65/keymaps/split_bs/config.h diff --git a/keyboards/zeal65/keymaps/split_bs/keymap.c b/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c similarity index 100% rename from keyboards/zeal65/keymaps/split_bs/keymap.c rename to keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c diff --git a/keyboards/wilba_tech/zeal65/readme.md b/keyboards/wilba_tech/zeal65/readme.md new file mode 100644 index 0000000000..7441480384 --- /dev/null +++ b/keyboards/wilba_tech/zeal65/readme.md @@ -0,0 +1,16 @@ +Zeal65 +==== + +![Zeal65](https://cdn.shopify.com/s/files/1/0490/7329/products/Zeal65_PCB2.jpg) + +This is a 65% PCB with per-key RGB LEDs and supports fixed, 1800-like bottom row and split backspace. It was designed for the Zephyr custom keyboard. + +Keyboard Maintainer: [Wilba](http://wilba.tech/) and on [github](https://github.com/Wilba6582) +Hardware Supported: Zeal65 PCB Rev 1 +Hardware Availability: https://zealpc.net/collections/group-buy-pre-orders/products/zephyr + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/zeal65: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). diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk new file mode 100644 index 0000000000..6c8783eb29 --- /dev/null +++ b/keyboards/wilba_tech/zeal65/rules.mk @@ -0,0 +1,48 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/zeal65/zeal65.c b/keyboards/wilba_tech/zeal65/zeal65.c similarity index 100% rename from keyboards/zeal65/zeal65.c rename to keyboards/wilba_tech/zeal65/zeal65.c diff --git a/keyboards/zeal65/zeal65.h b/keyboards/wilba_tech/zeal65/zeal65.h similarity index 95% rename from keyboards/zeal65/zeal65.h rename to keyboards/wilba_tech/zeal65/zeal65.h index 3ee4f49e59..d8528e6c51 100644 --- a/keyboards/zeal65/zeal65.h +++ b/keyboards/wilba_tech/zeal65/zeal65.h @@ -16,8 +16,8 @@ #pragma once #include "quantum.h" -#include "../zeal60/rgb_backlight_keycodes.h" -#include "../zeal60/zeal60_keycodes.h" +#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" +#include "keyboards/wilba_tech/via_keycodes.h" #define XXX KC_NO diff --git a/keyboards/winkeyless/bface/README.md b/keyboards/winkeyless/bface/README.md index f1789b04cf..da0eb8088b 100644 --- a/keyboards/winkeyless/bface/README.md +++ b/keyboards/winkeyless/bface/README.md @@ -14,6 +14,8 @@ Flashing ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. +**Reset Key:** Hold down the key located at K00, commonly programmed as left control while plugging in the keyboard. + Windows: 1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). 2. Place your keyboard into reset. @@ -33,7 +35,7 @@ macOS: 3. Install the following packages: ``` brew install python - brew install pyusb + pip3 install pyusb brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` diff --git a/keyboards/winkeyless/bface/backlight_ps2avrGB.c b/keyboards/winkeyless/bface/backlight_ps2avrGB.c deleted file mode 100644 index c0f6428407..0000000000 --- a/keyboards/winkeyless/bface/backlight_ps2avrGB.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright 2017 Sebastian Kaim - * - * 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 . - */ - -#ifdef BACKLIGHT_ENABLE - -#include "backlight_ps2avrGB.h" -#define sbi(reg,bit) reg |= (_BV(bit)) -#define cbi(reg,bit) reg &= (~_BV(bit)) -#define PWM10 WGM10 -#define PWM11 WGM11 -#define COM1x1 COM1B1 -#define OCR1x OCR1B - -void backlight_init_ports(void) -{ -#if BACKLIGHT_ON_STATE == 0 - backlight_off(); -#else - backlight_on(); -#endif - - // setup pwm - // this bitmagic is sourced from the original firmware - /*TCCR1B = ((TCCR1B & ~0x07) | 0x03); - TCNT1H = 0; - TCNT1L = 0; - sbi(TIMSK, TOIE1); - OCR1BH = 0; - OCR1BL = 0; - cbi(TCCR1A,PWM11); - sbi(TCCR1A,PWM10); - sbi(TCCR1A,COM1B1); - cbi(TCCR1A,COM1B0);*/ - ICR1 = 0xFFFF; - - TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010; - TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; - - backlight_init(); -} - -void backlight_set(uint8_t level) -{ - if( level == 0 ) { - backlight_off(); - } - else { - backlight_on(); - /*uint8_t pwm = get_pwm_for_brightness(level); - set_backlight_pwm(pwm); - TCCR1A |= _BV(COM1x1); - OCR1x = (level >= 2) ? 0xFFFF : 0x00FF;*/ - } -} - -#define PWM_MAX 0xFF -uint8_t get_pwm_for_brightness(uint8_t level) -{ - // we need to cast up here to allow multiplication with 0xFF. We could also use floats, but this is probably a lot faster. - uint16_t brightness = (uint16_t)level * (uint16_t)PWM_MAX / (uint16_t)BACKLIGHT_LEVELS; - return (uint8_t)brightness; -} - -void backlight_on(void) -{ - //_SFR_IO8(0x12) |= _BV(0x4); - LED_PIN |= BACKLIGHT_PORT_NUM; -} - -void backlight_off(void) -{ - //_SFR_IO8(0x12) &= ~_BV(0x4); - LED_PIN &= ~BACKLIGHT_PORT_NUM; -} - -void set_backlight_pwm(uint8_t level) { - // this does not work (yet) - //OCR1B = level; -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/winkeyless/bface/backlight_ps2avrGB.h b/keyboards/winkeyless/bface/backlight_ps2avrGB.h deleted file mode 100644 index d5ca903993..0000000000 --- a/keyboards/winkeyless/bface/backlight_ps2avrGB.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2017 Sebastian Kaim - * - * 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 . - */ - - -#if defined(__AVR__) -#include -#include -#include -#endif -#include -#include -#include "backlight.h" - -#ifndef PS2AVRGB_BACKLIGHT_H -#define PS2AVRGB_BACKLIGHT_H - -uint8_t get_pwm_for_brightness(uint8_t level); -void set_backlight_pwm(uint8_t level); -void backlight_on(void); -void backlight_off(void); - -#endif diff --git a/keyboards/winkeyless/bface/bface.c b/keyboards/winkeyless/bface/bface.c index 8422a4a40b..8cb5b600cd 100644 --- a/keyboards/winkeyless/bface/bface.c +++ b/keyboards/winkeyless/bface/bface.c @@ -1,46 +1,47 @@ -/* -Copyright 2017 Luiz Ribeiro -Copyright 2018 Sebastian Kaim - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "bface.h" -#include "rgblight.h" -#include +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { - rgblight_task(); } diff --git a/keyboards/winkeyless/bface/bface.h b/keyboards/winkeyless/bface/bface.h index 62d62f6953..bca0c24c1a 100644 --- a/keyboards/winkeyless/bface/bface.h +++ b/keyboards/winkeyless/bface/bface.h @@ -16,19 +16,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" +#include "quantum.h" #define LAYOUT_60_ansi( \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, \ K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, \ K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, \ - K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, \ - K00, K10, K20, K56, K57, KA0, KB0, KC0 \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, \ + K00, K10, K20, K56, K57, KA0, KB0, KC0 \ ){ \ { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KA0, KB0, KC0, KC_NO, KC_NO }, \ { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KC_NO, KC_NO }, \ @@ -37,8 +34,6 @@ along with this program. If not, see . { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, K16, K26, K36, K46, K56, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB6, KC6, KD6, KE6 }, \ - { KC_NO, K17, K27, K37, K47, K57, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB7, KC7, KD7, KE7 } \ + { KC_NO, K17, K27, K37, K47, K57, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB7, KC7, KD7, KE7 } \ } - -#endif diff --git a/keyboards/winkeyless/bface/config.h b/keyboards/winkeyless/bface/config.h index 11ac373c02..9d90e16a3d 100644 --- a/keyboards/winkeyless/bface/config.h +++ b/keyboards/winkeyless/bface/config.h @@ -16,11 +16,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 // You can edit those at usbconfig.h about line 250. These values will // unforunatly be ignored so far #define MANUFACTURER winkeyless.kr @@ -30,11 +30,15 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 15 +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7} +#define UNUSED_PINS + #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 -#define BOOTLOADHID_BOOTLOADER 1 #ifdef BACKLIGHT_ENABLE // the backlight PWM does not work (yet). Therefore, we only have two backlight levels (on/off) @@ -43,4 +47,3 @@ along with this program. If not, see . #define BACKLIGHT_PORT_NUM (1 << 4) #endif -#endif diff --git a/keyboards/winkeyless/bface/i2c.c b/keyboards/winkeyless/bface/i2c.c deleted file mode 100644 index c27f3e3d17..0000000000 --- a/keyboards/winkeyless/bface/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/winkeyless/bface/keymaps/kpeatt/keymap.c b/keyboards/winkeyless/bface/keymaps/kpeatt/keymap.c index 84de7872f4..8d6e4da77c 100644 --- a/keyboards/winkeyless/bface/keymaps/kpeatt/keymap.c +++ b/keyboards/winkeyless/bface/keymaps/kpeatt/keymap.c @@ -73,7 +73,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______,______,______, ______, ______,______,______,______ ), // */ }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; diff --git a/keyboards/winkeyless/bface/keymaps/p3lim/README.md b/keyboards/winkeyless/bface/keymaps/p3lim/README.md new file mode 100644 index 0000000000..81f99ec966 --- /dev/null +++ b/keyboards/winkeyless/bface/keymaps/p3lim/README.md @@ -0,0 +1,14 @@ +# p3lim's b.face layout + +![](https://user-images.githubusercontent.com/26496/61170794-bf8a2c80-a56e-11e9-893f-f1766e7a9a04.png) + +My layout using the winkeyless b.face X2 PCB. The keys indicated with a gray color was not supported by the layout so a custom one was made. + +### Building & Flashing + +- Hold LCTRL while connecting to put in flashing mode +- Follow instructions in the main _bface_ directory + +### Layout notes + +The two additional keys were on pins 22+41 and 22+42, C3+B1 and C3+B2, which is mapped to col 10 row 1 and col 10 row 2 in the matrix. diff --git a/keyboards/winkeyless/bface/keymaps/p3lim/keymap.c b/keyboards/winkeyless/bface/keymaps/p3lim/keymap.c new file mode 100644 index 0000000000..0ec1245291 --- /dev/null +++ b/keyboards/winkeyless/bface/keymaps/p3lim/keymap.c @@ -0,0 +1,156 @@ +/* +Copyright 2019 Adrian L Lange + +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 . +*/ + +#include QMK_KEYBOARD_H +#include "quantum.h" + +#define LAYOUT_p3lim(\ + K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, \ + K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, \ + K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KC2, KD2, \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, KC1, \ + K00, K10, K20, K56, K57, KB0, KC0 \ +){ \ + { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KC_NO, KC_NO }, \ + { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC1, KC_NO, KC_NO }, \ + { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC2, KD2, KC_NO }, \ + { K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KC_NO, KC_NO }, \ + { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K16, K26, K36, K46, K56, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB6, KC6, KD6, KE6 }, \ + { KC_NO, K17, K27, K37, K47, K57, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB7, KC7, KD7, KE7 } \ +} + +enum my_keycodes { + C_ESC0 = SAFE_RANGE, // layer 0 esc + C_ESC1 // layer 1 esc +}; + +// use compiler macros for simpler stuff +#define C_NO1 RALT(KC_QUOT) +#define C_NO2 RALT(KC_SCLN) +#define C_NO3 RALT(KC_LBRC) +#define C_KVM1 LCA(KC_1) +#define C_KVM2 LCA(KC_2) +#define C_KVM3 LCA(KC_3) +#define C_KVM4 LCA(KC_4) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | + * |---------------------------------------------------------------------------------| Enter | + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | \ | | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Del | + * |-----------------------------------------------------------------------------------------+ + * | FN1 | Alt | GUI | Space | FN2 | Alt | Ctrl | + * `-----------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_p3lim( + C_ESC0, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + MO(1), KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_RGUI, KC_RCTL + ), + + /* FN1 + * ,-----------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | + * |-----------------------------------------------------------------------------------------+ + * | Caps | Home| Up | End | PgUp| | | | | | | | | | + * |---------------------------------------------------------------------------------| | + * | | Left| Down|Right| PgDn| | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | KVM1| KVM2| KVM3| KVM4| | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + [1] = LAYOUT_p3lim( + C_ESC1, 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_CAPS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, C_KVM1, C_KVM2, C_KVM3, C_KVM4, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_NO, _______, _______ + ), + + /* FN2 + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | Å | | | + * |---------------------------------------------------------------------------------| | + * | | | | | | | | | | | Ø | Æ | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + [2] = LAYOUT_p3lim( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_NO3, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_NO2, C_NO1, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, _______ + ), + /* + [n] = LAYOUT_p3lim( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + */ +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record){ + switch(keycode){ + case C_ESC0: // layer 0 + if(record->event.pressed){ + if(get_mods() & MOD_MASK_SHIFT) + register_code(KC_GRAVE); + else + register_code(KC_ESCAPE); + } else { + if(get_mods() & MOD_MASK_SHIFT) + unregister_code(KC_GRAVE); + else + unregister_code(KC_ESCAPE); + } + return false; + case C_ESC1: // layer 1 + if(record->event.pressed){ + if(get_mods() & MOD_MASK_SHIFT) + register_code(KC_ESCAPE); + else + register_code(KC_GRAVE); + } else { + if(get_mods() & MOD_MASK_SHIFT) + unregister_code(KC_ESCAPE); + else + unregister_code(KC_GRAVE); + } + return false; + } + return true; +} diff --git a/keyboards/winkeyless/bface/matrix.c b/keyboards/winkeyless/bface/matrix.c deleted file mode 100644 index b3761a63ca..0000000000 --- a/keyboards/winkeyless/bface/matrix.c +++ /dev/null @@ -1,113 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/winkeyless/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk index 369ccf2eda..506e37ac9c 100644 --- a/keyboards/winkeyless/bface/rules.mk +++ b/keyboards/winkeyless/bface/rules.mk @@ -1,31 +1,18 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no @@ -34,15 +21,6 @@ BACKLIGHT_ENABLE = yes BACKLIGHT_CUSTOM_DRIVER = yes BACKLIGHT_BREATHING = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight_ps2avrGB.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - diff --git a/keyboards/winkeyless/bface/usbconfig.h b/keyboards/winkeyless/bface/usbconfig.h index f87922615b..5ff26399b0 100644 --- a/keyboards/winkeyless/bface/usbconfig.h +++ b/keyboards/winkeyless/bface/usbconfig.h @@ -8,8 +8,7 @@ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ +#pragma once #include "config.h" @@ -109,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' @@ -392,5 +381,3 @@ section at the end of this file). /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 #define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/winkeyless/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c index 35800358cf..87a31d0520 100644 --- a/keyboards/winkeyless/bmini/bmini.c +++ b/keyboards/winkeyless/bmini/bmini.c @@ -16,30 +16,6 @@ along with this program. If not, see . */ #include "bmini.h" -#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} __attribute__ ((weak)) -void matrix_scan_user(void) { - rgblight_task(); -} +void matrix_scan_user(void) {} diff --git a/keyboards/winkeyless/bmini/config.h b/keyboards/winkeyless/bmini/config.h index 96acd9bf16..37df80f80a 100644 --- a/keyboards/winkeyless/bmini/config.h +++ b/keyboards/winkeyless/bmini/config.h @@ -22,6 +22,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 #define MANUFACTURER winkeyless.kr #define PRODUCT B.mini diff --git a/keyboards/winkeyless/bmini/i2c.c b/keyboards/winkeyless/bmini/i2c.c deleted file mode 100644 index a4f9521352..0000000000 --- a/keyboards/winkeyless/bmini/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/winkeyless/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk index 3d7bc0215d..7822bd8301 100644 --- a/keyboards/winkeyless/bmini/rules.mk +++ b/keyboards/winkeyless/bmini/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,13 +19,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c diff --git a/keyboards/winkeyless/bmini/usbconfig.h b/keyboards/winkeyless/bmini/usbconfig.h index d2d848fcdc..85a915bb46 100644 --- a/keyboards/winkeyless/bmini/usbconfig.h +++ b/keyboards/winkeyless/bmini/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/winkeyless/bminiex/bminiex.c b/keyboards/winkeyless/bminiex/bminiex.c index d9b05aba51..11315b9210 100644 --- a/keyboards/winkeyless/bminiex/bminiex.c +++ b/keyboards/winkeyless/bminiex/bminiex.c @@ -16,24 +16,10 @@ along with this program. If not, see . */ #include "bminiex.h" -#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" #include "backlight.h" #include "backlight_custom.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { @@ -48,50 +34,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i. #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422E +#define DEVICE_VER 0x0200 #define MANUFACTURER winkeyless.kr #define PRODUCT B.mini Ex diff --git a/keyboards/winkeyless/bminiex/i2c.c b/keyboards/winkeyless/bminiex/i2c.c deleted file mode 100644 index a4f9521352..0000000000 --- a/keyboards/winkeyless/bminiex/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#pragma once - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - diff --git a/keyboards/winkeyless/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk index e5d3a2a88c..39a77bda12 100644 --- a/keyboards/winkeyless/bminiex/rules.mk +++ b/keyboards/winkeyless/bminiex/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -40,7 +21,7 @@ COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c TAP_DANCE_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -50,7 +31,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c backlight.c diff --git a/keyboards/winkeyless/bminiex/usbconfig.h b/keyboards/winkeyless/bminiex/usbconfig.h index d2d848fcdc..85a915bb46 100644 --- a/keyboards/winkeyless/bminiex/usbconfig.h +++ b/keyboards/winkeyless/bminiex/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/xbows/knight/config.h b/keyboards/xbows/knight/config.h new file mode 100644 index 0000000000..1e561642f7 --- /dev/null +++ b/keyboards/xbows/knight/config.h @@ -0,0 +1,41 @@ +#pragma once +#include "config_common.h" +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1225 +#define DEVICE_VER 0x0001 +#define MANUFACTURER X-BOWS +#define PRODUCT KNIGHT +#define DESCRIPTION XBOWS SPLIT keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 15 + +// wiring of each half +#define MATRIX_ROW_PINS { D2, E6, C7, F7, F6, F5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, F4, F1, C6, B6, B5, B4, D7, D6, D4, D5, D3} +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#endif +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define SPLIT_HAND_PIN F0 +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + diff --git a/keyboards/xbows/knight/info.json b/keyboards/xbows/knight/info.json new file mode 100644 index 0000000000..9eafde01bc --- /dev/null +++ b/keyboards/xbows/knight/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "knight", + "url": "", + "maintainer": "xbows", + "width": 23.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":6, "y":0}, {"label":"F6", "x":7, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "y":0}, {"label":"F9", "x":10.5, "y":0}, {"label":"F10", "x":11.5, "y":0}, {"label":"F11", "x":12.5, "y":0}, {"label":"F12", "x":13.5, "y":0}, {"x":14.5, "y":0, "w":2}, {"x":16.5, "y":0, "w":2}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"x":22.5, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":9.5, "y":1.5}, {"label":"&", "x":10.5, "y":1.5}, {"label":"*", "x":11.5, "y":1.5}, {"label":"(", "x":12.5, "y":1.5}, {"label":")", "x":13.5, "y":1.5}, {"label":"_", "x":14.5, "y":1.5}, {"label":"+", "x":15.5, "y":1.5}, {"label":"Backspace", "x":16.5, "y":1.5, "w":2}, {"label":"Num Lock", "x":19.5, "y":1.5}, {"label":"/", "x":20.5, "y":1.5}, {"label":"*", "x":21.5, "y":1.5}, {"label":"-", "x":22.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5}, {"label":"Q", "x":1, "y":2.5}, {"label":"W", "x":2, "y":2.5}, {"label":"E", "x":3, "y":2.5}, {"label":"R", "x":4, "y":2.5}, {"label":"T", "x":5, "y":2.5}, {"label":"Y", "x":9.5, "y":2.5}, {"label":"U", "x":10.5, "y":2.5}, {"label":"I", "x":11.5, "y":2.5}, {"label":"O", "x":12.5, "y":2.5}, {"label":"P", "x":13.5, "y":2.5}, {"label":"{", "x":14.5, "y":2.5}, {"label":"}", "x":15.5, "y":2.5}, {"label":"|", "x":16.5, "y":2.5}, {"x":17.5, "y":2.5}, {"label":"7", "x":19.5, "y":2.5}, {"label":"8", "x":20.5, "y":2.5}, {"label":"9", "x":21.5, "y":2.5}, {"label":"+", "x":22.5, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5}, {"label":"A", "x":1, "y":3.5}, {"label":"S", "x":2, "y":3.5}, {"label":"D", "x":3, "y":3.5}, {"label":"F", "x":4, "y":3.5}, {"label":"G", "x":5, "y":3.5}, {"label":"Backspace", "x":6, "y":3.5, "w":3.25}, {"label":"H", "x":9.25, "y":3.5}, {"label":"J", "x":10.25, "y":3.5}, {"label":"K", "x":11.25, "y":3.5}, {"label":"L", "x":12.25, "y":3.5}, {"label":":", "x":13.25, "y":3.5}, {"label":"\"", "x":14.25, "y":3.5}, {"label":"Enter", "x":15.25, "y":3.5, "w":2.25}, {"x":17.5, "y":3.5}, {"label":"4", "x":19.5, "y":3.5}, {"label":"5", "x":20.5, "y":3.5}, {"label":"6", "x":21.5, "y":3.5}, {"x":22.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5}, {"label":"Z", "x":1, "y":4.5}, {"label":"X", "x":2, "y":4.5}, {"label":"C", "x":3, "y":4.5}, {"label":"V", "x":4, "y":4.5}, {"label":"B", "x":5, "y":4.5}, {"label":"Enter", "x":6, "y":4.5, "w":3.25}, {"label":"N", "x":9.25, "y":4.5}, {"label":"M", "x":10.25, "y":4.5}, {"label":"<", "x":11.25, "y":4.5}, {"label":">", "x":12.25, "y":4.5}, {"label":"?", "x":13.25, "y":4.5}, {"label":"Shift", "x":14.25, "y":4.5}, {"x":16.5, "y":4.5}, {"label":"1", "x":19.5, "y":4.5}, {"label":"2", "x":20.5, "y":4.5}, {"label":"3", "x":21.5, "y":4.5}, {"label":"Enter", "x":22.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":2.25}, {"label":"Ctrl", "x":6, "y":5.5, "w":1.25}, {"label":"Shift", "x":7.25, "y":5.5, "w":1.25}, {"x":8.5, "y":5.5, "w":2.25}, {"label":"Alt", "x":10.75, "y":5.5, "w":2.25}, {"x":13, "y":5.5}, {"label":"Ctrl", "x":14, "y":5.5}, {"x":15.5, "y":5.5}, {"x":16.5, "y":5.5}, {"x":17.5, "y":5.5}, {"x":19.5, "y":5.5, "w":2}, {"x":21.5, "y":5.5}] + } + } +} diff --git a/keyboards/xbows/knight/keymaps/default/keymap.c b/keyboards/xbows/knight/keymaps/default/keymap.c new file mode 100644 index 0000000000..c7db8f3ca9 --- /dev/null +++ b/keyboards/xbows/knight/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, 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_DEL, KC_PSCR, KC_ESC , KC_TAB, KC_BSPC, MO(1), + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_EQL, + 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_PGUP, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT,KC_SPC, KC_LCTL, KC_LSFT,KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + [1] = LAYOUT( + KC_ESC, 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_DEL, KC_PSCR, RESET, KC_TAB, KC_BSPC,KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK,KC_PSLS,KC_PAST,KC_EQL, + 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_PGUP, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, BL_STEP,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, RESET, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_ENT, + KC_LCTL, KC_LGUI, KC_SPC,KC_LALT, KC_LCTL, KC_LSFT,KC_SPC, KC_RALT, KC_TRNS,KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_0, KC_PDOT) +}; diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c new file mode 100644 index 0000000000..f697f23f97 --- /dev/null +++ b/keyboards/xbows/knight/knight.c @@ -0,0 +1,23 @@ +#include "knight.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(D1); + writePinHigh(D1); + setPinOutput(E2); + writePinHigh(E2); +} +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(E2, !led_state.caps_lock); + writePin(D1, !led_state.num_lock); + } + return true; +} diff --git a/keyboards/xbows/knight/knight.h b/keyboards/xbows/knight/knight.h new file mode 100644 index 0000000000..952d5a3114 --- /dev/null +++ b/keyboards/xbows/knight/knight.h @@ -0,0 +1,35 @@ +#pragma once + +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K111, K112, K113, K114, K115, K116, K117, K118, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, K416, K417, K518, \ + K500, K501, K502, K503, K505, K506, K507, K509, K510, K511, K512, K513, K514, K516, K517 \ +) \ + { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO }, \ + { K500, K501, K502, K503, KC_NO,K505, K506, K507, KC_NO,K509, K510, K511, K512, K513, K514 }, \ + { K015, K016, K017, K018 }, \ + { K115, K116, K117, K118 }, \ + { K215, K216, K217, K218 }, \ + { K315, K316, K317, K318 }, \ + { K415, K416, K417, KC_NO }, \ + { KC_NO,K516, K517, K518 } \ +} diff --git a/keyboards/xbows/knight/readme.md b/keyboards/xbows/knight/readme.md new file mode 100644 index 0000000000..063ff7a2e6 --- /dev/null +++ b/keyboards/xbows/knight/readme.md @@ -0,0 +1,15 @@ +# KNIGHT +![KNIGHT](https://ftp.bmp.ovh/imgs/2019/10/5f357cd665dd4b04.png) + +KNIGHT, a split87 and pad Mechanical Keyboard. +X-BOWS Knight, the first ergonomic mechanical keyboard with magnetic connection of detachable numeric keypad on both sides. Revolutionary seamless integrated aluminum alloy body. Original spherical OEM keycaps. + +Keyboard Maintainer: X-BOWS +Hardware Supported: X-BOWS Knight +Hardware Availability: [X-BOWS](https://x-bows.com/) + +Make example for this keyboard (after setting up your build environment): + + make xbows/knight: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). diff --git a/keyboards/xbows/knight/rules.mk b/keyboards/xbows/knight/rules.mk new file mode 100644 index 0000000000..3b18ea4696 --- /dev/null +++ b/keyboards/xbows/knight/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SPLIT_KEYBOARD = yes diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h new file mode 100644 index 0000000000..985f3acb16 --- /dev/null +++ b/keyboards/xbows/woody/config.h @@ -0,0 +1,44 @@ +#pragma once +#include "config_common.h" +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1224 +#define DEVICE_VER 0x0001 +#define MANUFACTURER X-BOWS +#define PRODUCT WOO-DY +#define DESCRIPTION XBOWS 65RGB keyboard + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS {B3, B2, B1, B0, B5 } +#define MATRIX_COL_PINS {B6, C6, C7, F4, F5, F6, F7, B7, D2, D3, D5, D4, D6, D7, B4 } +#define DIODE_DIRECTION COL2ROW +#ifdef RGB_MATRIX_ENABLE +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DEBOUNCE 3 +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_BAND_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110110 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 35 +#define DRIVER_2_LED_TOTAL 32 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#endif \ No newline at end of file diff --git a/keyboards/xbows/woody/info.json b/keyboards/xbows/woody/info.json new file mode 100644 index 0000000000..498267783b --- /dev/null +++ b/keyboards/xbows/woody/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "WOO-DY", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6.25}, {"x":10.25, "y":4, "w":1.5}, {"x":11.75, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/xbows/woody/keymaps/default/keymap.c b/keyboards/xbows/woody/keymaps/default/keymap.c new file mode 100644 index 0000000000..3010f568d9 --- /dev/null +++ b/keyboards/xbows/woody/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_PGUP, \ + 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_PGDN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_INS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT( /* FN */ + KC_GESC, 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_DEL, KC_DEL, \ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_HOME, \ + KC_CAPS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_END, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT) +}; diff --git a/keyboards/xbows/woody/readme.md b/keyboards/xbows/woody/readme.md new file mode 100644 index 0000000000..002705e10e --- /dev/null +++ b/keyboards/xbows/woody/readme.md @@ -0,0 +1,15 @@ +# WOO-DY +![WOO-DY](https://ftp.bmp.ovh/imgs/2019/10/cf5ba2fa02a62afc.png) + +Woo-dy, A 67 Keys Wooden Mechanical Keyboard. +At once minimalist and stylish, Woo-dy brings a natural calm and relaxation to your working space. The natural wood base made from real walnut or cherry reduces weight, feels great and adds subtle, natural style to any room. + +Keyboard Maintainer: X-BOWS +Hardware Supported: X-BOWS Woo-dy +Hardware Availability: [X-BOWS](https://x-bows.com/) + +Make example for this keyboard (after setting up your build environment): + + make xbows/woody: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). diff --git a/keyboards/xbows/woody/rules.mk b/keyboards/xbows/woody/rules.mk new file mode 100644 index 0000000000..2a9fcb7fc3 --- /dev/null +++ b/keyboards/xbows/woody/rules.mk @@ -0,0 +1,16 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BACKLIGHT_ENABLE = no +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = yes # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/xbows/woody/woody.c b/keyboards/xbows/woody/woody.c new file mode 100644 index 0000000000..9821f5f655 --- /dev/null +++ b/keyboards/xbows/woody/woody.c @@ -0,0 +1,128 @@ +#include "woody.h" +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + + {0, C8_8, C7_8, C6_8}, // LA17 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C1_15, C2_15, C3_15}, // LB7 + + {0, C1_8, C2_8, C3_8}, // LA8 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {0, C1_16, C2_16, C3_16}, // LB8 + + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {0, C9_15, C8_15, C6_14}, // LB15 + + {1, C8_8, C7_8, C6_8}, // LC17 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_16, C7_15, C6_15}, // LD16 + {1, C8_16, C7_16, C6_16}, // LD17 + {0, C8_16, C7_16, C6_16}, // LB17 + {0, C9_16, C7_15, C6_15}, // LB16 + +}; + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED,42, 43 }, + { 44, 45, 46, 47, 48, 49, 59, 51, 52, 53, 54, NO_LED, 55, 56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED,63, 64, 65, 66} +}, { + {0,0},{15,0},{30,0},{45,0},{60,0},{75,0},{90,0},{105,0},{120,0},{135,0},{150,0},{165,0},{180,0},{203,0},{224,0}, + {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, + {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, + {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, + {2,64},{21,64},{41,64},{99,64},{157,64},{178,64},{195,64},{210,64},{224,64} +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, + 4, 4, 4, 4, 4, 4, 1, 1, 1 +} }; +#endif + +void matrix_init_kb(void) { + matrix_init_user(); +} +void matrix_scan_kb(void) { + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} +__attribute__ ((weak)) + +void rgb_matrix_indicators_user(void) +{ + if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); + } +} diff --git a/keyboards/xbows/woody/woody.h b/keyboards/xbows/woody/woody.h new file mode 100644 index 0000000000..48eab82a68 --- /dev/null +++ b/keyboards/xbows/woody/woody.h @@ -0,0 +1,16 @@ +#pragma once +#define XXX KC_NO +#include "quantum.h" +#define LAYOUT( \ + 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, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4B, K4C, 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, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, XXX, K4B, K4C, K4D, K4E } \ +} diff --git a/keyboards/xd004/info.json b/keyboards/xd004/info.json new file mode 100644 index 0000000000..72c15da7f8 --- /dev/null +++ b/keyboards/xd004/info.json @@ -0,0 +1,11 @@ +{ + "keyboard_name": "XD004", + "maintainer": "", + "width": 4, + "height": 1, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"L", "x":0, "y":0}, {"label":"O", "x":1, "y":0}, {"label":"V", "x":2, "y":0}, {"label":"E", "x":3, "y":0}] + } + } +} diff --git a/keyboards/xd004/keymaps/default/keymap.c b/keyboards/xd004/keymaps/default/keymap.c new file mode 100644 index 0000000000..e82ce5e973 --- /dev/null +++ b/keyboards/xd004/keymaps/default/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + LAYOUT_all(KC_L, KC_O, KC_V, KC_E), + +}; + +// Loop +void matrix_scan_user(void){ + // Empty +}; diff --git a/keyboards/xd004/keymaps/default/readme.md b/keyboards/xd004/keymaps/default/readme.md new file mode 100644 index 0000000000..fdf07cc877 --- /dev/null +++ b/keyboards/xd004/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# Default Keymap for XD004 PCB + +This keymap is not very useful, but it will validate that the board works. + +## Build + +To build the default keymap, simply run `make xd004:default`. diff --git a/keyboards/xd004/keymaps/system_and_media/keymap.c b/keyboards/xd004/keymaps/system_and_media/keymap.c new file mode 100644 index 0000000000..60f0e15bbe --- /dev/null +++ b/keyboards/xd004/keymaps/system_and_media/keymap.c @@ -0,0 +1,59 @@ +#include QMK_KEYBOARD_H + +#define _BASE 0 // Base layer +#define _SYSTEM 1 // System actions +#define _VOLUME 2 // Volume actions + +#define SUPER_ALT_F4_TIMER 300 // Timeout on the super alt-f4 key + +/* + The idea of this is pretty simple: base layer has four action, two of which (the outermost) + are regular keystrokes on tap, and a momentary layer switch on hold, sending you to layers 1 and 2. + + The other bit of customization here is the 'Super Alt F4' which does Alt-F4, and then Enter if tapped + again SUPER_ALT_F4_TIMER miliseconds after. This lets you Alt-F4 applications, and finally quickly + double-tap it to Alt-F4+Enter to shut down the PC. +*/ + +bool is_alt_f4_active = false; +uint16_t alt_f4_timer = 0; + +enum custom_keycodes { // Make sure have the awesome keycode ready + SUPER_ALT_F4 = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + [_BASE] = LAYOUT_all(LT(_SYSTEM, KC_F5), C(G(KC_LEFT)), C(G(KC_RIGHT)), LT(_VOLUME, KC_F7)), + + // 1: System actions + [_SYSTEM] = LAYOUT_all(_______, SUPER_ALT_F4, G(KC_D), G(KC_L)), + + // 2: Volume actions + [_VOLUME] = LAYOUT_all(KC_MEDIA_NEXT_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _______), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { // This will do most of the grunt work with the keycodes. + case SUPER_ALT_F4: + if (record->event.pressed) { + if (!is_alt_f4_active) { + is_alt_f4_active = true; + tap_code16(LALT(KC_F4)); // Alt-F4 + } else { + tap_code(KC_ENTER); // Tap enter + } + } + alt_f4_timer = timer_read(); + break; + } + return true; +} + +void matrix_scan_user(void) { + if (is_alt_f4_active && timer_elapsed(alt_f4_timer) > SUPER_ALT_F4_TIMER) { + is_alt_f4_active = false; + } +}; diff --git a/keyboards/xd004/keymaps/system_and_media/readme.md b/keyboards/xd004/keymaps/system_and_media/readme.md new file mode 100644 index 0000000000..d684d463c6 --- /dev/null +++ b/keyboards/xd004/keymaps/system_and_media/readme.md @@ -0,0 +1,9 @@ +# Slightly more advanced keymap for XD004 PCB + +A somehow more useful keymap, allowing one to move across virtual desktops on Windows, etc. + +It also has a 'Super Alt-F4' key for Windows that, when tapped does Alt-F4, unless two consecutive taps are less than 300ms apart, in which case the second tap becomes Enter. This allows you to close all apps doing taps, and then when the System shutdown window arrives you do a second quick tap and it will type enter, thus shutting down the computer. + +## Build + +To build the keymap, simply run `make xd004:system_and_media`. diff --git a/keyboards/xd004/readme.md b/keyboards/xd004/readme.md new file mode 100644 index 0000000000..8b32c6a48c --- /dev/null +++ b/keyboards/xd004/readme.md @@ -0,0 +1,16 @@ +XD004 +== + +4-keys board + +![Top View of a XD004 board](https://ae01.alicdn.com/kf/HTB1_G9IX21H3KVjSZFHq6zKppXa0/xd004-xiudi-4-Custom-Mechanical-Keyboard-4-keys-switch-leds-PCB-programmed-hot-swappable-macro-key.jpg) + +Keyboard Maintainer: QMK Community +Hardware Supported: XD004 PCB v1.0 +Hardware Availability: [KPRepublic](https://kprepublic.com/products/xd004-xiudi-4-custom-mechanical-keyboard-4-keys-switch-leds-pcb-programmed-hot-swappable-macro-key-silver-case-micro-port) + +To build with a default keymap (not useful at all, have a look at other keymaps): + +```make xd004/v1: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). diff --git a/keyboards/xd004/v1/config.h b/keyboards/xd004/v1/config.h new file mode 100644 index 0000000000..a141137e98 --- /dev/null +++ b/keyboards/xd004/v1/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2019 Sidney Bovet + +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 . +*/ + +/* +Note: the following configuration uses 98% of the flash memory, be +careful if you enable anything else. Also have a look at rules.mk +where some things are disabled to save space as well. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCDCD +#define PRODUCT_ID 0x0404 +#define DEVICE_VER 0x0001 +// Note: unsure about manufacturer +#define MANUFACTURER XIUDI +#define PRODUCT XD004 v1 +#define DESCRIPTION XD004 v1 Keyboard PCB + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * On this board we have direct connection: no diodes. + */ +#define DIRECT_PINS \ + { \ + { D3, D0, C4, B4 } \ + } +#define UNUSED_PINS + +/* Backlight Setup */ +// Looks like each backlight LED is connected to a single output, D5 is the one furtherst away from USB port +#define BACKLIGHT_PIN D5 +#define BACKLIGHT_LEVELS 6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* RGB Underglow +This will not be used, as RGBLIGHT_ENABLE is set to 'no' in rules.mk +We do not have enough space in the flash for this at the moment, maybe +further optimizations can be done on that side. +*/ +#define RGB_DI_PIN C6 +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* disable action features */ +// #define NO_ACTION_ONESHOT // 462 bytes <- this needs to be un-commented out if Link Time Optimization is disabled, otherwise file is too large +// The two below are implicit since we use LINK_TIME_OPTIMIZATION_ENABLE (in rules.mk) +// #define NO_ACTION_MACRO +// #define NO_ACTION_FUNCTION \ No newline at end of file diff --git a/keyboards/xd004/v1/rules.mk b/keyboards/xd004/v1/rules.mk new file mode 100644 index 0000000000..e17ca648e1 --- /dev/null +++ b/keyboards/xd004/v1/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega16u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SPACE_CADET_ENABLE = no +# Saves about 5% of space: +LINK_TIME_OPTIMIZATION_ENABLE = yes + +#LAYOUTS = ortho_1x4 diff --git a/keyboards/xd004/xd004.c b/keyboards/xd004/xd004.c new file mode 100644 index 0000000000..37a1dca144 --- /dev/null +++ b/keyboards/xd004/xd004.c @@ -0,0 +1,7 @@ +#include "xd004.h" + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/xd004/xd004.h b/keyboards/xd004/xd004.h new file mode 100644 index 0000000000..a53ad537f7 --- /dev/null +++ b/keyboards/xd004/xd004.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" +//#include "led.h" + +/* XD60 Keymap Definition Macro */ +/* + +--------------------------------+ + | K0 K1 K2 K3 [----- USB + +--------------------------------+ +*/ +#define LAYOUT_all(K00, K01, K02, K03) \ + { \ + { K00, K01, K02, K03 } \ + } diff --git a/keyboards/xd60/info.json b/keyboards/xd60/info.json index ba3c4b5413..c69e8a7887 100644 --- a/keyboards/xd60/info.json +++ b/keyboards/xd60/info.json @@ -10,6 +10,10 @@ "LAYOUT_60_ansi": { "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"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":1, "w":1.25, "h":2}, {"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":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "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":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"GUI", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] } } } diff --git a/keyboards/xd60/keymaps/Jos/keymap.c b/keyboards/xd60/keymaps/Jos/keymap.c index 87dbad159a..f272d6fd18 100644 --- a/keyboards/xd60/keymaps/Jos/keymap.c +++ b/keyboards/xd60/keymaps/Jos/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRAVE, 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ - KC_LSFT, KC_LGUI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, F(0), \ + KC_LSFT, KC_LGUI, 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_LCTL, TD(0), KC_LALT, KC_SPC , KC_RALT, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function 1 Layers @@ -76,8 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Custom Actions const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn1 layer - [1] = ACTION_LAYER_MOMENTARY(2), // to GUI/Fn2 layer [2] = ACTION_LAYER_TOGGLE(3), // to Fn3/Num toggle layer }; diff --git a/keyboards/xd60/keymaps/birkir/keymap.c b/keyboards/xd60/keymaps/birkir/keymap.c index 35b60ae810..52f7086f21 100644 --- a/keyboards/xd60/keymaps/birkir/keymap.c +++ b/keyboards/xd60/keymaps/birkir/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NO, KC_ENT, \ KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, KC_RSFT, KC_UP, TG(2), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT ), // 1: Function Layer @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, TG(2), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END ), // 2: Cool Layer @@ -27,15 +27,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, TG(2), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END ) }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index b49803fa84..9233f99ba9 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -20,20 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// Macros -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { register_code(KC_RSFT); } - else { unregister_code(KC_RSFT); } - break; - } - - return MACRO_NONE; -}; - // Loop void matrix_scan_user(void) { // Empty diff --git a/keyboards/xd60/keymaps/default/readme.md b/keyboards/xd60/keymaps/default/readme.md index 248e0a6067..7d6bc75365 100644 --- a/keyboards/xd60/keymaps/default/readme.md +++ b/keyboards/xd60/keymaps/default/readme.md @@ -6,4 +6,8 @@ Default Keymap for XD60 as indicated on the original sale page. ## Build -To build the default keymap, simply run `make xd60:default`. + +To build the default keymap, simply run: + + make xd60/rev2:default # XD60 rev2 + make xd60/rev3:default # XD60 rev3 diff --git a/keyboards/xd60/keymaps/edulpn/keymap.c b/keyboards/xd60/keymaps/edulpn/keymap.c index 4ff00140aa..88032a384b 100644 --- a/keyboards/xd60/keymaps/edulpn/keymap.c +++ b/keyboards/xd60/keymaps/edulpn/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSHIFT, KC_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, F(0), KC_NO, KC_RGUI, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_RGUI, KC_RCTL), // 1: Function Layer LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_UP, KC_NO, KC_INSERT, KC_HOME, KC_PGUP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, KC_END, KC_PGDN, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_NO, KC_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, F(0), KC_NO, KC_RGUI, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_RGUI, KC_RCTL), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/edulpn64/keymap.c b/keyboards/xd60/keymaps/edulpn64/keymap.c index 95d80ffb77..d1ad6f1b64 100644 --- a/keyboards/xd60/keymaps/edulpn64/keymap.c +++ b/keyboards/xd60/keymaps/edulpn64/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR,KC_SLCK,KC_PAUS, RGB_RMOD,RGB_MOD, RGB_VAD, RGB_VAI, \ KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_HOME,KC_PGUP, RGB_HUD, RGB_HUI, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_PGDN, KC_NO, KC_RSFT, KC_UP, KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c index 4ece241efb..0f4694ca63 100644 --- a/keyboards/xd60/keymaps/iso/keymap.c +++ b/keyboards/xd60/keymaps/iso/keymap.c @@ -1,44 +1,33 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#define _BL 0 -#define _FL 1 +enum layer_names { + _BL, + _FL, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // 0: Base Layer - [_BL] = 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_NO, \ - 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_NO, \ - 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_NUHS, KC_ENT, \ - KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), + //,: Base Layer + [_BL] = LAYOUT_60_iso( + 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_CAPS, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), - // 1: Function Layer - [_FL] = LAYOUT_all( - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_NO, \ - KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \ - KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ - KC_LSFT, RGB_TOG, RGB_MOD, KC_CUT, KC_COPY,KC_PASTE,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_HOME, KC_PGUP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_NO, KC_PGDOWN, KC_NO), + //,: Function Layer + [_FL] = LAYOUT_60_iso( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, + XXXXXXX, KC_MPLY, KC_MSTP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, + KC_LSFT, RGB_TOG, RGB_MOD, KC_CUT, KC_COPY, KC_PSTE, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ) }; -// Macros -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { register_code(KC_RSFT); } - else { unregister_code(KC_RSFT); } - break; - } - - return MACRO_NONE; -}; - // Loop void matrix_scan_user(void) { - // Empty + // Empty }; diff --git a/keyboards/xd60/keymaps/iso/readme.md b/keyboards/xd60/keymaps/iso/readme.md index 82c575d981..84374fa185 100644 --- a/keyboards/xd60/keymaps/iso/readme.md +++ b/keyboards/xd60/keymaps/iso/readme.md @@ -1,9 +1,20 @@ # iso Keymap for XIUDI's 60% XD60 PCB -![iso Keymap for XD60]() - -## Additional Notes iso Keymap for XD60. +## Keymap + +### Base Layer + +![Layer 0](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/xd60/keymaps/iso/layer0.png) + +### Function Layer + +![Layer 1](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/xd60/keymaps/iso/layer1.png) + ## Build -To build the default keymap, simply run `make xd60:iso`. + +To build the default keymap, simply run: + + make xd60/rev2:iso # XD60 rev2 + make xd60/rev3:iso # XD60 rev3 diff --git a/keyboards/xd60/keymaps/kmontag42/keymap.c b/keyboards/xd60/keymaps/kmontag42/keymap.c index 719700d66c..e23aef589e 100644 --- a/keyboards/xd60/keymaps/kmontag42/keymap.c +++ b/keyboards/xd60/keymaps/kmontag42/keymap.c @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DOT, KC_ENT, \ KC_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSPC, KC_RGUI, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), // 1: Function Layer LAYOUT_all( @@ -18,15 +18,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, F(0), KC_NO, KC_NO, KC_NO, KC_NO), + KC_NO, KC_NO, KC_NO, KC_NO, MO(1), KC_NO, KC_NO, KC_NO, KC_NO), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/krusli/keymap.c b/keyboards/xd60/keymaps/krusli/keymap.c index b34b4dfbcf..6b4dfdc33f 100644 --- a/keyboards/xd60/keymaps/krusli/keymap.c +++ b/keyboards/xd60/keymaps/krusli/keymap.c @@ -21,11 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c b/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c index f0eaa97cb0..005355cd20 100644 --- a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c +++ b/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_all( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_INS, \ 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_BSPC, \ - F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, \ KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_UP, KC_DEL, \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_CAPS, KC_RSFT, KC_LEFT, KC_DOWN, KC_RIGHT), @@ -33,11 +33,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Function Layer -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xd60/keymaps/stanleylai/keymap.c index a0a69c476d..9d7327ee69 100644 --- a/keyboards/xd60/keymaps/stanleylai/keymap.c +++ b/keyboards/xd60/keymaps/stanleylai/keymap.c @@ -7,15 +7,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ - F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), KC_UP, KC_DEL, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(2), KC_UP, KC_DEL, \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer LAYOUT_all( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \ - F(0), KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ + MO(1), KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_INS, \ KC_LCTL, KC_LALT, KC_LGUI, KC_MPLY, KC_RGUI, KC_RALT, KC_HOME, KC_PGDOWN,KC_END), @@ -24,17 +24,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, BL_TOGG, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(1), KC_NO, KC_NO, \ + KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MO(2), KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Function Layer - [1] = ACTION_LAYER_MOMENTARY(2), // to RGB Layer -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/supercoffee/keymap.c b/keyboards/xd60/keymaps/supercoffee/keymap.c index d42e611e9c..4bf30398f5 100644 --- a/keyboards/xd60/keymaps/supercoffee/keymap.c +++ b/keyboards/xd60/keymaps/supercoffee/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSHIFT, KC_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), // 1: Function Layer LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_UP, KC_END, KC_NO, KC_NO, KC_CALC, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_DEL, BL_STEP,KC_NO, KC_NO, KC_VOLD, KC_VOLU,KC_MUTE, KC_NO, KC_PGDN, KC_RSFT, KC_NO, KC_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md index b9862428c7..4280414827 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -1,21 +1,16 @@ -XD60 -== +# XD60 Compact 60% with arrows. ![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) -Keyboard Maintainer: QMK Community -Hardware Supported: XD60 PCB rev2 & rev3 -Hardware Availability: https://www.massdrop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD60 PCB rev2 & rev3 +* Hardware Availability: [Drop.com](https://www.drop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open), [KPRepublic on AliExpress](https://www.aliexpress.com/item/32814945677.html) -With the implementation of Rev3 you need to specify the Rev you want to build. -To build for a Rev2 with a default keymap: +Make example for this keyboard (after setting up your build environment): -```make xd60/rev2:default``` - -To build for a Rev3 with a default keymap: - -```make xd60/rev3:default``` + make xd60/rev2:default # rev2 + make xd60/rev3:default # rev3 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). diff --git a/keyboards/xd60/rev2/config.h b/keyboards/xd60/rev2/config.h index 5f23f6eac3..26dbb50e30 100644 --- a/keyboards/xd60/rev2/config.h +++ b/keyboards/xd60/rev2/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -70,5 +69,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/xd60/rev2/rules.mk b/keyboards/xd60/rev2/rules.mk index 8a60252dcf..b6a8c05d2f 100644 --- a/keyboards/xd60/rev2/rules.mk +++ b/keyboards/xd60/rev2/rules.mk @@ -1,53 +1,15 @@ # MCU name -# MCU = at90usb1287 MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# LUFA specific -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) @@ -64,4 +26,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi \ No newline at end of file +LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk index f33fff76ce..7cff162c9f 100644 --- a/keyboards/xd60/rev3/rules.mk +++ b/keyboards/xd60/rev3/rules.mk @@ -1,54 +1,16 @@ # MCU name -# MCU = at90usb1287 MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# LUFA specific -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) @@ -64,4 +26,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi +LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h index 579d67dd34..3946138c38 100644 --- a/keyboards/xd60/xd60.h +++ b/keyboards/xd60/xd60.h @@ -1,8 +1,6 @@ -#ifndef XD60_H -#define XD60_H +#pragma once #include "quantum.h" -#include "led.h" /* XD60 LEDs * GPIO pads @@ -48,4 +46,16 @@ inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } -#endif +#define LAYOUT_60_iso( \ + 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, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ +} diff --git a/keyboards/xd75/keymaps/bulbizarre/config.h b/keyboards/xd75/keymaps/bulbizarre/config.h new file mode 100644 index 0000000000..e6975da8a2 --- /dev/null +++ b/keyboards/xd75/keymaps/bulbizarre/config.h @@ -0,0 +1,19 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/xd75/keymaps/bulbizarre/keymap.c b/keyboards/xd75/keymaps/bulbizarre/keymap.c new file mode 100644 index 0000000000..f35eea73c4 --- /dev/null +++ b/keyboards/xd75/keymaps/bulbizarre/keymap.c @@ -0,0 +1,152 @@ +/* Copyright 2017 Wunder + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +// Layer shorthand +#define _QW 0 +#define _FN 1 +#define _FS 2 + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + SWITCH_FN = SAFE_RANGE, + SWITCH_FS +}; + +uint16_t lt12_timer; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | ENTER | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | H | J | K | L | : | @ | ~ | ENTER | HOME | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | B | N | M | , | . | / | RSHIFT | UP | END | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | DEL | LALT | PSCR | SPACE | SPACE | SPACE | SPACE | ALTGR | FN | FX | RCTRL | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, + 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_NUHS, KC_ENT, KC_HOME, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_DEL, KC_LALT, KC_PSCR, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_ALGR, SWITCH_FN, SWITCH_FS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | = | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | ENTER | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | H | J | K | L | : | @ | ~ | ENTER | HOME | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | B | N | M | , | . | / | RSHIFT | UP | END | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | DEL | LALT | PSCR | SPACE | SPACE | SPACE | SPACE | ALTGR | FN | FX | RCTRL | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_ESC, 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_EQL, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QW), TO(_FS), _______, _______, _______, _______ + ), + +/* FUNCTIONS + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | RGB+ | BL_BRT | F3 | F4 | F5 | F6 | F7 | F8 | F9 | / | * | - | + | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | RGB_H+ | RGB- | BL- | E | R | T | Y | U | I | O | 7 | 8 | 9 | ENTER | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | RGB_H- | RGB_M+ | BL+ | VOL+ | F | G | H | J | K | L | 4 | 5 | 6 | ENTER | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | RGB_S+ | RGB_M- | BL_S | VOL- | V | B | B | N | M | , | 1 | 2 | 3 | UP | END | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | RGB_S- | RGB_T | BL_T | MUTE | SPACE | SPACE | SPACE | SPACE | ALTGR | FN | FX | 0 | . | . | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FS] = LAYOUT_ortho_5x15( /* FUNCTION */ + _______, RGB_VAI, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, _______, + RGB_HUI, RGB_VAD, BL_INC, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + RGB_HUD, RGB_RMOD,BL_DEC, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, RESET, + RGB_SAI, RGB_MOD, BL_STEP, KC_VOLD, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, + RGB_SAD, RGB_TOG, BL_TOGG, KC_MUTE, _______, _______, _______, _______, _______, TO(_FN), TO(_QW), KC_P0, KC_PDOT, KC_DOT, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SWITCH_FN: + if (record->event.pressed) { + lt12_timer = timer_read(); + layer_on(_FN); + gp100_led_on(); + } else { + if (timer_elapsed(lt12_timer) > 200) { + layer_off(_FN); + gp100_led_off(); + } + } + return false; + break; + case SWITCH_FS: + if (record->event.pressed) { + lt12_timer = timer_read(); + layer_on(_FS); + gp100_led_on(); + } else { + if (timer_elapsed(lt12_timer) > 200) { + layer_off(_FS); + gp100_led_off(); + } + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + capslock_led_on(); + } else { + capslock_led_off(); + } + if (IS_LAYER_ON(_FN) || IS_LAYER_ON(_FS)) { + gp100_led_on(); + } else { + gp100_led_off(); + } +} diff --git a/keyboards/xd75/keymaps/bulbizarre/readme.md b/keyboards/xd75/keymaps/bulbizarre/readme.md new file mode 100644 index 0000000000..87ee9d7055 --- /dev/null +++ b/keyboards/xd75/keymaps/bulbizarre/readme.md @@ -0,0 +1,4 @@ +# Bulbizarre keymap + +Modified full layout, F-key layer, numpad and function layer. +Uses backlight, RGB underglow, and tap or hold layer switching keys. diff --git a/keyboards/xd75/keymaps/bulbizarre/rules.mk b/keyboards/xd75/keymaps/bulbizarre/rules.mk new file mode 100644 index 0000000000..e20fde4ed0 --- /dev/null +++ b/keyboards/xd75/keymaps/bulbizarre/rules.mk @@ -0,0 +1,16 @@ +# Copyright 2013 Jun Wako +# +# 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 . + +BACKLIGHT_ENABLE = yes diff --git a/keyboards/xd75/keymaps/msiu/readme.md b/keyboards/xd75/keymaps/msiu/readme.md index d53c0f34a8..f37eee41a3 100644 --- a/keyboards/xd75/keymaps/msiu/readme.md +++ b/keyboards/xd75/keymaps/msiu/readme.md @@ -1 +1,3 @@ -# The default keymap for xd75 +# msiu's keymap for xd75 + +QWERTY keymap for xd75 with centered numpad and standard 40% layers for easy switching between xd75 and contra/planck. diff --git a/keyboards/xd75/keymaps/odyssey/config.h b/keyboards/xd75/keymaps/odyssey/config.h new file mode 100644 index 0000000000..63eee4ea1d --- /dev/null +++ b/keyboards/xd75/keymaps/odyssey/config.h @@ -0,0 +1,17 @@ +#pragma once +#define MK_3_SPEED +#define TAPPING_TERM 20 +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 10 +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 10 +#define MK_C_OFFSET_0 4 +#define MK_C_INTERVAL_0 30 +#define MK_C_OFFSET_1 8 +#define MK_C_INTERVAL_1 20 +#define MK_C_OFFSET_2 16 +#define MK_C_INTERVAL_2 20 +#define MK_C_OFFSET_UNMOD 3 +#define MK_C_INTERVAL_UNMOD 25 diff --git a/keyboards/xd75/keymaps/odyssey/keymap.c b/keyboards/xd75/keymaps/odyssey/keymap.c new file mode 100644 index 0000000000..35510379c7 --- /dev/null +++ b/keyboards/xd75/keymaps/odyssey/keymap.c @@ -0,0 +1,241 @@ +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _QW 0 +#define _CM 1 +#define _FN 2 + +typedef enum { + NONE_NONE, + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_SINGLE_TAP +} td_state_t; + +static td_state_t td_state = NONE_NONE; +int cur_dance (qk_tap_dance_state_t *state); +void altlp_finished (qk_tap_dance_state_t *state, void *user_data); +void altlp_reset (qk_tap_dance_state_t *state, void *user_data); + +// Four differend underglow states for 2 language layouts x 2 states of colemak layer +enum layer_states { + S_ENGLISH, + S_COLEMAK, + S_CRUSSIAN, + S_QRUSSIAN +} l_state = S_ENGLISH; + +// CLMK to toggle colemak (active only with english qwerty, saves intent in russian but does nothing untill switched back to english) +// RNBW - rainbow underglow +// PING - ping pong underglow +// SP_UP/DW - underglow speed controls +enum custom_keycodes { + STUB = SAFE_RANGE, + CLMK, + RNBW, + PING, + SP_UP, + SP_DW +}; + +// Escape if taped, FN layer mod if held +enum tapdance_codes { + LESC +}; + +bool sstate = false; +int rgb = 0; +int speed = 300; + +void set_colors(int r, int g, int b) { + for(int i = 0; i<6; i++) { + sethsv(r, g, b, (LED_TYPE *)&led[i]); + } + rgblight_set(); +} + +void update_led_state_c(void) { + if (rgb>0) return; + if (td_state == SINGLE_HOLD) set_colors(HSV_BLUE); + else { + if (l_state == S_ENGLISH) set_colors(HSV_RED); + if (l_state == S_QRUSSIAN) set_colors(HSV_GREEN); + if (l_state == S_COLEMAK) set_colors(HSV_YELLOW); + if (l_state == S_CRUSSIAN) set_colors(85, 100, 100); + } +} + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted && state->pressed) { return SINGLE_HOLD; } + else if (!state->pressed) { return SINGLE_TAP; } + else { return SINGLE_HOLD; } + } + if (state->count == 2) { return DOUBLE_SINGLE_TAP; } + else { return 3; } +} + +// Tapdance code stolen long time ago from one of the forum answers i found related to my problem, sadly can't provide link for the credits +void lesc_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_ESC); + break; + case SINGLE_HOLD: + layer_on(_FN); + update_led_state_c(); + sstate = false; + break; + case DOUBLE_SINGLE_TAP: + break; + case NONE_NONE: + break; + } +} + +void lesc_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + unregister_code16(KC_ESC); + break; + case SINGLE_HOLD: + layer_off(_FN); + if (sstate == false) { + register_code16(KC_ESC); + unregister_code16(KC_ESC); + } + break; + case DOUBLE_SINGLE_TAP: + break; + case NONE_NONE: + break; + } + td_state = NONE_NONE; + update_led_state_c(); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [LESC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lesc_finished, lesc_reset) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ +KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, RNBW, KC_EQL, 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_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, +KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, CLMK, KC_DEL, SP_UP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, +KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, KC_UP, SP_DW, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, +KC_LCTL, LSFT(KC_9), KC_LALT, KC_LGUI, TD(LESC),KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT, TD(LESC),KC_RGUI, KC_RALT, RSFT(KC_0),KC_RCTL + ), + [_CM] = LAYOUT_ortho_5x15( /* COLEMAK */ +_______, _______, _______, _______, _______, _______, _______, PING, _______, _______, _______, _______, _______, _______, _______, +_______, KC_Q, KC_W, KC_F, KC_P, KC_Z, _______, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_SLSH, +_______, KC_A, KC_R, KC_S, KC_T, KC_G, _______, _______, _______, KC_M, KC_N, KC_E, KC_I, KC_O, _______, +_______, KC_X, KC_V, KC_C, KC_D, KC_B, _______, _______, _______, KC_K, KC_H, KC_DOT, KC_COMM, KC_QUOT, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ +KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_P7, KC_P8, KC_P9, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, +RESET, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_WH_U, KC_P4, KC_P5, KC_P6, _______, _______, _______, RSFT(KC_MINS), LSFT(KC_MINS), _______, +_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_MINS, KC_WH_D, KC_P1, KC_P2, KC_P3, _______, KC_PPLS, KC_ACL0, KC_ACL1, KC_ACL2, _______, +_______, KC_ACL0, KC_ACL1, KC_ACL2, KC_WH_L, KC_WH_R, KC_NLCK, KC_PGUP, KC_P0, _______, _______, _______, _______, _______, _______, +RGB_TOG, _______, _______, _______, KC_BSPC, KC_BSPC, KC_HOME, KC_PGDN, KC_END, KC_BSPC, KC_BSPC, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(keycode != TD(LESC)) + sstate = true; + switch (keycode) { + case SP_UP: + if (speed>25) + speed -= 25; + break; + case SP_DW: + if (speed < 1000) + speed += 25; + break; + case RNBW: + if(record->event.pressed) { + rgb = rgb == 0 ? 1 : 0; + update_led_state_c(); + } + break; + case PING: + if(record->event.pressed) { + rgb = rgb == 0 ? 2 : 0; + update_led_state_c(); + } + break; + case CLMK: + if(record->event.pressed) { + if (l_state == S_COLEMAK) { + layer_off(_CM); + l_state = S_ENGLISH; + } + else if (l_state == S_ENGLISH) { + layer_on(_CM); + l_state = S_COLEMAK; + } + else if (l_state == S_CRUSSIAN) { l_state = S_QRUSSIAN; } + else if (l_state == S_QRUSSIAN) { l_state = S_CRUSSIAN; } + } + update_led_state_c(); + break; + case KC_CAPS: + if(record->event.pressed) { + if (l_state == S_ENGLISH) l_state = S_QRUSSIAN; + else if (l_state == S_QRUSSIAN) l_state = S_ENGLISH; + else if (l_state == S_COLEMAK) { + layer_off(_CM); + l_state = S_CRUSSIAN; + } + else if (l_state == S_CRUSSIAN) { + layer_on(_CM); + l_state = S_COLEMAK; + } + update_led_state_c(); + } + break; + } + return true; +} + +void matrix_init_user(void) { } + +// Rainbow globals +int t = 0; +int rc = 0; +int col = 0; +bool right = false; + +void matrix_scan_user(void) { + if (rgb==0) return; // Do nothing each tick right away if neither of animations enabled + if (rgb==1) { + if (rc == 0) { + rc = speed; + for(int i = 0; i<6; i++) { + sethsv(42*((t+i)%6), 255, 255, (LED_TYPE *)&led[i]); + } + rgblight_set(); + t++; t = t % 6; + } + } else if (rgb==2) { + if (rc == 0) { + rc = speed; + col = (col + 1) % 36; + for (int i = 0; i<6; i++) { + if (i==t) + sethsv(42*(((col-1)/6)%6), 255, 255, (LED_TYPE *)&led[(right ? t : 5-t)]); + else + sethsv(0, 0, 0, (LED_TYPE *)&led[right ? i : 5-i]); + } + rgblight_set(); + t++; t = t % 6; + if (t == 0) right = !right; + } + } + rc--; +} + +void led_set_user(uint8_t usb_led) { } diff --git a/keyboards/xd75/keymaps/odyssey/readme.md b/keyboards/xd75/keymaps/odyssey/readme.md new file mode 100644 index 0000000000..668c2bf23d --- /dev/null +++ b/keyboards/xd75/keymaps/odyssey/readme.md @@ -0,0 +1,2 @@ +Personal keymap of flutterlice +Called Odyssey because it took me what feels like ten year to come up with perfect keymap that satisfied all my needs. diff --git a/keyboards/xd75/keymaps/odyssey/rules.mk b/keyboards/xd75/keymaps/odyssey/rules.mk new file mode 100644 index 0000000000..5d80f20041 --- /dev/null +++ b/keyboards/xd75/keymaps/odyssey/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE=yes +MOUSEKEY_ENABLE=yes +COMMAND_ENABLE=no diff --git a/keyboards/xd75/keymaps/pitty/config.h b/keyboards/xd75/keymaps/pitty/config.h new file mode 100644 index 0000000000..e6975da8a2 --- /dev/null +++ b/keyboards/xd75/keymaps/pitty/config.h @@ -0,0 +1,19 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/xd75/keymaps/pitty/keymap.c b/keyboards/xd75/keymaps/pitty/keymap.c new file mode 100644 index 0000000000..955ae59ed5 --- /dev/null +++ b/keyboards/xd75/keymaps/pitty/keymap.c @@ -0,0 +1,148 @@ +/* Copyright 2017 Wunder + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "keymap_hungarian.h" + +enum XD75_layers { + _QWERTY, + _GAME, + _LOWER, + _RAISE +}; + + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* Qwerty + * ,--------------------------------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | Ó | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | Ú | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | Ű | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Lower | Space | Enter| Bksp |AltGr | Raise| | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x15( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, HU_OO, KC_INS, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, HU_UU, KC_DEL, KC_PGDN, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, HU_UEE, _______, KC_HOME, \ + MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_RAISE), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ +), + + +/* Game + * ,--------------------------------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | Ó | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | Ú | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | Ű | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Raise | Space | Enter| Bksp |AltGr | Lower| | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT_ortho_5x15( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, HU_OO, KC_INS, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, HU_UU, KC_DEL, KC_PGDN, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, HU_UEE, _______, KC_HOME, \ + KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, TT(_RAISE), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_LOWER), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ +), + + +/* Lower + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | + | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | 4 | 5 | 6 | - | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | | | 1 | 2 | 3 | * | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | |Lnxcpy|Lnxpst| | | 0 | | | / | = | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, HU_7, HU_8, HU_9, HU_PLUS, _______, _______, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, HU_4, HU_5, HU_6, HU_MINS, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, HU_1, HU_2, HU_3, HU_ASTR, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, HU_0, _______, _______, HU_SLSH, HU_EQL, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY), _______, _______, _______ \ +), + +/* Raise + * ,--------------------------------------------------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x15( \ + _______, 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_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY), _______, _______, _______ \ +), + + + +}; + + + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _RAISE: + rgblight_setrgb (0xC3, 0xFF, 0xFF); + rgblight_mode(5); + break; + case _LOWER: + rgblight_setrgb (0xFF, 0xFF, 0xFF); + rgblight_mode(5); + break; + case _GAME: + rgblight_mode(8); + break; + default: // for any other layers, or the default layer + rgblight_mode(14); + break; + } + return state; +} diff --git a/keyboards/xd75/keymaps/pitty/readme.md b/keyboards/xd75/keymaps/pitty/readme.md new file mode 100644 index 0000000000..b0cc429978 --- /dev/null +++ b/keyboards/xd75/keymaps/pitty/readme.md @@ -0,0 +1,3 @@ +My keymap for the XD75 + +Including Hungarian characters and layer reactive underglow. \ No newline at end of file diff --git a/keyboards/xd75/keymaps/default/rules.mk b/keyboards/xd75/keymaps/pitty/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/default/rules.mk rename to keyboards/xd75/keymaps/pitty/rules.mk diff --git a/keyboards/xd75/keymaps/xo/config.h b/keyboards/xd75/keymaps/xo/config.h new file mode 100644 index 0000000000..31cdef2578 --- /dev/null +++ b/keyboards/xd75/keymaps/xo/config.h @@ -0,0 +1,19 @@ +/* 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 3 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 . + */ + +#pragma once + +#define TAPPING_TOGGLE 2 +#define PERMISSIVE_HOLD +#define TAPPING_TERM 150 diff --git a/keyboards/xd75/keymaps/xo/keymap.c b/keyboards/xd75/keymaps/xo/keymap.c new file mode 100644 index 0000000000..6fe547e87a --- /dev/null +++ b/keyboards/xd75/keymaps/xo/keymap.c @@ -0,0 +1,72 @@ +/* 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 3 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 . + */ +#include QMK_KEYBOARD_H + +// You might want to alter this to something that matches the keycap LED colors +// you installed. +#define BASE_COLOR RGB_ORANGE + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x15( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, LCTL_T(KC_Z), LALT_T(KC_X), KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, RALT_T(KC_DOT), RCTL_T(KC_SLSH), KC_RSFT, + TT(1), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_ENT, KC_RGUI, KC_RALT, KC_RCTL, TT(1)), + [1] = LAYOUT_ortho_5x15( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_P7, KC_P8, KC_P9, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + LCTL(KC_GRV), KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P4, KC_P5, KC_P6, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, + KC_CAPSLOCK, KC_TRNS, KC_TRNS, KC_MSTP, RGB_SAD, RGB_SAI, KC_P1, KC_P2, KC_P3, KC_PLUS, KC_TRNS, RESET, KC_MUTE, KC_VOLD, KC_VOLU, + MO(2), KC_PSCR, KC_PAUS, KC_APP, RGB_VAD, RGB_VAI, KC_P0, KC_SLSH, KC_PDOT, KC_PENT, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, + TG(1), KC_TRNS, RGB_TOG, KC_SLCK, RGB_RMOD, RGB_MOD, KC_NLCK, KC_TRNS, KC_ASTR, KC_PENT, KC_PENT, MO(1), KC_TRNS, KC_TRNS, TG(1)), + [2] = LAYOUT_ortho_5x15( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_DEC, BL_INC, BL_TOGG, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_TOG) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + backlight_level(4); + } else { + backlight_level(6); + } + + if (IS_MOD(keycode)) { + if (record->event.pressed) { + rgblight_setrgb(RGB_RED); + } else { + rgblight_setrgb(BASE_COLOR); + } + } + + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 0: + rgblight_setrgb(BASE_COLOR); + break; + case 1: + rgblight_setrgb(RGB_AZURE); + break; + case 2: + rgblight_setrgb(RGB_PURPLE); + break; + } + return state; +} diff --git a/keyboards/xd75/keymaps/xo/readme.md b/keyboards/xd75/keymaps/xo/readme.md new file mode 100644 index 0000000000..d8ecb1c2a3 --- /dev/null +++ b/keyboards/xd75/keymaps/xo/readme.md @@ -0,0 +1,6 @@ +# xster's keymap + +My layout preferences. Done on a xd75 that had keycap LEDs. + +It has reactive keypress keycap light dimming. Layers and modifiers have +RGB underlit colors. diff --git a/keyboards/xd75/keymaps/xo/rules.mk b/keyboards/xd75/keymaps/xo/rules.mk new file mode 100644 index 0000000000..baa653f780 --- /dev/null +++ b/keyboards/xd75/keymaps/xo/rules.mk @@ -0,0 +1,14 @@ +# 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 3 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 . + +BACKLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/xd75/rules.mk b/keyboards/xd75/rules.mk index e992729432..9052c8c123 100644 --- a/keyboards/xd75/rules.mk +++ b/keyboards/xd75/rules.mk @@ -1,51 +1,15 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # QMK Build Options # change to "no" to disable the options, or define them in the Makefile in @@ -65,4 +29,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = ortho_5x15 \ No newline at end of file +LAYOUTS = ortho_5x15 diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h index 138c2c4c85..1ff5e1cfd7 100644 --- a/keyboards/xd84/config.h +++ b/keyboards/xd84/config.h @@ -237,7 +237,3 @@ /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 - -// LTO options -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/keyboards/xd84/custom_matrix_helper.c b/keyboards/xd84/custom_matrix_helper.c index a6a0a041d9..a4c5b6afa5 100644 --- a/keyboards/xd84/custom_matrix_helper.c +++ b/keyboards/xd84/custom_matrix_helper.c @@ -1,3 +1,18 @@ +/* Copyright 2019 + * + * 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 . + */ #include #include #include "wait.h" diff --git a/keyboards/xd84/matrix.c b/keyboards/xd84/matrix.c index a359050477..4cb5544ca4 100644 --- a/keyboards/xd84/matrix.c +++ b/keyboards/xd84/matrix.c @@ -65,7 +65,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Clear data in matrix row current_matrix[current_row] = 0; - // Select row and wait for row selecton to stabilize + // Select row and wait for row selection to stabilize select_row(current_row); wait_us(30); diff --git a/keyboards/xd84/pca9555.c b/keyboards/xd84/pca9555.c deleted file mode 100644 index df4631e9d7..0000000000 --- a/keyboards/xd84/pca9555.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "i2c_master.h" -#include "pca9555.h" - -#include "debug.h" - -#define SLAVE_TO_ADDR(n) (n<<1) -#define TIMEOUT 100 - -enum { - CMD_INPUT_0 = 0, - CMD_INPUT_1, - CMD_OUTPUT_0, - CMD_OUTPUT_1, - CMD_INVERSION_0, - CMD_INVERSION_1, - CMD_CONFIG_0, - CMD_CONFIG_1 -}; - -void pca9555_init(uint8_t slave_addr) { - static uint8_t s_init = 0; - if (!s_init) { - i2c_init(); - - s_init=1; - } - - // TODO: could check device connected - //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); - //i2c_stop(); -} - -void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; - - i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_set_config::FAILED\n"); - } -} - -void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; - - i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_set_output::FAILED\n"); - } -} - -uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; - - uint8_t data = 0; - i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_readPins::FAILED\n"); - } - return data; -} diff --git a/keyboards/xd84/pca9555.h b/keyboards/xd84/pca9555.h deleted file mode 100644 index 6aaee8a6f8..0000000000 --- a/keyboards/xd84/pca9555.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright 2019 - * - * 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 . - */ -#pragma once - -/* - PCA9555 - ,----------. - SDA --| SDA P00 |-- P1 - SCL --| SCL P01 |-- P2 - INT --| INT P02 |-- P3 - | P03 |-- P4 - A0 --| A0 P04 |-- P5 - A1 --| A1 P05 |-- P6 - A2 --| A2 P06 |-- P7 - | P07 |-- P8 - | | - | P10 |-- P10 - | P11 |-- P11 - | P12 |-- P12 - | P13 |-- P13 - | P14 |-- P14 - | P15 |-- P15 - | P16 |-- P16 - | P17 |-- P17 - `----------' -*/ - -#define PCA9555_PORT0 0 -#define PCA9555_PORT1 1 - -#define ALL_OUTPUT 0 -#define ALL_INPUT 0xFF -#define ALL_LOW 0 -#define ALL_HIGH 0xFF - -void pca9555_init(uint8_t slave_addr); - -void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); - -void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); - -uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file diff --git a/keyboards/xd84/readme.md b/keyboards/xd84/readme.md index 38b4efcba2..b8d9c5dbb8 100644 --- a/keyboards/xd84/readme.md +++ b/keyboards/xd84/readme.md @@ -2,7 +2,7 @@ ![XD84](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB17eeJSXXXXXbIXFXXq6xXFXXXp_1024x1024.jpg?v=1515505994) -Compact With 84 Keys & RGB LED Underglow +Keyboard with 84 Keys & RGB LED Underglow - Designed by Xiudi - Up to 87 keys - iso and ansi support diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index 283d4babc7..d9d316c133 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -77,12 +30,14 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +LINK_TIME_OPTIMIZATION_ENABLE = yes # custom matrix setup CUSTOM_MATRIX = yes -SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c -EXTRAFLAGS += -flto +VPATH += drivers/gpio +SRC += custom_matrix_helper.c pca9555.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c -LAYOUTS = 75_ansi 75_iso \ No newline at end of file +LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h index dae9d3db8f..438da93fb2 100644 --- a/keyboards/xd87/config.h +++ b/keyboards/xd87/config.h @@ -54,14 +54,14 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 -// #define RGB_DI_PIN E2 -// #ifdef RGB_DI_PIN -// #define RGBLIGHT_ANIMATIONS -// #define RGBLED_NUM 16 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #endif +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/xd87/keymaps/default_underglow/config.h b/keyboards/xd87/keymaps/default_underglow/config.h new file mode 100755 index 0000000000..6432d4b1f6 --- /dev/null +++ b/keyboards/xd87/keymaps/default_underglow/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Louwii + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/xd87/keymaps/default_underglow/keymap.c b/keyboards/xd87/keymaps/default_underglow/keymap.c new file mode 100755 index 0000000000..8852c3a62a --- /dev/null +++ b/keyboards/xd87/keymaps/default_underglow/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 Louwii + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + [1] = LAYOUT_tkl_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_VAI, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_VAD, RGB_RMOD,RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/xd87/keymaps/default_underglow/readme.md b/keyboards/xd87/keymaps/default_underglow/readme.md new file mode 100755 index 0000000000..676709fccd --- /dev/null +++ b/keyboards/xd87/keymaps/default_underglow/readme.md @@ -0,0 +1,13 @@ +# The default RGB underglow layout for xd87 + +The RGB Underglow feature is disabled by default. This specific keymap enables RGB Underglow but disables the Command feature in order to save space. + +## Keymap + +### Layer 0 + +![XD87 - rgb_default keymap - layer 0](https://i.imgur.com/lCOZADn.png) + +### Layer 1 + +![XD87 - rgb_default keymap - layer 1](https://i.imgur.com/BIsAgtO.png) \ No newline at end of file diff --git a/keyboards/xd87/keymaps/default_underglow/rules.mk b/keyboards/xd87/keymaps/default_underglow/rules.mk new file mode 100755 index 0000000000..5cf1edf60b --- /dev/null +++ b/keyboards/xd87/keymaps/default_underglow/rules.mk @@ -0,0 +1,3 @@ +BOOTMAGIC_ENABLE = lite +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/xd87/rules.mk b/keyboards/xd87/rules.mk index 39540e701d..3e8e4e1f51 100644 --- a/keyboards/xd87/rules.mk +++ b/keyboards/xd87/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -78,7 +30,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) # Supported layouts LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/xd87/xd87.c b/keyboards/xd87/xd87.c index da07c71d88..e14480b054 100644 --- a/keyboards/xd87/xd87.c +++ b/keyboards/xd87/xd87.c @@ -18,7 +18,7 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - + led_init_ports(); matrix_init_user(); } @@ -39,5 +39,15 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E2); + } else { + writePinHigh(E2); + } + led_set_user(usb_led); } + +void led_init_ports(void) { + setPinOutput(E2); +} diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h index ea6c878e9e..b0fa477952 100644 --- a/keyboards/xd96/config.h +++ b/keyboards/xd96/config.h @@ -238,7 +238,3 @@ /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 - -// LTO options -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/keyboards/xd96/matrix.c b/keyboards/xd96/matrix.c index 550dae4d02..e8fd850edb 100644 --- a/keyboards/xd96/matrix.c +++ b/keyboards/xd96/matrix.c @@ -67,7 +67,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Clear data in matrix row current_matrix[current_row] = 0; - // Select row and wait for row selecton to stabilize + // Select row and wait for row selection to stabilize select_row(current_row); wait_us(30); diff --git a/keyboards/xd96/pca9555.c b/keyboards/xd96/pca9555.c deleted file mode 100644 index 960df4f4e5..0000000000 --- a/keyboards/xd96/pca9555.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright 2019 - * - * 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 . - */ -#include "i2c_master.h" -#include "pca9555.h" - -#include "debug.h" - -#define SLAVE_TO_ADDR(n) (n<<1) -#define TIMEOUT 100 - -enum { - CMD_INPUT_0 = 0, - CMD_INPUT_1, - CMD_OUTPUT_0, - CMD_OUTPUT_1, - CMD_INVERSION_0, - CMD_INVERSION_1, - CMD_CONFIG_0, - CMD_CONFIG_1 -}; - -void pca9555_init(uint8_t slave_addr) { - static uint8_t s_init = 0; - if (!s_init) { - i2c_init(); - - s_init=1; - } - - // TODO: could check device connected - //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); - //i2c_stop(); -} - -void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; - - i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_set_config::FAILED\n"); - } -} - -void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; - - i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_set_output::FAILED\n"); - } -} - -uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { - uint8_t addr = SLAVE_TO_ADDR(slave_addr); - uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; - - uint8_t data = 0; - i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) { - print("pca9555_readPins::FAILED\n"); - } - return data; -} diff --git a/keyboards/xd96/pca9555.h b/keyboards/xd96/pca9555.h deleted file mode 100644 index 6aaee8a6f8..0000000000 --- a/keyboards/xd96/pca9555.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright 2019 - * - * 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 . - */ -#pragma once - -/* - PCA9555 - ,----------. - SDA --| SDA P00 |-- P1 - SCL --| SCL P01 |-- P2 - INT --| INT P02 |-- P3 - | P03 |-- P4 - A0 --| A0 P04 |-- P5 - A1 --| A1 P05 |-- P6 - A2 --| A2 P06 |-- P7 - | P07 |-- P8 - | | - | P10 |-- P10 - | P11 |-- P11 - | P12 |-- P12 - | P13 |-- P13 - | P14 |-- P14 - | P15 |-- P15 - | P16 |-- P16 - | P17 |-- P17 - `----------' -*/ - -#define PCA9555_PORT0 0 -#define PCA9555_PORT1 1 - -#define ALL_OUTPUT 0 -#define ALL_INPUT 0xFF -#define ALL_LOW 0 -#define ALL_HIGH 0xFF - -void pca9555_init(uint8_t slave_addr); - -void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); - -void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); - -uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file diff --git a/keyboards/xd96/readme.md b/keyboards/xd96/readme.md index 237d7a0516..bf01db8bb7 100644 --- a/keyboards/xd96/readme.md +++ b/keyboards/xd96/readme.md @@ -2,7 +2,7 @@ ![XD96](https://cdn.shopify.com/s/files/1/2711/4238/products/xd96_pcb_1024x1024.jpg?v=1515425370) -Compact With 96 Keys & RGB LED Underglow +Keyboard with 96 Keys & RGB LED Underglow - Designed by Xiudi - ISO and ANSI support - Uses Kimera core diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index c9f8044712..2079e436c0 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -77,10 +30,12 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +LINK_TIME_OPTIMIZATION_ENABLE = yes # custom matrix setup CUSTOM_MATRIX = yes -SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c -EXTRAFLAGS += -flto +VPATH += drivers/gpio +SRC += custom_matrix_helper.c pca9555.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/xd96/xd96.c b/keyboards/xd96/xd96.c index 45cfb3b1f1..e2af9f1004 100644 --- a/keyboards/xd96/xd96.c +++ b/keyboards/xd96/xd96.c @@ -16,9 +16,11 @@ #include "xd96.h" #define CAPS_PIN B6 +#define NUMLOCK_PIN C6 void keyboard_pre_init_kb(void) { setPinOutput(CAPS_PIN); + setPinOutput(NUMLOCK_PIN); keyboard_pre_init_user(); } @@ -29,6 +31,12 @@ void led_set_kb(uint8_t usb_led) { } else { writePinHigh(CAPS_PIN); } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(NUMLOCK_PIN); + } else { + writePinHigh(NUMLOCK_PIN); + } led_set_user(usb_led); } diff --git a/keyboards/xmmx/rules.mk b/keyboards/xmmx/rules.mk index ee87c6e8d4..df45fa5df0 100644 --- a/keyboards/xmmx/rules.mk +++ b/keyboards/xmmx/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk index 01435ee544..913ac3c024 100644 --- a/keyboards/xw60/rules.mk +++ b/keyboards/xw60/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index 2a89630116..1e6d4bb7cd 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -1,51 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/yd68/rules.mk b/keyboards/yd68/rules.mk index 197402e8ab..420ab38bf5 100644 --- a/keyboards/yd68/rules.mk +++ b/keyboards/yd68/rules.mk @@ -1,64 +1,16 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index 36031eebf5..a56a1b54b8 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h @@ -24,6 +24,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 // TODO: share these strings with usbconfig.h // Edit usbconfig.h to change these. @@ -46,6 +47,5 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 18 #define NO_UART 1 -#define BOOTLOADHID_BOOTLOADER 1 #endif diff --git a/keyboards/ymd75/i2c.c b/keyboards/ymd75/i2c.c deleted file mode 100644 index c27f3e3d17..0000000000 --- a/keyboards/ymd75/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 9d09d3da94..0c1c9110ca 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -1,34 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# Modified 2018 Wayne Jones (WarmCatUK) - -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -39,7 +19,7 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work @@ -55,8 +35,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c - - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c backlight.c diff --git a/keyboards/ymd75/usbconfig.h b/keyboards/ymd75/usbconfig.h index 73afb18e67..0e570b9ec1 100644 --- a/keyboards/ymd75/usbconfig.h +++ b/keyboards/ymd75/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -238,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'Y', 'M', 'D', 'K' diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c index 2259dfa5f0..74f7c6a493 100644 --- a/keyboards/ymd75/ymd75.c +++ b/keyboards/ymd75/ymd75.c @@ -16,23 +16,19 @@ along with this program. If not, see . */ #include "ymd75.h" -//#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" #include "backlight.h" #include "backlight_custom.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__ ((weak)) +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` @@ -48,48 +44,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i. #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 // Edit usbconfig.h to change these. #define MANUFACTURER ymdkey #define PRODUCT ymd96 @@ -42,6 +43,7 @@ along with this program. If not, see . #define TAPPING_TOGGLE 3 #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* RGB underglow */ // The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. @@ -51,7 +53,6 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS /*#define RGBLIGHT_VAL_STEP 20 -#define NO_UART 1 -#define BOOTLOADHID_BOOTLOADER 1*/ +#define NO_UART 1*/ #endif diff --git a/keyboards/ymd96/i2c.c b/keyboards/ymd96/i2c.c deleted file mode 100644 index c27f3e3d17..0000000000 --- a/keyboards/ymd96/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/ymd96/rules.mk b/keyboards/ymd96/rules.mk index 1cc4060b01..19d9fd81ab 100644 --- a/keyboards/ymd96/rules.mk +++ b/keyboards/ymd96/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -41,7 +22,7 @@ BACKLIGHT_ENABLE = yes BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c KEY_LOCK_ENABLE = yes @@ -52,7 +33,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c backlight.c diff --git a/keyboards/ymd96/usbconfig.h b/keyboards/ymd96/usbconfig.h index a90a36f082..83613384d7 100644 --- a/keyboards/ymd96/usbconfig.h +++ b/keyboards/ymd96/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -239,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'y','m','d','k','e','y' diff --git a/keyboards/ymd96/ymd96.c b/keyboards/ymd96/ymd96.c index b0bf6128fa..546a4c6e3a 100644 --- a/keyboards/ymd96/ymd96.c +++ b/keyboards/ymd96/ymd96.c @@ -18,22 +18,18 @@ along with this program. If not, see . #include "ymd96.h" -#include - -#include "action_layer.h" -#include "quantum.h" - -#include "i2c.h" - #include "backlight.h" #include "backlight_custom.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__ ((weak)) +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` @@ -49,49 +45,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i. + */ +#include "quantum.h" + + +void keyboard_pre_init_kb(void){ + //init the CAPS LOCK LED pin as an output + setPinOutput(D1); + //init the Backlight Pin as an output + setPinOutput(D4); + //call any user initialization code + keyboard_pre_init_user(); +} + +void led_set_kb(uint8_t usb_led){ + //control the caps lock LED + if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){ + //set led pin to high + writePinHigh(D1); + } else { + //set to low + writePinLow(D1); + } + //call any user LED functions + led_set_user(usb_led); +} + diff --git a/keyboards/ymdk/bface/bface.h b/keyboards/ymdk/bface/bface.h new file mode 100644 index 0000000000..5f1c9578b6 --- /dev/null +++ b/keyboards/ymdk/bface/bface.h @@ -0,0 +1,69 @@ +/* +Copyright 2019 Ethan Durrant (emdarcher) + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all(\ + K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4, KB4, KC4, KD4, KE4, \ + K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, \ + K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, \ + K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC1, KD1, KE1, \ + K00, K10, K20, K30, K70, K80, K90, KA0, KB0, KC0, KD0 \ +){ \ + { K00, K10, K20, K30, KC_NO, KC_NO, KC_NO,K70, K80, K90, KA0, KB0, KC0, KD0, KC_NO }, \ + { K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC1, KD1, KE1 }, \ + { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, KC_NO }, \ + { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KC_NO }, \ + { K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4, KB4, KC4, KD4, KE4 }, \ +} +// 0 1 2 3 4 5 6 7 8 9 A B C D E +// A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 D7 + +#define LAYOUT_60_ansi(\ + K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4, KB4, KC4, KE4, \ + K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, \ + K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KD2, \ + K01, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KD1, \ + K00, K10, K20, K70, K90, KA0, KC0, KD0 \ +){ \ + { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, K70, KC_NO, K90, KA0, KC_NO, KC0, KD0, KC_NO }, \ + { K01, KC_NO, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC_NO, KD1, KC_NO }, \ + { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC_NO, KD2, KC_NO }, \ + { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KC_NO }, \ + { K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4, KB4, KC4, KC_NO, KE4 }, \ +} +// 0 1 2 3 4 5 6 7 8 9 A B C D E +// A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 D7 + +#define LAYOUT_60_ansi_split_rshift(\ + K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4, KB4, KC4, KE4, \ + K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, \ + K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KD2, \ + K01, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KD1, KE1, \ + K00, K10, K20, K70, K90, KA0, KC0, KD0 \ +){ \ + { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, K70, KC_NO, K90, KA0, KC_NO, KC0, KD0, KC_NO }, \ + { K01, KC_NO, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC_NO, KD1, KE1 }, \ + { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC_NO, KD2, KC_NO }, \ + { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KC_NO }, \ + { K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4, KB4, KC4, KC_NO, KE4 }, \ +} +// 0 1 2 3 4 5 6 7 8 9 A B C D E +// A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 D7 + diff --git a/keyboards/ymdk/bface/config.h b/keyboards/ymdk/bface/config.h new file mode 100644 index 0000000000..9e5a9134ff --- /dev/null +++ b/keyboards/ymdk/bface/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2019 Ethan Durrant (emdarcher) + +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 . +*/ + +#pragma once + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 +// You can edit those at usbconfig.h about line 250. These values will +// unforunatly be ignored so far +#define MANUFACTURER YMDK +#define PRODUCT bface + +/* matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B7, B6, B5, B4, B3} +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7} +#define UNUSED_PINS + +#define NO_UART 1 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 6 + + diff --git a/keyboards/ymdk/bface/info.json b/keyboards/ymdk/bface/info.json new file mode 100644 index 0000000000..4e6e831595 --- /dev/null +++ b/keyboards/ymdk/bface/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "YMDK Bface", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "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},{"x":13, "y":0}, {"label":"Backspace", "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":"|", "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},{"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":0, "y":3},{"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"x":12, "y":3},{"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.75}, {"x":1.75, "y":4, "w":1.25}, {"x":3, "y":4, "w":1.25}, {"x":4.25, "y":4, "w":1.25},{"x":5.5, "y":4, "w":3}, {"x":8.5, "y":4, "w":1.25}, {"x":9.75, "y":4, "w":1.25}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi_split_rshift": { + "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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}, {"x":14, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/ymdk/bface/keymaps/default/config.h b/keyboards/ymdk/bface/keymaps/default/config.h new file mode 100644 index 0000000000..e1a6eb1a2b --- /dev/null +++ b/keyboards/ymdk/bface/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define GRAVE_ESC_ALT_OVERRIDE diff --git a/keyboards/ymdk/bface/keymaps/default/keymap.c b/keyboards/ymdk/bface/keymaps/default/keymap.c new file mode 100644 index 0000000000..9d2a2c9a0e --- /dev/null +++ b/keyboards/ymdk/bface/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2019 Ethan Durrant (emdarcher) + +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 . +*/ + +#include QMK_KEYBOARD_H + + +#define _FL 1 +#define _CL 2 +#define KC_X0 LT(_CL, KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + //Base Layer + [0] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, + KC_X0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_MENU,KC_RCTL + ), + //FN Layer + [_FL] = LAYOUT_60_ansi( + 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_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PGUP,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_HOME,KC_PGDN, KC_END,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, BL_DEC,BL_TOGG, BL_INC,KC_MPLY,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + //CAPS LOCK layer + [_CL] = LAYOUT_60_ansi( + 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_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_UP,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_RIGHT,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + /* You can copy this layer as base for a new fn layer * / + [n] = LAYOUT_60_ansi( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + */ +}; + diff --git a/keyboards/ymdk/bface/keymaps/default/readme.md b/keyboards/ymdk/bface/keymaps/default/readme.md new file mode 100644 index 0000000000..33c32a5117 --- /dev/null +++ b/keyboards/ymdk/bface/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# Default Keymap + +Base Layer: +![base](https://i.imgur.com/O7rNtDs.jpg) + +Standard ANSI 60% Layout. + +- GESC for ESC key. +- FN layer with media and navigation controls. +- CAPS LOCK layer (when held down) that has arrows mapped to IJKL keys. +- FN+V = Backlight Toggle, FN+C = Backlight Decrease, FN+B = Backlight Increase diff --git a/keyboards/ymdk/bface/keymaps/emdarcher/config.h b/keyboards/ymdk/bface/keymaps/emdarcher/config.h new file mode 100644 index 0000000000..e1a6eb1a2b --- /dev/null +++ b/keyboards/ymdk/bface/keymaps/emdarcher/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define GRAVE_ESC_ALT_OVERRIDE diff --git a/keyboards/ymdk/bface/keymaps/emdarcher/keymap.c b/keyboards/ymdk/bface/keymaps/emdarcher/keymap.c new file mode 100644 index 0000000000..86cacfce50 --- /dev/null +++ b/keyboards/ymdk/bface/keymaps/emdarcher/keymap.c @@ -0,0 +1,69 @@ +/* +Copyright 2019 Ethan Durrant (emdarcher) + +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 . +*/ + +#include QMK_KEYBOARD_H + + +#define _FL 1 +#define _CL 2 +#define _AL 3 +#define KC_X0 LT(_CL, KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + //Base layer + [0] = LAYOUT_60_ansi_split_rshift( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, + KC_X0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, MO(_FL),MO(_AL),KC_RCTL, KC_DOWN + ), + //FN Layer + [_FL] = LAYOUT_60_ansi_split_rshift( + 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_DEL, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MRWD,KC_MFFD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MPLY,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS, KC_TRNS,KC_PGUP, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_PGDN + ), + //CAPS LOCK Layer + [_CL] = LAYOUT_60_ansi_split_rshift( + 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_DEL, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN, KC_UP,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_HOME, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_END + ), + //Alt layer + [_AL] = LAYOUT_60_ansi_split_rshift( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_UP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_RIGHT,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS + ), + /* You can copy this layer as base for a new fn layer * / + [n] = LAYOUT_60_ansi_split_rshift( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS + ), + */ +}; + diff --git a/keyboards/ymdk/bface/keymaps/emdarcher/readme.md b/keyboards/ymdk/bface/keymaps/emdarcher/readme.md new file mode 100644 index 0000000000..7cba92fab6 --- /dev/null +++ b/keyboards/ymdk/bface/keymaps/emdarcher/readme.md @@ -0,0 +1,14 @@ +# emdarcher's keymap + +Base Layer: +![base](https://i.imgur.com/ie5aF7d.jpg) + +Uses a tweaked 60% ANSI layout with split right shift and up/down keys in the bottom right. Resulted from being used to 65% boards with arrow keys in bottom right and using the up/down arrows a lot in terminal. + +- Page Up/Down, and Home/End have been mapped to the up/down keys on different layers. +- The Caps Lock Layer uses VIM style directions on HJKL keys. +- LGUI moved to Mac Command Key location +- FN2 layer that has arrows on IJKL for one-handed arrow key control. +- Added Print Screen, Scroll Lock, and Pause keys on P,[,] keys to add Mac screen brightness control. + * On Mac, Scroll Lock is Brightness Down and Pause is Brightness Up, so with this FN+[ = brighness down, FN+] = brightness up +- Has Mac Fast-forward and Rewind keys mapped for changing media tracks. FN+; = Rewind, FN+' = Fast-forward diff --git a/keyboards/ymdk/bface/rules.mk b/keyboards/ymdk/bface/rules.mk new file mode 100644 index 0000000000..7b829530b2 --- /dev/null +++ b/keyboards/ymdk/bface/rules.mk @@ -0,0 +1,41 @@ +# Copyright 2019 Ethan Durrant (emdarcher) +# +# 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 . + +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +BACKLIGHT_CUSTOM_DRIVER = no +BACKLIGHT_BREATHING = no +RGBLIGHT_ENABLE = no +RGBLIGHT_CUSTOM_DRIVER = no + +OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/ymdk/bface/usbconfig.h b/keyboards/ymdk/bface/usbconfig.h new file mode 100644 index 0000000000..7768c5cae5 --- /dev/null +++ b/keyboards/ymdk/bface/usbconfig.h @@ -0,0 +1,383 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'Y', 'M', 'D', 'K' +#define USB_CFG_VENDOR_NAME_LEN 4 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'b', 'f', 'a', 'c', 'e' +#define USB_CFG_DEVICE_NAME_LEN 5 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 5982b6c530..4a846f5e94 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -22,6 +22,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 // TODO: share these strings with usbconfig.h // Edit usbconfig.h to change these. #define MANUFACTURER ymdk @@ -41,6 +42,8 @@ along with this program. If not, see . #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 + /* RGB underglow */ // The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. // The same pin is used on the JJ40, at least. diff --git a/keyboards/ymdk_np21/i2c.c b/keyboards/ymdk_np21/i2c.c deleted file mode 100644 index c27f3e3d17..0000000000 --- a/keyboards/ymdk_np21/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index 670967fbd9..2bab3043e8 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -41,8 +22,7 @@ BACKLIGHT_ENABLE = yes BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes -# DISABLE_WS2812 = no +WS2812_DRIVER = i2c KEY_LOCK_ENABLE = yes @@ -53,7 +33,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex +SRC = matrix.c backlight.c diff --git a/keyboards/ymdk_np21/usbconfig.h b/keyboards/ymdk_np21/usbconfig.h index ad97e7f0a3..4599c03dc9 100644 --- a/keyboards/ymdk_np21/usbconfig.h +++ b/keyboards/ymdk_np21/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -239,7 +228,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' diff --git a/keyboards/ymdk_np21/ymdk_np21.c b/keyboards/ymdk_np21/ymdk_np21.c index c1b11b4046..f2b3d46dab 100644 --- a/keyboards/ymdk_np21/ymdk_np21.c +++ b/keyboards/ymdk_np21/ymdk_np21.c @@ -18,25 +18,9 @@ along with this program. If not, see . #include "ymdk_np21.h" -#include - -#include "action_layer.h" -#include "quantum.h" - -#include "i2c.h" - #include "backlight.h" #include "backlight_custom.h" -extern rgblight_config_t rgblight_config; - -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { @@ -51,32 +35,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 diff --git a/keyboards/yosino58/rev1/rev1.h b/keyboards/yosino58/rev1/rev1.h index 84d90737d5..bc68892e88 100644 --- a/keyboards/yosino58/rev1/rev1.h +++ b/keyboards/yosino58/rev1/rev1.h @@ -2,7 +2,6 @@ #include "../yosino58.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef RGBLIGHT_ENABLE @@ -18,7 +17,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ diff --git a/keyboards/yosino58/rules.mk b/keyboards/yosino58/rules.mk index f2934454d9..5d3885fb2f 100644 --- a/keyboards/yosino58/rules.mk +++ b/keyboards/yosino58/rules.mk @@ -1,55 +1,16 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -74,3 +35,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes DEFAULT_FOLDER = yosino58/rev1 + +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c diff --git a/keyboards/yosino58/serial.c b/keyboards/yosino58/serial.c index 325c29a3f7..f6293c3dc2 100644 --- a/keyboards/yosino58/serial.c +++ b/keyboards/yosino58/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/z150_blackheart/rules.mk b/keyboards/z150_blackheart/rules.mk index b258bf35fd..150af8dabc 100644 --- a/keyboards/z150_blackheart/rules.mk +++ b/keyboards/z150_blackheart/rules.mk @@ -1,48 +1,16 @@ # MCU name MCU = at90usb1286 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -55,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no diff --git a/keyboards/zeal60/config.h b/keyboards/zeal60/config.h deleted file mode 100644 index 7c5340e730..0000000000 --- a/keyboards/zeal60/config.h +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -#include "config_common.h" - -// USB Device descriptor parameter -#define VENDOR_ID 0x5A45 // ZealPC ("ZE") -#define PRODUCT_ID 0x0060 // Zeal60 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ZealPC -#define PRODUCT Zeal60 -#define DESCRIPTION Zeal60 - -// key matrix size -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -// Zeal60 PCB default pin-out -#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } -#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS - -// IS31FL3731 driver -#define DRIVER_COUNT 2 -#define DRIVER_LED_TOTAL 72 - -// COL2ROW or ROW2COL -#define DIODE_DIRECTION COL2ROW - -// Set 0 if debouncing isn't needed -#define DEBOUNCE 5 - -// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -#define LOCKING_SUPPORT_ENABLE -// Locking resynchronize hack -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -// disable debug print -//#define NO_DEBUG - -// disable print -//#define NO_PRINT - -// disable action features -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#define RGB_BACKLIGHT_ENABLED 1 - -// This conditionally compiles the backlight code for Zeal60 specifics -#define RGB_BACKLIGHT_ZEAL60 - -// enable/disable LEDs based on layout -#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 -#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 -#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 -#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 -#define RGB_BACKLIGHT_USE_ISO_ENTER 0 -#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 - -// disable backlight when USB suspended (PC sleep/hibernate/shutdown) -#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 - -// disable backlight after timeout in minutes, 0 = no timeout -#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 - -// the default brightness -#define RGB_BACKLIGHT_BRIGHTNESS 255 - -// the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 - -// the default effect speed (0-3) -#define RGB_BACKLIGHT_EFFECT_SPEED 0 - -// the default color1 and color2 -#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } -#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } - -// These define which keys in the matrix are alphas/mods -// Used for backlight effects so colors are different for -// alphas vs. mods -// Each value is for a row, bit 0 is column 0 -// Alpha=0 Mod=1 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0001000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 - -#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 66 -// Dynamic macro starts after dynamic keymaps (66+(4*5*14*2)) = (66+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 626 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/zeal60/info.json b/keyboards/zeal60/info.json deleted file mode 100644 index c4234e49a4..0000000000 --- a/keyboards/zeal60/info.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "keyboard_name": "Zeal60", - "url": "", - "maintainer": "Wilba", - "bootloader": "DFU", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_all": { - "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"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":"|", "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}, {"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}, {"x":14, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_ansi": { - "layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "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":2.25}, {"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_iso": { - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Backspace", "x":13, "y":0, "w":2}, {"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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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":2.75}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_ansi_split_bs_rshift": { - "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"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":"|", "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":2.25}, {"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}, {"x":14, "y":3}, {"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_hhkb": { - "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":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":2.25}, {"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}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] - } - } -} \ No newline at end of file diff --git a/keyboards/zeal60/readme.md b/keyboards/zeal60/readme.md deleted file mode 100644 index 9eca28f83e..0000000000 --- a/keyboards/zeal60/readme.md +++ /dev/null @@ -1,47 +0,0 @@ -Zeal60 -==== - -![Zeal60](https://cdn.shopify.com/s/files/1/0490/7329/products/Zeal60.jpg) - -This is a 60% PCB with per-key RGB LEDs and supports ANSI, ISO, winkey/winkeyless bottom row, HHKB-layout (split right shift and backspace). - -Keyboard Maintainer: [Wilba](http://wilba.tech/) and on [github](https://github.com/Wilba6582) -Hardware Supported: Zeal60 PCB Rev 0-3 -Hardware Availability: https://zealpc.net/collections/group-buy-pre-orders/products/zeal60rgb - -Make example for this keyboard (after setting up your build environment): - - make zeal60: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). - - -RGB Backlight Configuration -==== - -A keymap (in the keymaps directory) can optionally configure which RGB backlight LEDs are used, depending on the needs of the layout, by adding a config.h file in the keymap's directory. -The following #define symbols will enable/disable a feature using 1 or 0. - - RGB_BACKLIGHT_USE_SPLIT_BACKSPACE - -Split backspace is being used, enables the right LED of the split backspace (the top-right corner) - - RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT - -Split left shift is being used (i.e. ISO layout), enables the right LED of the split left shift (the ISO key) - - RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT - -Split right shift is being used (i.e. HHKB style layouts), enables the right LED of the split right shift (the Fn key) - - RGB_BACKLIGHT_USE_7U_SPACEBAR - -A 7U spacebar is being used, controls the LEDs under the right stabilizer (of 7U spacebar) and right Alt (if 6.25U spacebar). - - RGB_BACKLIGHT_USE_ISO_ENTER - -An ISO Enter is being used. Only used to tweak the location of the LED being used under ANSI Enter/backslash - - RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS - -Disables the LEDs under HHKB corner blockers, useful for transparent cases. diff --git a/keyboards/zeal60/rgb_backlight.c b/keyboards/zeal60/rgb_backlight.c deleted file mode 100644 index a3f7151bf5..0000000000 --- a/keyboards/zeal60/rgb_backlight.c +++ /dev/null @@ -1,2196 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#if RGB_BACKLIGHT_ENABLED - -#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) || defined(RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) -#else -#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU, RGB_BACKLIGHT_HS60, RGB_BACKLIGHT_NK65 -#endif - -#ifndef MAX - #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) -#endif - -#ifndef MIN - #define MIN(a,b) ((a) < (b)? (a): (b)) -#endif - -#include "quantum.h" -#include "rgb_backlight.h" -#include "rgb_backlight_api.h" -#include "rgb_backlight_keycodes.h" - -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) -#include -#include -#include -#include "drivers/avr/i2c_master.h" -#else -#include "ch.h" -#include "hal.h" -#include "drivers/arm/i2c_master.h" -#include "tmk_core/common/eeprom.h" -#endif -#include "progmem.h" -#include "quantum/color.h" - -#if defined(RGB_BACKLIGHT_M6_B) -#include "drivers/issi/is31fl3218.h" -#define BACKLIGHT_LED_COUNT 6 -#elif defined(RGB_BACKLIGHT_HS60) -#include "drivers/issi/is31fl3733.h" -#define BACKLIGHT_LED_COUNT 64 -#elif defined(RGB_BACKLIGHT_NK65) -#include "drivers/issi/is31fl3733.h" -#define BACKLIGHT_LED_COUNT 69 -#else -#include "drivers/issi/is31fl3731.h" -#define BACKLIGHT_LED_COUNT 72 -#endif - -#define BACKLIGHT_EFFECT_MAX 10 - -backlight_config g_config = { - .use_split_backspace = RGB_BACKLIGHT_USE_SPLIT_BACKSPACE, - .use_split_left_shift = RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT, - .use_split_right_shift = RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT, - .use_7u_spacebar = RGB_BACKLIGHT_USE_7U_SPACEBAR, - .use_iso_enter = RGB_BACKLIGHT_USE_ISO_ENTER, - .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, - .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, - .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, - .brightness = RGB_BACKLIGHT_BRIGHTNESS, - .effect = RGB_BACKLIGHT_EFFECT, - .effect_speed = RGB_BACKLIGHT_EFFECT_SPEED, - .color_1 = RGB_BACKLIGHT_COLOR_1, - .color_2 = RGB_BACKLIGHT_COLOR_2, - .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR, - .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR, - .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR, - .layer_3_indicator = RGB_BACKLIGHT_LAYER_3_INDICATOR, - .alphas_mods = { - RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_2, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_3, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, -#if defined(RGB_BACKLIGHT_M6_B) - .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } -#endif -}; - -bool g_suspend_state = false; -uint8_t g_indicator_state = 0; - -// Global tick at 20 Hz -uint32_t g_tick = 0; - -// Ticks since this key was last hit. -uint8_t g_key_hit[BACKLIGHT_LED_COUNT]; - -// Ticks since any key was last hit. -uint32_t g_any_key_hit = 0; - -#if defined(RGB_BACKLIGHT_HS60) - -// This is a 7-bit address, that gets left-shifted and bit 0 -// set to 0 for write, 1 for read (as per I2C protocol) -// ADDR_2 is not needed. it is here as a dummy -#define ISSI_ADDR_1 0x50 - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, //LA1 - {0, E_1, D_1, F_1}, //LA2 - {0, H_1, G_1, I_1}, //LA3 - {0, K_1, J_1, L_1}, //LA4 - {0, B_2, A_2, C_2}, //LA5 - {0, E_2, D_2, F_2}, //LA6 - {0, H_2, G_2, I_2}, //LA7 - {0, K_2, J_2, L_2}, //LA8 - {0, B_3, A_3, C_3}, //LA9 - {0, E_3, D_3, F_3}, //LA10 - {0, H_3, G_3, I_3}, //LA11 - {0, K_3, J_3, L_3}, //LA12 - {0, B_4, A_4, C_4}, //LA13 - {0, E_4, D_4, F_4}, //LA14 - {0, H_4, G_4, I_4}, //LA15 - {0, K_4, J_4, L_4}, //LA16 - {0, B_5, A_5, C_5}, //LA17 - {0, E_5, D_5, F_5}, //LA18 - {0, H_5, G_5, I_5}, //LA19 - {0, K_5, J_5, L_5}, //LA20 - {0, B_6, A_6, C_6}, //LA21 - {0, E_6, D_6, F_6}, //LA22 - {0, H_6, G_6, I_6}, //LA23 - {0, K_6, J_6, L_6}, //LA24 - {0, B_7, A_7, C_7}, //LA25 - {0, E_7, D_7, F_7}, //LA26 - {0, H_7, G_7, I_7}, //LA27 - {0, K_7, J_7, L_7}, //LA28 - {0, B_8, A_8, C_8}, //LA29 - {0, E_8, D_8, F_8}, //LA30 - {0, H_8, G_8, I_8}, //LA31 - {0, K_8, J_8, L_8}, //LA32 - {0, B_9, A_9, C_9}, //LA33 - {0, E_9, D_9, F_9}, //LA34 - {0, H_9, G_9, I_9}, //LA35 - {0, K_9, J_9, L_9}, //LA36 - {0, B_10, A_10, C_10}, //LA37 - {0, E_10, D_10, F_10}, //LA38 - {0, H_10, G_10, I_10}, //LA39 - {0, K_10, J_10, L_10}, //LA40 - {0, B_11, A_11, C_11}, //LA41 - {0, E_11, D_11, F_11}, //LA42 - {0, H_11, G_11, I_11}, //LA43 - {0, K_11, J_11, L_11}, //LA44 - {0, B_12, A_12, C_12}, //LA45 - {0, E_12, D_12, F_12}, //LA46 - {0, H_12, G_12, I_12}, //LA47 - {0, K_12, J_12, L_12}, //LA48 - {0, B_13, A_13, C_13}, //LA49 - {0, E_13, D_13, F_13}, //LA50 - {0, H_13, G_13, I_13}, //LA51 - {0, K_13, J_13, L_13}, //LA52 - {0, B_14, A_14, C_14}, //LA53 - {0, E_14, D_14, F_14}, //LA54 - {0, H_14, G_14, I_14}, //LA55 - {0, K_14, J_14, L_14}, //LA56 - {0, B_15, A_15, C_15}, //LA57 - {0, E_15, D_15, F_15}, //LA58 - {0, H_15, G_15, I_15}, //LA59 - {0, K_15, J_15, L_15}, //LA60 - {0, B_16, A_16, C_16}, //LA61 - {0, E_16, D_16, F_16}, //LA62 - {0, H_16, G_16, I_16}, //LA63 - {0, K_16, J_16, L_16}, //LA64 -}; - -#elif defined(RGB_BACKLIGHT_NK65) - -// This is a 7-bit address, that gets left-shifted and bit 0 -// set to 0 for write, 1 for read (as per I2C protocol) -// ADDR_2 is not needed. it is here as a dummy -#define ISSI_ADDR_1 0x50 -#define ISSI_ADDR_2 0x52 - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, //LA1 - {0, E_1, D_1, F_1}, //LA2 - {0, H_1, G_1, I_1}, //LA3 - {0, K_1, J_1, L_1}, //LA4 - {0, B_2, A_2, C_2}, //LA5 - {0, E_2, D_2, F_2}, //LA6 - {0, H_2, G_2, I_2}, //LA7 - {0, K_2, J_2, L_2}, //LA8 - {0, B_3, A_3, C_3}, //LA9 - {0, E_3, D_3, F_3}, //LA10 - {0, H_3, G_3, I_3}, //LA11 - {0, K_3, J_3, L_3}, //LA12 - {0, B_4, A_4, C_4}, //LA13 - {0, E_4, D_4, F_4}, //LA14 - {0, H_4, G_4, I_4}, //LA15 - {0, K_4, J_4, L_4}, //LA16 - {0, B_5, A_5, C_5}, //LA17 - {0, E_5, D_5, F_5}, //LA18 - {0, H_5, G_5, I_5}, //LA19 - {0, K_5, J_5, L_5}, //LA20 - {0, B_6, A_6, C_6}, //LA21 - {0, E_6, D_6, F_6}, //LA22 - {0, H_6, G_6, I_6}, //LA23 - {0, K_6, J_6, L_6}, //LA24 - {0, B_7, A_7, C_7}, //LA25 - {0, E_7, D_7, F_7}, //LA26 - {0, H_7, G_7, I_7}, //LA27 - {0, K_7, J_7, L_7}, //LA28 - {0, B_8, A_8, C_8}, //LA29 - {0, E_8, D_8, F_8}, //LA30 - {0, H_8, G_8, I_8}, //LA31 - {0, K_8, J_8, L_8}, //LA32 - {0, B_9, A_9, C_9}, //LA33 - {0, E_9, D_9, F_9}, //LA34 - {0, H_9, G_9, I_9}, //LA35 - {0, K_9, J_9, L_9}, //LA36 - {0, B_10, A_10, C_10}, //LA37 - {0, E_10, D_10, F_10}, //LA38 - {0, H_10, G_10, I_10}, //LA39 - {0, K_10, J_10, L_10}, //LA40 - {0, B_11, A_11, C_11}, //LA41 - {0, E_11, D_11, F_11}, //LA42 - {0, H_11, G_11, I_11}, //LA43 - {0, K_11, J_11, L_11}, //LA44 - {0, B_12, A_12, C_12}, //LA45 - {0, E_12, D_12, F_12}, //LA46 - {0, H_12, G_12, I_12}, //LA47 - {0, K_12, J_12, L_12}, //LA48 - {0, B_13, A_13, C_13}, //LA49 - {0, E_13, D_13, F_13}, //LA50 - {0, H_13, G_13, I_13}, //LA51 - {0, K_13, J_13, L_13}, //LA52 - {0, B_14, A_14, C_14}, //LA53 - {0, E_14, D_14, F_14}, //LA54 - {0, H_14, G_14, I_14}, //LA55 - {0, K_14, J_14, L_14}, //LA56 - {0, B_15, A_15, C_15}, //LA57 - {0, E_15, D_15, F_15}, //LA58 - {0, H_15, G_15, I_15}, //LA59 - {0, K_15, J_15, L_15}, //LA60 - {0, B_16, A_16, C_16}, //LA61 - {0, E_16, D_16, F_16}, //LA62 - {0, H_16, G_16, I_16}, //LA63 - {0, K_16, J_16, L_16}, //LA64 - - {1, B_1, A_1, C_1}, //LB1 - {1, E_1, D_1, F_1}, //LB2 - {1, H_1, G_1, I_1}, //LB3 - {1, K_1, J_1, L_1}, //LB4 - {1, B_2, A_2, C_2}, //LB5 - {1, E_2, D_2, F_2}, //LB6 - {1, H_2, G_2, I_2}, //LB7 - {1, K_2, J_2, L_2}, //LB8 - {1, B_3, A_3, C_3}, //LB9 - {1, E_3, D_3, F_3}, //LB10 - {1, H_3, G_3, I_3}, //LB11 - {1, K_3, J_3, L_3}, //LB12 - {1, B_4, A_4, C_4}, //LB13 - {1, E_4, D_4, F_4}, //LB14 - {1, H_4, G_4, I_4}, //LB15 - {1, K_4, J_4, L_4}, //LB16 - {1, B_5, A_5, C_5}, //LB17 - {1, E_5, D_5, F_5}, //LB18 - {1, H_5, G_5, I_5}, //LB19 - {1, K_5, J_5, L_5}, //LB20 - {1, B_6, A_6, C_6}, //LB21 - {1, E_6, D_6, F_6}, //LB22 - {1, H_6, G_6, I_6}, //LB23 - {1, K_6, J_6, L_6}, //LB24 - {1, B_7, A_7, C_7}, //LB25 - {1, E_7, D_7, F_7}, //LB26 - {1, H_7, G_7, I_7}, //LB27 - {1, K_7, J_7, L_7}, //LB28 - {1, B_8, A_8, C_8}, //LB29 - {1, E_8, D_8, F_8}, //LB30 - {1, H_8, G_8, I_8}, //LB31 - {1, K_8, J_8, L_8}, //LB32 - {1, B_9, A_9, C_9}, //LB33 - {1, E_9, D_9, F_9}, //LB34 - {1, H_9, G_9, I_9}, //LB35 - {1, K_9, J_9, L_9}, //LB36 - {1, B_10, A_10, C_10}, //LB37 - {1, E_10, D_10, F_10}, //LB38 - {1, H_10, G_10, I_10}, //LB39 - {1, K_10, J_10, L_10}, //LB40 - {1, B_11, A_11, C_11}, //LB41 - {1, E_11, D_11, F_11}, //LB42 - {1, H_11, G_11, I_11}, //LB43 - {1, K_11, J_11, L_11}, //LB44 - {1, B_12, A_12, C_12}, //LB45 - {1, E_12, D_12, F_12}, //LB46 - {1, H_12, G_12, I_12}, //LB47 - {1, K_12, J_12, L_12}, //LB48 - {1, B_13, A_13, C_13}, //LB49 - {1, E_13, D_13, F_13}, //LB50 - {1, H_13, G_13, I_13}, //LB51 - {1, K_13, J_13, L_13}, //LB52 - {1, B_14, A_14, C_14}, //LB53 - {1, E_14, D_14, F_14}, //LB54 - {1, H_14, G_14, I_14}, //LB55 - {1, K_14, J_14, L_14}, //LB56 - {1, B_15, A_15, C_15}, //LB57 - {1, E_15, D_15, F_15}, //LB58 - {1, H_15, G_15, I_15}, //LB59 - {1, K_15, J_15, L_15}, //LB60 - {1, B_16, A_16, C_16}, //LB61 - {1, E_16, D_16, F_16}, //LB62 - {1, H_16, G_16, I_16}, //LB63 - {1, K_16, J_16, L_16}, //LB64 -}; - -#elif !defined(RGB_BACKLIGHT_M6_B) -// This is a 7-bit address, that gets left-shifted and bit 0 -// set to 0 for write, 1 for read (as per I2C protocol) -#define ISSI_ADDR_1 0x74 -#define ISSI_ADDR_2 0x76 - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C2_1, C3_1, C4_1}, // LA0 - {0, C1_1, C3_2, C4_2}, // LA1 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_8, C2_8, C3_8}, // LA8 - {0, C9_1, C8_1, C7_1}, // LA9 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_7, C8_7, C6_6}, // LA15 - {0, C9_8, C7_7, C6_7}, // LA16 - {0, C8_8, C7_8, C6_8}, // LA17 - - {0, C2_9, C3_9, C4_9}, // LB0 - {0, C1_9, C3_10, C4_10}, // LB1 - {0, C1_10, C2_10, C4_11}, // LB2 - {0, C1_11, C2_11, C3_11}, // LB3 - {0, C1_12, C2_12, C3_12}, // LB4 - {0, C1_13, C2_13, C3_13}, // LB5 - {0, C1_14, C2_14, C3_14}, // LB6 - {0, C1_15, C2_15, C3_15}, // LB7 - {0, C1_16, C2_16, C3_16}, // LB8 - {0, C9_9, C8_9, C7_9}, // LB9 - {0, C9_10, C8_10, C7_10}, // LB10 - {0, C9_11, C8_11, C7_11}, // LB11 - {0, C9_12, C8_12, C7_12}, // LB12 - {0, C9_13, C8_13, C7_13}, // LB13 - {0, C9_14, C8_14, C7_14}, // LB14 - {0, C9_15, C8_15, C6_14}, // LB15 - {0, C9_16, C7_15, C6_15}, // LB16 - {0, C8_16, C7_16, C6_16}, // LB17 - - {1, C2_1, C3_1, C4_1}, // LC0 - {1, C1_1, C3_2, C4_2}, // LC1 - {1, C1_2, C2_2, C4_3}, // LC2 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_5, C2_5, C3_5}, // LC5 - {1, C1_6, C2_6, C3_6}, // LC6 - {1, C1_7, C2_7, C3_7}, // LC7 - {1, C1_8, C2_8, C3_8}, // LC8 - {1, C9_1, C8_1, C7_1}, // LC9 - {1, C9_2, C8_2, C7_2}, // LC10 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_5, C8_5, C7_5}, // LC13 - {1, C9_6, C8_6, C7_6}, // LC14 - {1, C9_7, C8_7, C6_6}, // LC15 - {1, C9_8, C7_7, C6_7}, // LC16 - {1, C8_8, C7_8, C6_8}, // LC17 - - {1, C2_9, C3_9, C4_9}, // LD0 - {1, C1_9, C3_10, C4_10}, // LD1 - {1, C1_10, C2_10, C4_11}, // LD2 - {1, C1_11, C2_11, C3_11}, // LD3 - {1, C1_12, C2_12, C3_12}, // LD4 - {1, C1_13, C2_13, C3_13}, // LD5 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_16, C2_16, C3_16}, // LD8 - {1, C9_9, C8_9, C7_9}, // LD9 - {1, C9_10, C8_10, C7_10}, // LD10 - {1, C9_11, C8_11, C7_11}, // LD11 - {1, C9_12, C8_12, C7_12}, // LD12 - {1, C9_13, C8_13, C7_13}, // LD13 - {1, C9_14, C8_14, C7_14}, // LD14 - {1, C9_15, C8_15, C6_14}, // LD15 - {1, C9_16, C7_15, C6_15}, // LD16 - {1, C8_16, C7_16, C6_16}, // LD17 -}; -#endif // !defined(RGB_BACKLIGHT_M6_B) - - -typedef struct Point { - uint8_t x; - uint8_t y; -} Point; - - -// index in range 0..71 (LA0..LA17, LB0..LB17, LC0..LC17, LD0..LD17) -// point values in range x=0..224 y=0..64 -// origin is center of top-left key (i.e Esc) -#if defined(RGB_BACKLIGHT_ZEAL65) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {240,0}, {240,16}, {240,32}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, - // LC0..LC17 - {96,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {255,255}, {48,60}, {28,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,44}, {10,48}, {4,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {144,60}, {164,64}, {188,64}, {208,64} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, - {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, - // LB0..LB17 - {56,255}, {51,255}, {46,255}, {42,255}, {37,255}, {35,255}, {32,255}, {19,255}, {0,255}, - {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, - // LC0..LC17 - {184,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {255,255}, {167,255}, {165,255}, - {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {145,233}, {148,255}, {161,255}, - // LD0..LD17 - {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, - {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {201,228}, {206,255}, {213,255}, {218,255} -}; -#elif defined(RGB_BACKLIGHT_KOYU) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {240,0}, {240,16}, {240,32}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, - // LC0..LC17 - {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, - {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, - // LB0..LB17 - {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {32,255}, {19,255}, {0,255}, - {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, - // LC0..LC17 - {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, - {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, - // LD0..LD17 - {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, - {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} -}; -#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {255,255}, {255,255}, {255,255}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, - // LC0..LC17 - {102,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {60,64}, {43,64}, {23,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,48}, {2,48}, {3,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {210,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {144,64}, {161,64}, {181,64}, {201,64}, {221,64} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, {58,255}, - {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, - // LB0..LB17 - {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,255}, {255,255}, {255,255}, - {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, - // LC0..LC17 - {188,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {172,252}, {170,255}, {165,255}, - {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {150,244}, {147,255}, {161,255}, - // LD0..LD17 - {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, - {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} -}; -#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_ANSI) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA47 - {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, - {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, - {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, - {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, - {255,255},// LA48 does not exist, dummy - // LA49..LA50 - {192,0}, {200,16}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {210,48}, {216,0}, {220,16}, {214,32}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, - {255,255},// LA61 does not exit, dummy - {162,64}, {182,64}, {202,64} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA47 - {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, - {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, - {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, - {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, - {255,255},// LA48 does not exist, dummy - // LA49..LA50 - {39,255}, {23,238}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, - {255,255},// LA61 does not exit, dummy - {209,255}, {215,255}, {220,255} -}; -#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_HHKB) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA60 - {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, - {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, - {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, - {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, - {224,0}, {192,0}, {200,16}, {202,48}, {224,48}, {208,0}, {220,16}, {214,32}, {220,64}, {4,64}, {24,64}, {44,64}, {112,64}, - {255,255}, {255,255}, // LA61..LA62 does not exit, dummy - // LA63..LA64 - {180,64}, {200,64} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA60 - {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, - {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, - {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, - {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {32,255}, - {39,255}, {23,238}, {233,242}, {237,255}, {35,255}, {19,255}, {255,233}, {223,255}, {161,255}, {165,255}, {170,255}, {192,255}, - {255,255}, {255,255}, // LA61..LA62 does not exit, dummy - // LA63..LA64 - {214,255}, {219,255} -}; -#elif defined(RGB_BACKLIGHT_HS60) //HS60_ISO -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA50 - {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, - {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, - {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, - {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {210,48}, {216,0}, {220,16}, {222,24}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, - {255,255},// LA61 does not exit, dummy - {162,64}, {182,64}, {202,64} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA50 - {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, - {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, - {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, - {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {235,255}, {33,255}, {19,255}, {10,255}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, - {255,255},// LA61 does not exit, dummy - {209,255}, {215,255}, {220,255} -}; -#elif defined(RGB_BACKLIGHT_NK65) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA60 - {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, - {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, - {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, - {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, - {160,64}, {192,0}, {200,16}, {210,48}, {224,48}, {216,0}, {220,16}, {214,32}, {224,64}, {2,64}, {22,64}, {42,64}, {102,64}, - {255,255},// LA61 does not exit, dummy - //LA62..LB5 - {176,64}, {192,64}, {208,64}, {240,0}, {240,16}, {240,48}, {240,64}, {240,32} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA60 - {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, - {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, - {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, - {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, - {208,255}, {39,255}, {23,238}, {235,255}, {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, - {255,255},// LA61 does not exit, dummy - //LA62..LB5 - {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255}, -}; -#elif defined(RGB_BACKLIGHT_M6_B) -// M6-B is really simple: -// 0 3 5 -// 1 2 4 -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - {0,0}, {0,16}, {16,16}, {16,0}, {32,16}, {32,0} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} -}; -#endif - -// This may seem counter-intuitive, but it's quite flexible. -// For each LED, get it's position to decide what color to make it. -// This solves the issue of LEDs (and switches) not aligning to a grid, -// or having a large "bitmap" and sampling them. -void map_led_to_point( uint8_t index, Point *point ) -{ - // Slightly messy way to get Point structs out of progmem. - uint8_t *addr = (uint8_t*)&g_map_led_to_point[index]; - point->x = pgm_read_byte(addr); - point->y = pgm_read_byte(addr+1); - -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) - return; -#endif - - switch (index) - { - case 18+4: // LB4A - if ( g_config.use_split_backspace ) - point->x -= 8; - break; -#if defined(RGB_BACKLIGHT_ZEAL60) - case 18+14: // LB14A - if ( g_config.use_iso_enter ) - point->y += 8; // extremely pedantic - break; - case 54+5: // LD5A - if ( !g_config.use_iso_enter ) - point->x -= 10; - break; - case 36+16: // LC16A - if ( !g_config.use_split_left_shift ) - point->x += 8; - break; -#endif -#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) - case 36+0: // LC0A - if ( g_config.use_7u_spacebar ) - point->x += 10; - break; - case 36+6: // LC6A - if ( g_config.use_7u_spacebar ) - point->x += 4; - break; - case 54+7: // LD7A - if ( !g_config.use_split_right_shift ) - point->x -= 8; - break; -#endif - } -} - -void map_led_to_point_polar( uint8_t index, Point *point ) -{ - // Slightly messy way to get Point structs out of progmem. - uint8_t *addr = (uint8_t*)&g_map_led_to_point_polar[index]; - point->x = pgm_read_byte(addr); - point->y = pgm_read_byte(addr+1); -} - -// -// Maps switch matrix coordinate (row,col) to LED index -// - - -#if defined(RGB_BACKLIGHT_ZEAL65) -// Note: Left spacebar stab is at 4,2 (LC7) -// Right spacebar stab is at 4,9 (D14) -// -// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B6 -// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B7 -// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B8 -// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 -// C17, C8, C7, ---, ---, ---, ---, C0, ---, D14, D15, D16, D17, B17, B16 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, - { 36+17, 36+8, 36+7, 255, 255, 255, 255, 36+0, 255, 54+14, 54+15, 54+16, 54+17, 18+17, 18+16 } -}; -#elif defined(RGB_BACKLIGHT_KOYU) -// Note: Left spacebar stab is at 4,4 (LC6) -// Right spacebar stab is at 4,10 (D14) -// -// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B6 -// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B7 -// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B8 -// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 -// C17, C8, C7, C6, ---, ---, ---, C0, ---, ---, D14, D15, D16, B17, B16 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, - { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } -}; -#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) -// Note: Left spacebar stab is at 4,3 (LC6) -// Right spacebar stab is at 4,9 (LD13) or 4,10 (LD14) -// -// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, -// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, -// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, -// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, -// C17, C8, C7, C6, ---, ---, ---, C0, ---, D13, D14, D15, D16, D17, -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, - { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } -}; -#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_ANSI) -// -// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, -// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, -// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, -// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, -// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } -}; -#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_HHKB) -// -// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, -// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, LA48, -// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, -// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, -// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, ---, LA63, LA64, LA56 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 48-1 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 63-1, 64-1, 56-1 } -}; -#elif defined(RGB_BACKLIGHT_HS60) //HS60_ISO -// -// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, -// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, -// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, -// LA4, LA48, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, -// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } -}; -#elif defined(RGB_BACKLIGHT_NK65) -// -// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1, -// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2, -// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, LB5, -// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, LB3, -// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, LA48, LA62, LA63, LA64, LA56, LB4 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1, 1+64-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255, 2+64-1 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1, 5+64-1 }, - { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1, 3+64-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 48-1, 62-1, 63-1, 64-1, 56-1, 4+64-1 } -}; -#elif defined(RGB_BACKLIGHT_M6_B) -// M6-B is really simple: -// 0 3 5 -// 1 2 4 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0, 3, 5, 1, 2, 4 } -}; -#endif - -void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led ) -{ - *led = 255; - if ( row < MATRIX_ROWS && column < MATRIX_COLS ) - { - *led = pgm_read_byte(&g_map_row_column_to_led[row][column]); - } -} - -void backlight_update_pwm_buffers(void) -{ -#if defined(RGB_BACKLIGHT_M6_B) - IS31FL3218_update_pwm_buffers(); -#elif defined(RGB_BACKLIGHT_HS60) - IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); - IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); -#elif defined(RGB_BACKLIGHT_NK65) - IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); - IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); - IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); - IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); -#else - IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); - IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); -#endif -} - -void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) -{ -#if defined(RGB_BACKLIGHT_M6_B) - IS31FL3218_set_color( index, red, green, blue ); -#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) - IS31FL3733_set_color( index, red, green, blue ); -#else - IS31FL3731_set_color( index, red, green, blue ); -#endif -} - -void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) -{ -#if defined(RGB_BACKLIGHT_M6_B) - IS31FL3218_set_color_all( red, green, blue ); -#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) - IS31FL3733_set_color_all( red, green, blue ); -#else - IS31FL3731_set_color_all( red, green, blue ); -#endif -} - -void backlight_set_key_hit(uint8_t row, uint8_t column) -{ - uint8_t led; - map_row_column_to_led(row,column,&led); - g_key_hit[led] = 0; - - g_any_key_hit = 0; -} - -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) -// This is (F_CPU/1024) / 20 Hz -// = 15625 Hz / 20 Hz -// = 781 -#define TIMER3_TOP 781 - -void backlight_timer_init(void) -{ - static uint8_t backlight_timer_is_init = 0; - if ( backlight_timer_is_init ) - { - return; - } - backlight_timer_is_init = 1; - - // Timer 3 setup - TCCR3B = _BV(WGM32) | // CTC mode OCR3A as TOP - _BV(CS32) | _BV(CS30); // prescale by /1024 - // Set TOP value - uint8_t sreg = SREG; - cli(); - - OCR3AH = (TIMER3_TOP >> 8) & 0xff; - OCR3AL = TIMER3_TOP & 0xff; - SREG = sreg; -} - -void backlight_timer_enable(void) -{ - TIMSK3 |= _BV(OCIE3A); -} - -void backlight_timer_disable(void) -{ - TIMSK3 &= ~_BV(OCIE3A); -} -#else //STM32, use GPT with TIM4. Enable in halconf.h -static void gpt_backlight_timer_task(GPTDriver *gptp); -// Timer setup at 200Khz, callback at 10k ticks = 20Hz -static GPTConfig gpt4cfg1 = { - .frequency = 200000U, - .callback = gpt_backlight_timer_task -}; - -void backlight_timer_init(void) -{ - gptStart(&GPTD4, &gpt4cfg1); -} - -void backlight_timer_enable(void) -{ - gptStartContinuous(&GPTD4, 10000); -} - -void backlight_timer_disable(void) -{ - gptStopTimer(&GPTD4); -} -#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) - -void backlight_set_suspend_state(bool state) -{ - g_suspend_state = state; -} - -void backlight_set_indicator_state(uint8_t state) -{ - g_indicator_state = state; -} - -void backlight_effect_rgb_test(void) -{ - // Mask out bits 4 and 5 - // This 2-bit value will stay the same for 16 ticks. - switch ( (g_tick & 0x30) >> 4 ) - { - case 0: - { - backlight_set_color_all( 255, 0, 0 ); - break; - } - case 1: - { - backlight_set_color_all( 0, 255, 0 ); - break; - } - case 2: - { - backlight_set_color_all( 0, 0, 255 ); - break; - } - case 3: - { - backlight_set_color_all( 255, 255, 255 ); - break; - } - } -} - -#if defined(RGB_DEBUGGING_ONLY) -// This tests the LEDs -// Note that it will change the LED control registers -// in the LED drivers, and leave them in an invalid -// state for other backlight effects. -// ONLY USE THIS FOR TESTING LEDS! -void backlight_effect_single_LED_test(void) -{ - static uint8_t color = 0; // 0,1,2 for R,G,B - static uint8_t row = 0; - static uint8_t column = 0; - - static uint8_t tick = 0; - tick++; - - if ( tick > 2 ) - { - tick = 0; - column++; - } - if ( column > 14 ) - { - column = 0; - row++; - } - if ( row > 4 ) - { - row = 0; - color++; - } - if ( color > 2 ) - { - color = 0; - } - - uint8_t led; - map_row_column_to_led( row, column, &led ); - backlight_set_color_all( 255, 255, 255 ); - backlight_test_led( led, color==0, color==1, color==2 ); -} -#endif // defined(RGB_DEBUGGING_ONLY) - -// All LEDs off -void backlight_effect_all_off(void) -{ - backlight_set_color_all( 0, 0, 0 ); -} - -// Solid color -void backlight_effect_solid_color(void) -{ - HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; - RGB rgb = hsv_to_rgb( hsv ); - backlight_set_color_all( rgb.r, rgb.g, rgb.b ); -} - -// alphas = color1, mods = color2 -void backlight_effect_alphas_mods(void) -{ - RGB rgb1 = hsv_to_rgb( (HSV){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } ); - RGB rgb2 = hsv_to_rgb( (HSV){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } ); - - for ( int row = 0; row < MATRIX_ROWS; row++ ) - { - for ( int column = 0; column < MATRIX_COLS; column++ ) - { - uint8_t index; - map_row_column_to_led( row, column, &index ); - if ( index < BACKLIGHT_LED_COUNT ) - { - if ( ( g_config.alphas_mods[row] & (1< 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - // Divide delta by 4, this gives the delta per row - deltaH /= 4; - - int16_t s1 = g_config.color_1.s; - int16_t s2 = g_config.color_2.s; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; - RGB rgb; - Point point; - for ( int i=0; i>4); - // Relies on hue being 8-bit and wrapping - hsv.h = g_config.color_1.h + ( deltaH * y ); - hsv.s = g_config.color_1.s + ( deltaS * y ); - rgb = hsv_to_rgb( hsv ); - backlight_set_color( i, rgb.r, rgb.g, rgb.b ); - } -} - -void backlight_effect_raindrops(bool initialize) -{ - int16_t h1 = g_config.color_1.h; - int16_t h2 = g_config.color_2.h; - int16_t deltaH = h2 - h1; - deltaH /= 4; - - // Take the shortest path between hues - if ( deltaH > 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - - int16_t s1 = g_config.color_1.s; - int16_t s2 = g_config.color_2.s; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv; - RGB rgb; - - // Change one LED every tick - uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; - - for ( int i=0; i> 2; - hsv.h = g_config.color_1.h + offset2; - hsv.s = 127 + ( point.y >> 1 ); - rgb = hsv_to_rgb( hsv ); - backlight_set_color( i, rgb.r, rgb.g, rgb.b ); - } -} - -#if defined(RGB_BACKLIGHT_M6_B) -void backlight_effect_custom_colors(void) -{ - RGB rgb; - for ( uint8_t i = 0; i < 6; i++ ) - { - HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; - rgb = hsv_to_rgb( hsv ); - uint8_t led; - map_row_column_to_led( 0, i, &led ); - backlight_set_color( led, rgb.r, rgb.g, rgb.b ); - } -} -#endif - -void backlight_effect_indicators_set_colors( uint8_t index, HS color ) -{ - HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; - RGB rgb = hsv_to_rgb( hsv ); - if ( index == 254 ) - { - backlight_set_color_all( rgb.r, rgb.g, rgb.b ); - } - else - { - backlight_set_color( index, rgb.r, rgb.g, rgb.b ); - - // If the spacebar LED is the indicator, - // do the same for the spacebar stabilizers - if ( index == 36+0 ) // LC0 - { -#if defined(RGB_BACKLIGHT_ZEAL65) - backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined(RGB_BACKLIGHT_KOYU) - backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) - backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 - backlight_set_color( 54+13, rgb.r, rgb.g, rgb.b ); // LD13 - if ( g_config.use_7u_spacebar ) - { - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 - } -#endif - } - } -} - -// This runs after another backlight effect and replaces -// colors already set -void backlight_effect_indicators(void) -{ - if ( g_config.caps_lock_indicator.index != 255 && - ( g_indicator_state & (1< 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); - uint8_t effect = suspend_backlight ? 0 : g_config.effect; - - // Keep track of the effect used last time, - // detect change in effect, so each effect can - // have an optional initialization. - static uint8_t effect_last = 255; - bool initialize = effect != effect_last; - effect_last = effect; - - // this gets ticked at 20 Hz. - // each effect can opt to do calculations - // and/or request PWM buffer updates. - switch ( effect ) - { - case 0: - backlight_effect_all_off(); - break; - case 1: - backlight_effect_solid_color(); - break; - case 2: -#if defined(RGB_BACKLIGHT_M6_B) - backlight_effect_custom_colors(); -#else - backlight_effect_alphas_mods(); -#endif - break; - case 3: - backlight_effect_gradient_up_down(); - break; - case 4: - backlight_effect_raindrops( initialize ); - break; - case 5: - backlight_effect_cycle_all(); - break; - case 6: - backlight_effect_cycle_left_right(); - break; - case 7: - backlight_effect_cycle_up_down(); - break; - case 8: - backlight_effect_jellybean_raindrops( initialize ); - break; - case 9: - backlight_effect_cycle_radial1(); - break; - case 10: - backlight_effect_cycle_radial2(); - break; - default: - backlight_effect_all_off(); - break; - } - - if ( ! suspend_backlight ) - { -#if !defined(RGB_BACKLIGHT_M6_B) - backlight_effect_indicators(); -#endif - } -} - -void backlight_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) -{ - if ( row >= MATRIX_ROWS ) - { - // Special value, 255=none, 254=all - *index = row; - } - else - { - map_row_column_to_led( row, column, index ); - } -} - -void backlight_get_indicator_row_col( uint8_t index, uint8_t *row, uint8_t *column ) -{ - if ( index == 255 || index == 254 ) - { - // Special value, 255=none, 254=all - *row = index; - *column = 0; - return; - } - for ( uint8_t r = 0; r < MATRIX_ROWS; r++ ) - { - for ( uint8_t c = 0; c < MATRIX_COLS; c++ ) - { - uint8_t i = 255; - map_row_column_to_led( r, c, &i ); - if ( i == index ) - { - *row = r; - *column = c; - return; - } - } - } -} - -// Some helpers for setting/getting HSV -void _set_color( HS *color, uint8_t *data ) -{ - color->h = data[0]; - color->s = data[1]; -} - -void _get_color( HS *color, uint8_t *data ) -{ - data[0] = color->h; - data[1] = color->s; -} - -void backlight_config_set_value( uint8_t *data ) -{ - bool reinitialize = false; - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - switch ( *value_id ) - { -#if defined (RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) - case id_use_split_backspace: - { - g_config.use_split_backspace = (bool)*value_data; - reinitialize = true; - break; - } -#endif -#if defined (RGB_BACKLIGHT_ZEAL60) - case id_use_split_left_shift: - { - g_config.use_split_left_shift = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_split_right_shift: - { - g_config.use_split_right_shift = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_7u_spacebar: - { - g_config.use_7u_spacebar = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_iso_enter: - { - g_config.use_iso_enter = (bool)*value_data; - reinitialize = true; - break; - } - case id_disable_hhkb_blocker_leds: - { - g_config.disable_hhkb_blocker_leds = (bool)*value_data; - reinitialize = true; - break; - } -#endif - case id_disable_when_usb_suspended: - { - g_config.disable_when_usb_suspended = (bool)*value_data; - break; - } - case id_disable_after_timeout: - { - g_config.disable_after_timeout = *value_data; - break; - } - case id_brightness: - { - g_config.brightness = *value_data; - break; - } - case id_effect: - { - g_config.effect = *value_data; - break; - } - case id_effect_speed: - { - g_config.effect_speed = *value_data; - break; - } - case id_color_1: - { - _set_color( &(g_config.color_1), value_data ); - break; - } - case id_color_2: - { - _set_color( &(g_config.color_2), value_data ); - break; - } - case id_caps_lock_indicator_color: - { - _set_color( &(g_config.caps_lock_indicator.color), value_data ); - break; - } - case id_caps_lock_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.caps_lock_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_1_indicator_color: - { - _set_color( &(g_config.layer_1_indicator.color), value_data ); - break; - } - case id_layer_1_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_1_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_2_indicator_color: - { - _set_color( &(g_config.layer_2_indicator.color), value_data ); - break; - } - case id_layer_2_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_2_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_3_indicator_color: - { - _set_color( &(g_config.layer_3_indicator.color), value_data ); - break; - } - case id_layer_3_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_3_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_alphas_mods: - { - for ( int i=0; i<5; i++ ) - { - g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); - } - } -#if defined(RGB_BACKLIGHT_M6_B) - case id_custom_color: - { - uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) - { - _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); - } - } -#endif - } - - if ( reinitialize ) - { - backlight_init_drivers(); - } -} - -void backlight_config_get_value( uint8_t *data ) -{ - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - switch ( *value_id ) - { - case id_use_split_backspace: - { - *value_data = ( g_config.use_split_backspace ? 1 : 0 ); - break; - } - case id_use_split_left_shift: - { - *value_data = ( g_config.use_split_left_shift ? 1 : 0 ); - break; - } - case id_use_split_right_shift: - { - *value_data = ( g_config.use_split_right_shift ? 1 : 0 ); - break; - } - case id_use_7u_spacebar: - { - *value_data = ( g_config.use_7u_spacebar ? 1 : 0 ); - break; - } - case id_use_iso_enter: - { - *value_data = ( g_config.use_iso_enter ? 1 : 0 ); - break; - } - case id_disable_when_usb_suspended: - { - *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); - break; - } - case id_disable_hhkb_blocker_leds: - { - *value_data = ( g_config.disable_hhkb_blocker_leds ? 1 : 0 ); - break; - } - case id_disable_after_timeout: - { - *value_data = g_config.disable_after_timeout; - break; - } - case id_brightness: - { - *value_data = g_config.brightness; - break; - } - case id_effect: - { - *value_data = g_config.effect; - break; - } - case id_effect_speed: - { - *value_data = g_config.effect_speed; - break; - } - case id_color_1: - { - _get_color( &(g_config.color_1), value_data ); - break; - } - case id_color_2: - { - _get_color( &(g_config.color_2), value_data ); - break; - } - case id_caps_lock_indicator_color: - { - _get_color( &(g_config.caps_lock_indicator.color), value_data ); - break; - } - case id_caps_lock_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.caps_lock_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_1_indicator_color: - { - _get_color( &(g_config.layer_1_indicator.color), value_data ); - break; - } - case id_layer_1_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_1_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_2_indicator_color: - { - _get_color( &(g_config.layer_2_indicator.color), value_data ); - break; - } - case id_layer_2_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_2_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_3_indicator_color: - { - _get_color( &(g_config.layer_3_indicator.color), value_data ); - break; - } - case id_layer_3_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_3_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_alphas_mods: - { - for ( int i=0; i<5; i++ ) - { - *(value_data+i*2) = g_config.alphas_mods[i] >> 8; - *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; - } - } -#if defined(RGB_BACKLIGHT_M6_B) - case id_custom_color: - { - uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) - { - _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); - } - } -#endif - } -} - -void backlight_config_set_alphas_mods( uint16_t *alphas_mods ) -{ - for ( int i=0; i<5; i++ ) - { - g_config.alphas_mods[i] = alphas_mods[i]; - } - - backlight_config_save(); -} - -void backlight_config_load(void) -{ - eeprom_read_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); -} - -void backlight_config_save(void) -{ - eeprom_update_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); -} - -void backlight_init_drivers(void) -{ - // Initialize I2C - i2c_init(); - -#if defined(RGB_BACKLIGHT_M6_B) - IS31FL3218_init(); -#elif defined(RGB_BACKLIGHT_HS60) - IS31FL3733_init( ISSI_ADDR_1, 0 ); - - for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) - { -#if defined(HS60_ANSI) - bool enabled = !( ( index == 48-1 ) || //LA48 - ( index == 51-1 ) || //LA51 - ( index == 61-1 ) ); //LA61 -#elif defined(HS60_HHKB) - bool enabled = !( ( index == 61-1 ) || //LA61 - ( index == 62-1 ) ); //LA62 -#else //HS60_ISO - bool enabled = !( ( index == 51-1 ) || //LA51 - ( index == 61-1 ) ); //LA61 -#endif - // This only caches it for later - IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); - } - // This actually updates the LED drivers - IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); -#elif defined(RGB_BACKLIGHT_NK65) - IS31FL3733_init( ISSI_ADDR_1, 0 ); - IS31FL3733_init( ISSI_ADDR_2, 0 ); - - for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) - { - bool enabled = !( ( index == 61-1 ) || //LA61 - ( index > 6+64-1 ) ); //LB7-LB64 - // This only caches it for later - IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); - } - IS31FL3733_set_led_control_register( 7+64-1, 0, 1, 0 ); //Enable LB7 green enable for indicators - // This actually updates the LED drivers - IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); - IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); -#else - IS31FL3731_init( ISSI_ADDR_1 ); - IS31FL3731_init( ISSI_ADDR_2 ); - - for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) - { - // OR the possible "disabled" cases together, then NOT the result to get the enabled state - // LC6 LD13 not present on Zeal65 -#if defined(RGB_BACKLIGHT_ZEAL65) - bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 - ( index == 36+6 ) || // LC6 - ( index == 54+13 ) ); // LD13 -#elif defined(RGB_BACKLIGHT_KOYU) - bool enabled = !( ( index == 36+15 ) || // LC15 - ( index == 54+13 ) || // LD13 - ( index == 54+17 ) ); // LD17 -#elif defined(RGB_BACKLIGHT_M60_A) - bool enabled = !( - // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A - ( index == 18+6 ) || // LB6 - ( index == 18+7 ) || // LB7 - ( index == 18+8 ) || // LB8 - ( index == 18+15 ) || // LB15 - ( index == 18+16 ) || // LB16 - ( index == 18+17 ) || // LB17 - // HHKB blockers (LC17, LD17) and ISO extra keys (LC15,LD13) not present on M60-A - ( index == 36+17 ) || // LC17 - ( index == 54+17 ) || // LD17 - ( index == 36+15 ) || // LC15 - ( index == 54+13 ) ); // LD13 -#elif defined(RGB_BACKLIGHT_ZEAL60) - // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 - bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 - ( index == 36+15 && !g_config.use_split_left_shift ) || // LC15 - ( index == 54+8 && !g_config.use_split_right_shift ) || // LD8 - ( index == 54+13 && g_config.use_7u_spacebar ) || // LD13 - ( index == 36+17 && g_config.disable_hhkb_blocker_leds ) || // LC17 - ( index == 54+17 && g_config.disable_hhkb_blocker_leds ) || // LD17 - ( index == 18+6 ) || // LB6 - ( index == 18+7 ) || // LB7 - ( index == 18+8 ) || // LB8 - ( index == 18+15 ) || // LB15 - ( index == 18+16 ) || // LB16 - ( index == 18+17 ) ); // LB17 -#endif - // This only caches it for later - IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); - } - // This actually updates the LED drivers - IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); -#endif // !defined(RGB_BACKLIGHT_M6_B) - - // TODO: put the 1 second startup delay here? - - // clear the key hits - for ( int led=0; ledevent.pressed ) - { - backlight_set_key_hit( record->event.key.row, record->event.key.col ); - } - - switch(keycode) - { - case BR_INC: - if (record->event.pressed) - { - backlight_brightness_increase(); - } - return false; - break; - case BR_DEC: - if (record->event.pressed) - { - backlight_brightness_decrease(); - } - return false; - break; - case EF_INC: - if (record->event.pressed) - { - backlight_effect_increase(); - } - return false; - break; - case EF_DEC: - if (record->event.pressed) - { - backlight_effect_decrease(); - } - return false; - break; - case ES_INC: - if (record->event.pressed) - { - backlight_effect_speed_increase(); - } - return false; - break; - case ES_DEC: - if (record->event.pressed) - { - backlight_effect_speed_decrease(); - } - return false; - break; - case H1_INC: - if (record->event.pressed) - { - backlight_color_1_hue_increase(); - } - return false; - break; - case H1_DEC: - if (record->event.pressed) - { - backlight_color_1_hue_decrease(); - } - return false; - break; - case S1_INC: - if (record->event.pressed) - { - backlight_color_1_sat_increase(); - } - return false; - break; - case S1_DEC: - if (record->event.pressed) - { - backlight_color_1_sat_decrease(); - break; - } - return false; - break; - case H2_INC: - if (record->event.pressed) - { - backlight_color_2_hue_increase(); - } - return false; - break; - case H2_DEC: - if (record->event.pressed) - { - backlight_color_2_hue_decrease(); - } - return false; - break; - case S2_INC: - if (record->event.pressed) - { - backlight_color_2_sat_increase(); - } - return false; - break; - case S2_DEC: - if (record->event.pressed) - { - backlight_color_2_sat_decrease(); - break; - } - return false; - break; - } - - return true; -} - -// Deals with the messy details of incrementing an integer -uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) -{ - int16_t new_value = value; - new_value += step; - return MIN( MAX( new_value, min ), max ); -} - -uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) -{ - int16_t new_value = value; - new_value -= step; - return MIN( MAX( new_value, min ), max ); -} - -void backlight_effect_increase(void) -{ - g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); - backlight_config_save(); -} - -void backlight_effect_decrease(void) -{ - g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); - backlight_config_save(); -} - -void backlight_effect_speed_increase(void) -{ - g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); - backlight_config_save(); -} - -void backlight_effect_speed_decrease(void) -{ - g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); - backlight_config_save(); -} - -void backlight_brightness_increase(void) -{ - g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_brightness_decrease(void) -{ - g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_1_hue_increase(void) -{ - g_config.color_1.h = increment( g_config.color_1.h, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_1_hue_decrease(void) -{ - g_config.color_1.h = decrement( g_config.color_1.h, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_1_sat_increase(void) -{ - g_config.color_1.s = increment( g_config.color_1.s, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_1_sat_decrease(void) -{ - g_config.color_1.s = decrement( g_config.color_1.s, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_2_hue_increase(void) -{ - g_config.color_2.h = increment( g_config.color_2.h, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_2_hue_decrease(void) -{ - g_config.color_2.h = decrement( g_config.color_2.h, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_2_sat_increase(void) -{ - g_config.color_2.s = increment( g_config.color_2.s, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_2_sat_decrease(void) -{ - g_config.color_2.s = decrement( g_config.color_2.s, 8, 0, 255 ); - backlight_config_save(); -} - -#if defined(RGB_DEBUGGING_ONLY) -void backlight_test_led( uint8_t index, bool red, bool green, bool blue ) -{ - for ( int i=0; i. - */ -#pragma once - -enum backlight_config_value -{ - id_use_split_backspace = 0x01, - id_use_split_left_shift = 0x02, - id_use_split_right_shift = 0x03, - id_use_7u_spacebar = 0x04, - id_use_iso_enter = 0x05, - id_disable_hhkb_blocker_leds = 0x06, - id_disable_when_usb_suspended = 0x07, - id_disable_after_timeout = 0x08, - id_brightness = 0x09, - id_effect = 0x0A, - id_effect_speed = 0x0B, - id_color_1 = 0x0C, - id_color_2 = 0x0D, - id_caps_lock_indicator_color = 0x0E, - id_caps_lock_indicator_row_col = 0x0F, - id_layer_1_indicator_color = 0x10, - id_layer_1_indicator_row_col = 0x11, - id_layer_2_indicator_color = 0x12, - id_layer_2_indicator_row_col = 0x13, - id_layer_3_indicator_color = 0x14, - id_layer_3_indicator_row_col = 0x15, - id_alphas_mods = 0x16, - id_custom_color = 0x17 -}; diff --git a/keyboards/zeal60/rgb_backlight_keycodes.h b/keyboards/zeal60/rgb_backlight_keycodes.h deleted file mode 100644 index ba7f03f89d..0000000000 --- a/keyboards/zeal60/rgb_backlight_keycodes.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -// This is hardcoded at 0x5F00 so it's well after keycode value SAFE_RANGE -enum backlight_keycodes { - BR_INC = 0x5F00, // backlight brightness increase - BR_DEC, // backlight brightness decrease - EF_INC, // backlight effect increase - EF_DEC, // backlight effect decrease - ES_INC, - ES_DEC, - H1_INC, - H1_DEC, - S1_INC, - S1_DEC, - H2_INC, - H2_DEC, - S2_INC, - S2_DEC -}; diff --git a/keyboards/zeal60/rules.mk b/keyboards/zeal60/rules.mk deleted file mode 100644 index 1327d88210..0000000000 --- a/keyboards/zeal60/rules.mk +++ /dev/null @@ -1,79 +0,0 @@ - - -# project specific files -SRC = rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section -BOOTLOADER = atmel-dfu - -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. -OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes - -LAYOUTS = 60_ansi 60_iso 60_hhkb 60_ansi_split_bs_rshift diff --git a/keyboards/zeal60/zeal60.c b/keyboards/zeal60/zeal60.c deleted file mode 100644 index 93f442f554..0000000000 --- a/keyboards/zeal60/zeal60.c +++ /dev/null @@ -1,376 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#include "zeal60.h" -#include "zeal60_api.h" - -// Check that no backlight functions are called -#if RGB_BACKLIGHT_ENABLED -#include "rgb_backlight.h" -#endif // BACKLIGHT_ENABLED - -#include "raw_hid.h" -#include "dynamic_keymap.h" -#include "timer.h" -#include "tmk_core/common/eeprom.h" - -bool eeprom_is_valid(void) -{ - return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && - eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); -} - -void eeprom_set_valid(bool valid) -{ - eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); - eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); -} - -void eeprom_reset(void) -{ - // Set the Zeal60 specific EEPROM state as invalid. - eeprom_set_valid(false); - // Set the TMK/QMK EEPROM state as invalid. - eeconfig_disable(); -} - -#ifdef RAW_ENABLE - -void raw_hid_receive( uint8_t *data, uint8_t length ) -{ - uint8_t *command_id = &(data[0]); - uint8_t *command_data = &(data[1]); - switch ( *command_id ) - { - case id_get_protocol_version: - { - command_data[0] = PROTOCOL_VERSION >> 8; - command_data[1] = PROTOCOL_VERSION & 0xFF; - break; - } - case id_get_keyboard_value: - { - if ( command_data[0] == id_uptime ) - { - uint32_t value = timer_read32(); - command_data[1] = (value >> 24 ) & 0xFF; - command_data[2] = (value >> 16 ) & 0xFF; - command_data[3] = (value >> 8 ) & 0xFF; - command_data[4] = value & 0xFF; - } - else - { - *command_id = id_unhandled; - } - break; - } -#ifdef DYNAMIC_KEYMAP_ENABLE - case id_dynamic_keymap_get_keycode: - { - uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); - command_data[3] = keycode >> 8; - command_data[4] = keycode & 0xFF; - break; - } - case id_dynamic_keymap_set_keycode: - { - dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); - break; - } - case id_dynamic_keymap_reset: - { - dynamic_keymap_reset(); - break; - } - case id_dynamic_keymap_macro_get_count: - { - command_data[0] = dynamic_keymap_macro_get_count(); - break; - } - case id_dynamic_keymap_macro_get_buffer_size: - { - uint16_t size = dynamic_keymap_macro_get_buffer_size(); - command_data[0] = size >> 8; - command_data[1] = size & 0xFF; - break; - } - case id_dynamic_keymap_macro_get_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); - break; - } - case id_dynamic_keymap_macro_set_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); - break; - } - case id_dynamic_keymap_macro_reset: - { - dynamic_keymap_macro_reset(); - break; - } - case id_dynamic_keymap_get_layer_count: - { - command_data[0] = dynamic_keymap_get_layer_count(); - break; - } - case id_dynamic_keymap_get_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_get_buffer( offset, size, &command_data[3] ); - break; - } - case id_dynamic_keymap_set_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_set_buffer( offset, size, &command_data[3] ); - break; - } -#endif // DYNAMIC_KEYMAP_ENABLE -#if RGB_BACKLIGHT_ENABLED - case id_backlight_config_set_value: - { - backlight_config_set_value(command_data); - break; - } - case id_backlight_config_get_value: - { - backlight_config_get_value(command_data); - break; - } - case id_backlight_config_save: - { - backlight_config_save(); - break; - } -#endif // RGB_BACKLIGHT_ENABLED - case id_eeprom_reset: - { - eeprom_reset(); - break; - } - case id_bootloader_jump: - { - // Need to send data back before the jump - // Informs host that the command is handled - raw_hid_send( data, length ); - // Give host time to read it - wait_ms(100); - bootloader_jump(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - - // Return same buffer with values changed - raw_hid_send( data, length ); - -} - -#endif - -void main_init(void) -{ - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM. - if (eeprom_is_valid()) { -#if RGB_BACKLIGHT_ENABLED - backlight_config_load(); -#endif // RGB_BACKLIGHT_ENABLED - } else { -#if RGB_BACKLIGHT_ENABLED - // If the EEPROM has not been saved before, or is out of date, - // save the default values to the EEPROM. Default values - // come from construction of the zeal_backlight_config instance. - backlight_config_save(); -#endif // RGB_BACKLIGHT_ENABLED -#ifdef DYNAMIC_KEYMAP_ENABLE - // This resets the keymaps in EEPROM to what is in flash. - dynamic_keymap_reset(); - // This resets the macros in EEPROM to nothing. - dynamic_keymap_macro_reset(); -#endif - // Save the magic number last, in case saving was interrupted - eeprom_set_valid(true); - } - -#if RGB_BACKLIGHT_ENABLED - // Initialize LED drivers for backlight. - backlight_init_drivers(); - - backlight_timer_init(); - backlight_timer_enable(); -#endif // RGB_BACKLIGHT_ENABLED -} - -void bootmagic_lite(void) -{ - // The lite version of TMK's bootmagic. - // 100% less potential for accidentally making the - // keyboard do stupid things. - - // We need multiple scans because debouncing can't be turned off. - matrix_scan(); - wait_ms(DEBOUNCE); - wait_ms(DEBOUNCE); - matrix_scan(); - - // If the Esc (matrix 0,0) is held down on power up, - // reset the EEPROM valid state and jump to bootloader. - if ( matrix_get_row(0) & (1<<0) ) { - eeprom_reset(); - bootloader_jump(); - } -} - -void matrix_init_kb(void) -{ - bootmagic_lite(); - main_init(); - matrix_init_user(); -} - -void matrix_scan_kb(void) -{ -#if RGB_BACKLIGHT_ENABLED - // This only updates the LED driver buffers if something has changed. - backlight_update_pwm_buffers(); -#endif // BACKLIGHT_ENABLED - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) -{ -#if RGB_BACKLIGHT_ENABLED - process_record_backlight(keycode, record); -#endif // BACKLIGHT_ENABLED - - switch(keycode) { - case FN_MO13: - if (record->event.pressed) { - layer_on(1); - update_tri_layer(1, 2, 3); - } else { - layer_off(1); - update_tri_layer(1, 2, 3); - } - return false; - break; - case FN_MO23: - if (record->event.pressed) { - layer_on(2); - update_tri_layer(1, 2, 3); - } else { - layer_off(2); - update_tri_layer(1, 2, 3); - } - return false; - break; - } - -#ifdef DYNAMIC_KEYMAP_ENABLE - // Handle macros - if (record->event.pressed) { - if ( keycode >= MACRO00 && keycode <= MACRO15 ) - { - uint8_t id = keycode - MACRO00; - dynamic_keymap_macro_send(id); - return false; - } - } -#endif //DYNAMIC_KEYMAP_ENABLE - - return process_record_user(keycode, record); -} - -// This overrides the one in quantum/keymap_common.c -uint16_t keymap_function_id_to_action( uint16_t function_id ) -{ - // Zeal60 specific "action functions" are 0xF00 to 0xFFF - // i.e. F(0xF00) to F(0xFFF) are mapped to - // enum zeal60_action_functions by masking last 8 bits. - if ( function_id >= 0x0F00 && function_id <= 0x0FFF ) - { - uint8_t id = function_id & 0xFF; - switch ( id ) { - case TRIPLE_TAP_1_3: - case TRIPLE_TAP_2_3: - { - return ACTION_FUNCTION_TAP(id); - break; - } - default: - break; - } - } - - return pgm_read_word(&fn_actions[function_id]); -} - - -// Zeal60 specific "action functions" -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch (id) - { - case TRIPLE_TAP_1_3: - case TRIPLE_TAP_2_3: - if (record->event.pressed) { - layer_on( id == TRIPLE_TAP_1_3 ? 1 : 2 ); - if (record->tap.count && !record->tap.interrupted) { - if (record->tap.count >= 3) { - layer_invert(3); - } - } else { - record->tap.count = 0; - } - } else { - layer_off( id == TRIPLE_TAP_1_3 ? 1 : 2 ); - } - break; - } -} - -void led_set_kb(uint8_t usb_led) -{ -#if RGB_BACKLIGHT_ENABLED - backlight_set_indicator_state(usb_led); -#endif // RGB_BACKLIGHT_ENABLED -} - -void suspend_power_down_kb(void) -{ -#if RGB_BACKLIGHT_ENABLED - backlight_set_suspend_state(true); -#endif // RGB_BACKLIGHT_ENABLED -} - -void suspend_wakeup_init_kb(void) -{ -#if RGB_BACKLIGHT_ENABLED - backlight_set_suspend_state(false); -#endif // RGB_BACKLIGHT_ENABLED -} diff --git a/keyboards/zeal60/zeal60_api.h b/keyboards/zeal60/zeal60_api.h deleted file mode 100644 index 048344d712..0000000000 --- a/keyboards/zeal60/zeal60_api.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -#define PROTOCOL_VERSION 0x0008 - -enum zeal60_command_id -{ - id_get_protocol_version = 0x01, // always 0x01 - id_get_keyboard_value, - id_set_keyboard_value, - id_dynamic_keymap_get_keycode, - id_dynamic_keymap_set_keycode, - id_dynamic_keymap_reset, - id_backlight_config_set_value, - id_backlight_config_get_value, - id_backlight_config_save, - id_eeprom_reset, - id_bootloader_jump, - id_dynamic_keymap_macro_get_count, - id_dynamic_keymap_macro_get_buffer_size, - id_dynamic_keymap_macro_get_buffer, - id_dynamic_keymap_macro_set_buffer, - id_dynamic_keymap_macro_reset, - id_dynamic_keymap_get_layer_count, - id_dynamic_keymap_get_buffer, - id_dynamic_keymap_set_buffer, - id_unhandled = 0xFF, -}; - -enum zeal60_keyboard_value_id -{ - id_uptime = 0x01, - id_firmware_version -}; - diff --git a/keyboards/zeal60/zeal60_keycodes.h b/keyboards/zeal60/zeal60_keycodes.h deleted file mode 100644 index 7114a5efcd..0000000000 --- a/keyboards/zeal60/zeal60_keycodes.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -// Can't use SAFE_RANGE here, it might change if someone adds -// new values to enum quantum_keycodes. -// Need to keep checking 0x5F10 is still in the safe range. -// TODO: merge this into quantum_keycodes -// Backlight keycodes are in range 0x5F00-0x5F0F -enum zeal60_keycodes { - FN_MO13 = 0x5F10, - FN_MO23, - MACRO00, - MACRO01, - MACRO02, - MACRO03, - MACRO04, - MACRO05, - MACRO06, - MACRO07, - MACRO08, - MACRO09, - MACRO10, - MACRO11, - MACRO12, - MACRO13, - MACRO14, - MACRO15, -}; - -enum user_keycodes { - USER00 = 0x5F80, - USER01, - USER02, - USER03, - USER04, - USER05, - USER06, - USER07, - USER08, - USER09, - USER10, - USER11, - USER12, - USER13, - USER14, - USER15, -}; - -// Zeal60 specific "action functions" -// These are only valid IDs in action_function() -// Use FN_TT13, FN_TT23, etc. in keymaps -enum zeal60_action_functions { - TRIPLE_TAP_1_3 = 0x31, - TRIPLE_TAP_2_3 = 0x32 -}; - -// Bitwise OR the above with 0x0F00 to use in F(x) macro -// This reserves the top 256 of the 4096 range of F(x) keycodes, -// leaving the rest for use in fn_actions[] or actions in EEPROM. -#define FN_TT13 F((0x0F00|TRIPLE_TAP_1_3)) -#define FN_TT23 F((0x0F00|TRIPLE_TAP_2_3)) - -#define TG_NKRO MAGIC_TOGGLE_NKRO diff --git a/keyboards/zeal65/config.h b/keyboards/zeal65/config.h deleted file mode 100644 index 7217c6ed16..0000000000 --- a/keyboards/zeal65/config.h +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#pragma once - -#include "config_common.h" - -// USB Device descriptor parameter -#define VENDOR_ID 0x5A45 // ZealPC ("ZE") -#define PRODUCT_ID 0x0065 // Zeal65 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ZealPC -#define PRODUCT Zeal65 -#define DESCRIPTION Zeal65 - -// key matrix size -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -// Zeal60 PCB default pin-out -#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } -#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS - -// IS31FL3731 driver -#define DRIVER_COUNT 2 -#define DRIVER_LED_TOTAL 72 - -// COL2ROW or ROW2COL -#define DIODE_DIRECTION COL2ROW - -// Set 0 if debouncing isn't needed -#define DEBOUNCE 5 - -// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -#define LOCKING_SUPPORT_ENABLE -// Locking resynchronize hack -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -// disable debug print -//#define NO_DEBUG - -// disable print -//#define NO_PRINT - -// disable action features -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#define RGB_BACKLIGHT_ENABLED 1 - -// This conditionally compiles the backlight code for Zeal65 specifics -#define RGB_BACKLIGHT_ZEAL65 - -// enable/disable LEDs based on layout -#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 -#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 // Unused -#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 // Unused -#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 // Used only for stab LED matching spacebar LED -#define RGB_BACKLIGHT_USE_ISO_ENTER 0 // Unused -#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 - -// disable backlight when USB suspended (PC sleep/hibernate/shutdown) -#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 - -// disable backlight after timeout in minutes, 0 = no timeout -#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 - -// the default brightness -#define RGB_BACKLIGHT_BRIGHTNESS 255 - -// the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 - -// the default effect speed (0-3) -#define RGB_BACKLIGHT_EFFECT_SPEED 0 - -// the default color1 and color2 -#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } -#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } - -// These define which keys in the matrix are alphas/mods -// Used for backlight effects so colors are different for -// alphas vs. mods -// Each value is for a row, bit 0 is column 0 -// Alpha=0 Mod=1 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0101000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111110000000011 - -#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 34 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 66 -// Dynamic macro starts after dynamic keymaps (66+(4*5*15*2)) = (66+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 666 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 358 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/zeal65/info.json b/keyboards/zeal65/info.json deleted file mode 100644 index 94a090689e..0000000000 --- a/keyboards/zeal65/info.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "keyboard_name": "Zeal65", - "url": "", - "maintainer": "Wilba", - "bootloader": "DFU", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT_65_split_bs": { - "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":"Del", "x":14, "y":0}, {"label":"Home", "x":15, "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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Control", "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":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Win", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Fn2", "x":10, "y":4, "w":1.5}, {"label":"Fn1", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] - }, - "LAYOUT_65_normie": { - "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Control", "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":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"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":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Win", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Fn2", "x":10, "y":4, "w":1.5}, {"label":"Fn1", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] - } - } -} \ No newline at end of file diff --git a/keyboards/zeal65/readme.md b/keyboards/zeal65/readme.md deleted file mode 100644 index 8f43dc2435..0000000000 --- a/keyboards/zeal65/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -Zeal65 -==== - -![Zeal65](https://cdn.shopify.com/s/files/1/0490/7329/products/Zeal65_PCB2.jpg) - -This is a 65% PCB with per-key RGB LEDs and supports fixed, 1800-like bottom row and split backspace. It was designed for the Zephyr custom keyboard. - -Keyboard Maintainer: [Wilba](http://wilba.tech/) and on [github](https://github.com/Wilba6582) -Hardware Supported: Zeal65 PCB Rev 1 -Hardware Availability: https://zealpc.net/collections/group-buy-pre-orders/products/zephyr - -Make example for this keyboard (after setting up your build environment): - - make zeal65: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). diff --git a/keyboards/zeal65/rules.mk b/keyboards/zeal65/rules.mk deleted file mode 100644 index 596c1e6496..0000000000 --- a/keyboards/zeal65/rules.mk +++ /dev/null @@ -1,78 +0,0 @@ - - -# project specific files -SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section -BOOTLOADER = atmel-dfu - -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. -OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes diff --git a/keyboards/zinc/keymaps/default/keymap.c b/keyboards/zinc/keymaps/default/keymap.c index 7729914ecc..0f08d21ee7 100644 --- a/keyboards/zinc/keymaps/default/keymap.c +++ b/keyboards/zinc/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -302,5 +301,3 @@ void matrix_init_user(void) { RGB_current_config = rgblight_config; #endif } - - diff --git a/keyboards/zinc/keymaps/default/readme_jp.md b/keyboards/zinc/keymaps/default/readme_jp.md index f6e91f0c89..dfedb37c15 100644 --- a/keyboards/zinc/keymaps/default/readme_jp.md +++ b/keyboards/zinc/keymaps/default/readme_jp.md @@ -1,4 +1,4 @@ -# The Default Zinc Layout +# The Default Zinc Layout ## 配列 ### Qwerty配列 diff --git a/keyboards/zinc/keymaps/default/rules.mk b/keyboards/zinc/keymaps/default/rules.mk index 2dcefc0016..d2bc96e3af 100644 --- a/keyboards/zinc/keymaps/default/rules.mk +++ b/keyboards/zinc/keymaps/default/rules.mk @@ -1,4 +1,3 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/zinc/keymaps/ginjake/readme_jp.md b/keyboards/zinc/keymaps/ginjake/readme_jp.md index f6e91f0c89..dfedb37c15 100644 --- a/keyboards/zinc/keymaps/ginjake/readme_jp.md +++ b/keyboards/zinc/keymaps/ginjake/readme_jp.md @@ -1,4 +1,4 @@ -# The Default Zinc Layout +# The Default Zinc Layout ## 配列 ### Qwerty配列 diff --git a/keyboards/zinc/keymaps/monks/readme_jp.md b/keyboards/zinc/keymaps/monks/readme_jp.md index 680e2866c5..f1495af4c8 100644 --- a/keyboards/zinc/keymaps/monks/readme_jp.md +++ b/keyboards/zinc/keymaps/monks/readme_jp.md @@ -1,4 +1,4 @@ -# monksoffunk's personal zinc Layout +# monksoffunk's personal zinc Layout ## 配列 ### Qwerty配列 diff --git a/keyboards/zinc/keymaps/toshi0383/config.h b/keyboards/zinc/keymaps/toshi0383/config.h new file mode 100644 index 0000000000..33108a29e6 --- /dev/null +++ b/keyboards/zinc/keymaps/toshi0383/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2019 Toshihiro Suzuki +Copyright 2018 monksoffunk +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once +// if you need more program area, try uncomment follow line +#include "serial_config_simpleapi.h" + +// place overrides here +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/zinc/keymaps/toshi0383/keymap.c b/keyboards/zinc/keymaps/toshi0383/keymap.c new file mode 100644 index 0000000000..d1738c83e8 --- /dev/null +++ b/keyboards/zinc/keymaps/toshi0383/keymap.c @@ -0,0 +1,89 @@ +#include QMK_KEYBOARD_H + +extern uint8_t is_master; + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | Q | W | E | R | T | | Y | U | I | O | P |BSpace| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G | | H | J | K | L | : |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Space | Z | X | C | V | B | | N | M | Ctrl | GUI | Alt | SCMD | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | |Lower |Enter | |Enter |Raise | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_BASE] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RGUI, KC_RSFT, \ + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_RGUI, KC_RALT, RGUI(KC_RSFT), \ + _______, _______, _______, _______, LOWER, KC_ENT, KC_ENT, RAISE, _______, _______, _______, _______ \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | < | > | ( | ) | ` | | - | { | } | [ | ] | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | = | ? | | _ | + | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | |------| TRSP | | TRSP | GUI | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______,\ + _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, \ + _______, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, KC_DOT, KC_SLSH, _______, \ + _______, _______, _______, _______, _______, KC_TRNS, ADJUST, KC_RGUI, _______, _______, _______, _______ \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | : | ; | " | ' | \ | | Left | Down | Up |Right | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | |ADJUST| | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | GUI |Shift | |Shift |------| | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_4x12( \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, ADJUST, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LGUI, KC_LSFT, KC_LSFT, _______, _______, _______, _______, _______ \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | |RESET | |------| | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_4x12( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______ \ + ), + +}; diff --git a/keyboards/zinc/keymaps/toshi0383/rules.mk b/keyboards/zinc/keymaps/toshi0383/rules.mk new file mode 100644 index 0000000000..dca9aa7ff8 --- /dev/null +++ b/keyboards/zinc/keymaps/toshi0383/rules.mk @@ -0,0 +1,95 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +define ZINC_CUSTOMISE_MSG + $(info Zinc customize) + $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION=$(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) +endef + +# Zinc keyboard customize +LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +Link_Time_Optimization = no # if firmware size over limit, try this option + +#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. +#### Do not enable these with audio at the same time. + +### Zinc keyboard 'default' keymap: convenient command line option +## make ZINC= zinc:defualt +## option= back | under | na | ios +## ex. +## make ZINC=under zinc:defualt +## make ZINC=under,ios zinc:defualt +## make ZINC=back zinc:default +## make ZINC=back,na zinc:default +## make ZINC=back,ios zinc:default + +ifneq ($(strip $(ZINC)),) + ifeq ($(findstring back,$(ZINC)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(ZINC)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(ZINC)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(ZINC)), ios) + IOS_DEVICE_ENABLE = yes + endif + $(eval $(call ZINC_CUSTOMISE_MSG)) + $(info ) +endif + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call ZINC_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(Link_Time_Optimization)),yes) + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) + diff --git a/keyboards/zinc/rev1/rev1.h b/keyboards/zinc/rev1/rev1.h index 933e635c2d..aa1c408b0b 100644 --- a/keyboards/zinc/rev1/rev1.h +++ b/keyboards/zinc/rev1/rev1.h @@ -2,7 +2,6 @@ #include "../zinc.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef RGBLIGHT_ENABLE @@ -18,10 +17,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - - - // Standard Keymap // (TRRS jack on both halves are to the left side) #define LAYOUT( \ diff --git a/keyboards/zinc/reva/reva.h b/keyboards/zinc/reva/reva.h index 933e635c2d..aa1c408b0b 100644 --- a/keyboards/zinc/reva/reva.h +++ b/keyboards/zinc/reva/reva.h @@ -2,7 +2,6 @@ #include "../zinc.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" #ifdef RGBLIGHT_ENABLE @@ -18,10 +17,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - - - // Standard Keymap // (TRRS jack on both halves are to the left side) #define LAYOUT( \ diff --git a/keyboards/zinc/rules.mk b/keyboards/zinc/rules.mk index 5236c0bb02..d9d840c2d0 100644 --- a/keyboards/zinc/rules.mk +++ b/keyboards/zinc/rules.mk @@ -1,51 +1,16 @@ -#SRC += i2c.c -SRC += serial.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -70,3 +35,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes DEFAULT_FOLDER = zinc/rev1 + +#SRC += i2c.c +SRC += serial.c diff --git a/keyboards/zinc/serial.c b/keyboards/zinc/serial.c index 325c29a3f7..f6293c3dc2 100644 --- a/keyboards/zinc/serial.c +++ b/keyboards/zinc/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/zj68/config.h b/keyboards/zj68/config.h new file mode 100644 index 0000000000..59dcfc6664 --- /dev/null +++ b/keyboards/zj68/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2019 Collin Diekvoss + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Drop +#define PRODUCT ZJ68 +#define DESCRIPTION QMK ZJ68 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/zj68/info.json b/keyboards/zj68/info.json new file mode 100644 index 0000000000..f93963936d --- /dev/null +++ b/keyboards/zj68/info.json @@ -0,0 +1,86 @@ +{ + "keyboard_name": "ZJ68", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "~", "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 }, + { "x": 13, "y": 0 }, + { "x": 14, "y": 0 }, + { "x": 15, "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": "|", "x": 13.5, "y": 1, "w": 1.5 }, + { "x": 15, "y": 1 }, + + { "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 }, + { "x": 15, "y": 2 }, + + { "label": "Shift", "x": 0, "y": 3, "w": 1.25 }, + { "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 }, + { "x": 14, "y": 3 }, + { "x": 15, "y": 3 }, + + { "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 }, + { "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 4 }, + { "label": "Win", "x": 11, "y": 4 }, + { "x": 12, "y": 4 }, + { "x": 13, "y": 4 }, + { "x": 14, "y": 4 }, + { "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/zj68/keymaps/default/keymap.c b/keyboards/zj68/keymaps/default/keymap.c new file mode 100644 index 0000000000..05e0776db8 --- /dev/null +++ b/keyboards/zj68/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2019 Collin Diekvoss + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, KC_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_PGUP, + 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_PGDN, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + 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_NO, RESET, KC_PSCR, + RGB_TOG, _______, KC_UP, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + BL_TOGG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, KC_END, + _______, _______, _______, BL_DEC, BL_INC, BL_STEP, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/zj68/keymaps/default/readme.md b/keyboards/zj68/keymaps/default/readme.md new file mode 100644 index 0000000000..3522fe0229 --- /dev/null +++ b/keyboards/zj68/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# ZJ68 Default layout + +This is the default layout from the json file provided on Drop, that was intended to be used on kbdfirmware, with an added soft reset on fn(backspace). \ No newline at end of file diff --git a/keyboards/zj68/keymaps/splitbs/keymap.c b/keyboards/zj68/keymaps/splitbs/keymap.c new file mode 100644 index 0000000000..6403c0353f --- /dev/null +++ b/keyboards/zj68/keymaps/splitbs/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 Collin Diekvoss + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_65_ansi_split_bs( + 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_BSLS, KC_GRV, KC_INS, + 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_BSPC, KC_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + LAYOUT_65_ansi_split_bs( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/zj68/keymaps/splitbs/readme.md b/keyboards/zj68/keymaps/splitbs/readme.md new file mode 100644 index 0000000000..9047475eeb --- /dev/null +++ b/keyboards/zj68/keymaps/splitbs/readme.md @@ -0,0 +1,3 @@ +# ZJ68 W/ Split Backspace + +The plate that comes with the kit from Drop only allows one layout, but the pcb supports having a split backspace, so by widening the plate where the stabilizers are meant to go, you can fit the two switches in, if you want to go back to a single backspace later, you can still use pcb mount stabilizers. \ No newline at end of file diff --git a/keyboards/zj68/readme.md b/keyboards/zj68/readme.md new file mode 100644 index 0000000000..c889888c32 --- /dev/null +++ b/keyboards/zj68/readme.md @@ -0,0 +1,15 @@ +# ZJ68 + +![JZ68](https://i.imgur.com/bcsfQyt.jpg) + +A 65% keyboard kit sold through Drop. + +Keyboard Maintainer: QMK Community +Hardware Supported: ZJ68 PCB +Hardware Availability: [Drop](https://drop.com/buy/zj68-68-key-mechanical-keyboard-kit?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make zj68: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). diff --git a/keyboards/zj68/rules.mk b/keyboards/zj68/rules.mk new file mode 100644 index 0000000000..648553cc41 --- /dev/null +++ b/keyboards/zj68/rules.mk @@ -0,0 +1,29 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +AUDIO_ENABLE = no + +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +RGBLIGHT_ENABLE = no + +LAYOUTS = 65_ansi diff --git a/keyboards/zj68/zj68.c b/keyboards/zj68/zj68.c new file mode 100644 index 0000000000..960c943033 --- /dev/null +++ b/keyboards/zj68/zj68.c @@ -0,0 +1,24 @@ +/* Copyright 2019 Collin Diekvoss + * + * 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 . + */ +#include "zj68.h" + +void matrix_init_kb(void) { + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} diff --git a/keyboards/zj68/zj68.h b/keyboards/zj68/zj68.h new file mode 100644 index 0000000000..5eaae26ad3 --- /dev/null +++ b/keyboards/zj68/zj68.h @@ -0,0 +1,60 @@ +/* Copyright 2019 Collin Diekvoss + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K4E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K48, K49, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E } \ +} + +#define LAYOUT_65_ansi_split_bs( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K48, K49, K4A, K4B, K4C, K4D \ +) { \ + { 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, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E } \ +} + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K48, K49, K4A, K4B, K4C, K4D \ +) { \ + { 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, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E } \ +} diff --git a/keyboards/zlant/rules.mk b/keyboards/zlant/rules.mk index 0bc5c8aaed..82bc13c60e 100755 --- a/keyboards/zlant/rules.mk +++ b/keyboards/zlant/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/layouts/community/60_ansi/mechmerlin-ansi/readme.md b/layouts/community/60_ansi/mechmerlin-ansi/readme.md index aefd6a9929..4d3f3d8203 100644 --- a/layouts/community/60_ansi/mechmerlin-ansi/readme.md +++ b/layouts/community/60_ansi/mechmerlin-ansi/readme.md @@ -1,14 +1,12 @@ -MechMerlin's Standard ANSI 60% Layout -====================== +# MechMerlin's Standard ANSI 60% Layout This is the 60% layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) YouTube channel. -It is used on his -[Duck Eagle V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/eagle_viper/v2) -[NPKC KC60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kc60) +It is used on his [1up60HSE](https://github.com/qmk/qmk_firmware/tree/master/keyboards/1upkeyboards/1up60hse) -[HS60 V1](https://github.com/qmk/qmk_firmware/tree/master/keyboards/hs60/v1) +[dz60rgb-ansi](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dztech/dz60rgb) +[HS60 V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/hs60/v2) ## Keymap Notes - Arrow toggle switch is tapping the `FN` key once. diff --git a/layouts/community/60_ansi/xyverz/keymap.c b/layouts/community/60_ansi/xyverz/keymap.c new file mode 100644 index 0000000000..61176ef2b6 --- /dev/null +++ b/layouts/community/60_ansi/xyverz/keymap.c @@ -0,0 +1,125 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _DV, + _CM, + _FL, +}; + +enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * _QW: Qwerty Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Fn | A| S| D| F| G| H| J| K| L| ;| '| Return| + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| + * |-----------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn| + * `-----------------------------------------------------------' + */ + /* Layer 0: Qwerty */ + [_QW] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_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, + MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL) + ), + + /* + * _DV: Dvorak Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| Backsp| + * |-----------------------------------------------------------| + * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \| + * |-----------------------------------------------------------| + * |Fn | A| O| E| U| I| D| H| T| N| S| -| Return| + * |-----------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift| + * |-----------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn| + * `-----------------------------------------------------------' + */ + /* Layer 1: Dvorak */ + [_DV] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, + MO(_FL), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL) + ), + + /* + * _CM: Colemak Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| + * |-----------------------------------------------------------| + * |Fn | A| R| S| T| D| H| N| E| I| O| '| Return| + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift| + * |-----------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn| + * `-----------------------------------------------------------' + */ + /* Layer 2: Colemak */ + [_CM] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, + MO(_FL), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL) + ), + + /* + * _FL: Function Layer + * ,-----------------------------------------------------------. + * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Del| + * |-----------------------------------------------------------| + * | | | | | | | |PgU| Up|PgD|PSc|SLk|Pau| | + * |-----------------------------------------------------------| + * | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | | + * |-----------------------------------------------------------| + * |CAPS | |Mut|VlD|VlU| |End| | | | | | + * |-----------------------------------------------------------| + * |_QW |_DV |_CM | | | | | | + * `-----------------------------------------------------------' + */ + /* Layer 3: Functions */ + [_FL] = LAYOUT_60_ansi( + _______, 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_DEL , + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, _______, + QWERTY, DVORAK, COLEMAK, _______, _______, _______, _______, _______ + ), + +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DV); + return false; + case QWERTY: + set_single_persistent_default_layer(_QW); + return false; + case COLEMAK: + set_single_persistent_default_layer(_CM); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c index 780c13c2f1..92cc366aca 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c @@ -6,10 +6,7 @@ enum layer { LAYER_ADJUST, }; -/* Switch to function layer when held. */ #define LY_FUNC MO(LAYER_FUNCTION) - -/* Switch to adjust layer when held. */ #define LY_ADJST MO(LAYER_ADJUST) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -17,26 +14,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_DEFAULT] = LAYOUT_60_ansi_split_bs_rshift( 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_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_APP, KC_RCTL + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_APP, KC_RCTL ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915 */ [LAYER_FUNCTION] = LAYOUT_60_ansi_split_bs_rshift( _______, 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_INS, KC_DEL, - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, - KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ [LAYER_ADJUST] = LAYOUT_60_ansi_split_bs_rshift( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, RGB_VAI, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, KC_MUTE, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md index 79bff7406c..35ce63196c 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md @@ -2,19 +2,25 @@ This is a hybrid of an HHKB layout and a standard ANSI bottom row. It's nice if you want to fill out a 60% case with no blockers, or just really want a 6.25U -spacebar. The arrow and navigation keys match a standard HHKB layout (using the -Fn key next to the right shift key), but the media keys are centered around the -WASD cluster instead of the usual HHKB layout. Additionally, the redundant Fn -key on the bottom row activates an adjust layer to control RGB underglow. +spacebar. The arrow and navigation keys match a standard HHKB layout using the +Fn key next to the right shift key. Additionally, the redundant Fn key on the +bottom row activates an adjust layer with controls for RGB underglow and +backlight, as well as media keys centered around the ESDF cluster. ## Default layer ![Default layer layout](https://i.imgur.com/HM0115k.png) +([KLE](http://www.keyboard-layout-editor.com/#/gists/327b41b5a933b3d44bf60ca9822e85dc)) + ## Function layer -![Function layer layout](https://i.imgur.com/8dr5ktH.png) +![Function layer layout](https://i.imgur.com/oLdVfn0.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/78PBNt6.png) +![Adjust layer layout](https://i.imgur.com/bqC6QYS.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c)) diff --git a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md index 855fd5ac9e..528776011e 100644 --- a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md @@ -1,13 +1,15 @@ -MechMerlin's Split ANSI 60% Layout -====================== +# MechMerlin's Split ANSI 60% Layout This is the 60% layout with split backspace and right shift used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) YouTube channel. It is used on his -[Sentraq S60-X RGB](https://github.com/qmk/qmk_firmware/tree/master/keyboards/s60_x) -[Zeal60 Rev4](https://github.com/qmk/qmk_firmware/tree/master/keyboards/zeal60) + [DO60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/do60) +[DP60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dp60) +[Sentraq S60-X RGB](https://github.com/qmk/qmk_firmware/tree/master/keyboards/s60_x) +[Waldo](https://github.com/qmk/qmk_firmware/tree/master/keyboards/waldo) +[Zeal60 Rev4](https://github.com/qmk/qmk_firmware/tree/master/keyboards/zeal60) ## Keymap Notes - Highly influenced by the KBP V60 and WKL B.Face standard layouts diff --git a/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c b/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c new file mode 100644 index 0000000000..73d6789c1b --- /dev/null +++ b/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H + +enum { + BASE, + FN, + YFL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = LAYOUT_60_ansi_split_bs_rshift( + 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_GRV, 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, \ + LCTL_T(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_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(YFL), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RGUI, KC_RALT, MO(FN), KC_RCTL), + +[FN] = LAYOUT_60_ansi_split_bs_rshift( + 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_DEL, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), + +[YFL] = LAYOUT_60_ansi_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, \ + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/layouts/community/60_hhkb/yanfali/keymap.c b/layouts/community/60_hhkb/yanfali/keymap.c new file mode 100644 index 0000000000..98649ca4b9 --- /dev/null +++ b/layouts/community/60_hhkb/yanfali/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +enum _layers { + BL, + FN +}; +/* + * Default HHKB Layout + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Default layer +┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BkSpc│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │█████│Enter│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│Shift│█████│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │█████│Shift│ Fn │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│█████│ Gui │ Alt │█████│█████│Space│█████│█████│█████│█████│█████│ Alt │ Gui │█████│█████│ +└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ +[BL] = LAYOUT_60_hhkb( + 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_GRV, 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, \ + LCTL_T(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_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), \ + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT ), + /* 1: HHKB Fn layer +┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ Pwr │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Ins │ Del │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│Caps │ RGB │RGBfw│RGBrv│BLtog│BLstp│ │ │ Psc │ Slk │ Pus │ Up │ │ │█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │ VoD │ VoU │ Mut │ Ejc │ │NP_* │NP_/ │Home │PgUp │Left │Right│█████│NPEnt│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │█████│ │ │ │ │ │NP_+ │NP_- │ End │PgDwn│Down │█████│ │ │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│█████│ │ │█████│█████│█████│ │█████│█████│█████│█████│ │ │█████│█████│ +└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ +[FN]= LAYOUT_60_hhkb( + KC_PWR, 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_INS, KC_DEL, \ + _______, RGB_TOG, KC_UP, RGB_RMOD, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, \ + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), +}; + + diff --git a/layouts/community/60_iso/unxmaal/keymap.c b/layouts/community/60_iso/unxmaal/keymap.c index 8f2d55d9be..07fca874e4 100644 --- a/layouts/community/60_iso/unxmaal/keymap.c +++ b/layouts/community/60_iso/unxmaal/keymap.c @@ -108,7 +108,6 @@ enum function_id { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(2), // Momentary Fn overlay [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay diff --git a/layouts/community/60_tsangan_hhkb/bcat/keymap.c b/layouts/community/60_tsangan_hhkb/bcat/keymap.c new file mode 100644 index 0000000000..19516542f0 --- /dev/null +++ b/layouts/community/60_tsangan_hhkb/bcat/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_FUNCTION, + LAYER_ADJUST, +}; + +#define LY_FUNC MO(LAYER_FUNCTION) +#define LY_ADJST LT(LAYER_ADJUST, KC_APP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/86b33d75aa6f56d8781ab3d8475f4e77 */ + [LAYER_DEFAULT] = LAYOUT_60_tsangan_hhkb( + 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_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_RCTL + ), + + /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551 */ + [LAYER_FUNCTION] = LAYOUT_60_tsangan_hhkb( + _______, 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_INS, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */ + [LAYER_ADJUST] = LAYOUT_60_tsangan_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, RGB_VAI, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, KC_MUTE, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/layouts/community/60_tsangan_hhkb/bcat/readme.md b/layouts/community/60_tsangan_hhkb/bcat/readme.md new file mode 100644 index 0000000000..c0debdef5b --- /dev/null +++ b/layouts/community/60_tsangan_hhkb/bcat/readme.md @@ -0,0 +1,25 @@ +# bcat's 60% Tsangan HHKB layout + +This is a normal Tsangan/HHKB (split backspace, split right shift) layout with +arrow and navigation keys that match a standard HHKB layout. Additionally, the +redundant right Super key on the bottom row actives an adjust layer with +controls for RGB underglow and backlight, as well as media keys centered around +the ESDF cluster. + +## Default layer + +![Default layer layout](https://i.imgur.com/et26km2.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/86b33d75aa6f56d8781ab3d8475f4e77)) + +## Function layer + +![Function layer layout](https://i.imgur.com/s2uyH2U.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551)) + +## Adjust layer + +![Adjust layer layout](https://i.imgur.com/BKNez3Z.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4)) diff --git a/layouts/community/60_tsangan_hhkb/yanfali/keymap.c b/layouts/community/60_tsangan_hhkb/yanfali/keymap.c new file mode 100644 index 0000000000..a6cd15f4e2 --- /dev/null +++ b/layouts/community/60_tsangan_hhkb/yanfali/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +enum layer { + BASE, + FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_60_tsangan_hhkb( + 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_GRV, 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, + LCTL_T(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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [FN] = LAYOUT_60_tsangan_hhkb( + _______, 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_INS, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/layouts/community/65_ansi_blocker/mechmerlin/keymap.c b/layouts/community/65_ansi_blocker/mechmerlin/keymap.c new file mode 100644 index 0000000000..7ab719ab26 --- /dev/null +++ b/layouts/community/65_ansi_blocker/mechmerlin/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "mechmerlin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_65_ansi_blocker( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_DEL, + KC_CTCP, 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FL] = LAYOUT_65_ansi_blocker( + 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, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +}; + diff --git a/layouts/community/65_ansi_blocker/mechmerlin/readme.md b/layouts/community/65_ansi_blocker/mechmerlin/readme.md new file mode 100644 index 0000000000..fa69ce3e7d --- /dev/null +++ b/layouts/community/65_ansi_blocker/mechmerlin/readme.md @@ -0,0 +1,11 @@ +# MechMerlin's 65_ansi_blocker layout + +This is the 65% layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) +YouTube channel. + +It is used on his +[RGB Doro67](https://github.com/qmk/qmk_firmware/tree/master/keyboards/doro67/rgb) +[KBD67 mkii](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd67/mkiirgb) + +### Build +To build the firmware file associated with this keymap, simply run `make your_keyboard:mechmerlin`. \ No newline at end of file diff --git a/layouts/community/65_ansi_blocker/mechmerlin/rules.mk b/layouts/community/65_ansi_blocker/mechmerlin/rules.mk new file mode 100644 index 0000000000..e2ce3d7731 --- /dev/null +++ b/layouts/community/65_ansi_blocker/mechmerlin/rules.mk @@ -0,0 +1 @@ +USER_NAME := mechmerlin \ No newline at end of file diff --git a/layouts/community/66_ansi/xyverz/config.h b/layouts/community/66_ansi/xyverz/config.h new file mode 100644 index 0000000000..06e5830af8 --- /dev/null +++ b/layouts/community/66_ansi/xyverz/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define TAPPING_TERM 600 // ms +#undef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 8 diff --git a/layouts/community/66_ansi/xyverz/keymap.c b/layouts/community/66_ansi/xyverz/keymap.c new file mode 100644 index 0000000000..521379bde9 --- /dev/null +++ b/layouts/community/66_ansi/xyverz/keymap.c @@ -0,0 +1,122 @@ +// Xyverz' keymap. +// It's based on the default keymap, but Dvorak! + +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _DVORAK, + _COLEMAK, + _FL, + _CL +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +// Useful defines +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _QWERTY: Base Layer (Default Layer) + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ + +[_QWERTY] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + 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_PGDN, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _COLEMAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| R| S| T| D| H| N| E| I| O| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _DVORAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| O| E| U| I| D| H| T| N| S| -| | Ent| + * |--------------------------------------------------------------. + * |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ + FN_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT ( + 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_DEL, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL), _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL), _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + } + } + return true; +} diff --git a/layouts/community/66_ansi/xyverz/rules.mk b/layouts/community/66_ansi/xyverz/rules.mk new file mode 100644 index 0000000000..164232f339 --- /dev/null +++ b/layouts/community/66_ansi/xyverz/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. \ No newline at end of file diff --git a/layouts/community/75_ansi/yanfali/keymap.c b/layouts/community/75_ansi/yanfali/keymap.c new file mode 100644 index 0000000000..729e7d6aca --- /dev/null +++ b/layouts/community/75_ansi/yanfali/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +enum { + BASE, + FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = LAYOUT_75_ansi(\ + KC_ESC, 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_PSCR, KC_PAUS, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + 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_PGUP, + LCTL_T(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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_NO, MO(FN), KC_LEFT, KC_DOWN, KC_RGHT), + +[FN] = LAYOUT_75_ansi(\ + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_INC, BL_DEC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END) +}; diff --git a/layouts/community/ergodox/absenth/keymap.c b/layouts/community/ergodox/absenth/keymap.c index e4f1ec901a..d84b68f0ef 100644 --- a/layouts/community/ergodox/absenth/keymap.c +++ b/layouts/community/ergodox/absenth/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/layouts/community/ergodox/adnw_k_o_y/keymap.c b/layouts/community/ergodox/adnw_k_o_y/keymap.c index 8a0e47026e..59ae2681f3 100644 --- a/layouts/community/ergodox/adnw_k_o_y/keymap.c +++ b/layouts/community/ergodox/adnw_k_o_y/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, DE_K, DE_DOT, DE_O, DE_COMM,DE_Y, TG(SYMB), + KC_DEL, DE_K, DE_DOT, DE_O, DE_COMM,DE_Y, TG(SYMB), KC_BSPC, DE_H, DE_A, DE_E, DE_I, DE_U, KC_LSFT, CTL_T(DE_X), DE_Q, DE_AE, DE_UE, DE_OE, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/layouts/community/ergodox/albert/keymap.c b/layouts/community/ergodox/albert/keymap.c index c1b47312fe..8b73424d45 100644 --- a/layouts/community/ergodox/albert/keymap.c +++ b/layouts/community/ergodox/albert/keymap.c @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CTL_T(KC_SPC), ALT_T(KC_BSPC), LT(KEYW, KC_END), // right hand LSFT(KC_RGHT), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DELT, + MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(NUMB, KC_ENT), MO(EMAC), LT(MOUS, KC_N), LT(CRSR, KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_DOWN, KC_MINS, ALT_T(KC_LBRC), CTL_T(KC_RBRC), diff --git a/layouts/community/ergodox/alexjj/keymap.c b/layouts/community/ergodox/alexjj/keymap.c index 5f4f85cd43..64e7c94433 100644 --- a/layouts/community/ergodox/alexjj/keymap.c +++ b/layouts/community/ergodox/alexjj/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN,KC_UP, ALL_T(KC_NO),KC_GRV, KC_RCTRL, KC_F2, TT(MDIA), KC_INS, - KC_DELT,TT(SYMB), KC_SPC + KC_DEL,TT(SYMB), KC_SPC ), /* Keymap 1: Symbol Layer * diff --git a/layouts/community/ergodox/bepo_csa/keymap.c b/layouts/community/ergodox/bepo_csa/keymap.c index 8dfb95a337..c6d4f628ff 100644 --- a/layouts/community/ergodox/bepo_csa/keymap.c +++ b/layouts/community/ergodox/bepo_csa/keymap.c @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [LR_BASE] = LAYOUT_ergodox( // layer 0 : default // left hand - BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL, KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC, KC_HOME, KC_PGDN, // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W, + KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W, KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, @@ -342,7 +342,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(LR_CSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, - KC_TRNS, KC_APP, S(KC_DELT), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD, + KC_TRNS, KC_APP, S(KC_DEL), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/bryan/keymap.c b/layouts/community/ergodox/bryan/keymap.c index 5e74c91262..acae77d5fc 100644 --- a/layouts/community/ergodox/bryan/keymap.c +++ b/layouts/community/ergodox/bryan/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * |Ctrl/Esc|PgUp| | App | LGui | + * |Ctrl/Esc|PgUp| | App | LGui | * ,------|------|------| |------+--------+------. * | | | PgDn | | Home | | | * | Space|Backsp|------| |------| Tab |Enter | @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, M(2), - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), GUI_T(KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), - + ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_LALT,KC_TAB, KC_ENT diff --git a/layouts/community/ergodox/coderkun_neo2/keymap.c b/layouts/community/ergodox/coderkun_neo2/keymap.c index 0c70dbb5d0..d1fcea9c91 100644 --- a/layouts/community/ergodox/coderkun_neo2/keymap.c +++ b/layouts/community/ergodox/coderkun_neo2/keymap.c @@ -196,7 +196,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NHL] = LAYOUT_ergodox( // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_PGUP,KC_BSPC,KC_UP, KC_DELT,KC_PGDN,KC_NO, + KC_NO, KC_PGUP,KC_BSPC,KC_UP, KC_DEL, KC_PGDN,KC_NO, KC_NO, KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, KC_NO, KC_ESC, KC_TAB, KC_INS, KC_ENT, KC_UNDO,KC_TRNS, KC_NO, KC_NO, KC_TRNS,KC_NO, KC_TRNS, diff --git a/layouts/community/ergodox/colemak/keymap.c b/layouts/community/ergodox/colemak/keymap.c index 7330eda140..83c77e4a34 100644 --- a/layouts/community/ergodox/colemak/keymap.c +++ b/layouts/community/ergodox/colemak/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(SYMB), KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/layouts/community/ergodox/colemak_osx_pc_no/keymap.c b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c index 1196770373..189ff5c43d 100644 --- a/layouts/community/ergodox/colemak_osx_pc_no/keymap.c +++ b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_UNDS, KC_LEFT, KC_ESC, KC_FN7, KC_HASH, MO(2), KC_INSERT, NO_SLSH, - KC_DELT, + KC_DEL, KC_BSPC,KC_ENT,KC_SPC ), /* Keymap 1: Basic layer MACS (Same as pc, except for cmd/ctrl, which are swapped) diff --git a/layouts/community/ergodox/dave/keymap.c b/layouts/community/ergodox/dave/keymap.c index 4287496479..f47f881425 100644 --- a/layouts/community/ergodox/dave/keymap.c +++ b/layouts/community/ergodox/dave/keymap.c @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NAVI] = LAYOUT_ergodox( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_INS, KC_PGUP, KC_TRNS, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DELT, KC_PGDN, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_PGDN, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_WBAK, KC_DELT, KC_WFWD, KC_TRNS, KC_TRNS, + KC_TRNS, KC_WBAK, KC_DEL, KC_WFWD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/dragon788/keymap.c b/layouts/community/ergodox/dragon788/keymap.c index c0c2134774..7377128ecc 100644 --- a/layouts/community/ergodox/dragon788/keymap.c +++ b/layouts/community/ergodox/dragon788/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TT(SYMB), KC_GRV, KC_QUOT,KC_LEFT, LT(MDIA, KC_RGHT), KC_APP, KC_HOME, KC_END, - KC_BSPC,KC_DELT,KC_LALT, + KC_BSPC,KC_DEL, KC_LALT, // right hand TG(3), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(2), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 821710ed8e..0091ebcde8 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -1,16 +1,19 @@ #pragma once #ifdef RGBLIGHT_ENABLE -# undef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 12 - -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 -#endif // RGBLIGHT_ENABLE +# undef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 +#endif // RGBLIGHT_ENABLE #undef PRODUCT -#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine +#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine #undef DEBOUNCE -#define DEBOUNCE 15 +#define DEBOUNCE 30 + +#define TAPPING_TERM_PER_KEY + +#define ERGODOX_LED_30 diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 74382f1752..8308bfdaa1 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -1,38 +1,28 @@ -/* -This is the keymap for the keyboard -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger -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 . -*/ -#include QMK_KEYBOARD_H #include "drashna.h" #ifdef UNICODEMAP_ENABLE -#include "drashna_unicode.h" -#endif // UNICODEMAP_ENABLE +# include "drashna_unicode.h" +#endif // UNICODEMAP_ENABLE #ifndef UNICODE_ENABLE -# define UC(x) KC_NO +# define UC(x) KC_NO +#endif +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; #endif -extern userspace_config_t userspace_config; +enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; -enum more_custom_keycodes { - KC_SWAP_NUM = NEW_SAFE_RANGE -}; - -//define layer change stuff for underglow indicator +// define layer change stuff for underglow indicator bool skip_leds = false; +/* + * The `LAYOUT_ergodox_pretty_base` macro is a template to allow the use of + * identical modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, + * etc), so that there is no need to set them up for each layout, and modify + * all of them if I want to change them. This helps to keep consistency and + * ease of use. K## is a placeholder to pass through the individual keycodes + */ +// clang-format off #define LAYOUT_ergodox_pretty_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -40,8 +30,8 @@ bool skip_leds = false; ) \ LAYOUT_ergodox_pretty_wrapper( \ KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ - KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ - KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ @@ -292,8 +282,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ergodox_pretty_wrapper( KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST, - _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG(_MODS), - _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, KC_MPLY, + _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, + _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -301,9 +291,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +// clang-format on bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { case KC_1: if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) { @@ -332,7 +322,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } break; } - //switch (keycode) { + // switch (keycode) { // case KC_P00: // if (!record->event.pressed) { // register_code(KC_KP_0); @@ -347,9 +337,9 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } void matrix_scan_keymap(void) { // runs frequently to update info - uint8_t modifiers = get_mods(); + uint8_t modifiers = get_mods(); uint8_t led_usb_state = host_keyboard_leds(); - uint8_t one_shot = get_oneshot_mods(); + uint8_t one_shot = get_oneshot_mods(); if (!skip_leds) { ergodox_board_led_off(); @@ -360,24 +350,21 @@ void matrix_scan_keymap(void) { // runs frequently to update info // Since we're not using the LEDs here for layer indication anymore, // then lets use them for modifier indicators. Shame we don't have 4... // Also, no "else", since we want to know each, independently. - if ( ( modifiers | one_shot ) & MOD_MASK_SHIFT || led_usb_state & (1<= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { + if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { + return (2 * TAPPING_TERM); + } + } + return TAPPING_TERM; +} diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index f0628d9daf..3aee59df6c 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -2,9 +2,9 @@ TAP_DANCE_ENABLE = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration SPACE_CADET_ENABLE = no -ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) - RGBLIGHT_ENABLE = yes - RGB_MATRIX_ENABLE = no +ifeq ($(strip $(KEYBOARD)), ergodox_ez) + RGBLIGHT_ENABLE = yes + RGB_MATRIX_ENABLE = no endif CONSOLE_ENABLE = no BOOTMAGIC_ENABLE = yes @@ -12,9 +12,8 @@ BOOTMAGIC_ENABLE = yes UNICODE_ENABLE = yes UNICDOEMAP_ENABLE = no -MACROS_ENABLED = no RGBLIGHT_TWINKLE = no INDICATOR_LIGHTS = no RGBLIGHT_STARTUP_ANIMATION = yes -DEBOUNCE_TYPE = eager_pk +DEBOUNCE_TYPE = eager_pr diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h index e6c8223e91..6431cb4ff8 100644 --- a/layouts/community/ergodox/drashna_glow/config.h +++ b/layouts/community/ergodox/drashna_glow/config.h @@ -5,24 +5,5 @@ #undef PRODUCT #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Glow -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) -// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) -// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended -// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -// #define EECONFIG_RGB_MATRIX (uint32_t *)16 - -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - -#endif +#undef RGB_MATRIX_LED_PROCESS_LIMIT +#undef RGB_MATRIX_LED_FLUSH_LIMIT diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk index ae9a2fb16c..45addc7c22 100644 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ b/layouts/community/ergodox/drashna_glow/rules.mk @@ -6,8 +6,8 @@ SRC += $(CORRECTED_LAYOUT)/keymap.c -include $(CORRECTED_LAYOUT)/rules.mk -ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) - RGBLIGHT_ENABLE = no - RGB_MATRIX_ENABLE = yes - TAP_DANCE_ENABLE = no +ifeq ($(strip $(KEYBOARD)), ergodox_ez) + RGBLIGHT_ENABLE = no + RGB_MATRIX_ENABLE = yes +# TAP_DANCE_ENABLE = no endif diff --git a/layouts/community/ergodox/dvorak/keymap.c b/layouts/community/ergodox/dvorak/keymap.c index b161358c14..4d8483f544 100644 --- a/layouts/community/ergodox/dvorak/keymap.c +++ b/layouts/community/ergodox/dvorak/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(1), + KC_DEL, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(1), KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/layouts/community/ergodox/dvorak_intl_squisher/keymap.c b/layouts/community/ergodox/dvorak_intl_squisher/keymap.c index 83cee0d06f..98e288516b 100644 --- a/layouts/community/ergodox/dvorak_intl_squisher/keymap.c +++ b/layouts/community/ergodox/dvorak_intl_squisher/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_WBAK, - KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_DELT, + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_DEL, KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_LALT, KC_LGUI, KC_LEFT,KC_RGHT, @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(2), KC_PSCREEN, KC_PGUP, KC_PGDN,RALT(KC_RSFT), KC_ENT - ), + ), /* Keymap 1: Symbol & Media Layer * * ,--------------------------------------------------. ,--------------------------------------------------. diff --git a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c index 41beeb7e5f..bb27f18e80 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c +++ b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand MO(DEVL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, NO_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB), + KC_DEL, SE_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB), KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(MDIA), CTL_T(KC_NO), MO(SYMB), KC_LALT, KC_LEFT,KC_RGHT, @@ -69,8 +69,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC,KC_BSPC,KC_END, // right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLASH, - TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, NO_AM, - KC_D, KC_H, KC_T, KC_N, KC_S, NO_AE, + TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, SE_AM, + KC_D, KC_H, KC_T, KC_N, KC_S, SE_AE, TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), LALT(KC_LSFT), CTL_T(KC_ESC), @@ -102,18 +102,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = LAYOUT_ergodox( // left hand M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS, - KC_TRNS, KC_HASH, NO_LPRN, NO_RPRN, ALGR(KC_MINS), NO_SLSH, - KC_TRNS, NO_TILD, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS, + KC_TRNS, SE_AT, ALGR(KC_7), ALGR(KC_0), SE_LBRC, SE_RBRC, KC_TRNS, + KC_TRNS, KC_HASH, SE_LPRN, SE_RPRN, ALGR(KC_MINS), SE_SLSH, + KC_TRNS, SE_TILD, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, // right hand KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, NO_LESS, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12, - LSFT(NO_LESS), KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS, - KC_TRNS, NO_QUES, KC_1, KC_2, KC_3, LSFT(KC_5), KC_TRNS, + KC_TRNS, SE_LESS, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12, + LSFT(SE_LESS), KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS, + KC_TRNS, SE_QUES, KC_1, KC_2, KC_3, LSFT(KC_5), KC_TRNS, KC_DOT,KC_0, LSFT(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -186,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEVL] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_PSCR, ALGR(KC_4), KC_TRNS, - KC_TRNS, NO_ACUT, NO_APOS, NO_PIPE, KC_TRNS, ALGR(KC_3), + KC_TRNS, SE_ACUT, SE_APOS, SE_PIPE, KC_TRNS, ALGR(KC_3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -218,81 +218,81 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_PUBLIC: if (record->event.pressed) { return MACRO( T(P), T(U), T(B), T(L), T(I), T(C), T(SPACE),END); - } + } break; case MACRO_PRIVATE: if (record->event.pressed) { return MACRO( T(P), T(R), T(I), T(V), T(A), T(T), T(E), T(SPACE),END); - } + } break; case MACRO_PROT: if (record->event.pressed) { return MACRO( T(P), T(R), T(O), T(T), T(E), T(C), T(T), T(E), T(D), T(SPACE),END); - } + } break; case MACRO_SHARED: if (record->event.pressed) { return MACRO( T(S), T(H), T(A), T(R), T(E), T(D), T(SPACE), END); - } + } break; case MACRO_CONST: if (record->event.pressed) { return MACRO( T(C), T(O), T(N), T(S), T(T), T(SPACE), END); - } - break; + } + break; case MACRO_DIM: if (record->event.pressed) { return MACRO( T(D), T(I), T(M), T(SPACE), END); - } + } break; case MACRO_STRING: if (record->event.pressed) { return MACRO( T(S), T(T), T(R), T(I), T(N), T(G), T(SPACE), END); - } - break; + } + break; case MACRO_BOOL: if (record->event.pressed) { return MACRO( T(B), T(O), T(O), T(L), T(E), T(A), T(N), T(SPACE), END); - } - break; + } + break; case MACRO_INT: if (record->event.pressed) { return MACRO( T(I), T(N), T(T), T(SPACE), END); - } + } break; case MACRO_DEC: if (record->event.pressed) { return MACRO( T(D), T(E), T(C), T(I), T(M), T(A), T(L), T(SPACE), END); - } + } break; case MACRO_RETURN: if (record->event.pressed) { return MACRO( T(R), T(E), T(T), T(U),T(R),T(N), T(SPACE), END); - } + } break; case MACRO_NOTHING: if (record->event.pressed) { return MACRO( T(N), T(O), T(T), T(H), T(I), T(N), T(G), T(SPACE), END); - } + } case MACRO_TODO: if (record->event.pressed) { return MACRO( KC_BSLASH, D(LSHIFT) ,T(T), T(O), T(D), T(O), KC_DOT, U(LSHIFT), T(SPACE),END); - } - break; + } + break; case MACRO_SAVE: if (record->event.pressed) { return MACRO( D(LCTL) ,T(S), U(LCTL),END); - } - break; + } + break; case MACRO_BUILD: if (record->event.pressed) { return MACRO( D(LCTL), D(LSHIFT) ,T(B), U(LSHIFT), U(LCTL),END); - } + } break; case MACRO_DEBUG: if (record->event.pressed) { return MACRO( KC_F5 ,END); - } + } break; } return MACRO_NONE; diff --git a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c index b0eff652b8..4ca20bd48c 100644 --- a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c +++ b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | 1 | 2 | 3 | 4 | 5 | ~MOUS| | QWRT | 6 | 7 | 8 | 9 | 0 | + | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | P | Y | | | Del | F | G | C | R | L | , | + * | | Å | Ä | Ö | P | Y | | | Del | F | G | C | R | L | , | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Escape | A | O | E | U | I |------| |------| D | H | T | N | S | -/_ | * |--------+------+------+------+------+------| | | RCTRL|------+------+------+------+------+--------| @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, MO(MOUS), - KC_TAB, NO_AA, NO_AE, NO_OSLH, KC_P, KC_Y, KC_NO, + KC_TAB, SE_AA, SE_AE, SE_OSLH, KC_P, KC_Y, KC_NO, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, KC_DOT, KC_Q, KC_J, KC_K, KC_X, KC_NO, KC_LCTRL, KC_NO, KC_NO, KC_LALT, KC_LCMD, @@ -41,9 +41,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_BSPC, KC_TAB, KC_NO, // right hand - TG(QWRT), KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, + TG(QWRT), KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, KC_DEL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM, - KC_D, KC_H, KC_T, KC_N, KC_S, NO_MINS, + KC_D, KC_H, KC_T, KC_N, KC_S, SE_MINS, KC_RCTRL, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(SYMB), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_END, @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | ; | / | ( | ) | | |------| |------| # | ^ | # | " | ~ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | : | = | @ | ! | \ | | | | % | | ' | * | | | + * | | : | = | @ | ! | \ | | | | % | ´ | ' | * | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -84,9 +84,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_NO, KC_NO, // right hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, LSFT(KC_2), NO_QUES, LSFT(KC_6), NO_LESS, NO_GRTR, KC_NO, - KC_HASH, NO_CIRC, KC_HASH, LSFT(KC_2), NO_TILD, KC_NO, - KC_NO, KC_PERC, NO_ACUT, NO_APOS, NO_ASTR, NO_GRV, KC_NO, + KC_NO, LSFT(KC_2), SE_QUES, LSFT(KC_6), SE_LESS, SE_GRTR, KC_NO, + KC_HASH, SE_CIRC, KC_HASH, LSFT(KC_2), SE_TILD, KC_NO, + KC_NO, KC_PERC, SE_ACUT, SE_APOS, SE_ASTR, SE_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, @@ -137,16 +137,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * ,--------------------------------------------------. ,--------------------------------------------------. * | Print | ! | " | # | # | % | | |Middle| & | / | ( | ) | = | ? | - * | Screen | 1 | 2 @ | 3 | 4 $ | 5 | F11 | |Mouse | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | + * | Screen | 1 | 2 @ | 3 £ | 4 $ | 5 | F11 | |Mouse | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | | + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | Å | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | | | + * | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä | * |--------+------+------+------+------+------| ` | | Del |------+------+------+------+------+--------| * | LShft | Z | X | C | V | B | ' | | | N | M | , | . | - | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | LCtl | ^ | * | LAlt | LGui | | AltGr| Down | Up | Left | Right| - * | (') | " ~ | ' | | | | | | | | | + * | (') | " ~ | ' ´ | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,--------------. * | LCtl | LAlt | | Home | End | @@ -161,16 +161,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PSCR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_ACUT, - CTL_T(NO_APOS), NO_CIRC, NO_ASTR, KC_LALT, KC_LGUI, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SE_ACUT, + CTL_T(SE_APOS), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI, KC_LCTRL, KC_LALT, - NO_TILD, + SE_TILD, KC_BSPC, KC_TAB, KC_ESC, // right hand - KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, - KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, - KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, - KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSFT, + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, + KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, + KC_H, KC_J, KC_K, KC_L, SE_OSLH, SE_AE, + KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT, KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, KC_HOME, KC_END, KC_PGUP, diff --git a/layouts/community/ergodox/emacs_osx_dk/keymap.c b/layouts/community/ergodox/emacs_osx_dk/keymap.c index 8f4c010afe..c34d9f65b0 100644 --- a/layouts/community/ergodox/emacs_osx_dk/keymap.c +++ b/layouts/community/ergodox/emacs_osx_dk/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CTL_T(KC_BSLS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_RALT, MO(SYMB), KC_LCTRL, KC_LEFT,KC_RGHT,KC_LALT, - KC_DELT,KC_INS, + KC_DEL, KC_INS, KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand diff --git a/layouts/community/ergodox/german-kinergo/keymap.c b/layouts/community/ergodox/german-kinergo/keymap.c index 7e1e5bf82b..20651df0fb 100644 --- a/layouts/community/ergodox/german-kinergo/keymap.c +++ b/layouts/community/ergodox/german-kinergo/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT, KC_LCTRL, KC_LALT, KC_HOME, - KC_BSPC,KC_DELT,KC_END, + KC_BSPC,KC_DEL,KC_END, // right hand KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, MO(1), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // [BASE] = LAYOUT_ergodox( // layer 0 : default // // left hand // KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, -// KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), +// KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, // KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), // LT(SYMB,DE_LESS),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS, diff --git a/layouts/community/ergodox/german-lukas/keymap.c b/layouts/community/ergodox/german-lukas/keymap.c index e0cdf25c6e..373a1e0440 100644 --- a/layouts/community/ergodox/german-lukas/keymap.c +++ b/layouts/community/ergodox/german-lukas/keymap.c @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT, KC_LCTRL, KC_LALT, KC_HOME, - KC_SPC ,KC_DELT,KC_END, + KC_SPC ,KC_DEL,KC_END, // right hand KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(MDIA), DE_Z, KC_U, KC_I, KC_O, KC_P, LT(SHRT,DE_UE), diff --git a/layouts/community/ergodox/german-manuneo/keymap.c b/layouts/community/ergodox/german-manuneo/keymap.c index 9198bf6e30..d1e48e1102 100644 --- a/layouts/community/ergodox/german-manuneo/keymap.c +++ b/layouts/community/ergodox/german-manuneo/keymap.c @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |LGUI|LALT|LCTL| !RCTL|RALT|LEFT|DOWN|RGHT| * '------------------------' '------------------------' * .-----------. .-----------. - * |INS |TG(2)| !M(UM)|DELT | + * |INS |TG(2)| !M(UM)|DEL | * .-----+-----+-----! !-----+-----+-----. * ! ! | APP | ! PGUP| ! ! * ! ! !-----! !-----! ! ! @@ -142,7 +142,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*-*/ DE_S, DE_N, DE_R, DE_T, DE_D, DE_SS, KC_TAB, DE_B, DE_M, DE_COMM, DE_DOT, KC_UP, DE_Y, /*-*/ /*-*/ KC_RCTL, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT, - M(UM), KC_DELT, + M(UM), KC_DEL, KC_PGUP, KC_PGDN, KC_ENTER, KC_SPACE ), diff --git a/layouts/community/ergodox/german-manuneo/keymap.md b/layouts/community/ergodox/german-manuneo/keymap.md index c59f16a00c..3f476ad2a0 100644 --- a/layouts/community/ergodox/german-manuneo/keymap.md +++ b/layouts/community/ergodox/german-manuneo/keymap.md @@ -43,7 +43,7 @@ Tested with python 2.7 and python 3.4 | | |LGUI|LALT|LCTL| !RCTL|RALT|LEFT|DOWN|RGHT| '------------------------' '------------------------' .-----------. .-----------. - |INS |TG(2)| !M(UM)|DELT | + |INS |TG(2)| !M(UM)|DEL | .-----+-----+-----! !-----+-----+-----. ! ! | APP | ! PGUP| ! ! ! ! !-----! !-----! ! ! diff --git a/layouts/community/ergodox/german/keymap.c b/layouts/community/ergodox/german/keymap.c index a379b24ca3..83ead2eb24 100644 --- a/layouts/community/ergodox/german/keymap.c +++ b/layouts/community/ergodox/german/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,DE_LESS),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS, diff --git a/layouts/community/ergodox/guni/keymap.c b/layouts/community/ergodox/guni/keymap.c index 9a00f0a979..021271c2e1 100644 --- a/layouts/community/ergodox/guni/keymap.c +++ b/layouts/community/ergodox/guni/keymap.c @@ -138,7 +138,6 @@ const uint16_t PROGMEM fn_actions[] = { //[29] = ACTION_LAYER_TOGGLE(4), [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), [30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT), - [31] = ACTION_LAYER_MOMENTARY(2), //[] = ACTION_LAYER_TAP_KEY(4, KC_S), }; diff --git a/layouts/community/ergodox/ishigoya-jp/keymap.c b/layouts/community/ergodox/ishigoya-jp/keymap.c index 43bc74a0e1..59040cd50c 100644 --- a/layouts/community/ergodox/ishigoya-jp/keymap.c +++ b/layouts/community/ergodox/ishigoya-jp/keymap.c @@ -144,7 +144,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RCTL, KC_LGUI, KC_LALT,JP_UNDS,KC_LCTL, KC_BTN3, KC_DEL, KC_NO, - KC_SPC,KC_LSFT,F(1), + KC_SPC,KC_LSFT,MO(NUM), // right hand LCTL(KC_Z), KC_NO, LSFT(KC_4), JP_AT, KC_LEFT, KC_UP, KC_RIGHT, KC_PGUP, KC_J, KC_F, KC_U, KC_P, KC_DOWN, LSFT(KC_3), @@ -187,7 +187,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, - M(SHIFT), M(JPFN), F(1), + M(SHIFT), M(JPFN), MO(NUM), // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(JPFU), M(JPSE), M(JPTSU), M(JPKU), KC_TRNS, KC_TRNS, @@ -415,10 +415,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(NUM) // FN1 - Momentary Layer 6 (Numbers) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/layouts/community/ergodox/issmirnov/README.md b/layouts/community/ergodox/issmirnov/README.md new file mode 100644 index 0000000000..564edfe31d --- /dev/null +++ b/layouts/community/ergodox/issmirnov/README.md @@ -0,0 +1,49 @@ +# Ivan's Ergodox Config + + +## Details about the layout + +- Shift and Cmd are One Shot Modifiers, so tapping them once will apply them to the next key. When tapped twice they will lock, until tapped again to clear. +- When switching to other layers, any stuck modifiers are cleared in order to avoid unintended key combos +- There are a few leader key combinations. Right now, `KC_LEAD` + `s` will open my wiki homepage. +- All transparent keys have been replaced with noops to avoid layer bleeding. + +## Initial Setup + +### QMK + +``` +brew tap osx-cross/avr +brew tap PX4/homebrew-px4 +brew update +brew install avr-gcc +brew install dfu-programmer +brew install gcc-arm-none-eabi +brew install avrdude + +git clone https://github.com/qmk/qmk_firmware.git +git clone https://github.com/issmirnov/ergodox-layout.git \ + layouts/community/ergodox/ismirnov +``` + +### Teensy utils + +Download and add both of these to $PATH + +- [hid_listen](https://www.pjrc.com/teensy/hid_listen.html) +- [teensy loader cli](https://www.pjrc.com/teensy/loader_cli.html) + +## Flashing + +``` +make ergodox_ez:ismirnov +teensy_loader_cli -mmcu=atmega32u4 -w -v ergodox_ez_ismirnov.hex + +# or just +make ergodox_ez:ismirnov:flash +``` + +## Gotchas + +- If you get error: `dyld: Library not loaded: /usr/local/opt/isl/lib/libisl.15.dylib` then do `brew reinstall avr-gcc` +- If `hid_listen` just prints out a ton of dots, update makefile with `CONSOLE_ENABLE = yes` diff --git a/layouts/community/ergodox/issmirnov/asci-keymap.txt b/layouts/community/ergodox/issmirnov/asci-keymap.txt new file mode 100644 index 0000000000..9b023f6641 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/asci-keymap.txt @@ -0,0 +1,95 @@ + Qwerty +,--------------------------------------------. ,--------------------------------------------. +| Escape | 1 | 2 | 3 | 4 | 5 | ! | | = | 6 | 7 | 8 | 9 | 0 | Escape | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +|Lctl(Spa| Q | W | E | R | T | * | | + | Y | U | I | O | P |Lgui(Spa| +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Tab | A | S | D | F | G |-----| |-----| H | J | K | L |TapTo|Mo(Navi)| +|--------+-----+-----+-----+-----+-----| / | | - |-----+-----+-----+-----+-----+--------| +|Osm(ModL| Z | X | C | V | B | | | | N | M | . |Comma|Tg(Nu| ' | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + |Ctrl |Lsft(|Lsft(| Alt | Mod | |Escap| : | % | |Lgui(| + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | ← | → | + ,-----|-----|-----| |-----+-----+-----. + | | | | | ↑ | | | + | ⎵ | ⌫ |-----| |-----| Tab |Enter| + | | | Del | | ↓ | | | + `-----------------' `-----------------' + + Symb +,--------------------------------------------. ,--------------------------------------------. +| Escape | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| | - | @ | { | } | ` | * | | + | * | ! | | | % | + |Mo(Navi)| +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Tab | ^ | _ | ( | ) | $ |-----| |-----| # | = | : | ; |TapTo| Dquo | +|--------+-----+-----+-----+-----+-----| / | | - |-----+-----+-----+-----+-----+--------| +| Lshift | < | > | [ | ] | ~ | | | | & | ? | / | \ |Tg(Nu| ' | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + |Ctrl |Lsft(|Lsft(| Alt |WkspL| |Escap| : | % | | | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | ← | → | + ,-----|-----|-----| |-----+-----+-----. + | | | | | ↑ | | | + |WkspR| ⌫ |-----| |-----| Tab |Enter| + | | | Del | | ↓ | | | + `-----------------' `-----------------' + + Nump +,--------------------------------------------. ,--------------------------------------------. +| | | | | | | | | = | | | | | | Reset | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| | No | No |Lgui(| | | * | | + | , | 7 | 8 | 9 | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Tab | |Lgui(|Lgui(|Lgui(| |-----| |-----| 0 | 4 | 5 | 6 |To(Sy| | +|--------+-----+-----+-----+-----+-----| / | | - |-----+-----+-----+-----+-----+--------| +| | | | |Audio|Audio| | | | . | 1 | 2 | 3 |To(Qw| | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + |To(0)| | | | | | 0 | | |To(3)| | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | ← | → | + ,-----|-----|-----| |-----+-----+-----. + | | | | | ↑ | | | + | ⎵ | ⌫ |-----| |-----| Alt |Shift| + | | | Del | | ↓ | | | + `-----------------' `-----------------' + + Overwatch +,--------------------------------------------. ,--------------------------------------------. +| Escape | 1 | 2 | 3 | 4 | 5 |To(0)| | | | | | | | | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| Tab | Q | W | E | R | T | | | | | | | | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Ctrl | A | S | D | F | P |-----| |-----| | | | | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Lshift | Z | X | C | V |Grave| | | | | | | | | | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + |Ctrl | F9 |Pscre| H | R | | | | | | | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | | | + ,-----|-----|-----| |-----+-----+-----. + | | | | | | | | + | ⎵ | |-----| |-----| | | + | | | | | | | | + `-----------------' `-----------------' + + Navi +,--------------------------------------------. ,--------------------------------------------. +| Escape | 1 | 2 | 3 | 4 | 5 | 6 | | | | | | | | | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| | | | ↑ | | | | | | | | | | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| | | ← | ↓ | → | |-----| |-----| |Ctrl | | | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| | | | | | | | | | | | | | | | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + | | | | |WkspL| | ⌘⇧ | | | | | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | | | + ,-----|-----|-----| |-----+-----+-----. + | | | | | | | | + |WkspR| |-----| |-----| | Mod | + | | | | | | | | + `-----------------' `-----------------' + diff --git a/layouts/community/ergodox/issmirnov/build.sh b/layouts/community/ergodox/issmirnov/build.sh new file mode 100755 index 0000000000..7bb694d8a7 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +make ergodox_ez:issmirnov diff --git a/layouts/community/ergodox/issmirnov/config.h b/layouts/community/ergodox/issmirnov/config.h new file mode 100644 index 0000000000..fe62a7d1df --- /dev/null +++ b/layouts/community/ergodox/issmirnov/config.h @@ -0,0 +1,3 @@ +// Reference: https://beta.docs.qmk.fm/reference/config-options +// and https://github.com/qmk/qmk_firmware/blob/master/docs/config_options.md +#include QMK_KEYBOARD_CONFIG_H diff --git a/layouts/community/ergodox/issmirnov/keymap.c b/layouts/community/ergodox/issmirnov/keymap.c new file mode 100644 index 0000000000..ce853f3d32 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/keymap.c @@ -0,0 +1,250 @@ +#include QMK_KEYBOARD_H + +// Custom user includes +#include "issmirnov.h" +#include "tap_tog.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_ergodox_wrapper( +KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, +LCTL(KC_SPACE), _________________QWERTY_L1_________________, KC_ASTR, +KC_TAB, _________________QWERTY_L2_________________, +OSM(MOD_LSFT), _________________QWERTY_L3_________________, KC_SLASH, +KC_LCTL, LSFT(KC_LGUI), LSFT(KC_LALT), KC_LALT, KC_LGUI, + XXXXXXX, XXXXXXX, + XXXXXXX, + KC_SPACE, KC_BSPACE, KC_DEL, + +KC_EQL , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_ESCAPE , +KC_PLUS , _________________QWERTY_R1_________________ , LGUI(KC_SPACE) , + _________________QWERTY_R2_________________ , MO(_NAVI) , +KC_MINS , _________________QWERTY_R3_________________ , KC_QUOTE , +KC_ESCAPE , KC_COLN , KC_PERC , XXXXXXX , LGUI(KC_L) , + +KC_LEFT, KC_RGHT, +KC_UP, +KC_DOWN, KC_TAB, KC_ENTER +), + + // layer 1 +[_SYMB] = LAYOUT_ergodox_wrapper( +KC_ESCAPE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , +XXXXXXX , _________________SYMB_L1___________________ ,KC_ASTR , +KC_TAB , _________________SYMB_L2___________________, +KC_LSHIFT , _________________SYMB_L3___________________, KC_SLASH , +KC_LCTL , LSFT(KC_LGUI) , LSFT(KC_LALT) , KC_LALT , WKSP_LEFT , + + XXXXXXX, XXXXXXX, + XXXXXXX, + WKSP_RIGHT, KC_BSPACE, KC_DEL, + +KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , XXXXXXX , +KC_PLUS , _________________SYMB_R1___________________ , MO(_NAVI) , + _________________SYMB_R2___________________ , KC_DQUO , +KC_MINS , _________________SYMB_R3___________________ , KC_QUOTE , +KC_ESCAPE , KC_COLN , KC_PERC , XXXXXXX , XXXXXXX , + +KC_LEFT, KC_RGHT, +KC_UP, +KC_DOWN, KC_TAB, KC_ENTER +), + + // layer 2 +[_NUMP] = LAYOUT_ergodox_wrapper( +XXXXXXX , ___________________XXXXX___________________, XXXXXXX , +XXXXXXX , _________________NUMP_L1___________________ , KC_ASTR , +KC_TAB , _________________NUMP_L2___________________ , +XXXXXXX , _________________NUMP_L3___________________ , KC_SLASH , +TO(0) , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + XXXXXXX , XXXXXXX , + XXXXXXX , + KC_SPACE , KC_BSPACE , KC_DEL , + +KC_EQL , ___________________XXXXX___________________ , RESET , +KC_PLUS , _________________NUMP_R1___________________ , XXXXXXX , + _________________NUMP_R2___________________ , XXXXXXX , +KC_MINS , _________________NUMP_R3___________________ , XXXXXXX , + KC_0 , XXXXXXX , XXXXXXX , TO(3) , XXXXXXX , + +KC_LEFT, KC_RGHT, +KC_UP, +KC_DOWN, KC_LALT, KC_LSFT +), + + // layer 3 +[_OVERWATCH] = LAYOUT_ergodox_wrapper( +KC_ESCAPE, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , TO(0) , +______________OVERWATCH_L1_________________ , XXXXXXX , +______________OVERWATCH_L2_________________ , +______________OVERWATCH_L3_________________ , XXXXXXX , +______________OVERWATCH_L4_________________ , + +XXXXXXX , XXXXXXX , +XXXXXXX , +KC_SPACE , XXXXXXX , XXXXXXX , + + +_______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, + +_______, _______, +_______, +_______, _______, _______ + +), +// layer 4 +[_NAVI] = LAYOUT_ergodox_wrapper( +KC_ESCAPE, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , +XXXXXXX, _________________NAVI_L1___________________ , XXXXXXX , +XXXXXXX, _________________NAVI_L2___________________ , +XXXXXXX, _________________NAVI_L3___________________ , XXXXXXX , +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_LEFT, + +XXXXXXX , XXXXXXX , +XXXXXXX , +WKSP_RIGHT , XXXXXXX , XXXXXXX , + + +_______, _______, _______, _______, _______, _______, _______, +_______, _________________NAVI_R1___________________, _______, + _________________NAVI_R2___________________, _______, +_______, _________________NAVI_R3___________________, _______, +MODSFT, _______, _______, _______, _______, + +_______, _______, +_______, +_______, _______, KC_LGUI + +), +}; + + +// called by QMK during key processing before the actual key event is handled. Useful for macros. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint8_t layer = biton32(layer_state); + switch (keycode) { + case TAP_TOG_LAYER: + process_tap_tog(_SYMB,record); + return false; + break; + + case WKSP_LEFT: + // Only if TAP_TOG_LAYER is being held right now do we want to do actions. + if (record->event.pressed && (!tap_tog_layer_toggled_on || layer == _NAVI)) { + tap_code16(LGUI(LSFT(KC_Z))); + tap_tog_layer_other_key_pressed = true; // Add flag so layer resets + } + break; + case WKSP_RIGHT: + // Only if TAP_TOG_LAYER is being held right now do we want to do actions. + if (record->event.pressed && (!tap_tog_layer_toggled_on || layer == _NAVI)) { + tap_code16(LGUI(LSFT(KC_X))); + tap_tog_layer_other_key_pressed = true; // Add flag so layer resets + } + break; + default: + tap_tog_count = 0; // reset counter. + tap_tog_layer_other_key_pressed = true; // always set this to true, TAP_TOG_LAYER handlers will handle interpreting this + break; + } + return true; +} + +// Runs constantly in the background, in a loop every 100ms or so. +// Best used for LED status output triggered when user isn't actively typing. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + if (layer == 0) { + // Set up LED indicators for stuck modifier keys. + // https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/report.h#L118 + switch (keyboard_report->mods) { + case MOD_BIT(KC_LSFT): // LSHIFT + ergodox_right_led_1_set (LED_BRIGHTNESS_LO); + ergodox_right_led_1_on (); + ergodox_right_led_2_set (LED_BRIGHTNESS_LO); + ergodox_right_led_2_on (); + ergodox_right_led_3_set (LED_BRIGHTNESS_HI); + ergodox_right_led_3_off (); + break; + + case MOD_BIT(KC_LGUI): // LGUI + ergodox_right_led_1_set (LED_BRIGHTNESS_HI); + ergodox_right_led_1_off (); + ergodox_right_led_2_set (LED_BRIGHTNESS_LO); + ergodox_right_led_2_on (); + ergodox_right_led_3_set (LED_BRIGHTNESS_LO); + ergodox_right_led_3_on (); + break; + + case MOD_BIT(KC_LSFT) ^ MOD_BIT(KC_LGUI): + ergodox_right_led_1_set (70); + ergodox_right_led_1_on (); + ergodox_right_led_2_set (70); + ergodox_right_led_2_on (); + ergodox_right_led_3_set (70); + ergodox_right_led_3_on (); + break; + + default: // reset leds + ergodox_right_led_1_set (LED_BRIGHTNESS_HI); + ergodox_right_led_1_off (); + ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + ergodox_right_led_2_off (); + ergodox_right_led_3_set (LED_BRIGHTNESS_HI); + ergodox_right_led_3_off (); + } + } +} + +// only runs when when the layer is changed, good for updating LED's and clearing sticky state +uint32_t layer_state_set_user(uint32_t state) { + uint8_t layer = biton32(state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + combo_enable(); // by default, enable combos. + switch (layer) { + case 0: + break; + case 1: + clear_mods(); + ergodox_right_led_1_on(); + break; + case 2: + clear_mods(); + ergodox_right_led_2_on(); + break; + case _OVERWATCH: + clear_mods(); + combo_disable(); // We don't want combos in overwatch + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + return state; +}; diff --git a/layouts/community/ergodox/issmirnov/push.sh b/layouts/community/ergodox/issmirnov/push.sh new file mode 100755 index 0000000000..1a6c7c4478 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/push.sh @@ -0,0 +1,2 @@ +#!/bin/bash +make ergodox_ez:issmirnov:teensy diff --git a/layouts/community/ergodox/issmirnov/template.txt b/layouts/community/ergodox/issmirnov/template.txt new file mode 100644 index 0000000000..35c7920a11 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/template.txt @@ -0,0 +1,17 @@ +,--------------------------------------------. ,--------------------------------------------. +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | | 38 | 39 | 40 | 41 | 42 | 43 | 44 | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 45 | 46 | 47 | 48 | 49 | 50 | 51 | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| 14 | 15 | 16 | 17 | 18 | 19 |-----| |-----| 52 | 53 | 54 | 55 | 56 | 57 | +|--------+-----+-----+-----+-----+-----| 26 | | 58 |-----+-----+-----+-----+-----+--------| +| 20 | 21 | 22 | 23 | 24 | 25 | | | | 59 | 60 | 61 | 62 | 63 | 64 | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + | 27 | 28 | 29 | 30 | 31 | | 65 | 66 | 67 | 68 | 69 | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | 32 | 33 | | 70 | 71 | + ,-----|-----|-----| |-----+-----+-----. + | | | 34 | | 72 | | | + | 35 | 36 |-----| |-----| 74 | 75 | + | | | 37 | | 73 | | | + `-----------------' `-----------------' diff --git a/layouts/community/ergodox/jacobono/keymap.c b/layouts/community/ergodox/jacobono/keymap.c index 8d80e349ba..62858f8dd0 100644 --- a/layouts/community/ergodox/jacobono/keymap.c +++ b/layouts/community/ergodox/jacobono/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LGUI(S(KC_SPC)), KC_SPC,KC_ENT,MO(NUMPAD), // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT, + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TRNS, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB, KC_H, KC_N, KC_E, KC_I, KC_O, KC_DEL, LGUI(KC_TAB), KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, @@ -83,11 +83,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_TRNS, KC_QUOT, LALT(KC_LSFT), KC_LEFT, MO(SYMB), - KC_TAB, KC_DELT, + KC_TAB, KC_DEL, KC_HOME, KC_SPC, KC_LGUI, KC_END, // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT, + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_RCTRL, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, diff --git a/layouts/community/ergodox/jafo/keymap.c b/layouts/community/ergodox/jafo/keymap.c index 08ea16d4bb..4737ab710d 100644 --- a/layouts/community/ergodox/jafo/keymap.c +++ b/layouts/community/ergodox/jafo/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), GUI_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(MDIA), - LT(SYMB,KC_GRV),KC_QUOT, KC_DELT, KC_LEFT,KC_RGHT, + LT(SYMB,KC_GRV),KC_QUOT, KC_DEL, KC_LEFT,KC_RGHT, CTL_T(KC_ESC), KC_LALT, KC_HOME, KC_SPC,KC_BSPC,KC_END, diff --git a/layouts/community/ergodox/jgarr/keymap.c b/layouts/community/ergodox/jgarr/keymap.c index 37524dfa08..84b573aca2 100644 --- a/layouts/community/ergodox/jgarr/keymap.c +++ b/layouts/community/ergodox/jgarr/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(1), CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), diff --git a/layouts/community/ergodox/mpiechotka/keymap.c b/layouts/community/ergodox/mpiechotka/keymap.c index cfd5b195e2..a673d0bd8a 100644 --- a/layouts/community/ergodox/mpiechotka/keymap.c +++ b/layouts/community/ergodox/mpiechotka/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(SYMB), KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE_CM] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, CM_Q, CM_W, CM_F, CM_P, CM_G, TG(SYMB), + KC_DEL, CM_Q, CM_W, CM_F, CM_P, CM_G, TG(SYMB), KC_ESC, CM_A, CM_R, CM_S, CM_T, CM_D, KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, KC_EQL, LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, diff --git a/layouts/community/ergodox/msc/keymap.c b/layouts/community/ergodox/msc/keymap.c index c64c92c9c8..62c2ec7b53 100644 --- a/layouts/community/ergodox/msc/keymap.c +++ b/layouts/community/ergodox/msc/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), KC_LGUI,KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c index afadf13ff6..63fea6e1c1 100644 --- a/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c +++ b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO_EQL, KC_N, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS, KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2), KC_INSERT, KC_PERC, - KC_DELT, + KC_DEL, KC_BSPC,KC_ENT,KC_SPC ), /* Keymap 1: Basic layer MACS (Same as pc, except for cmd/ctrl, which are swapped) diff --git a/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c index 10b7df642b..cb61ce59cb 100644 --- a/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c +++ b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS, KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2), KC_INSERT, KC_PERC, - KC_DELT, + KC_DEL, KC_BSPC,KC_ENT,KC_SPC ), /* Keymap 1: Basic layer MAC (Same as pc, except for cmd/ctrl, which are swapped) diff --git a/layouts/community/ergodox/osx_fr/keymap.c b/layouts/community/ergodox/osx_fr/keymap.c index b1876d6a8e..dba9bf32be 100644 --- a/layouts/community/ergodox/osx_fr/keymap.c +++ b/layouts/community/ergodox/osx_fr/keymap.c @@ -35,14 +35,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand FR_MINS, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_LEFT, - KC_DELT, FR_A, FR_Z, KC_E, KC_R, KC_T, TG(1), + KC_DEL, FR_A, FR_Z, KC_E, KC_R, KC_T, TG(1), KC_BSPC, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(FR_W), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,FR_UGRV), FR_LESS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPC, KC_BSPC, KC_END, - + // right hand KC_RGHT, FR_SECT, FR_EGRV, FR_EXLM, FR_CCED, FR_AGRV, FR_RPRN, TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, FR_GRV, diff --git a/layouts/community/ergodox/osx_kinesis_pnut/keymap.c b/layouts/community/ergodox/osx_kinesis_pnut/keymap.c index 5b731a1c00..21e383bd26 100644 --- a/layouts/community/ergodox/osx_kinesis_pnut/keymap.c +++ b/layouts/community/ergodox/osx_kinesis_pnut/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LALT(KC_LSFT), LT(SYMB,KC_GRV),KC_QUOT,KC_LEFT,KC_RGHT, KC_LGUI, ALT_T(KC_APP), KC_HOME, - KC_BSPC,KC_DELT,KC_END, + KC_BSPC,KC_DEL,KC_END, // right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, diff --git a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c index dcf2dc1d85..729810705b 100644 --- a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c +++ b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, M(KC_Q), M(KC_W), M(KC_E), M(KC_R), M(KC_T), KC_LBRC, M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G), - KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), KC_FN0, + KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), MO(SYMB), KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT, KC_TRNS, KC_FN1, KC_HOME, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_RBRC, M(KC_Y), M(KC_U), M(KC_I), M(KC_O), M(KC_P), KC_BSLS, M(KC_H), M(KC_J), M(KC_K), M(KC_L), KC_SCLN, KC_QUOT, - KC_FN0, M(KC_N), M(KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(SYMB), M(KC_N), M(KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DOWN, KC_UP, KC_RCTL, KC_RGUI, KC_RALT, KC_RALT, KC_RCTL, KC_PGUP, @@ -148,12 +148,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - ACTION_LAYER_MOMENTARY(SYMB), // FN0 - Momentary Layer 1 (Symbols) - ACTION_LAYER_ON(SYMB,ON_RELEASE), // FN1 - Enable Layer 1 (Symbols) - ACTION_LAYER_ON(MDIA,ON_RELEASE), // FN2 - Enable Layer 2 (Media) - ACTION_LAYER_OFF(SYMB,ON_RELEASE), // FN3 - Disable Layer 1 (Symbols) - ACTION_LAYER_OFF(MDIA,ON_RELEASE), // FN4 - Disable Layer 2 (MMedia) - ACTION_LAYER_MOMENTARY(MDIA) // FN5 - Momentary Layer 2 (Mdia) + [1] = ACTION_LAYER_ON(SYMB,ON_RELEASE), // FN1 - Enable Layer 1 (Symbols) + [2] = ACTION_LAYER_ON(MDIA,ON_RELEASE), // FN2 - Enable Layer 2 (Media) + [3] = ACTION_LAYER_OFF(SYMB,ON_RELEASE), // FN3 - Disable Layer 1 (Symbols) + [4] = ACTION_LAYER_OFF(MDIA,ON_RELEASE), // FN4 - Disable Layer 2 (MMedia) }; diff --git a/layouts/community/ergodox/phoenix/keymap.c b/layouts/community/ergodox/phoenix/keymap.c index 31a987b356..b9be7e2b89 100644 --- a/layouts/community/ergodox/phoenix/keymap.c +++ b/layouts/community/ergodox/phoenix/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_END, KC_SPC,KC_BSPC,KC_LGUI, // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, diff --git a/layouts/community/ergodox/plover/keymap.c b/layouts/community/ergodox/plover/keymap.c index 9f19ab24c4..0ab60ffbb8 100644 --- a/layouts/community/ergodox/plover/keymap.c +++ b/layouts/community/ergodox/plover/keymap.c @@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, ALT_T(KC_APP), KC_HOME, - KC_END, - KC_BSPC,KC_DELT,KC_LALT, + KC_END, + KC_BSPC,KC_DEL,KC_LALT, // right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(3), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, diff --git a/layouts/community/ergodox/qwerty_code_friendly/keymap.c b/layouts/community/ergodox/qwerty_code_friendly/keymap.c index 5f4ed3c19d..bf20e76a53 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/keymap.c +++ b/layouts/community/ergodox/qwerty_code_friendly/keymap.c @@ -24,34 +24,37 @@ #define CFQ_USE_DYNAMIC_MACRO - #if !defined(CFQ_USER_KEY0) -# define CFQ_USER_KEY0 KC_BSPC +# define CFQ_USER_KEY0 KC_APP #endif #if !defined(CFQ_USER_KEY1) -# define CFQ_USER_KEY1 CFQ_KC_FN1 +# define CFQ_USER_KEY1 KC_MENU #endif #if !defined(CFQ_USER_KEY2) -# define CFQ_USER_KEY2 KC_INS +# define CFQ_USER_KEY2 KC_BSPC #endif #if !defined(CFQ_USER_KEY3) -# define CFQ_USER_KEY3 KC_NLCK +# define CFQ_USER_KEY3 KC_DEL #endif #if !defined(CFQ_USER_KEY4) -# define CFQ_USER_KEY4 KC_BSPC +# define CFQ_USER_KEY4 KC_SPC #endif #if !defined(CFQ_USER_KEY5) -# define CFQ_USER_KEY5 KC_DELT +# define CFQ_USER_KEY5 CFQ_KC_FN1 #endif #if !defined(CFQ_USER_KEY6) # define CFQ_USER_KEY6 KC_CAPS #endif #if !defined(CFQ_USER_KEY7) -# define CFQ_USER_KEY7 CFQ_KC_FN3 +# define CFQ_USER_KEY7 KC_INS #endif #if !defined(CFQ_USER_KEY8) # define CFQ_USER_KEY8 KC_DEL #endif +#if !defined(CFQ_USER_KEY9) +# define CFQ_USER_KEY9 KC_BSPC +#endif + #ifdef CFQ_USE_80_KEYS # define LAYOUT_ergodox_76_or_80 LAYOUT_ergodox_80 @@ -240,10 +243,10 @@ static char cfq_word_lut_title_caps[ sizeof(CFQ_WORD_Y) + sizeof(CFQ_WORD_Z) ]; -#define LAYER_BASE 0 /* default layer */ -#define LAYER_KPAD 1 /* keypad */ -#define LAYER_MDIA 2 /* media keys */ -#define LAYER_FKEY 3 /* F-Keys & Words */ +#define LAYER_BASE 0 /* Default Layer. */ +#define LAYER_KPAD 1 /* Keypad, Bracket Pairs & Macro Record. */ +#define LAYER_FKEY 2 /* Function Keys, Media & Mouse Keys. */ +#define LAYER_WORD 3 /* Entire Words (one for each key) & Numbers. */ enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, /* can always be here */ @@ -307,20 +310,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' - * | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del | + * | LCtl |Super | Alt | App | Menu | | Left | Down | Up |Right | Del | * '----------------------------------' '----------------------------------' * .-------------. .-------------. - * | Ins |NumClk| | Home | End | + * |BSpace| Del | | Home | End | * .------+------+------| |------+------+------. * | | |CapsLk| | PgUp | | | - * |BSpace| Del |------| |------| ~L2 |Enter | - * | | | ~L3 | | PgDn | | | + * |Space | ~L1 |------| |------| ~L2 |Enter | + * | | |Insert| | PgDn | | | * '--------------------' '--------------------' * * Optional overrides: see CFQ_USER_KEY# defines. - * * .--------------------------------------------------. .--------------------------------------------------. - * | | | | | | | | | | | | | | | USR0 | + * | | | | | | | | | | | | | | | USR9 | * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -328,7 +330,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' - * | | | | USR1 | | | | | | | USR8 | + * | | | | USR0 | USR1 | | | | | | USR8 | * '----------------------------------' '----------------------------------' * .-------------. .-------------. * | USR2 | USR3 | | | | @@ -347,12 +349,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, - KC_LCTL, KC_LGUI, KC_LALT, CFQ_USER_KEY1, KC_SPC, + KC_LCTL, KC_LGUI, KC_LALT, CFQ_USER_KEY0, CFQ_USER_KEY1, CFQ_USER_KEY2, CFQ_USER_KEY3, K80(L0K0), K80(L0K1), CFQ_USER_KEY6, CFQ_USER_KEY4, CFQ_USER_KEY5, CFQ_USER_KEY7, /* right hand */ - KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, CFQ_USER_KEY0, + KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, CFQ_USER_KEY9, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, @@ -361,7 +363,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, K80(L0K2), K80(L0K3), KC_PGDN, CFQ_KC_FN2, KC_ENT ), -/* Keymap 1: KeyPad, Macro Record +/* Keymap 1: Keypad, Bracket Pairs & Macro Record * * .--------------------------------------------------. .--------------------------------------------------. * | | | | | | | {} | | }{ | |NumLck| / | * | - | | @@ -377,12 +379,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * .-------------. .-------------. * |Start1|Start2| | | | * .------+------+------| |------+------+------. - * | | | Stop | | | | | - * |Play1 |Play2 |------| |------| | | - * | | | | | | | | + * | | |Play1 | | | | | + * | Stop | |------| |------| | | + * | | |Play2 | | | | | * '--------------------' '--------------------' */ -/* KEYPAD & MACRO */ [LAYER_KPAD] = LAYOUT_ergodox_76_or_80( /* left hand */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_CBR, @@ -391,8 +392,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_ANG, M_BRACKET_IN_BRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2, - K80(L1K0), K80(L1K1), DYN_REC_STOP, - DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_TRNS, + K80(L1K0), K80(L1K1), DYN_MACRO_PLAY1, + DYN_REC_STOP, KC_TRNS, DYN_MACRO_PLAY2, /* right hand */ M_BRACKET_OUT_CBR, KC_TRNS, KC_NLCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, M_BRACKET_OUT_PRN, M_ARROW_LEQL, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, @@ -403,7 +404,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, K80(L1K2), K80(L1K3), KC_TRNS, KC_TRNS, KC_TRNS ), -/* Keymap 2: FKeys, media & mouse keys +/* Keymap 2: Function Keys, Media & Mouse Keys * * .--------------------------------------------------. .--------------------------------------------------. * | | | | | | | | | Mute | | F10 | F11 | F12 | | | @@ -424,8 +425,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | MNxt | | | * '--------------------' '--------------------' */ -/* MEDIA, MOUSE & NUMBERS */ -[LAYER_MDIA] = LAYOUT_ergodox_76_or_80( +[LAYER_FKEY] = LAYOUT_ergodox_76_or_80( /* left hand */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_WH_U, @@ -446,6 +446,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MNXT, KC_TRNS, KC_MPLY ), /* Keymap 3: Entire Words (one for each key) & Numbers + * + * Activate by holding L1 & L2. * * .--------------------------------------------------. .--------------------------------------------------. * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | @@ -466,9 +468,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * '--------------------' '--------------------' */ - -/* FKEY & WORDS */ -[LAYER_FKEY] = LAYOUT_ergodox_76_or_80( +[LAYER_WORD] = LAYOUT_ergodox_76_or_80( /* left hand */ KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, M_WORD_Q, M_WORD_W, M_WORD_E, M_WORD_R, M_WORD_T, KC_TRNS, @@ -490,6 +490,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +uint32_t layer_state_set_user(uint32_t state) { + /* Use layer 3 when 1 & 2 are pressed. */ + state = update_tri_layer_state(state, LAYER_KPAD, LAYER_FKEY, LAYER_WORD); + return state; +} + #define WITHOUT_MODS(...) \ do { \ uint8_t _real_mods = get_mods(); \ diff --git a/layouts/community/ergodox/qwerty_code_friendly/readme.md b/layouts/community/ergodox/qwerty_code_friendly/readme.md index 319ea50b9a..e615fa28f0 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/readme.md +++ b/layouts/community/ergodox/qwerty_code_friendly/readme.md @@ -61,20 +61,20 @@ using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make. |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' - | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del | + | LCtl |Super | Alt | App | Menu | | Left | Down | Up |Right | Del | '----------------------------------' '----------------------------------' .-------------. .-------------. - | Ins |NumClk| | Home | End | + |BSpace| Del | | Home | End | .------+------+------| |------+------+------. | | |CapsLk| | PgUp | | | - |BSpace| Del |------| |------| ~L2 |Enter | - | | | ~L3 | | PgDn | | | + |Space | ~L1 |------| |------| ~L2 |Enter | + | | |Insert| | PgDn | | | '--------------------' '--------------------' Optional overrides: see CFQ_USER_KEY# defines. .--------------------------------------------------. .--------------------------------------------------. -| | | | | | | | | | | | | | | USR0 | +| | | | | | | | | | | | | | | USR9 | |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| | | | | | | | | | | | | | | | | |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -82,7 +82,7 @@ Optional overrides: see CFQ_USER_KEY# defines. |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | | | | | | | | | | | | | | | | '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' - | | | | USR1 | | | | | | | USR8 | + | | | | USR0 | USR1 | | | | | | USR8 | '----------------------------------' '----------------------------------' .-------------. .-------------. | USR2 | USR3 | | | | @@ -93,7 +93,7 @@ Optional overrides: see CFQ_USER_KEY# defines. '--------------------' '--------------------' ``` -## Keymap 1: KeyPad, Macro Record +## Keymap 1: KeyPad, Bracket Pairs & Macro Record Notes: @@ -115,9 +115,9 @@ Notes: .-------------. .-------------. |Start1|Start2| | | | .------+------+------| |------+------+------. - | | | Stop | | | | | - |Play1 |Play2 |------| |------| | | - | | | | | | | | + | | |Play1 | | | | | + | Stop | |------| |------| | | + | | |Play2 | | | | | '--------------------' '--------------------' ``` @@ -146,6 +146,8 @@ Notes: ## Keymap 3: User Defined Words & Numbers +Activate by holding L1 & L2. + This is for assigning whole words to single keys. You can define the arguments (which must be quoted) using: `CFQ_WORD_[A-Z]` eg: `-DCFQ_WORD_E=\"my@email.com\"` @@ -178,6 +180,12 @@ Notes: ## Changelog +- 2019/11/20 + Move space to thumb cluster + Make L1 and L2 symmetrical. + Activate L3 by holding L1 & L2. + Add App & Menu keys. + - 2018/10/19 Move F-Keys to key-pad like layout. diff --git a/layouts/community/ergodox/reset_eeprom/keymap.c b/layouts/community/ergodox/reset_eeprom/keymap.c index 9033205b98..83c252a9a1 100644 --- a/layouts/community/ergodox/reset_eeprom/keymap.c +++ b/layouts/community/ergodox/reset_eeprom/keymap.c @@ -60,24 +60,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } - return MACRO_NONE; -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { // dynamically generate these. diff --git a/layouts/community/ergodox/sneako/keymap.c b/layouts/community/ergodox/sneako/keymap.c index 5add317e16..313e597d7b 100644 --- a/layouts/community/ergodox/sneako/keymap.c +++ b/layouts/community/ergodox/sneako/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, diff --git a/layouts/community/ergodox/software_neo2/keymap.c b/layouts/community/ergodox/software_neo2/keymap.c index 7ec4f7b838..73e0694ba0 100644 --- a/layouts/community/ergodox/software_neo2/keymap.c +++ b/layouts/community/ergodox/software_neo2/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_DELT, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY, + KC_DEL, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY, KC_TAB, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_ESC, NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, KC_LSFT, CTL_T(NEO_UE), GUI_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, TG(1), @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), NEO_B, NEO_M, NEO_COMM, NEO_DOT, NEO_J, KC_RSFT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NEO_L2_R, KC_LALT,KC_RGUI, - KC_DELT, + KC_DEL, KC_ESC,KC_ENT, KC_SPC ), /* Keymap 1: Media and mouse keys diff --git a/layouts/community/ergodox/swedish-lindhe/keymap.c b/layouts/community/ergodox/swedish-lindhe/keymap.c index 71ccba2414..1b16c31d4d 100644 --- a/layouts/community/ergodox/swedish-lindhe/keymap.c +++ b/layouts/community/ergodox/swedish-lindhe/keymap.c @@ -53,16 +53,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PSCR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F11, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_ACUT, - CTL_T(NO_APOS), NO_CIRC, NO_ASTR, KC_LALT, KC_LGUI, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SE_ACUT, + CTL_T(SE_APOS), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI, KC_LCTRL, KC_LALT, - NO_TILD, + SE_TILD, KC_SPC, KC_BSPC, KC_ESC, // right hand - KC_MS_BTN3, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, - KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, - KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSFT, + KC_MS_BTN3, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, + KC_H, KC_J, KC_K, KC_L, SE_OSLH, SE_AE, + KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT, KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, KC_HOME, KC_END, KC_PGUP, diff --git a/layouts/community/ergodox/swedish/keymap.c b/layouts/community/ergodox/swedish/keymap.c index 987f2c6afd..454dcc35cc 100644 --- a/layouts/community/ergodox/swedish/keymap.c +++ b/layouts/community/ergodox/swedish/keymap.c @@ -62,20 +62,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand - NO_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,NO_APOS), NO_ACUT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + LT(SYMB,SE_APOS), SE_ACUT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), GUI_T(NO_AE), - MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(NO_MINS), KC_RSFT, - KC_UP, KC_DOWN, NO_CIRC, NO_ASTR, TT(SYMB), + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_OSLH), GUI_T(SE_AE), + MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(SE_MINS), KC_RSFT, + KC_UP, KC_DOWN, SE_CIRC, SE_ASTR, TT(SYMB), KC_ALGR, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -106,19 +106,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = LAYOUT_ergodox( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_EXLM,NO_AT, NO_LCBR,NO_RCBR,NO_PIPE,KC_TRNS, - KC_TRNS,KC_HASH,NO_DLR, NO_LPRN,NO_RPRN,NO_GRV, - KC_TRNS,KC_PERC,NO_CIRC,NO_LBRC,NO_RBRC,NO_TILD,KC_TRNS, + KC_TRNS,KC_EXLM,SE_AT, SE_LCBR,SE_RCBR,SE_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,SE_DLR, SE_LPRN,SE_RPRN,SE_GRV, + KC_TRNS,KC_PERC,SE_CIRC,SE_LBRC,SE_RBRC,SE_TILD,KC_TRNS, EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, RGB_MOD,KC_TRNS, KC_TRNS, RGB_VAD,RGB_VAI,KC_TRNS, // right hand KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, NO_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, NO_PLUS, KC_TRNS, - KC_TRNS, NO_AMPR, KC_1, KC_2, KC_3, NO_MINS, KC_TRNS, - KC_TRNS,KC_DOT, KC_0, NO_EQL, KC_TRNS, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, SE_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, SE_PLUS, KC_TRNS, + KC_TRNS, SE_AMPR, KC_1, KC_2, KC_3, SE_MINS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, SE_EQL, KC_TRNS, RGB_TOG, RGB_SLD, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI diff --git a/layouts/community/ergodox/swissgerman/keymap.c b/layouts/community/ergodox/swissgerman/keymap.c index b32fa4c2a4..8ba9582934 100644 --- a/layouts/community/ergodox/swissgerman/keymap.c +++ b/layouts/community/ergodox/swissgerman/keymap.c @@ -47,15 +47,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' | + * | § | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | | + * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | ü | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | + * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L |ö / L2|ä / Cmd | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~L1 | + * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | ¨ | ~L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | LGui | | Alt |Ctrl/Esc| @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT, @@ -270,7 +270,7 @@ void send_key(uint16_t keycode) { void go_back_based_on_tag(char* tag) { const int BRACKETS_AND_SLASH_LENGTH = 3; - + for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { send_key(KC_LEFT); } diff --git a/layouts/community/ergodox/tkuichooseyou/keymap.c b/layouts/community/ergodox/tkuichooseyou/keymap.c index 4dbf8be585..9141cd1c74 100644 --- a/layouts/community/ergodox/tkuichooseyou/keymap.c +++ b/layouts/community/ergodox/tkuichooseyou/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), - KC_DELT, CTL_T(KC_ESC), + KC_DEL, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT ), diff --git a/layouts/community/ergodox/tm2030/keymap.c b/layouts/community/ergodox/tm2030/keymap.c index 1259a18ff2..3f82800377 100644 --- a/layouts/community/ergodox/tm2030/keymap.c +++ b/layouts/community/ergodox/tm2030/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC, KC_LSFT, KC_PGDN, // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, + KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SFT_T(KC_QUOT), KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_BSLS), @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [DVRK] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSPC, KC_LSFT, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_ENT, @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC, KC_LSFT, KC_PGDN, // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_D, KC_H, KC_T, KC_N, KC_S, SFT_T(KC_MINS), KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_BSLS), @@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, - KC_TRNS, KC_TRNS, LSFT(KC_DELT),LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, + KC_TRNS, KC_TRNS, LSFT(KC_DEL), LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/tonyabra_osx/keymap.c b/layouts/community/ergodox/tonyabra_osx/keymap.c index 4f174a69de..469c219440 100644 --- a/layouts/community/ergodox/tonyabra_osx/keymap.c +++ b/layouts/community/ergodox/tonyabra_osx/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, TG(SYMB), KC_GRV, KC_LBRC, KC_RBRC,KC_QUOT, - KC_DELT,KC_LALT, + KC_DEL, KC_LALT, KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand diff --git a/layouts/community/ergodox/townk_osx/keymap.c b/layouts/community/ergodox/townk_osx/keymap.c index a6097d9a3e..e36d71432d 100644 --- a/layouts/community/ergodox/townk_osx/keymap.c +++ b/layouts/community/ergodox/townk_osx/keymap.c @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_FN1, TG(KEYPAD), KC_LCTRL, KC_LALT, KC_LGUI, M_TESC, M_TPASTE, KC_HOME, - KC_BSPC, KC_DELT, KC_END, + KC_BSPC, KC_DEL, KC_END, //right half KC_POWER, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, MEH_T(KC_F17), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, diff --git a/layouts/community/ergodox/twey/keymap.c b/layouts/community/ergodox/twey/keymap.c index 0cc98ca77b..dac153f070 100644 --- a/layouts/community/ergodox/twey/keymap.c +++ b/layouts/community/ergodox/twey/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(STEN), - KC_DELT, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_ESC, + KC_DEL, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_ESC, KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB, MO(SYMB), KC_NO, KC_GRV, KC_LEFT,KC_RGHT, diff --git a/layouts/community/ergodox/videck/keymap.c b/layouts/community/ergodox/videck/keymap.c index 1229469d71..7058d93447 100644 --- a/layouts/community/ergodox/videck/keymap.c +++ b/layouts/community/ergodox/videck/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PGDN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_R), + KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_R), KC_LBRC, KC_RBRC, KC_EQL, KC_RALT, KC_RCTL, KC_APP, KC_ESC, KC_INS, diff --git a/layouts/community/ergodox/xyverz/keymap.c b/layouts/community/ergodox/xyverz/keymap.c index eeeded47fc..3131c30640 100644 --- a/layouts/community/ergodox/xyverz/keymap.c +++ b/layouts/community/ergodox/xyverz/keymap.c @@ -1,6 +1,6 @@ /* * About this keymap: - * + * * The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner * keys. I've decided to continue using this layout with my ErgoDox. @@ -99,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT_ergodox( // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MD), KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT, @@ -138,10 +138,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | End | | PgDn | | | * `--------------------' `--------------------' */ -[_CM] = LAYOUT_ergodox( +[_CM] = LAYOUT_ergodox( // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX, + KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MD), KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT, diff --git a/layouts/community/ergodox/zweihander-macos/keymap.c b/layouts/community/ergodox/zweihander-macos/keymap.c index f64808c4d2..93a435efb1 100644 --- a/layouts/community/ergodox/zweihander-macos/keymap.c +++ b/layouts/community/ergodox/zweihander-macos/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(SYMB), - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI,KC_LEFT,KC_RGHT, diff --git a/layouts/community/numpad_5x6/bjohnson/config.h b/layouts/community/numpad_5x6/bjohnson/config.h index fe2cffec78..668450d88d 100644 --- a/layouts/community/numpad_5x6/bjohnson/config.h +++ b/layouts/community/numpad_5x6/bjohnson/config.h @@ -4,7 +4,7 @@ #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) #define RGB_DI_PIN B7 -#define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_NUM 13 // Number of LEDs #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 12 diff --git a/layouts/community/numpad_5x6/bjohnson/keymap.c b/layouts/community/numpad_5x6/bjohnson/keymap.c index 79e87e69f4..4b15ccdfb9 100644 --- a/layouts/community/numpad_5x6/bjohnson/keymap.c +++ b/layouts/community/numpad_5x6/bjohnson/keymap.c @@ -25,9 +25,10 @@ void keyboard_post_init_user(void) { uint8_t temp_mode = rgblight_config.mode; rgblight_enable_noeeprom(); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - for (uint16_t i = 360; i > 0; i--) { - rgblight_sethsv_noeeprom( ( i + 180) % 360, 255, 255); - wait_ms(8); + for (uint16_t i = 255; i > 0; i--) { + rgblight_sethsv_noeeprom( ( i + 128) % 255, 255, 255); + matrix_scan(); + wait_ms(10); } led_set_user(host_keyboard_leds()); rgblight_mode_noeeprom(temp_mode); diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h index 2fc5ab6588..29045148e3 100644 --- a/layouts/community/numpad_5x6/drashna/config.h +++ b/layouts/community/numpad_5x6/drashna/config.h @@ -3,17 +3,17 @@ // #define B6_AUDIO #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) -# define RGB_DI_PIN B1 -# define RGBLED_NUM 16 // Number of LEDs +# define RGB_DI_PIN B1 +# define RGBLED_NUM 16 // Number of LEDs -# define RGBLIGHT_HUE_STEP 12 -# define RGBLIGHT_SAT_STEP 12 -# define RGBLIGHT_VAL_STEP 12 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#endif // RGBLIGHT_ENABLE +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#endif // RGBLIGHT_ENABLE #if defined(KEYBOARD_primekb_prime_m) -# undef PRODUCT -# define PRODUCT Drashna Hacked Prime_M Macro Pad +# undef PRODUCT +# define PRODUCT Drashna Hacked Prime_M Macro Pad #endif diff --git a/layouts/community/numpad_5x6/drashna/keymap.c b/layouts/community/numpad_5x6/drashna/keymap.c index 646f4db337..3d325a4c11 100644 --- a/layouts/community/numpad_5x6/drashna/keymap.c +++ b/layouts/community/numpad_5x6/drashna/keymap.c @@ -1,8 +1,8 @@ -#include QMK_KEYBOARD_H #include "drashna.h" #define F2_MCRO LT(_GAMEPAD, KC_F2) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMLOCK] = LAYOUT_numpad_5x6( KC_F1, F2_MCRO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, @@ -20,3 +20,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_VAI, RGB_VAD, _______, _______, _______ ), }; +// clang-format on diff --git a/layouts/community/numpad_5x6/drashna/rules.mk b/layouts/community/numpad_5x6/drashna/rules.mk index 62bbc365d1..0bdf97bae5 100644 --- a/layouts/community/numpad_5x6/drashna/rules.mk +++ b/layouts/community/numpad_5x6/drashna/rules.mk @@ -5,6 +5,5 @@ NO_SECRETS = yes BOOTMAGIC_ENABLE = lite INDICATOR_LIGHTS = no RGBLIGHT_TWINKLE = yes -MACROS_ENABLED = no MAKE_BOOTLOADER = yes RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/layouts/community/ortho_1x4/belgorath/keymap.c b/layouts/community/ortho_1x4/belgorath/keymap.c new file mode 100644 index 0000000000..ace4022957 --- /dev/null +++ b/layouts/community/ortho_1x4/belgorath/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _DEFAULT 0 +#define _LOWER 1 +#define LOWER LT(_LOWER, KC_PENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DEFAULT] = LAYOUT_ortho_1x4 ( + LOWER, KC_P0, KC_PDOT,KC_PAST +), + +/* Lower */ +[_LOWER] = LAYOUT_ortho_1x4 ( + _______,_______,_______,_______ +), +}; diff --git a/layouts/community/ortho_1x4/layout.json b/layouts/community/ortho_1x4/layout.json new file mode 100644 index 0000000000..6103c7e248 --- /dev/null +++ b/layouts/community/ortho_1x4/layout.json @@ -0,0 +1 @@ +["","","",""] \ No newline at end of file diff --git a/layouts/community/ortho_4x12/bakingpy/keymap.c b/layouts/community/ortho_4x12/bakingpy/keymap.c index 71672d0513..eb3b420ee6 100644 --- a/layouts/community/ortho_4x12/bakingpy/keymap.c +++ b/layouts/community/ortho_4x12/bakingpy/keymap.c @@ -2,13 +2,15 @@ extern keymap_config_t keymap_config; -#define _MAC 0 -#define _WINDOWS 1 -#define _TESTMODE 2 -#define _LOWER 3 -#define _RAISE 4 -#define _FKEYS 5 -#define _ADJUST 16 +enum layer_names { + _MAC, + _WINDOWS, + _TESTMODE, + _LOWER, + _RAISE, + _FKEYS, + _ADJUST, +}; enum custom_keycodes { MAC = SAFE_RANGE, @@ -17,7 +19,6 @@ enum custom_keycodes { LOWER, RAISE, ADJUST, - PLAY_ALLSTAR, }; #define KC_ KC_TRNS @@ -35,6 +36,22 @@ enum custom_keycodes { #define KC_BL_T BL_TOGG #define KC_RMOD RGB_MOD +#ifndef LAYOUT_kc_ortho_4x12 +#define LAYOUT_kc_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + LAYOUT_ortho_4x12( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ + ) + +#endif + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAC] = LAYOUT_kc_ortho_4x12( @@ -130,28 +147,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case MAC: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_MAC); + set_single_persistent_default_layer(_MAC); } return false; break; case WINDOWS: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_WINDOWS); + set_single_persistent_default_layer(_WINDOWS); } return false; break; case TESTMODE: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_TESTMODE); + set_single_persistent_default_layer(_TESTMODE); } return false; break; diff --git a/layouts/community/ortho_4x12/bakingpy/rules.mk b/layouts/community/ortho_4x12/bakingpy/rules.mk index 17a589cd1d..0da75e0be4 100644 --- a/layouts/community/ortho_4x12/bakingpy/rules.mk +++ b/layouts/community/ortho_4x12/bakingpy/rules.mk @@ -1,5 +1,5 @@ ifneq ($(LAYOUTS_HAS_RGB), no) - RGBLIGHT_ENABLE = yes + RGBLIGHT_ENABLE = yes endif AUDIO_ENABLE = no ifeq ($(strip $(KEYBOARD)), zlant) diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 475afd213f..663708afa6 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -1,55 +1,68 @@ #pragma once - #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) -# define RGB_DI_PIN B3 -# define RGBLED_NUM 13 // Number of LEDs -# define RGBLIGHT_ANIMATIONS -# define RGBLIGHT_HUE_STEP 12 -# define RGBLIGHT_SAT_STEP 12 -# define RGBLIGHT_VAL_STEP 12 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -# ifdef RGB_MATRIX_ENABLE -# define RGBLIGHT_DISABLE_KEYCODES -# endif -#endif // RGBLIGHT_ENABLE +# if defined(KEYBOARD_planck_light) +# define RGB_DI_PIN A0 +# define RGBLED_NUM 13 // Number of LEDs +# endif +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +# ifdef RGB_MATRIX_ENABLE +# define RGBLIGHT_DISABLE_KEYCODES +# endif +#endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -# define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended -# ifndef KEYBOARD_planck_ez -# define EECONFIG_RGB_MATRIX (uint32_t *)15 -# endif +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# undef RGB_MATRIX_LED_PROCESS_LIMIT +# undef RGB_MATRIX_LED_FLUSH_LIMIT +# ifdef KEYBOARD_planck_rev6 +# define DRIVER_LED_TOTAL RGBLED_NUM +# endif #endif #if defined(KEYBOARD_lets_split_rev2) -# define USE_SERIAL -# undef USE_I2C -# define EE_HANDS +# define USE_SERIAL +# undef USE_I2C +# define EE_HANDS #endif #if !defined(KEYBOARD_planck_light) -# ifdef RGBLIGHT_ENABLE -# define NO_MUSIC_MODE -# endif // RGBLIGHT_ENABLE -#endif // KEYBOARD_planck_light - +# ifdef RGBLIGHT_ENABLE +# define NO_MUSIC_MODE +# endif // RGBLIGHT_ENABLE +#else +# undef QMK_ESC_OUTPUT +# define QMK_ESC_OUTPUT E6 // usually COL +# undef QMK_ESC_INPUT +# define QMK_ESC_INPUT B0 // usually ROW +# undef QMK_LED +# define QMK_LED D6 +# undef QMK_SPEAKER +# define QMK_SPEAKER B5 +# define SOLENOID_PIN A1 +#endif // KEYBOARD_planck_light #if defined(KEYBOARD_planck) -# undef PRODUCT -# if defined(KEYBOARD_planck_light) -# define PRODUCT Drashna Hacked RGB Beacon (Planck Light) -# elif defined(KEYBOARD_planck_rev6) -# define PRODUCT Drashna Hacked Planck Rev6 -# elif defined(KEYBOARD_planck_EZ) -# define PRODUCT Drashna Hacked Planck EZ -# endif +# undef PRODUCT +# if defined(KEYBOARD_planck_light) +# define PRODUCT Drashna Hacked RGB Beacon(Planck Light) +# elif defined(KEYBOARD_planck_rev6) +# define PRODUCT Drashna Hacked Planck Rev6 +# elif defined(KEYBOARD_planck_ez) +# define PRODUCT Drashna Hacked Planck EZ +# endif #endif +#define ENCODER_DIRECTION_FLIP /* * MIDI options */ @@ -73,3 +86,50 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ +#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ +#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ + +/* default 3V ERM vibration motor voltage and library*/ +#if FB_ERM_LRA == 0 +# define RATED_VOLTAGE 3 +# define V_RMS 2.3 +# define V_PEAK 3.30 +/* Library Selection */ +# define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +/* default 2V LRA voltage and library */ +#elif FB_ERM_LRA == 1 +# define RATED_VOLTAGE 2 +# define V_RMS 2.0 +# define V_PEAK 2.85 +# define F_LRA 200 +/* Library Selection */ +# define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +#endif + +/* Control 1 register settings */ +#define DRIVE_TIME 25 +#define AC_COUPLE 0 +#define STARTUP_BOOST 1 + +/* Control 2 Settings */ +#define BIDIR_INPUT 1 +#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ +#define SAMPLE_TIME 3 +#define BLANKING_TIME 1 +#define IDISS_TIME 1 + +/* Control 3 settings */ +#define NG_THRESH 2 +#define ERM_OPEN_LOOP 1 +#define SUPPLY_COMP_DIS 0 +#define DATA_FORMAT_RTO 0 +#define LRA_DRIVE_MODE 0 +#define N_PWM_ANALOG 0 +#define LRA_OPEN_LOOP 0 +/* Control 4 settings */ +#define ZC_DET_TIME 0 +#define AUTO_CAL_TIME 3 diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index c1c016ce9f..c3899cd036 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -1,55 +1,50 @@ -/* Copyright 2015-2017 Jack Humbert - * - * 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 . - */ - -#include QMK_KEYBOARD_H #include "drashna.h" #ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; #endif - #ifdef BACKLIGHT_ENABLE enum planck_keycodes { - BACKLIT = NEW_SAFE_RANGE, + BACKLIT = NEW_SAFE_RANGE, + TH_LVL, }; + #else - #define BACKLIT OSM(MOD_LSFT) +# define BACKLIT OSM(MOD_LSFT) +enum planck_keycodes { + TH_LVL = NEW_SAFE_RANGE, +}; #endif #ifdef KEYBOARD_planck_ez -# define PLNK_1 BK_LWER -# define PLNK_2 SP_LWER -# define PLNK_3 KC_NO -# define PLNK_4 ET_RAIS +# define PLNK_1 BK_LWER +# define PLNK_2 SP_LWER +# define PLNK_3 KC_NO +# define PLNK_4 ET_RAIS #else -# define PLNK_1 SP_LWER -# define PLNK_2 BK_LWER -# define PLNK_3 DL_RAIS -# define PLNK_4 ET_RAIS +# define PLNK_1 SP_LWER +# define PLNK_2 BK_LWER +# define PLNK_3 DL_RAIS +# define PLNK_4 ET_RAIS #endif +/* + * The `LAYOUT_ortho_4x12_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ +// clang-format off #define LAYOUT_ortho_4x12_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ ) \ LAYOUT_ortho_4x12_wrapper( \ - KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ - KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) @@ -117,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_RAISE] = LAYOUT_ortho_4x12_wrapper( @@ -130,26 +125,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ortho_4x12_wrapper( KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, - _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE + TH_LVL, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, + HPT_TOG, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, TG_MODS ) }; - +// clang-format on bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - #ifdef BACKLIGHT_ENABLE +#ifdef BACKLIGHT_ENABLE case BACKLIT: if (record->event.pressed) { register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE +# ifdef BACKLIGHT_ENABLE backlight_step(); - #endif +# endif } else { unregister_code(KC_RSFT); } - return false; + break; +#endif +#ifdef KEYBOARD_planck_ez + case TH_LVL: + if (record->event.pressed) { + keyboard_config.led_level++; + if (keyboard_config.led_level > 4) { + keyboard_config.led_level = 0; + } + planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4); + planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4); + eeconfig_update_kb(keyboard_config.raw); + layer_state_set_kb(layer_state); + } break; #endif } @@ -172,6 +180,32 @@ bool music_mask_user(uint16_t keycode) { #ifdef RGB_MATRIX_ENABLE +# ifdef KEYBOARD_planck_rev6 +// clang-format off +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, + { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED }, + { NO_LED, 4, NO_LED, NO_LED, 3, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED } + }, { + // LED Index to Physical Position + {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} + }, { + // LED Index to Flag + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL + } +}; +// clange-format on +# endif + +// clang-format off void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } @@ -179,160 +213,196 @@ void suspend_power_down_keymap(void) { void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } +// clang-format on void rgb_matrix_indicators_user(void) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); uint8_t this_osm = get_oneshot_mods(); - bool is_ez; - #ifdef KEYBOARD_planck_ez + bool is_ez; +# ifdef KEYBOARD_planck_ez is_ez = true; - #endif +# endif - if ( userspace_config.rgb_layer_change && -#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + if (userspace_config.rgb_layer_change && +# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED !g_suspend_state && -#endif -#if defined(RGBLIGHT_ENABLE) - (!rgblight_config.enable && rgb_matrix_config.enable) -#else - rgb_matrix_config.enable -#endif - ) { - switch (biton32(layer_state)) { +# endif +# if defined(RGBLIGHT_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +# else + rgb_matrix_config.enable +# endif + ) { + switch (get_highest_layer(layer_state)) { + case _GAMEPAD: + rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _DIABLO: + rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER); + break; case _RAISE: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; + rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; case _LOWER: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; + rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; case _ADJUST: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; - default: - switch (biton32(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break; - case _COLEMAK: - rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break; - case _DVORAK: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; - case _WORKMAN: - rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break; - case _NORMAN: - rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break; - case _MALTRON: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; - case _EUCALYN: - rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break; - case _CARPLAX: - rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break; + rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + default: { + bool mods_enabled = IS_LAYER_ON(_MODS); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _COLEMAK: + rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _DVORAK: + rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _WORKMAN: + rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _NORMAN: + rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _MALTRON: + rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _EUCALYN: + rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _CARPLAX: + rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; } + break; + } } } - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY: - rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); break; + rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); + break; case _COLEMAK: - rgb_matrix_set_color(is_ez ? 41 : 42, 0xFF, 0x00, 0xFF); break; + rgb_matrix_set_color(is_ez ? 41 : 42, 0xFF, 0x00, 0xFF); + break; case _DVORAK: - rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0x00); break; + rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0x00); + break; case _WORKMAN: - rgb_matrix_set_color(is_ez ? 41 : 42, 0xD9, 0xA5, 0x21); break; + rgb_matrix_set_color(is_ez ? 41 : 42, 0xD9, 0xA5, 0x21); + break; } - if ( (this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1<. + */ + +#include QMK_KEYBOARD_H +#include "muse.h" +#include "mguterl.h" + +extern keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * |HypTab| Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |EscCtl| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | GESC | Ctrl | Alt | GUI |Lower |SpcUtl|SpcUtl|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + ESC_CTL, 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, SFT_ENT, + KC_GESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SPC_UTL, SPC_UTL, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* + * Gaming is very similar to Qwerty. Certain features from Qwerty are disable + * for better gaming experience. + */ +[_GAMING] = LAYOUT_ortho_4x12( + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ESC, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______ +), + +/* + * Util is accessed by holding Space. The Util layer contains vimkeys and + * shortcuts that I find myself needing often. + */ +[_UTIL] = LAYOUT_ortho_4x12( \ + _______, GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, GUI_6, GUI_7, GUI_8, GUI_9, GUI_0, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, GO_BACK, GO_FWD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + 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_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, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + 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_DEL, 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_ortho_4x12( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * |ToGame| Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + TG_GAME, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + writePinHigh(E6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_ADJUST); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_ADJUST); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/layouts/community/ortho_4x12/mguterl/readme.md b/layouts/community/ortho_4x12/mguterl/readme.md new file mode 100644 index 0000000000..d1328c9aa5 --- /dev/null +++ b/layouts/community/ortho_4x12/mguterl/readme.md @@ -0,0 +1,20 @@ +# Michael Guterl's Ortho 4x12 Layout + +I use this layout for both my Planck and Levinson. I also have a very similar +[keymap](/keyboards/preonic/keymaps/mguterl) for my Preonic. + +Check out my [userspace](/users/mguterl) for the custom keycodes that are used +in keymap.c. + +At a very high level I use 4 layers: + +* Qwerty - Letters +* Util - Vimkeys for navigation and other convenient things +* Raise - Numbers and F keys +* Lower - Symbols + +```sh +make planck/rev5:mguterl:flash # For Planck rev5 or earlier and Planck Light +make planck/rev6:mguterl:flash # For Planck rev6 +make keebio/levinson/rev2:mguterl:dfu # For Levinson rev2 +``` diff --git a/layouts/community/ortho_4x12/mguterl/rules.mk b/layouts/community/ortho_4x12/mguterl/rules.mk new file mode 100644 index 0000000000..dcf16bef39 --- /dev/null +++ b/layouts/community/ortho_4x12/mguterl/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/layouts/community/ortho_4x12/xyverz/keymap.c b/layouts/community/ortho_4x12/xyverz/keymap.c index 681dafacd4..a21c143f00 100644 --- a/layouts/community/ortho_4x12/xyverz/keymap.c +++ b/layouts/community/ortho_4x12/xyverz/keymap.c @@ -1,34 +1,15 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST -}; +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; // Aliases to keep the keymap tidy -#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. -#define RGB_SWR RGB_M_SW // Swirl Animation alias -#define RGB_SNK RGB_M_SN // Snake Animation alias +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +#define RGB_SWR RGB_M_SW // Swirl Animation alias +#define RGB_SNK RGB_M_SN // Snake Animation alias +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -47,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_RSFT,\ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -65,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -83,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -101,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -119,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -137,77 +118,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - + ) }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA - // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); #endif }; +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; -/* case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; */ - } - return true; -} + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/layouts/community/ortho_4x12/xyverz/readme.md b/layouts/community/ortho_4x12/xyverz/readme.md index 1ec10a0da6..d6614d956d 100644 --- a/layouts/community/ortho_4x12/xyverz/readme.md +++ b/layouts/community/ortho_4x12/xyverz/readme.md @@ -8,6 +8,7 @@ This revision includes this documentation and introduction of the individual RGB ## Still to do: + * Update layout files to match current standards. * Enjoy this revision; figure out new things later. ### Qwerty layer diff --git a/layouts/community/ortho_5x12/drashna/config.h b/layouts/community/ortho_5x12/drashna/config.h index 123c284a2c..7504338fff 100644 --- a/layouts/community/ortho_5x12/drashna/config.h +++ b/layouts/community/ortho_5x12/drashna/config.h @@ -1,21 +1,22 @@ #pragma once - /* ws2812 RGB LED */ #if defined(KEYBOARD_fractal) -# define RGB_DI_PIN D2 -# undef RGBLED_NUM -# define RGBLIGHT_ANIMATIONS -# define RGBLED_NUM 29 // Number of LEDs -# undef RGBLIGHT_HUE_STEP -# define RGBLIGHT_HUE_STEP 8 -# undef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 8 -# undef RGBLIGHT_VAL_STEP -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_LIMIT_VAL 175 -# define RGBLIGHT_SLEEP +# define RGB_DI_PIN D2 +# undef RGBLED_NUM +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 29 // Number of LEDs +# undef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 8 +# undef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 8 +# undef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 175 +# define RGBLIGHT_SLEEP -# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3 -# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14 +# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3 +# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14 +# define B7_AUDIO +# define NO_MUSIC_MODE #endif diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c index bf0907a513..0ee9dfb10c 100644 --- a/layouts/community/ortho_5x12/drashna/keymap.c +++ b/layouts/community/ortho_5x12/drashna/keymap.c @@ -1,24 +1,13 @@ -/* Copyright 2015-2017 Jack Humbert - * Modified by KeyPCB for the Fractal keyboard - * Backlight isn't on the Fractal, so I've removed the keycode from the keymaps - * - * 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 . - */ - -#include QMK_KEYBOARD_H #include "drashna.h" +/* + * The `LAYOUT_ortho_5x12_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ +// clang-format off #define LAYOUT_ortho_5x12_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -26,12 +15,13 @@ K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ ) \ LAYOUT_ortho_5x12_wrapper( \ - KC_GRV, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ - KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ - KC_ESC, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ - KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, CTL_T(K3A), KC_ENT, \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ + KC_C1R3, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \ + KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, RCTL_T(K3A), KC_ENT, \ KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) + #define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) @@ -131,26 +121,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ortho_5x12_wrapper( \ KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, - _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______, + _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - - }; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - } - return true; -}; - -void matrix_init_keymap(void) { -#ifdef KEYBOARD_fractal - setPinOutput(D5); - writePinHigh(D5); - - setPinOutput(B0); - writePinHigh(B0); -#endif -} +// clang-format on diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk index 160419fcce..cae4b27bab 100644 --- a/layouts/community/ortho_5x12/drashna/rules.mk +++ b/layouts/community/ortho_5x12/drashna/rules.mk @@ -5,19 +5,12 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no AUDIO_ENABLE = yes -ifneq (,$(findstring fractal,$(KEYBOARD))) # Make sure it IS the Planck Light - RGB_MATRIX_ENABLE = no - AUDIO_ENABLE = no - RGBLIGHT_ENABLE = yes - RGBLIGHT_TWINKLE = yes - BOOTLOADER = qmk-dfu -endif - -ifeq ($(strip $(PROTOCOL)), VUSB) -NKRO_ENABLE = no -else NKRO_ENABLE = yes + +ifeq ($(strip $(KEYBOARD)), fractal) + RGB_MATRIX_ENABLE = no + AUDIO_ENABLE = yes + RGBLIGHT_ENABLE = yes + RGBLIGHT_TWINKLE = yes + BOOTLOADER = qmk-dfu endif - - -MACROS_ENABLED = no diff --git a/layouts/community/ortho_5x12/xyverz/keymap.c b/layouts/community/ortho_5x12/xyverz/keymap.c index bbf1d7bb0e..2cca237bbe 100644 --- a/layouts/community/ortho_5x12/xyverz/keymap.c +++ b/layouts/community/ortho_5x12/xyverz/keymap.c @@ -1,34 +1,15 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; // Aliases to keep the keymap tidy -#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. -#define RGB_SWR RGB_M_SW // Swirl Animation alias -#define RGB_SNK RGB_M_SN // Snake Animation alias +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +#define RGB_SWR RGB_M_SW // Swirl Animation alias +#define RGB_SNK RGB_M_SN // Snake Animation alias +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -50,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -71,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -92,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -113,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -134,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -155,92 +136,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - + ) }; +// clang-format on + #ifdef AUDIO_ENABLE float tone_qwerty[][2] = SONG(QWERTY_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); #endif -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA - // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); #endif }; +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; -/* case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; */ - } - return true; -} + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/layouts/community/ortho_5x14/yet-another-developer/config.h b/layouts/community/ortho_5x14/yet-another-developer/config.h new file mode 100644 index 0000000000..7504338fff --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/config.h @@ -0,0 +1,22 @@ +#pragma once + +/* ws2812 RGB LED */ +#if defined(KEYBOARD_fractal) +# define RGB_DI_PIN D2 +# undef RGBLED_NUM +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 29 // Number of LEDs +# undef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 8 +# undef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 8 +# undef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 175 +# define RGBLIGHT_SLEEP + +# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3 +# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14 +# define B7_AUDIO +# define NO_MUSIC_MODE +#endif diff --git a/layouts/community/ortho_5x14/yet-another-developer/keymap.c b/layouts/community/ortho_5x14/yet-another-developer/keymap.c new file mode 100644 index 0000000000..aea50508d3 --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/keymap.c @@ -0,0 +1,208 @@ +#include QMK_KEYBOARD_H +#include "yet-another-developer.h" + +// clang-format off + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_ergodash_pretty( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, R43, R44, R45, R46 \ + L36, R30, \ + L44, L45, L46, R40, R41, R42, \ + ) \ + /* matrix positions */ \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } + +#define LAYOUT_ergodash_pretty_wrapper(...) LAYOUT_ergodash_pretty(__VA_ARGS__) + +#define LAYOUT_ergodash_pretty_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_ergodox_pretty_wrapper( \ + KC_ESC, ________________NUMBER_LEFT________________, KC_LBRC, KC_RBRC, ________________NUMBER_RIGHT_______________, KC_PSCR, \ + KC_GRV, K01, K02, K03, K04, K05, KC_MINS, KC_EQL, K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_TAB, ALT_T(K11), K12, K13, K14, K15, KC_DEL, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + KC_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ + KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + LT(_LOWER, KC_SPC), LT(_RAISE, KC_ENT), \ + OS_LGUI,LT(_LOWER, KC_SPC),KC_DEL, KC_BSPC, LT(_RAISE, KC_ENT), OS_RGUI \ + ) + +#define LAYOUT_ergodash_pretty_base_wrapper(...) LAYOUT_ergodash_pretty_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: QWERTY Layer + * + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " | + * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift | + * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------| + * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | + * `-----------------------------' `------------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * `---------------------' `---------------------' + */ + [_QWERTY] = LAYOUT_ergodash_pretty_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), +/* Keymap 0: COLEMAK layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' | + * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | + * `-----------------------------' `------------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * `---------------------' `---------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* + [_COLEMAK] = LAYOUT_ergodash_pretty_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + +// Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES) + [_MODS] = LAYOUT_ergodash_pretty_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + +/* Keymap 4: Customized Overwatch Layout + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | | | | | | | | | F9 | F10 | F11 | F12 | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | F1 | K | Q | W | E | R | T | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TAB | G | A | S | D | F |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCTR | LSHFT| Z | X | C | V | | | | N | M | | | | | + * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------| + * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | + * `-----------------------------' `------------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * `---------------------' `---------------------' + */ + [_GAMEPAD] = LAYOUT_ergodash_pretty_wrapper( + KC_ESC, KC_NO, KC_1, KC_2, KC_3, HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_O, KC_P, MAGIC_TOGGLE_NKRO, LALT(KC_PSCR), + KC_LGUI, KC_HYPR, + KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM + ), + +/* Keymap 3: + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | V | D | ALT | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | S | I | F | M | T | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | | + * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | + * `-----------------------------' `------------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * `---------------------' `---------------------' + */ + [_DIABLO] = LAYOUT_ergodash_pretty_wrapper( + KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO, KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_L, KC_J, KC_NO, KC_NO, + KC_F, KC_NO, + SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, KC_PGDN, KC_DEL, KC_ENT + ), + + [_LOWER] = LAYOUT_ergodash_pretty_wrapper( + KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, + KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE, + _______, ___________________BLANK___________________, _________________LOWER_R2__________________, KC_DQUO, + _______, ___________________BLANK___________________, _______, _______, _________________LOWER_R3__________________, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_ergodash_pretty_wrapper( + KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, + KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_QUOT, + _______, _________________RAISE_L3__________________, _______, _______, _________________RAISE_R3__________________, KC_PSCR, + _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_SLCK, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_ergodash_pretty_wrapper( + KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, + _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + +}; +// clang-format on diff --git a/layouts/community/ortho_5x14/yet-another-developer/rules.mk b/layouts/community/ortho_5x14/yet-another-developer/rules.mk new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/rules.mk @@ -0,0 +1 @@ + diff --git a/layouts/community/tkl_ansi/xyverz/keymap.c b/layouts/community/tkl_ansi/xyverz/keymap.c new file mode 100644 index 0000000000..1f79f87d1b --- /dev/null +++ b/layouts/community/tkl_ansi/xyverz/keymap.c @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _DV, + _CM, + _FL, +}; + +enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT_tkl_ansi( /* Layer 0: Qwerty */ \ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + [_DV] = LAYOUT_tkl_ansi( /* Layer 1: Dvorak */ \ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + [_CM] = LAYOUT_tkl_ansi( /* Layer 2: Colemak */ \ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + +[_FL] = LAYOUT_tkl_ansi( /* Layer 3: Functions */ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_MPRV, KC_MPLY, KC_MNXT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + QWERTY, DVORAK, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DV); + return false; + case QWERTY: + set_single_persistent_default_layer(_QW); + return false; + case COLEMAK: + set_single_persistent_default_layer(_CM); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/layouts/community/tkl_ansi/xyverz/readme.md b/layouts/community/tkl_ansi/xyverz/readme.md new file mode 100644 index 0000000000..b67b1385dd --- /dev/null +++ b/layouts/community/tkl_ansi/xyverz/readme.md @@ -0,0 +1 @@ +2019-10-16 Updated to bring keymap up to current. diff --git a/layouts/default/60_abnt2/default_60_abnt2/keymap.c b/layouts/default/60_abnt2/default_60_abnt2/keymap.c new file mode 100644 index 0000000000..c66cba7bee --- /dev/null +++ b/layouts/default/60_abnt2/default_60_abnt2/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H +#include "keymap_br_abnt2.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_abnt2( + 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, BR_ACUT, BR_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT, + KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_abnt2( + BR_QUOT, 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_DEL, + _______, _______, _______, _______, RESET, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/layouts/default/60_abnt2/info.json b/layouts/default/60_abnt2/info.json new file mode 100644 index 0000000000..4e371abdc9 --- /dev/null +++ b/layouts/default/60_abnt2/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "60% ABNT2 layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_abnt2": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3}, + {"x":13.25, "y":3, "w":1.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/layouts/default/60_abnt2/layout.json b/layouts/default/60_abnt2/layout.json new file mode 100644 index 0000000000..0a4d8fd58b --- /dev/null +++ b/layouts/default/60_abnt2/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},""], +[{w:1.75},"","","","","","","","","","","","",""], +[{w:1.25},"","","","","","","","","","","","","",{w:1.75},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""] diff --git a/layouts/default/60_abnt2/readme.md b/layouts/default/60_abnt2/readme.md new file mode 100644 index 0000000000..d363e0d5cb --- /dev/null +++ b/layouts/default/60_abnt2/readme.md @@ -0,0 +1,3 @@ +# 60_abnt2 + +![60% ABNT2 layout](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/layouts/default/60_abnt2/keyboard-layout.png) diff --git a/layouts/default/60_ansi/info.json b/layouts/default/60_ansi/info.json new file mode 100644 index 0000000000..a5c9b5f567 --- /dev/null +++ b/layouts/default/60_ansi/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "60% ANSI layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/layouts/default/60_ansi_split_bs_rshift/info.json b/layouts/default/60_ansi_split_bs_rshift/info.json new file mode 100644 index 0000000000..c42c3b047e --- /dev/null +++ b/layouts/default/60_ansi_split_bs_rshift/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "60% ANSI layout with split Backspace and Right Shift", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/layouts/default/60_ansi_split_bs_rshift/layout.json b/layouts/default/60_ansi_split_bs_rshift/layout.json index ebad5d89dc..55bd4531c9 100644 --- a/layouts/default/60_ansi_split_bs_rshift/layout.json +++ b/layouts/default/60_ansi_split_bs_rshift/layout.json @@ -1,5 +1,5 @@ [{a:7},"","","","","","","","","","","","","","",""], [{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], [{w:1.75},"","","","","","","","","","","","",{w:2.25},""], -[{w:2.25},"","","","","","","","","","","",{w:1.75},"",{w:1},""], +[{w:2.25},"","","","","","","","","","","",{w:1.75},"",""], [{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""] diff --git a/layouts/default/60_ansi_tsangan/info.json b/layouts/default/60_ansi_tsangan/info.json new file mode 100644 index 0000000000..9c21043dbc --- /dev/null +++ b/layouts/default/60_ansi_tsangan/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "60% ANSI Tsangan layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_tsangan": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":12.5, "y":4}, + {"x":13.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/layouts/default/60_ansi_tsangan/layout.json b/layouts/default/60_ansi_tsangan/layout.json index f6a65beb34..6cdacf8de4 100644 --- a/layouts/default/60_ansi_tsangan/layout.json +++ b/layouts/default/60_ansi_tsangan/layout.json @@ -2,4 +2,4 @@ [{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], [{w:1.75},"","","","","","","","","","","","",{w:2.25},""], [{w:2.25},"","","","","","","","","","","",{w:2.75},""], -[{w:1.5},"",{w:1},"",{w:1.5},"",{w:7},"",{w:1.5},"",{w:1},"",{w:1.5},""] +[{w:1.5},"","",{w:1.5},"",{w:7},"",{w:1.5},"","",{w:1.5},""] diff --git a/layouts/default/60_hhkb/info.json b/layouts/default/60_hhkb/info.json new file mode 100644 index 0000000000..0d9594affc --- /dev/null +++ b/layouts/default/60_hhkb/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "60% HHKB layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_hhkb": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":12.5, "y":4} + ] + } + } +} diff --git a/layouts/default/60_hhkb/layout.json b/layouts/default/60_hhkb/layout.json index 9dce76a2e4..5d02648dd7 100644 --- a/layouts/default/60_hhkb/layout.json +++ b/layouts/default/60_hhkb/layout.json @@ -1,5 +1,5 @@ -["Esc","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=","|\n\\","~\n`"], -[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"Delete"], -[{w:1.75},"Control","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"], -[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:1.75},"Shift","Fn"], -[{x:1.5},"Os",{w:1.5},"Alt",{a:7,w:7},"",{a:4,w:1.5},"Alt","Os"] +[{a:7},"","","","","","","","","","","","","","",""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2.25},"","","","","","","","","","","",{w:1.75},"",""], +[{x:1.5},"",{w:1.5},"",{w:7},"",{w:1.5},"",""] diff --git a/layouts/default/60_iso/info.json b/layouts/default/60_iso/info.json new file mode 100644 index 0000000000..4e5b485ba2 --- /dev/null +++ b/layouts/default/60_iso/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "60% ISO layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/layouts/default/60_iso_tsangan/info.json b/layouts/default/60_iso_tsangan/info.json new file mode 100644 index 0000000000..91a51f2852 --- /dev/null +++ b/layouts/default/60_iso_tsangan/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "60% ISO Tsangan layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_iso_tsangan": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":12.5, "y":4}, + {"x":13.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/layouts/default/60_iso_tsangan/layout.json b/layouts/default/60_iso_tsangan/layout.json index e231859353..776a5c0dbf 100644 --- a/layouts/default/60_iso_tsangan/layout.json +++ b/layouts/default/60_iso_tsangan/layout.json @@ -2,4 +2,4 @@ [{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},""], [{w:1.75},"","","","","","","","","","","","",""], [{w:1.25},"","","","","","","","","","","","",{w:2.75},""], -[{w:1.5},"",{w:1},"",{w:1.5},"",{w:7},"",{w:1.5},"",{w:1},"",{w:1.5},""] +[{w:1.5},"","",{w:1.5},"",{w:7},"",{w:1.5},"","",{w:1.5},""] diff --git a/layouts/default/60_tsangan_hhkb/info.json b/layouts/default/60_tsangan_hhkb/info.json new file mode 100644 index 0000000000..6a7451f88c --- /dev/null +++ b/layouts/default/60_tsangan_hhkb/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "60% ANSI Tsangan HHKB layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_tsangan_hhkb": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":12.5, "y":4}, + {"x":13.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/layouts/default/60_tsangan_hhkb/layout.json b/layouts/default/60_tsangan_hhkb/layout.json index 117d26d419..c387347d9e 100644 --- a/layouts/default/60_tsangan_hhkb/layout.json +++ b/layouts/default/60_tsangan_hhkb/layout.json @@ -1,5 +1,5 @@ [{a:7},"","","","","","","","","","","","","","",""], [{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], [{w:1.75},"","","","","","","","","","","","",{w:2.25},""], -[{w:2.25},"","","","","","","","","","","",{w:1.75},"",{w:1},""], -[{w:1.5},"",{w:1},"",{w:1.5},"",{w:7},"",{w:1.5},"",{w:1},"",{w:1.5},""] +[{w:2.25},"","","","","","","","","","","",{w:1.75},"",""], +[{w:1.5},"","",{w:1.5},"",{w:7},"",{w:1.5},"","",{w:1.5},""] diff --git a/layouts/default/65_ansi/info.json b/layouts/default/65_ansi/info.json new file mode 100644 index 0000000000..86fbc3ca77 --- /dev/null +++ b/layouts/default/65_ansi/info.json @@ -0,0 +1,85 @@ +{ + "keyboard_name": "65% ANSI layout", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/layouts/default/65_ansi/layout.json b/layouts/default/65_ansi/layout.json index 0fa92b0f2e..d8b752ba54 100644 --- a/layouts/default/65_ansi/layout.json +++ b/layouts/default/65_ansi/layout.json @@ -1,4 +1,4 @@ -["","","","","","","","","","","","","",{w:2},"",""], +[{a:7},"","","","","","","","","","","","","",{w:2},"",""], [{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",""], [{w:1.75},"","","","","","","","","","","","",{w:2.25},"",""], [{w:2.25},"","","","","","","","","","","",{w:1.75},"","",""], diff --git a/layouts/default/65_ansi_blocker/default_65_ansi_blocker/keymap.c b/layouts/default/65_ansi_blocker/default_65_ansi_blocker/keymap.c new file mode 100644 index 0000000000..fedcc0c73b --- /dev/null +++ b/layouts/default/65_ansi_blocker/default_65_ansi_blocker/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_65_ansi_blocker(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) + }; \ No newline at end of file diff --git a/layouts/default/65_ansi_blocker/info.json b/layouts/default/65_ansi_blocker/info.json new file mode 100644 index 0000000000..bbe1c8c3a5 --- /dev/null +++ b/layouts/default/65_ansi_blocker/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "65% ANSI layout with blocker", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/layouts/default/65_ansi_blocker/layout.json b/layouts/default/65_ansi_blocker/layout.json new file mode 100644 index 0000000000..5586e2d0ed --- /dev/null +++ b/layouts/default/65_ansi_blocker/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},"",""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},"",""], +[{w:2.25},"","","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{x:0.5},"","",""] diff --git a/layouts/default/65_ansi_blocker/readme.md b/layouts/default/65_ansi_blocker/readme.md new file mode 100644 index 0000000000..9e9a5f4541 --- /dev/null +++ b/layouts/default/65_ansi_blocker/readme.md @@ -0,0 +1,5 @@ +# 65_blocker_ansi + + LAYOUT_65_blocker_ansi + +This is the 65% ANSI layout made popular by boards such as the Percent Canoe. \ No newline at end of file diff --git a/layouts/default/65_iso/info.json b/layouts/default/65_iso/info.json new file mode 100644 index 0000000000..f5bf439341 --- /dev/null +++ b/layouts/default/65_iso/info.json @@ -0,0 +1,86 @@ +{ + "keyboard_name": "65% ISO layout", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/layouts/default/65_iso/layout.json b/layouts/default/65_iso/layout.json index 6496e93634..9f95429261 100644 --- a/layouts/default/65_iso/layout.json +++ b/layouts/default/65_iso/layout.json @@ -1,4 +1,4 @@ -["","","","","","","","","","","","","",{w:2},"",""], +[{a:7},"","","","","","","","","","","","","",{w:2},"",""], [{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",""], [{w:1.75},"","","","","","","","","","","","","",{x:1.25},""], [{w:1.25},"","","","","","","","","","","","",{w:1.75},"","",""], diff --git a/layouts/default/66_ansi/info.json b/layouts/default/66_ansi/info.json new file mode 100644 index 0000000000..07f5913f0a --- /dev/null +++ b/layouts/default/66_ansi/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "66% ANSI layout", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT_66_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15.5, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15.5, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.25}, + {"x":14.5, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4}, + {"x":12.25, "y":4, "w":1.25}, + {"x":13.5, "y":4}, + {"x":14.5, "y":4}, + {"x":15.5, "y":4} + ] + } + } +} diff --git a/layouts/default/66_ansi/layout.json b/layouts/default/66_ansi/layout.json index 60a3a47c00..5ab33eb2f6 100644 --- a/layouts/default/66_ansi/layout.json +++ b/layouts/default/66_ansi/layout.json @@ -1,5 +1,5 @@ -["~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{x:0.5},"Page Up"], -[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\",{x:0.5},"Page Down"], -[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"], -[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.25},"Shift","Up"], -[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"Alt","Fn",{w:1.25},"Ctrl","Left","Down","Right"] +[{a:7},"","","","","","","","","","","","","",{w:2},"",{x:0.5},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",{x:0.5},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2.25},"","","","","","","","","","","",{w:2.25},"",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"","",{w:1.25},"","","",""] diff --git a/layouts/default/66_iso/info.json b/layouts/default/66_iso/info.json new file mode 100644 index 0000000000..df20bebc36 --- /dev/null +++ b/layouts/default/66_iso/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "66% ISO layout", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT_66_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15.5, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15.5, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.25}, + {"x":14.5, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4}, + {"x":12.25, "y":4, "w":1.25}, + {"x":13.5, "y":4}, + {"x":14.5, "y":4}, + {"x":15.5, "y":4} + ] + } + } +} diff --git a/layouts/default/66_iso/layout.json b/layouts/default/66_iso/layout.json index 1397b37eeb..046226fbcc 100644 --- a/layouts/default/66_iso/layout.json +++ b/layouts/default/66_iso/layout.json @@ -1,5 +1,5 @@ -["~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{x:0.5},"Page Up"], -[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"Enter",{x:0.5},"Page Down"], -[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'","~\n#"], -[{w:1.25},"Shift","|\n\\","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.25},"Shift","↑"], -[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"Alt","Fn",{w:1.25},"Ctrl","←","↓","→"] +[{a:7},"","","","","","","","","","","","","",{w:2},"",{x:0.5},""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",{x:0.5},""], +[{w:1.75},"","","","","","","","","","","","",""], +[{w:1.25},"","","","","","","","","","","","",{w:2.25},"",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"","",{w:1.25},"","","",""] diff --git a/layouts/default/68_ansi/info.json b/layouts/default/68_ansi/info.json new file mode 100644 index 0000000000..1aabb1cce7 --- /dev/null +++ b/layouts/default/68_ansi/info.json @@ -0,0 +1,85 @@ +{ + "keyboard_name": "68% ANSI layout", + "url": "", + "maintainer": "qmk", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_68_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + {"x":15.25, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + } + } +} diff --git a/layouts/default/75_ansi/info.json b/layouts/default/75_ansi/info.json new file mode 100644 index 0000000000..4f670fc59d --- /dev/null +++ b/layouts/default/75_ansi/info.json @@ -0,0 +1,102 @@ +{ + "keyboard_name": "75% ANSI layout", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_75_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1, "w":2}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.5}, + {"x":1.5, "y":2}, + {"x":2.5, "y":2}, + {"x":3.5, "y":2}, + {"x":4.5, "y":2}, + {"x":5.5, "y":2}, + {"x":6.5, "y":2}, + {"x":7.5, "y":2}, + {"x":8.5, "y":2}, + {"x":9.5, "y":2}, + {"x":10.5, "y":2}, + {"x":11.5, "y":2}, + {"x":12.5, "y":2}, + {"x":13.5, "y":2, "w":1.5}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.75}, + {"x":1.75, "y":3}, + {"x":2.75, "y":3}, + {"x":3.75, "y":3}, + {"x":4.75, "y":3}, + {"x":5.75, "y":3}, + {"x":6.75, "y":3}, + {"x":7.75, "y":3}, + {"x":8.75, "y":3}, + {"x":9.75, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3}, + {"x":12.75, "y":3, "w":2.25}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":2.25}, + {"x":2.25, "y":4}, + {"x":3.25, "y":4}, + {"x":4.25, "y":4}, + {"x":5.25, "y":4}, + {"x":6.25, "y":4}, + {"x":7.25, "y":4}, + {"x":8.25, "y":4}, + {"x":9.25, "y":4}, + {"x":10.25, "y":4}, + {"x":11.25, "y":4}, + {"x":12.25, "y":4, "w":1.75}, + {"x":14, "y":4}, + {"x":15, "y":4}, + + {"x":0, "y":5, "w":1.25}, + {"x":1.25, "y":5, "w":1.25}, + {"x":2.5, "y":5, "w":1.25}, + {"x":3.75, "y":5, "w":6.25}, + {"x":10, "y":5}, + {"x":11, "y":5}, + {"x":12, "y":5}, + {"x":13, "y":5}, + {"x":14, "y":5}, + {"x":15, "y":5} + ] + } + } +} diff --git a/layouts/default/75_iso/info.json b/layouts/default/75_iso/info.json new file mode 100644 index 0000000000..14820d6a77 --- /dev/null +++ b/layouts/default/75_iso/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "75% ISO layout", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_75_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1, "w":2}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.5}, + {"x":1.5, "y":2}, + {"x":2.5, "y":2}, + {"x":3.5, "y":2}, + {"x":4.5, "y":2}, + {"x":5.5, "y":2}, + {"x":6.5, "y":2}, + {"x":7.5, "y":2}, + {"x":8.5, "y":2}, + {"x":9.5, "y":2}, + {"x":10.5, "y":2}, + {"x":11.5, "y":2}, + {"x":12.5, "y":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.75}, + {"x":1.75, "y":3}, + {"x":2.75, "y":3}, + {"x":3.75, "y":3}, + {"x":4.75, "y":3}, + {"x":5.75, "y":3}, + {"x":6.75, "y":3}, + {"x":7.75, "y":3}, + {"x":8.75, "y":3}, + {"x":9.75, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3}, + {"x":12.75, "y":3}, + {"x":13.75, "y":2, "w":1.25, "h":2}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4}, + {"x":2.25, "y":4}, + {"x":3.25, "y":4}, + {"x":4.25, "y":4}, + {"x":5.25, "y":4}, + {"x":6.25, "y":4}, + {"x":7.25, "y":4}, + {"x":8.25, "y":4}, + {"x":9.25, "y":4}, + {"x":10.25, "y":4}, + {"x":11.25, "y":4}, + {"x":12.25, "y":4, "w":1.75}, + {"x":14, "y":4}, + {"x":15, "y":4}, + + {"x":0, "y":5, "w":1.25}, + {"x":1.25, "y":5, "w":1.25}, + {"x":2.5, "y":5, "w":1.25}, + {"x":3.75, "y":5, "w":6.25}, + {"x":10, "y":5}, + {"x":11, "y":5}, + {"x":12, "y":5}, + {"x":13, "y":5}, + {"x":14, "y":5}, + {"x":15, "y":5} + ] + } + } +} diff --git a/layouts/default/ergodox/info.json b/layouts/default/ergodox/info.json new file mode 100644 index 0000000000..49a1f119a8 --- /dev/null +++ b/layouts/default/ergodox/info.json @@ -0,0 +1,104 @@ +{ + "keyboard_name": "Ergodox layout", + "url": "", + "maintainer": "qmk", + "width": 19.75, + "height": 7.25, + "layouts": { + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, + {"x":1.5, "y":0.375}, + {"x":2.5, "y":0.125}, + {"x":3.5, "y":0}, + {"x":4.5, "y":0.125}, + {"x":5.5, "y":0.25}, + {"x":6.5, "y":0.25}, + + {"x":0, "y":1.375, "w":1.5}, + {"x":1.5, "y":1.375}, + {"x":2.5, "y":1.125}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1.125}, + {"x":5.5, "y":1.25}, + {"x":6.5, "y":1.25, "h":1.5}, + + {"x":0, "y":2.375, "w":1.5}, + {"x":1.5, "y":2.375}, + {"x":2.5, "y":2.125}, + {"x":3.5, "y":2}, + {"x":4.5, "y":2.125}, + {"x":5.5, "y":2.25}, + + {"x":0, "y":3.375, "w":1.5}, + {"x":1.5, "y":3.375}, + {"x":2.5, "y":3.125}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3.125}, + {"x":5.5, "y":3.25}, + {"x":6.5, "y":2.75, "h":1.5}, + + {"x":0.5, "y":4.375}, + {"x":1.5, "y":4.375}, + {"x":2.5, "y":4.125}, + {"x":3.5, "y":4}, + {"x":4.5, "y":4.125}, + + {"x":7.75, "y":4.25}, + {"x":8.75, "y":4.25}, + + {"x":8.75, "y":5.25}, + + {"x":6.75, "y":5.25, "h":2}, + {"x":7.75, "y":5.25, "h":2}, + {"x":8.75, "y":6.25}, + + {"x":12.25, "y":0.25}, + {"x":13.25, "y":0.25}, + {"x":14.25, "y":0.125}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0.125}, + {"x":17.25, "y":0.375}, + {"x":18.25, "y":0.375, "w":1.5}, + + {"x":12.25, "y":1.25, "h":1.5}, + {"x":13.25, "y":1.25}, + {"x":14.25, "y":1.125}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1.125}, + {"x":17.25, "y":1.375}, + {"x":18.25, "y":1.375, "w":1.5}, + + {"x":13.25, "y":2.25}, + {"x":14.25, "y":2.125}, + {"x":15.25, "y":2}, + {"x":16.25, "y":2.125}, + {"x":17.25, "y":2.375}, + {"x":18.25, "y":2.375, "w":1.5}, + + {"x":12.25, "y":2.75, "h":1.5}, + {"x":13.25, "y":3.25}, + {"x":14.25, "y":3.125}, + {"x":15.25, "y":3}, + {"x":16.25, "y":3.125}, + {"x":17.25, "y":3.375}, + {"x":18.25, "y":3.375, "w":1.5}, + + {"x":14.25, "y":4.125}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4.125}, + {"x":17.25, "y":4.375}, + {"x":18.25, "y":4.375}, + + {"x":10, "y":4.25}, + {"x":11, "y":4.25}, + + {"x":10, "y":5.25}, + + {"x":10, "y":6.25}, + {"x":11, "y":5.25, "h":2}, + {"x":12, "y":5.25, "h":2} + ] + } + } +} diff --git a/layouts/default/fullsize_ansi/info.json b/layouts/default/fullsize_ansi/info.json new file mode 100644 index 0000000000..ba67fbd4cc --- /dev/null +++ b/layouts/default/fullsize_ansi/info.json @@ -0,0 +1,122 @@ +{ + "keyboard_name": "Fullsize ANSI layout", + "url": "", + "maintainer": "qmk", + "width": 22.5, + "height": 6.25, + "layouts": { + "LAYOUT_fullsize_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + {"x":18.5, "y":1.25}, + {"x":19.5, "y":1.25}, + {"x":20.5, "y":1.25}, + {"x":21.5, "y":1.25}, + + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":2.25, "w":1.5}, + {"x":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + {"x":18.5, "y":2.25}, + {"x":19.5, "y":2.25}, + {"x":20.5, "y":2.25}, + {"x":21.5, "y":2.25, "h": 2}, + + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25, "w":2.25}, + {"x":18.5, "y":3.25}, + {"x":19.5, "y":3.25}, + {"x":20.5, "y":3.25}, + + {"x":0, "y":4.25, "w":2.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25}, + {"x":20.5, "y":4.25}, + {"x":21.5, "y":4.25, "h":2}, + + {"x":0, "y":5.25, "w":1.25}, + {"x":1.25, "y":5.25, "w":1.25}, + {"x":2.5, "y":5.25, "w":1.25}, + {"x":3.75, "y":5.25, "w":6.25}, + {"x":10, "y":5.25, "w":1.25}, + {"x":11.25, "y":5.25, "w":1.25}, + {"x":12.5, "y":5.25, "w":1.25}, + {"x":13.75, "y":5.25, "w":1.25}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25}, + {"x":18.5, "y":5.25, "w":2}, + {"x":20.5, "y":5.25} + ] + } + } +} diff --git a/layouts/default/fullsize_ansi/layout.json b/layouts/default/fullsize_ansi/layout.json index 38db30dfcd..bd98daba69 100644 --- a/layouts/default/fullsize_ansi/layout.json +++ b/layouts/default/fullsize_ansi/layout.json @@ -1,6 +1,6 @@ -["Esc",{x:1},"F1","F2","F3","F4",{x:0.5},"F5","F6","F7","F8",{x:0.5},"F9","F10","F11","F12",{x:0.25},"PrtSc","Scroll Lock","Pause\nBreak"], -[{y:0.5},"~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{x:0.25},"Insert","Home","PgUp",{x:0.25},"Num Lock","/","*","-"], -[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\",{x:0.25},"Delete","End","PgDn",{x:0.25},"7\nHome","8\n↑","9\nPgUp",{h:2},"+"], -[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter",{x:3.5},"4\n←","5","6\n→"], -[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift",{x:1.25},"↑",{x:1.25},"1\nEnd","2\n↓","3\nPgDn",{h:2},"Enter"], -[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"Alt",{w:1.25},"Win",{w:1.25},"Menu",{w:1.25},"Ctrl",{x:0.25},"←","↓","→",{x:0.25,w:2},"0\nIns",".\nDel"] +[{a:7},"",{x:1},"","","","",{x:0.5},"","","","",{x:0.5},"","","","",{x:0.25},"","",""], +[{y:0.25},"","","","","","","","","","","","","",{w:2},"",{x:0.25},"","","",{x:0.25},"","","",""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",{x:0.25},"","","",{x:0.25},"","","",{h:2},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},"",{x:3.5},"","",""], +[{w:2.25},"","","","","","","","","","","",{w:2.75},"",{x:1.25},"",{x:1.25},"","","",{h:2},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{x:0.25},"","","",{x:0.25,w:2},"",""] diff --git a/layouts/default/fullsize_iso/info.json b/layouts/default/fullsize_iso/info.json new file mode 100644 index 0000000000..403797a31d --- /dev/null +++ b/layouts/default/fullsize_iso/info.json @@ -0,0 +1,123 @@ +{ + "keyboard_name": "Fullsize ISO layout", + "url": "", + "maintainer": "qmk", + "width": 22.5, + "height": 6.25, + "layouts": { + "LAYOUT_fullsize_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + {"x":18.5, "y":1.25}, + {"x":19.5, "y":1.25}, + {"x":20.5, "y":1.25}, + {"x":21.5, "y":1.25}, + + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + {"x":18.5, "y":2.25}, + {"x":19.5, "y":2.25}, + {"x":20.5, "y":2.25}, + {"x":21.5, "y":2.25, "h": 2}, + + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25}, + {"x":13.75, "y":2.25, "w":1.25, "h":2}, + {"x":18.5, "y":3.25}, + {"x":19.5, "y":3.25}, + {"x":20.5, "y":3.25}, + + {"x":0, "y":4.25, "w":1.25}, + {"x":1.25, "y":4.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25}, + {"x":20.5, "y":4.25}, + {"x":21.5, "y":4.25, "h":2}, + + {"x":0, "y":5.25, "w":1.25}, + {"x":1.25, "y":5.25, "w":1.25}, + {"x":2.5, "y":5.25, "w":1.25}, + {"x":3.75, "y":5.25, "w":6.25}, + {"x":10, "y":5.25, "w":1.25}, + {"x":11.25, "y":5.25, "w":1.25}, + {"x":12.5, "y":5.25, "w":1.25}, + {"x":13.75, "y":5.25, "w":1.25}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25}, + {"x":18.5, "y":5.25, "w":2}, + {"x":20.5, "y":5.25} + ] + } + } +} diff --git a/layouts/default/fullsize_iso/layout.json b/layouts/default/fullsize_iso/layout.json index 1cead8293b..38e197475c 100644 --- a/layouts/default/fullsize_iso/layout.json +++ b/layouts/default/fullsize_iso/layout.json @@ -1,6 +1,6 @@ -["Esc",{x:1},"F1","F2","F3","F4",{x:0.5},"F5","F6","F7","F8",{x:0.5},"F9","F10","F11","F12",{x:0.25},"PrtSc","Scroll Lock","Pause\nBreak"], -[{y:0.5},"¬\n`","!\n1","\"\n2","£\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{x:0.25},"Insert","Home","PgUp",{x:0.25},"Num Lock","/","*","-"], -[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"Enter",{x:0.25},"Delete","End","PgDn",{x:0.25},"7\nHome","8\n↑","9\nPgUp",{h:2},"+"], -[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","@\n'","~\n#",{x:4.75},"4\n←","5","6\n→"], -[{w:1.25},"Shift","|\n\\","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift",{x:1.25},"↑",{x:1.25},"1\nEnd","2\n↓","3\nPgDn",{h:2},"Enter"], -[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"AltGr",{w:1.25},"Win",{w:1.25},"Menu",{w:1.25},"Ctrl",{x:0.25},"←","↓","→",{x:0.25,w:2},"0\nIns",".\nDel"] +[{a:7},"",{x:1},"","","","",{x:0.5},"","","","",{x:0.5},"","","","",{x:0.25},"","",""], +[{y:0.25},"","","","","","","","","","","","","",{w:2},"",{x:0.25},"","","",{x:0.25},"","","",""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",{x:0.25},"","","",{x:0.25},"","","",{h:2},""], +[{w:1.75},"","","","","","","","","","","","","",{x:4.75},"","",""], +[{w:1.25},"","","","","","","","","","","","",{w:2.75},"",{x:1.25},"",{x:1.25},"","","",{h:2},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{x:0.25},"","","",{x:0.25,w:2},"",""] diff --git a/layouts/default/numpad_4x4/info.json b/layouts/default/numpad_4x4/info.json new file mode 100644 index 0000000000..79a6af7712 --- /dev/null +++ b/layouts/default/numpad_4x4/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "4x4 number pad layout", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_numpad_4x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0, "h":2}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2, "h":2}, + + {"x":0, "y":3, "w":2}, + {"x":2, "y":3} + ] + } + } +} diff --git a/layouts/default/numpad_4x4/layout.json b/layouts/default/numpad_4x4/layout.json index a39ed6f46d..68ecbc5ce4 100644 --- a/layouts/default/numpad_4x4/layout.json +++ b/layouts/default/numpad_4x4/layout.json @@ -1,4 +1,4 @@ -["","","",{h:2},""], +[{a:7},"","","",{h:2},""], ["","",""], ["","","",{h:2},""], [{w:2},"",""] diff --git a/layouts/default/numpad_5x4/info.json b/layouts/default/numpad_5x4/info.json new file mode 100644 index 0000000000..f14a7d7c3c --- /dev/null +++ b/layouts/default/numpad_5x4/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "5x4 number pad layout", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":1, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2} + ] + } + } +} diff --git a/layouts/default/numpad_5x4/layout.json b/layouts/default/numpad_5x4/layout.json index deec0abf36..ea3a3dafa4 100644 --- a/layouts/default/numpad_5x4/layout.json +++ b/layouts/default/numpad_5x4/layout.json @@ -1,4 +1,4 @@ -["","","",""], +[{a:7},"","","",""], ["","","",{h:2},""], ["","",""], ["","","",{h:2},""], diff --git a/layouts/default/numpad_5x6/info.json b/layouts/default/numpad_5x6/info.json new file mode 100644 index 0000000000..fa88c5e97e --- /dev/null +++ b/layouts/default/numpad_5x6/info.json @@ -0,0 +1,44 @@ +{ + "keyboard_name": "5x6 number pad layout", + "url": "", + "maintainer": "qmk", + "width": 6, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x6": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":1, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4, "y":4}, + {"x":5, "y":3, "h":2} + ] + } + } +} diff --git a/layouts/default/numpad_5x6/layout.json b/layouts/default/numpad_5x6/layout.json index 7264cd5a6d..7a4f715de0 100644 --- a/layouts/default/numpad_5x6/layout.json +++ b/layouts/default/numpad_5x6/layout.json @@ -1,6 +1,5 @@ -["","","",""], -[{y:0.5},"","","",""], -["","","",{h:2},""], -["","",""], -["","","",{h:2},""], -[{w:2},"",""] +[{a:7},"","","","","",""], +["","","","","",{h:2},""], +["","","","",""], +["","","","","",{h:2},""], +["","",{w:2},"",""] diff --git a/layouts/default/numpad_6x4/info.json b/layouts/default/numpad_6x4/info.json new file mode 100644 index 0000000000..f8548621f1 --- /dev/null +++ b/layouts/default/numpad_6x4/info.json @@ -0,0 +1,39 @@ +{ + "keyboard_name": "6x4 number pad layout", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_numpad_6x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":2, "h":2}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + + {"x":0, "y":5, "w":2}, + {"x":2, "y":5}, + {"x":3, "y":4, "h":2} + ] + } + } +} diff --git a/layouts/default/numpad_6x4/layout.json b/layouts/default/numpad_6x4/layout.json index 7264cd5a6d..ee6f4fc969 100644 --- a/layouts/default/numpad_6x4/layout.json +++ b/layouts/default/numpad_6x4/layout.json @@ -1,5 +1,5 @@ +[{a:7},"","","",""], ["","","",""], -[{y:0.5},"","","",""], ["","","",{h:2},""], ["","",""], ["","","",{h:2},""], diff --git a/layouts/default/ortho_3x10/info.json b/layouts/default/ortho_3x10/info.json new file mode 100644 index 0000000000..f28e70a3f0 --- /dev/null +++ b/layouts/default/ortho_3x10/info.json @@ -0,0 +1,45 @@ +{ + "keyboard_name": "3x10 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 10, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x10": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":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} + ] + } + } +} diff --git a/layouts/default/ortho_3x10/layout.json b/layouts/default/ortho_3x10/layout.json index 6600f32a6a..352a422630 100644 --- a/layouts/default/ortho_3x10/layout.json +++ b/layouts/default/ortho_3x10/layout.json @@ -1,3 +1,3 @@ -["","","","","","","","","",""], +[{a:7},"","","","","","","","","",""], ["","","","","","","","","",""], ["","","","","","","","","",""] diff --git a/layouts/default/ortho_4x10/info.json b/layouts/default/ortho_4x10/info.json new file mode 100644 index 0000000000..0e17121c63 --- /dev/null +++ b/layouts/default/ortho_4x10/info.json @@ -0,0 +1,56 @@ +{ + "keyboard_name": "4x10 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x10": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":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":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3} + ] + } + } +} diff --git a/layouts/default/ortho_4x10/layout.json b/layouts/default/ortho_4x10/layout.json index 86f098e27e..c6f72eb778 100644 --- a/layouts/default/ortho_4x10/layout.json +++ b/layouts/default/ortho_4x10/layout.json @@ -1,4 +1,4 @@ -["","","","","","","","","",""], +[{a:7},"","","","","","","","","",""], ["","","","","","","","","",""], ["","","","","","","","","",""], ["","","","","","","","","",""] diff --git a/layouts/default/ortho_4x12/info.json b/layouts/default/ortho_4x12/info.json new file mode 100644 index 0000000000..b642cc6b44 --- /dev/null +++ b/layouts/default/ortho_4x12/info.json @@ -0,0 +1,64 @@ +{ + "keyboard_name": "4x12 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":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":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3} + ] + } + } +} diff --git a/layouts/default/ortho_4x12/layout.json b/layouts/default/ortho_4x12/layout.json index 9439b6e0be..48fb475400 100644 --- a/layouts/default/ortho_4x12/layout.json +++ b/layouts/default/ortho_4x12/layout.json @@ -1,4 +1,4 @@ +[{a:7},"","","","","","","","","","","",""], ["","","","","","","","","","","",""], ["","","","","","","","","","","",""], -["","","","","","","","","","","",""], -["","","","","","","","","","","",""] \ No newline at end of file +["","","","","","","","","","","",""] diff --git a/layouts/default/ortho_4x4/info.json b/layouts/default/ortho_4x4/info.json new file mode 100644 index 0000000000..2bf6376dbd --- /dev/null +++ b/layouts/default/ortho_4x4/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "4x4 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3} + ] + } + } +} diff --git a/layouts/default/ortho_4x4/layout.json b/layouts/default/ortho_4x4/layout.json index ef2a095267..acecc8ab6c 100644 --- a/layouts/default/ortho_4x4/layout.json +++ b/layouts/default/ortho_4x4/layout.json @@ -1,4 +1,4 @@ -["","","",""], +[{a:7},"","","",""], ["","","",""], ["","","",""], ["","","",""] diff --git a/layouts/default/ortho_5x12/info.json b/layouts/default/ortho_5x12/info.json new file mode 100644 index 0000000000..9579bf98bd --- /dev/null +++ b/layouts/default/ortho_5x12/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "5x12 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":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":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + {"x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"x":8, "y":4}, + {"x":9, "y":4}, + {"x":10, "y":4}, + {"x":11, "y":4} + ] + } + } +} diff --git a/layouts/default/ortho_5x12/layout.json b/layouts/default/ortho_5x12/layout.json index 9b12fa1825..c67e8470df 100644 --- a/layouts/default/ortho_5x12/layout.json +++ b/layouts/default/ortho_5x12/layout.json @@ -1,4 +1,4 @@ -["","","","","","","","","","","",""], +[{a:7},"","","","","","","","","","","",""], ["","","","","","","","","","","",""], ["","","","","","","","","","","",""], ["","","","","","","","","","","",""], diff --git a/layouts/default/ortho_5x14/info.json b/layouts/default/ortho_5x14/info.json new file mode 100644 index 0000000000..c9e403d631 --- /dev/null +++ b/layouts/default/ortho_5x14/info.json @@ -0,0 +1,87 @@ +{ + "keyboard_name": "5x14 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x14": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":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":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + {"x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"x":8, "y":4}, + {"x":9, "y":4}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4} + ] + } + } +} diff --git a/layouts/default/ortho_5x14/layout.json b/layouts/default/ortho_5x14/layout.json index e7703827e8..f67e197d53 100644 --- a/layouts/default/ortho_5x14/layout.json +++ b/layouts/default/ortho_5x14/layout.json @@ -1,5 +1,5 @@ -["","","","","","","","","","","","","","",""], -["","","","","","","","","","","","","","",""], -["","","","","","","","","","","","","","",""], -["","","","","","","","","","","","","","",""], -["","","","","","","","","","","","","","",""] +[{a:7},"","","","","","","","","","","","","",""], +["","","","","","","","","","","","","",""], +["","","","","","","","","","","","","",""], +["","","","","","","","","","","","","",""], +["","","","","","","","","","","","","",""] diff --git a/layouts/default/ortho_5x15/info.json b/layouts/default/ortho_5x15/info.json new file mode 100644 index 0000000000..0286fd25af --- /dev/null +++ b/layouts/default/ortho_5x15/info.json @@ -0,0 +1,92 @@ +{ + "keyboard_name": "5x15 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x15": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1}, + {"x":14, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":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":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + {"x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"x":8, "y":4}, + {"x":9, "y":4}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/layouts/default/ortho_5x15/layout.json b/layouts/default/ortho_5x15/layout.json index e7703827e8..42a20657a2 100644 --- a/layouts/default/ortho_5x15/layout.json +++ b/layouts/default/ortho_5x15/layout.json @@ -1,4 +1,4 @@ -["","","","","","","","","","","","","","",""], +[{a:7},"","","","","","","","","","","","","","",""], ["","","","","","","","","","","","","","",""], ["","","","","","","","","","","","","","",""], ["","","","","","","","","","","","","","",""], diff --git a/layouts/default/ortho_5x4/info.json b/layouts/default/ortho_5x4/info.json new file mode 100644 index 0000000000..c85ad02d63 --- /dev/null +++ b/layouts/default/ortho_5x4/info.json @@ -0,0 +1,37 @@ +{ + "keyboard_name": "5x4 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4} + ] + } + } +} diff --git a/layouts/default/ortho_5x4/layout.json b/layouts/default/ortho_5x4/layout.json index 8616344774..67a96a7beb 100644 --- a/layouts/default/ortho_5x4/layout.json +++ b/layouts/default/ortho_5x4/layout.json @@ -1,4 +1,4 @@ -["","","",""], +[{a:7},"","","",""], ["","","",""], ["","","",""], ["","","",""], diff --git a/layouts/default/ortho_6x4/info.json b/layouts/default/ortho_6x4/info.json new file mode 100644 index 0000000000..d9a937e735 --- /dev/null +++ b/layouts/default/ortho_6x4/info.json @@ -0,0 +1,42 @@ +{ + "keyboard_name": "6x4 ortholinear layout", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + + {"x":0, "y":5}, + {"x":1, "y":5}, + {"x":2, "y":5}, + {"x":3, "y":5} + ] + } + } +} diff --git a/layouts/default/ortho_6x4/layout.json b/layouts/default/ortho_6x4/layout.json index 4db1bb0fde..a575306d2c 100644 --- a/layouts/default/ortho_6x4/layout.json +++ b/layouts/default/ortho_6x4/layout.json @@ -1,6 +1,6 @@ +[{a:7},"","","",""], ["","","",""], ["","","",""], ["","","",""], ["","","",""], -["","","",""], -["","","",""], +["","","",""] diff --git a/layouts/default/planck_mit/info.json b/layouts/default/planck_mit/info.json new file mode 100644 index 0000000000..9ac260cb6e --- /dev/null +++ b/layouts/default/planck_mit/info.json @@ -0,0 +1,63 @@ +{ + "keyboard_name": "Planck MIT (4x12) layout", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_mit": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":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":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3, "w":2}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3} + ] + } + } +} diff --git a/layouts/default/planck_mit/layout.json b/layouts/default/planck_mit/layout.json index 91250bb7bd..b214e073c5 100644 --- a/layouts/default/planck_mit/layout.json +++ b/layouts/default/planck_mit/layout.json @@ -1,4 +1,4 @@ -["","","","","","","","","","","",""], +[{a:7},"","","","","","","","","","","",""], ["","","","","","","","","","","",""], ["","","","","","","","","","","",""], ["","","","","",{w:2},"","","","","",""] diff --git a/layouts/default/tkl_ansi/info.json b/layouts/default/tkl_ansi/info.json new file mode 100644 index 0000000000..944f93d396 --- /dev/null +++ b/layouts/default/tkl_ansi/info.json @@ -0,0 +1,105 @@ +{ + "keyboard_name": "Tenkeyless ANSI layout", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":2.25, "w":1.5}, + {"x":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25, "w":2.25}, + + {"x":0, "y":4.25, "w":2.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + + {"x":0, "y":5.25, "w":1.25}, + {"x":1.25, "y":5.25, "w":1.25}, + {"x":2.5, "y":5.25, "w":1.25}, + {"x":3.75, "y":5.25, "w":6.25}, + {"x":10, "y":5.25, "w":1.25}, + {"x":11.25, "y":5.25, "w":1.25}, + {"x":12.5, "y":5.25, "w":1.25}, + {"x":13.75, "y":5.25, "w":1.25}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25} + ] + } + } +} diff --git a/layouts/default/tkl_ansi/layout.json b/layouts/default/tkl_ansi/layout.json index 54492b98ff..dda9ae58ab 100644 --- a/layouts/default/tkl_ansi/layout.json +++ b/layouts/default/tkl_ansi/layout.json @@ -1,6 +1,6 @@ -["Esc",{x:1},"F1","F2","F3","F4",{x:0.5},"F5","F6","F7","F8",{x:0.5},"F9","F10","F11","F12",{x:0.25},"PrtSc","Scroll Lock","Pause\nBreak"], -[{y:0.5},"~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{x:0.25},"Insert","Home","PgUp"], -[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\",{x:0.25},"Delete","End","PgDn"], -[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"], -[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift",{x:1.25},"↑"], -[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"Alt",{w:1.25},"Win",{w:1.25},"Menu",{w:1.25},"Ctrl",{x:0.25},"←","↓","→"] +[{a:7},"",{x:1},"","","","",{x:0.5},"","","","",{x:0.5},"","","","",{x:0.25},"","",""], +[{y:0.25},"","","","","","","","","","","","","",{w:2},"",{x:0.25},"","",""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",{x:0.25},"","",""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2.25},"","","","","","","","","","","",{w:2.75},"",{x:1.25},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{x:0.25},"","",""] diff --git a/layouts/default/tkl_iso/info.json b/layouts/default/tkl_iso/info.json new file mode 100644 index 0000000000..524f28c88e --- /dev/null +++ b/layouts/default/tkl_iso/info.json @@ -0,0 +1,106 @@ +{ + "keyboard_name": "Tenkeyless ISO layout", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_tkl_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25}, + {"x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"x":0, "y":4.25, "w":1.25}, + {"x":1.25, "y":4.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + + {"x":0, "y":5.25, "w":1.25}, + {"x":1.25, "y":5.25, "w":1.25}, + {"x":2.5, "y":5.25, "w":1.25}, + {"x":3.75, "y":5.25, "w":6.25}, + {"x":10, "y":5.25, "w":1.25}, + {"x":11.25, "y":5.25, "w":1.25}, + {"x":12.5, "y":5.25, "w":1.25}, + {"x":13.75, "y":5.25, "w":1.25}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25} + ] + } + } +} diff --git a/layouts/default/tkl_iso/layout.json b/layouts/default/tkl_iso/layout.json index d0b8d5d3d9..b551da6c00 100644 --- a/layouts/default/tkl_iso/layout.json +++ b/layouts/default/tkl_iso/layout.json @@ -1,6 +1,6 @@ -["Esc",{x:1},"F1","F2","F3","F4",{x:0.5},"F5","F6","F7","F8",{x:0.5},"F9","F10","F11","F12",{x:0.25},"PrtSc","Scroll Lock","Pause\nBreak"], -[{y:0.5},"¬\n`","!\n1","\"\n2","£\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{x:0.25},"Insert","Home","PgUp"], -[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"Enter",{x:0.25},"Delete","End","PgDn"], -[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","@\n'","~\n#"], -[{w:1.25},"Shift","|\n\\","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift",{x:1.25},"↑"], -[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"AltGr",{w:1.25},"Win",{w:1.25},"Menu",{w:1.25},"Ctrl",{x:0.25},"←","↓","→"] +[{a:7},"",{x:1},"","","","",{x:0.5},"","","","",{x:0.5},"","","","",{x:0.25},"","",""], +[{y:0.25},"","","","","","","","","","","","","",{w:2},"",{x:0.25},"","",""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",{x:0.25},"","",""], +[{w:1.75},"","","","","","","","","","","","",""], +[{w:1.25},"","","","","","","","","","","","",{w:2.75},"",{x:1.25},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{x:0.25},"","",""] diff --git a/lib/lufa b/lib/lufa new file mode 160000 index 0000000000..ce10f7642b --- /dev/null +++ b/lib/lufa @@ -0,0 +1 @@ +Subproject commit ce10f7642b0459e409839b23cc91498945119b4d diff --git a/lib/lufa/.gitattributes b/lib/lufa/.gitattributes deleted file mode 100644 index 92dfc3c617..0000000000 --- a/lib/lufa/.gitattributes +++ /dev/null @@ -1,94 +0,0 @@ -# auto for anything unspecified -* text=auto - -# sources -*.c text -*.cc text -*.cxx text -*.cpp text -*.c++ text -*.hpp text -*.h text -*.h++ text -*.hh text -*.bat text -*.coffee text -*.css text -*.htm text -*.html text -*.inc text -*.ini text -*.js text -*.jsx text -*.json text -*.less text -*.php text -*.pl text -*.py text -*.rb text -*.sass text -*.scm text -*.scss text -*.sh text -*.sql text -*.styl text -*.ts text -*.xml text -*.xhtml text - -# make files (need to always use lf for compatibility with Windows 10 bash) -Makefile eol=lf -*.mk eol=lf - -# make files (need to always use lf for compatibility with Windows 10 bash) -*.sh eol=lf - -# documentation -*.markdown text -*.md text -*.mdwn text -*.mdown text -*.mkd text -*.mkdn text -*.mdtxt text -*.mdtext text -*.txt text -AUTHORS text -CHANGELOG text -CHANGES text -CONTRIBUTING text -COPYING text -INSTALL text -license text -LICENSE text -NEWS text -readme text -*README* text -TODO text - -GRAPHICS -*.ai binary -*.bmp binary -*.eps binary -*.gif binary -*.ico binary -*.jng binary -*.jp2 binary -*.jpg binary -*.jpeg binary -*.jpx binary -*.jxr binary -*.pdf binary -*.png binary -*.psb binary -*.psd binary -*.svg text -*.svgz binary -*.tif binary -*.tiff binary -*.wbmp binary -*.webp binary - -# hex files -*.hex binary -*.eep binary diff --git a/lib/lufa/.gitignore b/lib/lufa/.gitignore deleted file mode 100644 index 1cd1dccf80..0000000000 --- a/lib/lufa/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -*.o -*.d -*.elf -*.hex -*.eep -*.sym -*.bin -*.lss -*.map -*.bak -*.class -Documentation/ -LUFA/StudioIntegration/ProjectGenerator/* -LUFA/StudioIntegration/DocBook/* -!LUFA/StudioIntegration/Docbook/mshelp/* -Keyboard.h \ No newline at end of file diff --git a/lib/lufa/Bootloaders/CDC/BootloaderAPI.c b/lib/lufa/Bootloaders/CDC/BootloaderAPI.c deleted file mode 100644 index 2be1568082..0000000000 --- a/lib/lufa/Bootloaders/CDC/BootloaderAPI.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * - * Bootloader user application API functions. - */ - -#include "BootloaderAPI.h" - -void BootloaderAPI_ErasePage(const uint32_t Address) -{ - boot_page_erase_safe(Address); - boot_spm_busy_wait(); - boot_rww_enable(); -} - -void BootloaderAPI_WritePage(const uint32_t Address) -{ - boot_page_write_safe(Address); - boot_spm_busy_wait(); - boot_rww_enable(); -} - -void BootloaderAPI_FillWord(const uint32_t Address, const uint16_t Word) -{ - boot_page_fill_safe(Address, Word); -} - -uint8_t BootloaderAPI_ReadSignature(const uint16_t Address) -{ - return boot_signature_byte_get(Address); -} - -uint8_t BootloaderAPI_ReadFuse(const uint16_t Address) -{ - return boot_lock_fuse_bits_get(Address); -} - -uint8_t BootloaderAPI_ReadLock(void) -{ - return boot_lock_fuse_bits_get(GET_LOCK_BITS); -} - -void BootloaderAPI_WriteLock(const uint8_t LockBits) -{ - boot_lock_bits_set_safe(LockBits); -} diff --git a/lib/lufa/Bootloaders/CDC/BootloaderAPI.h b/lib/lufa/Bootloaders/CDC/BootloaderAPI.h deleted file mode 100644 index 5169bbc3c4..0000000000 --- a/lib/lufa/Bootloaders/CDC/BootloaderAPI.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * - * Header file for BootloaderAPI.c. - */ - -#ifndef _BOOTLOADER_API_H_ -#define _BOOTLOADER_API_H_ - - /* Includes: */ - #include - #include - #include - - #include - - #include "Config/AppConfig.h" - - /* Function Prototypes: */ - void BootloaderAPI_ErasePage(const uint32_t Address); - void BootloaderAPI_WritePage(const uint32_t Address); - void BootloaderAPI_FillWord(const uint32_t Address, const uint16_t Word); - uint8_t BootloaderAPI_ReadSignature(const uint16_t Address); - uint8_t BootloaderAPI_ReadFuse(const uint16_t Address); - uint8_t BootloaderAPI_ReadLock(void); - void BootloaderAPI_WriteLock(const uint8_t LockBits); - -#endif - diff --git a/lib/lufa/Bootloaders/CDC/BootloaderAPITable.S b/lib/lufa/Bootloaders/CDC/BootloaderAPITable.S deleted file mode 100644 index 2c60f84e8d..0000000000 --- a/lib/lufa/Bootloaders/CDC/BootloaderAPITable.S +++ /dev/null @@ -1,91 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -; Trampolines to actual API implementations if the target address is outside the -; range of a rjmp instruction (can happen with large bootloader sections) -.section .apitable_trampolines, "ax" -.global BootloaderAPI_Trampolines -BootloaderAPI_Trampolines: - - BootloaderAPI_ErasePage_Trampoline: - jmp BootloaderAPI_ErasePage - BootloaderAPI_WritePage_Trampoline: - jmp BootloaderAPI_WritePage - BootloaderAPI_FillWord_Trampoline: - jmp BootloaderAPI_FillWord - BootloaderAPI_ReadSignature_Trampoline: - jmp BootloaderAPI_ReadSignature - BootloaderAPI_ReadFuse_Trampoline: - jmp BootloaderAPI_ReadFuse - BootloaderAPI_ReadLock_Trampoline: - jmp BootloaderAPI_ReadLock - BootloaderAPI_WriteLock_Trampoline: - jmp BootloaderAPI_WriteLock - BootloaderAPI_UNUSED1: - ret - BootloaderAPI_UNUSED2: - ret - BootloaderAPI_UNUSED3: - ret - BootloaderAPI_UNUSED4: - ret - BootloaderAPI_UNUSED5: - ret - - - -; API function jump table -.section .apitable_jumptable, "ax" -.global BootloaderAPI_JumpTable -BootloaderAPI_JumpTable: - - rjmp BootloaderAPI_ErasePage_Trampoline - rjmp BootloaderAPI_WritePage_Trampoline - rjmp BootloaderAPI_FillWord_Trampoline - rjmp BootloaderAPI_ReadSignature_Trampoline - rjmp BootloaderAPI_ReadFuse_Trampoline - rjmp BootloaderAPI_ReadLock_Trampoline - rjmp BootloaderAPI_WriteLock_Trampoline - rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1 - rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2 - rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3 - rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4 - rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5 - - - -; Bootloader table signatures and information -.section .apitable_signatures, "ax" -.global BootloaderAPI_Signatures -BootloaderAPI_Signatures: - - .long BOOT_START_ADDR ; Start address of the bootloader - .word 0xDF00 ; Signature for the CDC class bootloader - .word 0xDCFB ; Signature for a LUFA class bootloader diff --git a/lib/lufa/Bootloaders/CDC/BootloaderCDC.c b/lib/lufa/Bootloaders/CDC/BootloaderCDC.c deleted file mode 100644 index aa17bc15bd..0000000000 --- a/lib/lufa/Bootloaders/CDC/BootloaderCDC.c +++ /dev/null @@ -1,673 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * - * Main source file for the CDC class bootloader. This file contains the complete bootloader logic. - */ - -#define INCLUDE_FROM_BOOTLOADERCDC_C -#include "BootloaderCDC.h" - -/** Contains the current baud rate and other settings of the first virtual serial port. This must be retained as some - * operating systems will not open the port unless the settings can be set successfully. - */ -static CDC_LineEncoding_t LineEncoding = { .BaudRateBPS = 0, - .CharFormat = CDC_LINEENCODING_OneStopBit, - .ParityType = CDC_PARITY_None, - .DataBits = 8 }; - -/** Current address counter. This stores the current address of the FLASH or EEPROM as set by the host, - * and is used when reading or writing to the AVRs memory (either FLASH or EEPROM depending on the issued - * command.) - */ -static uint32_t CurrAddress; - -/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run - * via a watchdog reset. When cleared the bootloader will exit, starting the watchdog and entering an infinite - * loop until the AVR restarts and the application runs. - */ -static bool RunBootloader = true; - -/** Magic lock for forced application start. If the HWBE fuse is programmed and BOOTRST is unprogrammed, the bootloader - * will start if the /HWB line of the AVR is held low and the system is reset. However, if the /HWB line is still held - * low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value - * \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start. - */ -uint16_t MagicBootKey ATTR_NO_INIT; - - -/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application - * start key has been loaded into \ref MagicBootKey. If the bootloader started via the watchdog and the key is valid, - * this will force the user application to start via a software jump. - */ -void Application_Jump_Check(void) -{ - bool JumpToApplication = false; - - #if (BOARD == BOARD_LEONARDO) - /* Enable pull-up on the IO13 pin so we can use it to select the mode */ - PORTC |= (1 << 7); - Delay_MS(10); - - /* If IO13 is not jumpered to ground, start the user application instead */ - JumpToApplication = ((PINC & (1 << 7)) != 0); - - /* Disable pull-up after the check has completed */ - PORTC &= ~(1 << 7); - #elif ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)) - /* Disable JTAG debugging */ - JTAG_DISABLE(); - - /* Enable pull-up on the JTAG TCK pin so we can use it to select the mode */ - PORTF |= (1 << 4); - Delay_MS(10); - - /* If the TCK pin is not jumpered to ground, start the user application instead */ - JumpToApplication = ((PINF & (1 << 4)) != 0); - - /* Re-enable JTAG debugging */ - JTAG_ENABLE(); - #else - /* Check if the device's BOOTRST fuse is set */ - if (boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS) & FUSE_BOOTRST) - { - /* If the reset source was not an external reset or the key is correct, clear it and jump to the application */ - if (!(MCUSR & (1 << EXTRF)) || (MagicBootKey == MAGIC_BOOT_KEY)) - JumpToApplication = true; - - /* Clear reset source */ - MCUSR &= ~(1 << EXTRF); - } - else - { - /* If the reset source was the bootloader and the key is correct, clear it and jump to the application; - * this can happen in the HWBE fuse is set, and the HBE pin is low during the watchdog reset */ - if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) - JumpToApplication = true; - - /* Clear reset source */ - MCUSR &= ~(1 << WDRF); - } - #endif - - /* Don't run the user application if the reset vector is blank (no app loaded) */ - bool ApplicationValid = (pgm_read_word_near(0) != 0xFFFF); - - /* If a request has been made to jump to the user application, honor it */ - if (JumpToApplication && ApplicationValid) - { - /* Turn off the watchdog */ - MCUSR &= ~(1 << WDRF); - wdt_disable(); - - /* Clear the boot key and jump to the user application */ - MagicBootKey = 0; - - // cppcheck-suppress constStatement - ((void (*)(void))0x0000)(); - } -} - -/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously - * runs the bootloader processing routine until instructed to soft-exit, or hard-reset via the watchdog to start - * the loaded application code. - */ -int main(void) -{ - /* Setup hardware required for the bootloader */ - SetupHardware(); - - /* Turn on first LED on the board to indicate that the bootloader has started */ - LEDs_SetAllLEDs(LEDS_LED1); - - /* Enable global interrupts so that the USB stack can function */ - GlobalInterruptEnable(); - - while (RunBootloader) - { - CDC_Task(); - USB_USBTask(); - } - - /* Wait a short time to end all USB transactions and then disconnect */ - _delay_us(1000); - - /* Disconnect from the host - USB interface will be reset later along with the AVR */ - USB_Detach(); - - /* Unlock the forced application start mode of the bootloader if it is restarted */ - MagicBootKey = MAGIC_BOOT_KEY; - - /* Enable the watchdog and force a timeout to reset the AVR */ - wdt_enable(WDTO_250MS); - - for (;;); -} - -/** Configures all hardware required for the bootloader. */ -static void SetupHardware(void) -{ - /* Disable watchdog if enabled by bootloader/fuses */ - MCUSR &= ~(1 << WDRF); - wdt_disable(); - - /* Disable clock division */ - clock_prescale_set(clock_div_1); - - /* Relocate the interrupt vector table to the bootloader section */ - MCUCR = (1 << IVCE); - MCUCR = (1 << IVSEL); - - /* Initialize the USB and other board hardware drivers */ - USB_Init(); - LEDs_Init(); - - /* Bootloader active LED toggle timer initialization */ - TIMSK1 = (1 << TOIE1); - TCCR1B = ((1 << CS11) | (1 << CS10)); -} - -/** ISR to periodically toggle the LEDs on the board to indicate that the bootloader is active. */ -ISR(TIMER1_OVF_vect, ISR_BLOCK) -{ - LEDs_ToggleLEDs(LEDS_LED1 | LEDS_LED2); -} - -/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready - * to relay data to and from the attached USB host. - */ -void EVENT_USB_Device_ConfigurationChanged(void) -{ - /* Setup CDC Notification, Rx and Tx Endpoints */ - Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, - CDC_NOTIFICATION_EPSIZE, 1); - - Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); - - Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); -} - -/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to - * the device from the USB host before passing along unhandled control requests to the library for processing - * internally. - */ -void EVENT_USB_Device_ControlRequest(void) -{ - /* Ignore any requests that aren't directed to the CDC interface */ - if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) != - (REQTYPE_CLASS | REQREC_INTERFACE)) - { - return; - } - - /* Activity - toggle indicator LEDs */ - LEDs_ToggleLEDs(LEDS_LED1 | LEDS_LED2); - - /* Process CDC specific control requests */ - switch (USB_ControlRequest.bRequest) - { - case CDC_REQ_GetLineEncoding: - if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) - { - Endpoint_ClearSETUP(); - - /* Write the line coding data to the control endpoint */ - Endpoint_Write_Control_Stream_LE(&LineEncoding, sizeof(CDC_LineEncoding_t)); - Endpoint_ClearOUT(); - } - - break; - case CDC_REQ_SetLineEncoding: - if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) - { - Endpoint_ClearSETUP(); - - /* Read the line coding data in from the host into the global struct */ - Endpoint_Read_Control_Stream_LE(&LineEncoding, sizeof(CDC_LineEncoding_t)); - Endpoint_ClearIN(); - } - - break; - case CDC_REQ_SetControlLineState: - if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) - { - Endpoint_ClearSETUP(); - Endpoint_ClearStatusStage(); - } - - break; - } -} - -#if !defined(NO_BLOCK_SUPPORT) -/** Reads or writes a block of EEPROM or FLASH memory to or from the appropriate CDC data endpoint, depending - * on the AVR109 protocol command issued. - * - * \param[in] Command Single character AVR109 protocol command indicating what memory operation to perform - */ -static void ReadWriteMemoryBlock(const uint8_t Command) -{ - uint16_t BlockSize; - char MemoryType; - - uint8_t HighByte = 0; - uint8_t LowByte = 0; - - BlockSize = (FetchNextCommandByte() << 8); - BlockSize |= FetchNextCommandByte(); - - MemoryType = FetchNextCommandByte(); - - if ((MemoryType != MEMORY_TYPE_FLASH) && (MemoryType != MEMORY_TYPE_EEPROM)) - { - /* Send error byte back to the host */ - WriteNextResponseByte('?'); - - return; - } - - /* Check if command is to read a memory block */ - if (Command == AVR109_COMMAND_BlockRead) - { - /* Re-enable RWW section */ - boot_rww_enable(); - - while (BlockSize--) - { - if (MemoryType == MEMORY_TYPE_FLASH) - { - /* Read the next FLASH byte from the current FLASH page */ - #if (FLASHEND > 0xFFFF) - WriteNextResponseByte(pgm_read_byte_far(CurrAddress | HighByte)); - #else - WriteNextResponseByte(pgm_read_byte(CurrAddress | HighByte)); - #endif - - /* If both bytes in current word have been read, increment the address counter */ - if (HighByte) - CurrAddress += 2; - - HighByte = !HighByte; - } - else - { - /* Read the next EEPROM byte into the endpoint */ - WriteNextResponseByte(eeprom_read_byte((uint8_t*)(intptr_t)(CurrAddress >> 1))); - - /* Increment the address counter after use */ - CurrAddress += 2; - } - } - } - else - { - uint32_t PageStartAddress = CurrAddress; - - if (MemoryType == MEMORY_TYPE_FLASH) - { - boot_page_erase(PageStartAddress); - boot_spm_busy_wait(); - } - - while (BlockSize--) - { - if (MemoryType == MEMORY_TYPE_FLASH) - { - /* If both bytes in current word have been written, increment the address counter */ - if (HighByte) - { - /* Write the next FLASH word to the current FLASH page */ - boot_page_fill(CurrAddress, ((FetchNextCommandByte() << 8) | LowByte)); - - /* Increment the address counter after use */ - CurrAddress += 2; - } - else - { - LowByte = FetchNextCommandByte(); - } - - HighByte = !HighByte; - } - else - { - /* Write the next EEPROM byte from the endpoint */ - eeprom_update_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)), FetchNextCommandByte()); - - /* Increment the address counter after use */ - CurrAddress += 2; - } - } - - /* If in FLASH programming mode, commit the page after writing */ - if (MemoryType == MEMORY_TYPE_FLASH) - { - /* Commit the flash page to memory */ - boot_page_write(PageStartAddress); - - /* Wait until write operation has completed */ - boot_spm_busy_wait(); - } - - /* Send response byte back to the host */ - WriteNextResponseByte('\r'); - } -} -#endif - -/** Retrieves the next byte from the host in the CDC data OUT endpoint, and clears the endpoint bank if needed - * to allow reception of the next data packet from the host. - * - * \return Next received byte from the host in the CDC data OUT endpoint - */ -static uint8_t FetchNextCommandByte(void) -{ - /* Select the OUT endpoint so that the next data byte can be read */ - Endpoint_SelectEndpoint(CDC_RX_EPADDR); - - /* If OUT endpoint empty, clear it and wait for the next packet from the host */ - while (!(Endpoint_IsReadWriteAllowed())) - { - Endpoint_ClearOUT(); - - while (!(Endpoint_IsOUTReceived())) - { - if (USB_DeviceState == DEVICE_STATE_Unattached) - return 0; - } - } - - /* Fetch the next byte from the OUT endpoint */ - return Endpoint_Read_8(); -} - -/** Writes the next response byte to the CDC data IN endpoint, and sends the endpoint back if needed to free up the - * bank when full ready for the next byte in the packet to the host. - * - * \param[in] Response Next response byte to send to the host - */ -static void WriteNextResponseByte(const uint8_t Response) -{ - /* Select the IN endpoint so that the next data byte can be written */ - Endpoint_SelectEndpoint(CDC_TX_EPADDR); - - /* If IN endpoint full, clear it and wait until ready for the next packet to the host */ - if (!(Endpoint_IsReadWriteAllowed())) - { - Endpoint_ClearIN(); - - while (!(Endpoint_IsINReady())) - { - if (USB_DeviceState == DEVICE_STATE_Unattached) - return; - } - } - - /* Write the next byte to the IN endpoint */ - Endpoint_Write_8(Response); -} - -/** Task to read in AVR109 commands from the CDC data OUT endpoint, process them, perform the required actions - * and send the appropriate response back to the host. - */ -static void CDC_Task(void) -{ - /* Select the OUT endpoint */ - Endpoint_SelectEndpoint(CDC_RX_EPADDR); - - /* Check if endpoint has a command in it sent from the host */ - if (!(Endpoint_IsOUTReceived())) - return; - - /* Read in the bootloader command (first byte sent from host) */ - uint8_t Command = FetchNextCommandByte(); - - if (Command == AVR109_COMMAND_ExitBootloader) - { - RunBootloader = false; - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - else if ((Command == AVR109_COMMAND_SetLED) || (Command == AVR109_COMMAND_ClearLED) || - (Command == AVR109_COMMAND_SelectDeviceType)) - { - FetchNextCommandByte(); - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - else if ((Command == AVR109_COMMAND_EnterProgrammingMode) || (Command == AVR109_COMMAND_LeaveProgrammingMode)) - { - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - else if (Command == AVR109_COMMAND_ReadPartCode) - { - /* Return ATMEGA128 part code - this is only to allow AVRProg to use the bootloader */ - WriteNextResponseByte(0x44); - WriteNextResponseByte(0x00); - } - else if (Command == AVR109_COMMAND_ReadAutoAddressIncrement) - { - /* Indicate auto-address increment is supported */ - WriteNextResponseByte('Y'); - } - else if (Command == AVR109_COMMAND_SetCurrentAddress) - { - /* Set the current address to that given by the host (translate 16-bit word address to byte address) */ - CurrAddress = (FetchNextCommandByte() << 9); - CurrAddress |= (FetchNextCommandByte() << 1); - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - else if (Command == AVR109_COMMAND_ReadBootloaderInterface) - { - /* Indicate serial programmer back to the host */ - WriteNextResponseByte('S'); - } - else if (Command == AVR109_COMMAND_ReadBootloaderIdentifier) - { - /* Write the 7-byte software identifier to the endpoint */ - for (uint8_t CurrByte = 0; CurrByte < 7; CurrByte++) - WriteNextResponseByte(SOFTWARE_IDENTIFIER[CurrByte]); - } - else if (Command == AVR109_COMMAND_ReadBootloaderSWVersion) - { - WriteNextResponseByte('0' + BOOTLOADER_VERSION_MAJOR); - WriteNextResponseByte('0' + BOOTLOADER_VERSION_MINOR); - } - else if (Command == AVR109_COMMAND_ReadSignature) - { - WriteNextResponseByte(AVR_SIGNATURE_3); - WriteNextResponseByte(AVR_SIGNATURE_2); - WriteNextResponseByte(AVR_SIGNATURE_1); - } - else if (Command == AVR109_COMMAND_EraseFLASH) - { - /* Clear the application section of flash */ - for (uint32_t CurrFlashAddress = 0; CurrFlashAddress < (uint32_t)BOOT_START_ADDR; CurrFlashAddress += SPM_PAGESIZE) - { - boot_page_erase(CurrFlashAddress); - boot_spm_busy_wait(); - boot_page_write(CurrFlashAddress); - boot_spm_busy_wait(); - } - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - #if !defined(NO_LOCK_BYTE_WRITE_SUPPORT) - else if (Command == AVR109_COMMAND_WriteLockbits) - { - /* Set the lock bits to those given by the host */ - boot_lock_bits_set(FetchNextCommandByte()); - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - #endif - else if (Command == AVR109_COMMAND_ReadLockbits) - { - WriteNextResponseByte(boot_lock_fuse_bits_get(GET_LOCK_BITS)); - } - else if (Command == AVR109_COMMAND_ReadLowFuses) - { - WriteNextResponseByte(boot_lock_fuse_bits_get(GET_LOW_FUSE_BITS)); - } - else if (Command == AVR109_COMMAND_ReadHighFuses) - { - WriteNextResponseByte(boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS)); - } - else if (Command == AVR109_COMMAND_ReadExtendedFuses) - { - WriteNextResponseByte(boot_lock_fuse_bits_get(GET_EXTENDED_FUSE_BITS)); - } - #if !defined(NO_BLOCK_SUPPORT) - else if (Command == AVR109_COMMAND_GetBlockWriteSupport) - { - WriteNextResponseByte('Y'); - - /* Send block size to the host */ - WriteNextResponseByte(SPM_PAGESIZE >> 8); - WriteNextResponseByte(SPM_PAGESIZE & 0xFF); - } - else if ((Command == AVR109_COMMAND_BlockWrite) || (Command == AVR109_COMMAND_BlockRead)) - { - /* Delegate the block write/read to a separate function for clarity */ - ReadWriteMemoryBlock(Command); - } - #endif - #if !defined(NO_FLASH_BYTE_SUPPORT) - else if (Command == AVR109_COMMAND_FillFlashPageWordHigh) - { - /* Write the high byte to the current flash page */ - boot_page_fill(CurrAddress, FetchNextCommandByte()); - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - else if (Command == AVR109_COMMAND_FillFlashPageWordLow) - { - /* Write the low byte to the current flash page */ - boot_page_fill(CurrAddress | 0x01, FetchNextCommandByte()); - - /* Increment the address */ - CurrAddress += 2; - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - else if (Command == AVR109_COMMAND_WriteFlashPage) - { - /* Commit the flash page to memory */ - boot_page_write(CurrAddress); - - /* Wait until write operation has completed */ - boot_spm_busy_wait(); - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - else if (Command == AVR109_COMMAND_ReadFLASHWord) - { - #if (FLASHEND > 0xFFFF) - uint16_t ProgramWord = pgm_read_word_far(CurrAddress); - #else - uint16_t ProgramWord = pgm_read_word(CurrAddress); - #endif - - WriteNextResponseByte(ProgramWord >> 8); - WriteNextResponseByte(ProgramWord & 0xFF); - } - #endif - #if !defined(NO_EEPROM_BYTE_SUPPORT) - else if (Command == AVR109_COMMAND_WriteEEPROM) - { - /* Read the byte from the endpoint and write it to the EEPROM */ - eeprom_update_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)), FetchNextCommandByte()); - - /* Increment the address after use */ - CurrAddress += 2; - - /* Send confirmation byte back to the host */ - WriteNextResponseByte('\r'); - } - else if (Command == AVR109_COMMAND_ReadEEPROM) - { - /* Read the EEPROM byte and write it to the endpoint */ - WriteNextResponseByte(eeprom_read_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)))); - - /* Increment the address after use */ - CurrAddress += 2; - } - #endif - else if (Command != AVR109_COMMAND_Sync) - { - /* Unknown (non-sync) command, return fail code */ - WriteNextResponseByte('?'); - } - - /* Select the IN endpoint */ - Endpoint_SelectEndpoint(CDC_TX_EPADDR); - - /* Remember if the endpoint is completely full before clearing it */ - bool IsEndpointFull = !(Endpoint_IsReadWriteAllowed()); - - /* Send the endpoint data to the host */ - Endpoint_ClearIN(); - - /* If a full endpoint's worth of data was sent, we need to send an empty packet afterwards to signal end of transfer */ - if (IsEndpointFull) - { - while (!(Endpoint_IsINReady())) - { - if (USB_DeviceState == DEVICE_STATE_Unattached) - return; - } - - Endpoint_ClearIN(); - } - - /* Wait until the data has been sent to the host */ - while (!(Endpoint_IsINReady())) - { - if (USB_DeviceState == DEVICE_STATE_Unattached) - return; - } - - /* Select the OUT endpoint */ - Endpoint_SelectEndpoint(CDC_RX_EPADDR); - - /* Acknowledge the command from the host */ - Endpoint_ClearOUT(); -} diff --git a/lib/lufa/Bootloaders/CDC/BootloaderCDC.h b/lib/lufa/Bootloaders/CDC/BootloaderCDC.h deleted file mode 100644 index b6543aa738..0000000000 --- a/lib/lufa/Bootloaders/CDC/BootloaderCDC.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * - * Header file for BootloaderCDC.c. - */ - -#ifndef _CDC_H_ -#define _CDC_H_ - - /* Includes: */ - #include - #include - #include - #include - #include - #include - #include - - #include "Descriptors.h" - #include "BootloaderAPI.h" - #include "Config/AppConfig.h" - - #include - #include - #include - - /* Preprocessor Checks: */ - #if !defined(__OPTIMIZE_SIZE__) - #error This bootloader requires that it be optimized for size, not speed, to fit into the target device. Change optimization settings and try again. - #endif - - /* Macros: */ - /** Version major of the CDC bootloader. */ - #define BOOTLOADER_VERSION_MAJOR 0x01 - - /** Version minor of the CDC bootloader. */ - #define BOOTLOADER_VERSION_MINOR 0x00 - - /** Hardware version major of the CDC bootloader. */ - #define BOOTLOADER_HWVERSION_MAJOR 0x01 - - /** Hardware version minor of the CDC bootloader. */ - #define BOOTLOADER_HWVERSION_MINOR 0x00 - - /** Eight character bootloader firmware identifier reported to the host when requested. */ - #define SOFTWARE_IDENTIFIER "LUFACDC" - - /** Magic bootloader key to unlock forced application start mode. */ - #define MAGIC_BOOT_KEY 0xDC42 - - /* Enums: */ - /** Possible memory types that can be addressed via the bootloader. */ - enum AVR109_Memories - { - MEMORY_TYPE_FLASH = 'F', - MEMORY_TYPE_EEPROM = 'E', - }; - - /** Possible commands that can be issued to the bootloader. */ - enum AVR109_Commands - { - AVR109_COMMAND_Sync = 27, - AVR109_COMMAND_ReadEEPROM = 'd', - AVR109_COMMAND_WriteEEPROM = 'D', - AVR109_COMMAND_ReadFLASHWord = 'R', - AVR109_COMMAND_WriteFlashPage = 'm', - AVR109_COMMAND_FillFlashPageWordLow = 'c', - AVR109_COMMAND_FillFlashPageWordHigh = 'C', - AVR109_COMMAND_GetBlockWriteSupport = 'b', - AVR109_COMMAND_BlockWrite = 'B', - AVR109_COMMAND_BlockRead = 'g', - AVR109_COMMAND_ReadExtendedFuses = 'Q', - AVR109_COMMAND_ReadHighFuses = 'N', - AVR109_COMMAND_ReadLowFuses = 'F', - AVR109_COMMAND_ReadLockbits = 'r', - AVR109_COMMAND_WriteLockbits = 'l', - AVR109_COMMAND_EraseFLASH = 'e', - AVR109_COMMAND_ReadSignature = 's', - AVR109_COMMAND_ReadBootloaderSWVersion = 'V', - AVR109_COMMAND_ReadBootloaderHWVersion = 'v', - AVR109_COMMAND_ReadBootloaderIdentifier = 'S', - AVR109_COMMAND_ReadBootloaderInterface = 'p', - AVR109_COMMAND_SetCurrentAddress = 'A', - AVR109_COMMAND_ReadAutoAddressIncrement = 'a', - AVR109_COMMAND_ReadPartCode = 't', - AVR109_COMMAND_EnterProgrammingMode = 'P', - AVR109_COMMAND_LeaveProgrammingMode = 'L', - AVR109_COMMAND_SelectDeviceType = 'T', - AVR109_COMMAND_SetLED = 'x', - AVR109_COMMAND_ClearLED = 'y', - AVR109_COMMAND_ExitBootloader = 'E', - }; - - /* Type Defines: */ - /** Type define for a non-returning pointer to the start of the loaded application in flash memory. */ - typedef void (*AppPtr_t)(void) ATTR_NO_RETURN; - - /* Function Prototypes: */ - static void CDC_Task(void); - static void SetupHardware(void); - - void Application_Jump_Check(void) ATTR_INIT_SECTION(3); - - void EVENT_USB_Device_ConfigurationChanged(void); - - #if defined(INCLUDE_FROM_BOOTLOADERCDC_C) || defined(__DOXYGEN__) - #if !defined(NO_BLOCK_SUPPORT) - static void ReadWriteMemoryBlock(const uint8_t Command); - #endif - static uint8_t FetchNextCommandByte(void); - static void WriteNextResponseByte(const uint8_t Response); - #endif - -#endif - diff --git a/lib/lufa/Bootloaders/CDC/BootloaderCDC.txt b/lib/lufa/Bootloaders/CDC/BootloaderCDC.txt deleted file mode 100644 index f8c349cded..0000000000 --- a/lib/lufa/Bootloaders/CDC/BootloaderCDC.txt +++ /dev/null @@ -1,242 +0,0 @@ -/** \file - * - * This file contains special DoxyGen information for the generation of the main page and other special - * documentation pages. It is not a project source file. - */ - -/** \mainpage CDC Class USB AVR Bootloader - * - * \section Sec_Compat Demo Compatibility: - * - * The following list indicates what microcontrollers are compatible with this demo. - * - * \li Series 7 USB AVRs (AT90USBxxx7) - * \li Series 6 USB AVRs (AT90USBxxx6) - * \li Series 4 USB AVRs (ATMEGAxxU4) - * \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2) - * - * \section Sec_Info USB Information: - * - * The following table gives a rundown of the USB utilization of this demo. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
USB Mode:Device
USB Class:Communications Device Class (CDC)
USB Subclass:Abstract Control Model (ACM)
Relevant Standards:USBIF CDC Class Standard
Supported USB Speeds:Full Speed Mode
- * - * \section Sec_Description Project Description: - * - * This bootloader enumerates to the host as a CDC Class device (virtual serial port), allowing for AVR109 - * protocol compatible programming software to load firmware onto the AVR. - * - * Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit - * into 4KB of bootloader space. If you wish to alter this size and/or change the AVR model, you will need to - * edit the MCU, FLASH_SIZE_KB and BOOT_SECTION_SIZE_KB values in the accompanying makefile. - * - * When the bootloader is running, the board's LED(s) will flash at regular intervals to distinguish the - * bootloader from the normal user application. - * - * \warning THIS BOOTLOADER IS NOT SECURE. Malicious entities can recover written data, even if the device - * lockbits are set. - * - * \section Sec_Running Running the Bootloader - * - * On the USB AVR8 devices, setting the \c HWBE device fuse will cause the bootloader to run if the \c HWB pin of - * the AVR is grounded when the device is reset. - * - * The are two behaviours of this bootloader, depending on the device's fuses: - * - * If the device's BOOTRST fuse is set, the bootloader will run any time the system is reset from - * the external reset pin, unless no valid user application has been loaded. To initiate the bootloader, the - * device's external reset pin should be grounded momentarily. - * - * If the device's BOOTRST fuse is not set, the bootloader will run only if initiated via a software - * jump, or if the \c HWB pin was low during the last device reset (if the \c HWBE fuse is set). - * - * For board specific exceptions to the above, see below. - * - * \subsection SSec_XPLAIN Atmel Xplain Board - * Ground the USB AVR JTAG's \c TCK pin to ground when powering on the board to start the bootloader. This assumes the - * \c HWBE fuse is cleared and the \c BOOTRST fuse is set as the HWBE pin is not user accessible on this board. - * - * \subsection SSec_Leonardo Arduino Leonardo Board - * Ground \c IO13 when powering the board to start the bootloader. This assumes the \c HWBE fuse is cleared and the - * \c BOOTRST fuse is set as the HWBE pin is not user accessible on this board. - * - * \section Sec_Installation Driver Installation - * - * After running this bootloader for the first time on a new computer, you will need to supply the .INF - * file located in this bootloader project's directory as the device's driver when running under Windows. - * This will enable Windows to use its inbuilt CDC drivers, negating the need for custom drivers for the - * device. Other Operating Systems should automatically use their own inbuilt CDC-ACM drivers. - * - * \section Sec_HostApp Host Controller Application - * - * This bootloader is compatible with the open source application AVRDUDE, Atmel's AVRPROG, or other - * applications implementing the AVR109 protocol, which is documented on the Atmel website as an application - * note. - * - * \subsection SSec_AVRDude AVRDUDE (Windows, Mac, Linux) - * - * AVRDude is a free, cross-platform and open source command line programmer for Atmel and third party AVR - * programmers. It is available on the the Windows platform as part of the "WinAVR" package, or on other systems - * either from a build from the official source code, or in many distributions as a precompiled binary package. - * - * To load a new HEX file with AVRDude, specify "AVR109" as the programmer, with the allocated COM port. On Windows - * platforms this will be a COMx port name: - * \code - * avrdude -c AVR109 -p at90usb1287 -P COM0 -U flash:w:Mouse.hex - * \endcode - * - * On Linux systems, this will typically be a /dev/ttyACMx port name: - * \code - * avrdude -c AVR109 -p at90usb1287 -P /dev/ttyACM0 -U flash:w:Mouse.hex - * \endcode - * - * Refer to the AVRDude project documentation for additional usage instructions. - * - * \section Sec_API User Application API - * - * Several user application functions for FLASH and other special memory area manipulations are exposed by the bootloader, - * allowing the user application to call into the bootloader at runtime to read and write FLASH data. - * - * By default, the bootloader API jump table is located 32 bytes from the end of the device's FLASH memory, and follows the - * following layout: - * - * \code - * #define BOOTLOADER_API_TABLE_SIZE 32 - * #define BOOTLOADER_API_TABLE_START ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE) - * #define BOOTLOADER_API_CALL(Index) (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2) - * - * void (*BootloaderAPI_ErasePage)(uint32_t Address) = BOOTLOADER_API_CALL(0); - * void (*BootloaderAPI_WritePage)(uint32_t Address) = BOOTLOADER_API_CALL(1); - * void (*BootloaderAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2); - * uint8_t (*BootloaderAPI_ReadSignature)(uint16_t Address) = BOOTLOADER_API_CALL(3); - * uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address) = BOOTLOADER_API_CALL(4); - * uint8_t (*BootloaderAPI_ReadLock)(void) = BOOTLOADER_API_CALL(5); - * void (*BootloaderAPI_WriteLock)(uint8_t LockBits) = BOOTLOADER_API_CALL(6); - * - * #define BOOTLOADER_MAGIC_SIGNATURE_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2)) - * #define BOOTLOADER_MAGIC_SIGNATURE 0xDCFB - * - * #define BOOTLOADER_CLASS_SIGNATURE_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4)) - * #define BOOTLOADER_CDC_SIGNATURE 0xDF00 - * - * #define BOOTLOADER_ADDRESS_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8)) - * #define BOOTLOADER_ADDRESS_LENGTH 4 - * \endcode - * - * From the application the API support of the bootloader can be detected by reading the FLASH memory bytes located at address - * \c BOOTLOADER_MAGIC_SIGNATURE_START and comparing them to the value \c BOOTLOADER_MAGIC_SIGNATURE. The class of bootloader - * can be determined by reading the FLASH memory bytes located at address \c BOOTLOADER_CLASS_SIGNATURE_START and comparing them - * to the value \c BOOTLOADER_CDC_SIGNATURE. The start address of the bootloader can be retrieved by reading the bytes of FLASH - * memory starting from address \c BOOTLOADER_ADDRESS_START. - * - * \subsection SSec_API_MemLayout Device Memory Map - * The following illustration indicates the final memory map of the device when loaded with the bootloader. - * - * \verbatim - * +----------------------------+ 0x0000 - * | | - * | | - * | | - * | | - * | | - * | | - * | | - * | | - * | User Application | - * | | - * | | - * | | - * | | - * | | - * | | - * | | - * +----------------------------+ FLASHEND - BOOT_SECTION_SIZE - * | | - * | Bootloader Application | - * | (Not User App. Accessible) | - * | | - * +----------------------------+ FLASHEND - 96 - * | API Table Trampolines | - * | (Not User App. Accessible) | - * +----------------------------+ FLASHEND - 32 - * | Bootloader API Table | - * | (User App. Accessible) | - * +----------------------------+ FLASHEND - 8 - * | Bootloader ID Constants | - * | (User App. Accessible) | - * +----------------------------+ FLASHEND - * \endverbatim - * - * \section Sec_KnownIssues Known Issues: - * - * \par On Linux machines, the CDC bootloader is unstable or inaccessible. - * A change to the \c ModemManager module in many Linux distributions causes - * this module to try to take control over inserted CDC devices, corrupting the - * datastream. A UDEV rule is required to prevent this. - * See here for resolution steps. - * If the issue still persists then uninstall modemmanager by executing sudo apt-get remove modemmanager, or - * the equivalent using your chosen distribution's package manager. - * - * \par On Linux machines, the CDC bootloader is inaccessible. - * On many Linux systems, non-root users do not have automatic access to newly - * inserted CDC devices. Root privileges or a UDEV rule is required to gain - * access. - * See here for resolution steps. - * - * \section Sec_Options Project Options - * - * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Define Name:Location:Description:
NO_BLOCK_SUPPORTAppConfig.hDefine to disable memory block read/write support in the bootloader, requiring all reads and writes to be made - * using the byte-level commands.
NO_EEPROM_BYTE_SUPPORTAppConfig.hDefine to disable EEPROM memory byte read/write support in the bootloader, requiring all EEPROM reads and writes - * to be made using the block-level commands.
NO_FLASH_BYTE_SUPPORTAppConfig.hDefine to disable FLASH memory byte read/write support in the bootloader, requiring all FLASH reads and writes - * to be made using the block-level commands.
NO_LOCK_BYTE_WRITE_SUPPORTAppConfig.hDefine to disable lock byte write support in the bootloader, preventing the lock bits from being set programmatically.
- */ - diff --git a/lib/lufa/Bootloaders/CDC/Config/AppConfig.h b/lib/lufa/Bootloaders/CDC/Config/AppConfig.h deleted file mode 100644 index 22972b72fe..0000000000 --- a/lib/lufa/Bootloaders/CDC/Config/AppConfig.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * \brief Application Configuration Header File - * - * This is a header file which is be used to configure LUFA's - * compile time options, as an alternative to the compile time - * constants supplied through a makefile. - * - * For information on what each token does, refer to the - * \ref Sec_Options section of the application documentation. - */ - -#ifndef _APP_CONFIG_H_ -#define _APP_CONFIG_H_ - -// #define NO_BLOCK_SUPPORT -// #define NO_EEPROM_BYTE_SUPPORT -// #define NO_FLASH_BYTE_SUPPORT -// #define NO_LOCK_BYTE_WRITE_SUPPORT - -#endif diff --git a/lib/lufa/Bootloaders/CDC/Config/LUFAConfig.h b/lib/lufa/Bootloaders/CDC/Config/LUFAConfig.h deleted file mode 100644 index 5aa0e765bf..0000000000 --- a/lib/lufa/Bootloaders/CDC/Config/LUFAConfig.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * \brief LUFA Library Configuration Header File - * - * This header file is used to configure LUFA's compile time options, - * as an alternative to the compile time constants supplied through - * a makefile. - * - * For information on what each token does, refer to the LUFA - * manual section "Summary of Compile Tokens". - */ - -#ifndef _LUFA_CONFIG_H_ -#define _LUFA_CONFIG_H_ - - #if (ARCH == ARCH_AVR8) - - /* Non-USB Related Configuration Tokens: */ -// #define DISABLE_TERMINAL_CODES - - /* USB Class Driver Related Tokens: */ -// #define HID_HOST_BOOT_PROTOCOL_ONLY -// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} -// #define HID_USAGE_STACK_DEPTH {Insert Value Here} -// #define HID_MAX_COLLECTIONS {Insert Value Here} -// #define HID_MAX_REPORTITEMS {Insert Value Here} -// #define HID_MAX_REPORT_IDS {Insert Value Here} -// #define NO_CLASS_DRIVER_AUTOFLUSH - - /* General USB Driver Related Tokens: */ - #define ORDERED_EP_CONFIG - #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) - #define USB_DEVICE_ONLY -// #define USB_HOST_ONLY -// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} -// #define NO_LIMITED_CONTROLLER_CONNECT - #define NO_SOF_EVENTS - - /* USB Device Mode Driver Related Tokens: */ - #define USE_RAM_DESCRIPTORS -// #define USE_FLASH_DESCRIPTORS -// #define USE_EEPROM_DESCRIPTORS - #define NO_INTERNAL_SERIAL - #define FIXED_CONTROL_ENDPOINT_SIZE 8 - #define DEVICE_STATE_AS_GPIOR 0 - #define FIXED_NUM_CONFIGURATIONS 1 -// #define CONTROL_ONLY_DEVICE -// #define INTERRUPT_CONTROL_ENDPOINT - #define NO_DEVICE_REMOTE_WAKEUP - #define NO_DEVICE_SELF_POWER - - /* USB Host Mode Driver Related Tokens: */ -// #define HOST_STATE_AS_GPIOR {Insert Value Here} -// #define USB_HOST_TIMEOUT_MS {Insert Value Here} -// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} -// #define NO_AUTO_VBUS_MANAGEMENT -// #define INVERTED_VBUS_ENABLE_LINE - - #else - - #error Unsupported architecture for this LUFA configuration file. - - #endif -#endif diff --git a/lib/lufa/Bootloaders/CDC/Descriptors.c b/lib/lufa/Bootloaders/CDC/Descriptors.c deleted file mode 100644 index 6276570373..0000000000 --- a/lib/lufa/Bootloaders/CDC/Descriptors.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * - * USB Device Descriptors, for library use when in USB device mode. Descriptors are special - * computer-readable structures which the host requests upon device enumeration, to determine - * the device's capabilities and functions. - */ - -#include "Descriptors.h" - -/** Device descriptor structure. This descriptor, located in SRAM memory, describes the overall - * device characteristics, including the supported USB version, control endpoint size and the - * number of device configurations. The descriptor is read out by the USB host when the enumeration - * process begins. - */ -const USB_Descriptor_Device_t DeviceDescriptor = -{ - .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, - - .USBSpecification = VERSION_BCD(1,1,0), - .Class = CDC_CSCP_CDCClass, - .SubClass = CDC_CSCP_NoSpecificSubclass, - .Protocol = CDC_CSCP_NoSpecificProtocol, - - .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, - - .VendorID = 0x03EB, - .ProductID = 0x204A, - .ReleaseNumber = VERSION_BCD(1,0,0), - - .ManufacturerStrIndex = STRING_ID_Manufacturer, - .ProductStrIndex = STRING_ID_Product, - .SerialNumStrIndex = NO_DESCRIPTOR, - - .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS -}; - -/** Configuration descriptor structure. This descriptor, located in SRAM memory, describes the usage - * of the device in one of its supported configurations, including information about any device interfaces - * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting - * a configuration so that the host may correctly communicate with the USB device. - */ -const USB_Descriptor_Configuration_t ConfigurationDescriptor = -{ - .Config = - { - .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, - - .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), - .TotalInterfaces = 2, - - .ConfigurationNumber = 1, - .ConfigurationStrIndex = NO_DESCRIPTOR, - - .ConfigAttributes = USB_CONFIG_ATTR_RESERVED, - - .MaxPowerConsumption = USB_CONFIG_POWER_MA(100) - }, - - .CDC_CCI_Interface = - { - .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - - .InterfaceNumber = INTERFACE_ID_CDC_CCI, - .AlternateSetting = 0, - - .TotalEndpoints = 1, - - .Class = CDC_CSCP_CDCClass, - .SubClass = CDC_CSCP_ACMSubclass, - .Protocol = CDC_CSCP_ATCommandProtocol, - - .InterfaceStrIndex = NO_DESCRIPTOR - }, - - .CDC_Functional_Header = - { - .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface}, - .Subtype = 0x00, - - .CDCSpecification = VERSION_BCD(1,1,0), - }, - - .CDC_Functional_ACM = - { - .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface}, - .Subtype = 0x02, - - .Capabilities = 0x02, - }, - - .CDC_Functional_Union = - { - .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface}, - .Subtype = 0x06, - - .MasterInterfaceNumber = INTERFACE_ID_CDC_CCI, - .SlaveInterfaceNumber = INTERFACE_ID_CDC_DCI, - }, - - .CDC_NotificationEndpoint = - { - .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - - .EndpointAddress = CDC_NOTIFICATION_EPADDR, - .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), - .EndpointSize = CDC_NOTIFICATION_EPSIZE, - .PollingIntervalMS = 0xFF - }, - - .CDC_DCI_Interface = - { - .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - - .InterfaceNumber = INTERFACE_ID_CDC_DCI, - .AlternateSetting = 0, - - .TotalEndpoints = 2, - - .Class = CDC_CSCP_CDCDataClass, - .SubClass = CDC_CSCP_NoDataSubclass, - .Protocol = CDC_CSCP_NoDataProtocol, - - .InterfaceStrIndex = NO_DESCRIPTOR - }, - - .CDC_DataOutEndpoint = - { - .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - - .EndpointAddress = CDC_RX_EPADDR, - .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), - .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x05 - }, - - .CDC_DataInEndpoint = - { - .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - - .EndpointAddress = CDC_TX_EPADDR, - .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), - .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x05 - } -}; - -/** Language descriptor structure. This descriptor, located in SRAM memory, is returned when the host requests - * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate - * via the language ID table available at USB.org what languages the device supports for its string descriptors. - */ -const USB_Descriptor_String_t LanguageString = USB_STRING_DESCRIPTOR_ARRAY(LANGUAGE_ID_ENG); - -/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable - * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device - * Descriptor. - */ -const USB_Descriptor_String_t ManufacturerString = USB_STRING_DESCRIPTOR(L"Dean Camera"); - -/** Product descriptor string. This is a Unicode string containing the product's details in human readable form, - * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device - * Descriptor. - */ -const USB_Descriptor_String_t ProductString = USB_STRING_DESCRIPTOR(L"LUFA CDC"); - -/** This function is called by the library when in device mode, and must be overridden (see LUFA library "USB Descriptors" - * documentation) by the application code so that the address and size of a requested descriptor can be given - * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function - * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the - * USB host. - */ -uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint16_t wIndex, - const void** const DescriptorAddress) -{ - const uint8_t DescriptorType = (wValue >> 8); - const uint8_t DescriptorNumber = (wValue & 0xFF); - - const void* Address = NULL; - uint16_t Size = NO_DESCRIPTOR; - - switch (DescriptorType) - { - case DTYPE_Device: - Address = &DeviceDescriptor; - Size = sizeof(USB_Descriptor_Device_t); - break; - case DTYPE_Configuration: - Address = &ConfigurationDescriptor; - Size = sizeof(USB_Descriptor_Configuration_t); - break; - case DTYPE_String: - if (DescriptorNumber == STRING_ID_Language) - { - Address = &LanguageString; - Size = LanguageString.Header.Size; - } - else if (DescriptorNumber == STRING_ID_Manufacturer) - { - Address = &ManufacturerString; - Size = ManufacturerString.Header.Size; - } - else if (DescriptorNumber == STRING_ID_Product) - { - Address = &ProductString; - Size = ProductString.Header.Size; - } - - break; - } - - *DescriptorAddress = Address; - return Size; -} - diff --git a/lib/lufa/Bootloaders/CDC/Descriptors.h b/lib/lufa/Bootloaders/CDC/Descriptors.h deleted file mode 100644 index a6fbf5262b..0000000000 --- a/lib/lufa/Bootloaders/CDC/Descriptors.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaims all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * - * Header file for Descriptors.c. - */ - -#ifndef _DESCRIPTORS_H_ -#define _DESCRIPTORS_H_ - - /* Includes: */ - #include - - #include "Config/AppConfig.h" - - /* Macros: */ - #if defined(__AVR_AT90USB1287__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x97 - #define AVR_SIGNATURE_3 0x82 - #elif defined(__AVR_AT90USB647__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x96 - #define AVR_SIGNATURE_3 0x82 - #elif defined(__AVR_AT90USB1286__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x97 - #define AVR_SIGNATURE_3 0x82 - #elif defined(__AVR_AT90USB646__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x96 - #define AVR_SIGNATURE_3 0x82 - #elif defined(__AVR_ATmega32U4__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x95 - #define AVR_SIGNATURE_3 0x87 - #elif defined(__AVR_ATmega16U4__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x94 - #define AVR_SIGNATURE_3 0x88 - #elif defined(__AVR_ATmega32U2__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x95 - #define AVR_SIGNATURE_3 0x8A - #elif defined(__AVR_ATmega16U2__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x94 - #define AVR_SIGNATURE_3 0x89 - #elif defined(__AVR_AT90USB162__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x94 - #define AVR_SIGNATURE_3 0x82 - #elif defined(__AVR_ATmega8U2__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x93 - #define AVR_SIGNATURE_3 0x89 - #elif defined(__AVR_AT90USB82__) - #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x93 - #define AVR_SIGNATURE_3 0x82 - #else - #error The selected AVR part is not currently supported by this bootloader. - #endif - - /** Endpoint address for the CDC control interface event notification endpoint. */ - #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2) - - /** Endpoint address for the CDC data interface TX (data IN) endpoint. */ - #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3) - - /** Endpoint address for the CDC data interface RX (data OUT) endpoint. */ - #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4) - - /** Size of the CDC data interface TX and RX data endpoint banks, in bytes. */ - #define CDC_TXRX_EPSIZE 16 - - /** Size of the CDC control interface notification endpoint bank, in bytes. */ - #define CDC_NOTIFICATION_EPSIZE 8 - - /* Type Defines: */ - /** Type define for the device configuration descriptor structure. This must be defined in the - * application code, as the configuration descriptor contains several sub-descriptors which - * vary between devices, and which describe the device's usage to the host. - */ - typedef struct - { - USB_Descriptor_Configuration_Header_t Config; - - // CDC Control Interface - USB_Descriptor_Interface_t CDC_CCI_Interface; - USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header; - USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM; - USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union; - USB_Descriptor_Endpoint_t CDC_NotificationEndpoint; - - // CDC Data Interface - USB_Descriptor_Interface_t CDC_DCI_Interface; - USB_Descriptor_Endpoint_t CDC_DataOutEndpoint; - USB_Descriptor_Endpoint_t CDC_DataInEndpoint; - } USB_Descriptor_Configuration_t; - - /** Enum for the device interface descriptor IDs within the device. Each interface descriptor - * should have a unique ID index associated with it, which can be used to refer to the - * interface from other descriptors. - */ - enum InterfaceDescriptors_t - { - INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */ - INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */ - }; - - /** Enum for the device string descriptor IDs within the device. Each string descriptor should - * have a unique ID index associated with it, which can be used to refer to the string from - * other descriptors. - */ - enum StringDescriptors_t - { - STRING_ID_Language = 0, /**< Supported Languages string descriptor ID (must be zero) */ - STRING_ID_Manufacturer = 1, /**< Manufacturer string ID */ - STRING_ID_Product = 2, /**< Product string ID */ - }; - - /* Function Prototypes: */ - uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint16_t wIndex, - const void** const DescriptorAddress) - ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); - -#endif - diff --git a/lib/lufa/Bootloaders/CDC/LUFA CDC Bootloader.inf b/lib/lufa/Bootloaders/CDC/LUFA CDC Bootloader.inf deleted file mode 100644 index 61624c7318..0000000000 --- a/lib/lufa/Bootloaders/CDC/LUFA CDC Bootloader.inf +++ /dev/null @@ -1,66 +0,0 @@ -;************************************************************ -; Windows USB CDC ACM Setup File -; Copyright (c) 2000 Microsoft Corporation -;************************************************************ - -[DefaultInstall] -CopyINF="LUFA CDC Bootloader.inf" - -[Version] -Signature="$Windows NT$" -Class=Ports -ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} -Provider=%MFGNAME% -DriverVer=7/1/2012,10.0.0.0 - -[Manufacturer] -%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64 - -[SourceDisksNames] - -[SourceDisksFiles] - -[DestinationDirs] -DefaultDestDir=12 - -[DriverInstall] -Include=mdmcpq.inf -CopyFiles=FakeModemCopyFileSection -AddReg=DriverInstall.AddReg - -[DriverInstall.Services] -Include=mdmcpq.inf -AddService=usbser, 0x00000002, LowerFilter_Service_Inst - -[DriverInstall.AddReg] -HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider" - -;------------------------------------------------------------------------------ -; Vendor and Product ID Definitions -;------------------------------------------------------------------------------ -; When developing your USB device, the VID and PID used in the PC side -; application program and the firmware on the microcontroller must match. -; Modify the below line to use your VID and PID. Use the format as shown below. -; Note: One INF file can be used for multiple devices with different VID and PIDs. -; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line. -;------------------------------------------------------------------------------ -[DeviceList] -%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A - -[DeviceList.NTx86] -%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A - -[DeviceList.NTamd64] -%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A - -[DeviceList.NTia64] -%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A - -;------------------------------------------------------------------------------ -; String Definitions -;------------------------------------------------------------------------------ -;Modify these strings to customize your device -;------------------------------------------------------------------------------ -[Strings] -MFGNAME="http://www.lufa-lib.org" -DESCRIPTION="LUFA CDC Class Bootloader" diff --git a/lib/lufa/Bootloaders/CDC/asf.xml b/lib/lufa/Bootloaders/CDC/asf.xml deleted file mode 100644 index 02e7063c66..0000000000 --- a/lib/lufa/Bootloaders/CDC/asf.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CDC Class Bootloader, capable of reprogramming a device using avrdude or other AVR109 protocol compliant software when plugged into a host. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/lufa/Bootloaders/CDC/doxyfile b/lib/lufa/Bootloaders/CDC/doxyfile deleted file mode 100644 index 414693479f..0000000000 --- a/lib/lufa/Bootloaders/CDC/doxyfile +++ /dev/null @@ -1,2396 +0,0 @@ -# Doxyfile 1.8.9 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "LUFA Library - CDC Class Bootloader" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = ./Documentation/ - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = YES - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = NO - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = NO - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = NO - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = NO - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = YES - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = ./ - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = *.h \ - *.c \ - *.txt - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = Documentation/ - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = __* \ - INCLUDE_FROM_* - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = NO - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = NO - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = YES - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = YES - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = YES - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = YES - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 1 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /